Basic SELECT
Select one or more expressions from a table:Column Aliases
UseAS to name an output column, or omit AS and place the alias directly after the expression:
SELECT list can be referenced in ORDER BY.
SELECT *
Expand all columns from all referenced tables:SELECT DISTINCT
Deduplicate rows in the result set:ORDER BY
Sort results by one or more columns. Multiple sort keys are separated by commas:SELECT list are usable in ORDER BY:
LIMIT
Cap the number of rows returned:FETCH FIRST n ROWS ONLY is equivalent:
OFFSET skips a fixed number of rows before returning results:
For paginating through a full result set, prefer the
maxRows / resumeIdx API options over SQL OFFSET. See Pagination.