NAME
select - selects rows and columns from a table.
SYNOPSIS
select {*|expression}[, ...] FROM table_name [ORDER BY expression [{ASC|DESC}] [, ...]]
where expression can be one of:
count(*) Counts the number of rows (aggregate function).
column The column value.
column.join Follows foreign key relationship, selects the joined column from
the foreign table. Any number of joins may be performed.
column::type Casts the column value to the given type.
Only a single cast is supported.
column.join::type One or more joins may be followed by a single cast.
Column names with dots may be double-quoted to avoid being interpreted as a join:
For example:
SELECT "creditCard.expirationMonth" FROM credit_card_transactions
When arguments parsed externally, will need to escape for the shell:
aosh SELECT \"creditCard.expirationMonth\" FROM credit_card_transactions
Aggregate functions:
May not combine aggregate functions with non-aggregate functions.
May not use ORDER BY with aggregate functions.
|