Railroad — SQL SELECT
The reading path of a SELECT statement: columns, FROM, joins, WHERE, GROUP BY, ORDER BY.
Make it your own.
select ::= "SELECT" [ "DISTINCT" ] columns "FROM" table { join } [ where ] [ groupby ] [ orderby ]
columns ::= "*" | column { "," column }
join ::= ( "JOIN" | "LEFT JOIN" ) table "ON" condition
where ::= "WHERE" condition { ( "AND" | "OR" ) condition }
groupby ::= "GROUP BY" column { "," column }
orderby ::= "ORDER BY" column [ "ASC" | "DESC" ]