fromSubquery

abstract fun fromSubquery(subquery: String, alias: String? = null): SelectQueryBuilder

Uses the result of another query as a data source (derived table). Automatically wraps the subquery in parentheses and adds an alias when provided.

Parameters

subquery

SQL string containing the subquery.

alias

Name (alias) that will be assigned to the derived table.