This is probably a good time to review the order in which SELECT statement clauses are to be specified. Table 10.2 lists all the clauses we have learned thus far, in the order they must be used.
Clause | Description | Required |
---|---|---|
SELECT | Columns or expressions to be returned | Yes |
FROM | Table to retrieve data from | Only if selecting from a table |
WHERE | Row-level filtering | No |
GROUP BY | Group specification | Only if calculating aggregates by group |
HAVING | Group-level filtering | No |
ORDER BY | Output sort order | No |
18.117.165.66