SELECT [ DISTINCT ] select_expr [, select_expr, ... ]
FROM table_ref [, table_ref ...]
[WHERE where_condition]
[GROUP BY column_def [ASC | DESC], ... ]
[HAVING group_by_where_condition]
[ORDER BY column_def [ASC | DESC], ... ]
[LIMIT row_count OFFSET offset ]
table_ref:
table_factor
| CROSS JOIN
| INNER JOIN table_factor ON conditional_expr
| { LEFT | RIGHT } JOIN table_factor ON conditional_expr
📚 SELECT