All queries are made of intermediate "steps"; by the "programmer"; or the SQL engine. Most queries are just "added to" until they become incomprehensible. If one starts out with using "intermediate" queries and / or "temp tables", the "granularity" makes them more maintainable and re-usable. And surprisingly (or not) will outperform whatever the engine had trouble untangling. I see a lot of "I just wrote the biggest SQL query ever in one statement!" Yes; and that involves stored procedures.