This illustrates the processing order:
Joins, WHERE, GROUP BY, and HAVING clauses
Partitions created, analytic functions applied to each row in each partition
Final ORDER BY