...
Everything starts with a FROM table. which is JOINED other tables to produce a new one.
Then the table (1) above is pruned horizontally with WHERE by dropping all the records no matching the conditions
The new table (2) is pruned vertically then, to match the SELECT columns only.
DISTINCT removes all the duplicate records in (3)
GROUP BY will create a new table from (4) grouping by the provide columns.
HAVING will prune the previous (5) table by removing all the records no matching the conditions. HAVE acts similarly to the WHERE clause for the GROUP BY.
The filtered grouped table (6) will be ORDER BY some columns
OFFSET N will skip N first records in (7)
and LIMIT M will take the output table from (8) and remove all the records after the M first ones.
...