General form, SELECT
statement:
SELECT column-1<,
... column-n>
FROM table-1
| view-1<, ... table-n
| view-n>
<WHERE expression>
<GROUP
BY column-1<,
... column-n>>
<HAVING expression>
<ORDER
BY column-1<,
... column-n>>;
SELECT
specifies the column(s)
that appear in the output
FROM
specifies the table(s)
or view(s) to be queried
WHERE
uses an expression
to subset or restrict the data based on one or more condition(s)
GROUP BY
classifies the data
into groups based on the specified column(s)
HAVING
uses an expression
to subset or restrict groups of data based on group condition(s)
ORDER BY
sorts the rows that
the query returns by the value(s) of the specified column(s).
|