50 real data engineering SQL interview problems grouped by pattern: window functions, gaps and islands, dedup, anti joins, sessionisation, SCD2 with MERGE, pivots, data quality checks, performance and NULL traps. Each gives sample data, the solution, the real output, why it works, Postgres vs Spark SQL differences and the common mistake. Every query was run and the outputs shown are actual results. Includes a one-page cheat sheet. 52 pages, 16 diagrams.