How to Understand Long and Complex SQL Queries
A “peel-and-understand-the-layer” strategy for complex SQL queries
A single SQL query for an ad hoc analysis or reporting could vary between 2–40 lines (typically). But when it comes to data pipelines and scheduled queries, a single SQL query could be hundreds of lines (easily! believe me).