


Practice the SQL that data engineering work really needs.
This course contains practice tests on the SQL behind pipelines, data warehouses and analytics: from joins and NULL handling to window functions, query plans, indexes and dimensional modeling. Each test covers one area, so you can work through the topics one at a time and see exactly where you need to study more. Every question explains why the correct answer works, what each of the other options really does and when you would use it instead, and links to the official documentation page it's based on. So a single question teaches you four ideas, not one.
· Practice Test 1 - SELECT, Joins and Aggregation: filtering, aliases, ORDER BY and LIMIT, inner and outer joins, anti-joins, GROUP BY, HAVING, ROLLUP and CUBE, medians and percentiles, string_agg, date ranges and time zones
· Practice Test 2 - NULLs, Set Operations and Subqueries: three-valued logic, COALESCE and NULLIF, CASE, UNION, INTERSECT and EXCEPT, scalar and correlated subqueries, EXISTS, IN and the NOT IN trap, IS DISTINCT FROM, relational division ('bought every product') and comparing two tables with EXCEPT ALL
· Practice Test 3 - Window Functions: ROW_NUMBER, RANK and DENSE_RANK, LAG and LEAD, running totals and moving averages, ROWS, RANGE and GROUPS frames, deduplication, gaps and islands, cohorts, z-score outliers and Snowflake's QUALIFY
· Practice Test 4 - CTEs and Query Execution: CTEs and their materialization, recursive queries and cycle detection, data-modifying CTEs, hierarchies with ltree, materialized views, LATERAL and WITH ORDINALITY, function volatility, EXPLAIN and EXPLAIN ANALYZE, join methods and partition pruning
· Practice Test 5 - Optimisation and Indexes: B-tree, hash, GIN and BRIN indexes, covering and partial indexes, full-text search, statistics and pg_stat_statements, keyset pagination, fillfactor and HOT updates, isolation levels, parallel query, reading execution plans
· Practice Test 6 - Modelling and Pipelines: slowly changing dimensions (Kimball Types 0 to 7), change data capture, MERGE and upserts, idempotent and incremental loads, watermarks, bulk loading with COPY, job queues with SKIP LOCKED, dbt snapshots, materializations, tests and incremental models
Checked against the documentation
PostgreSQL is the default dialect, and every fact is checked in the current PostgreSQL documentation. Where products differ, the explanation says so, and questions about Spark, Snowflake, dbt, Kafka or Debezium name the product and follow its own docs. Modeling questions follow the Kimball Group's dimensional modeling techniques.
Who it's for
Data engineers, analytics engineers and analysts who want to test and deepen their SQL, and developers preparing for SQL-heavy data engineering interviews.
How to use it
Take one test at a time and review every explanation, including those for the answers you got right. Try the queries in a local PostgreSQL database if you have one. Retake a test until you score above 80%.
Please note
These are original practice questions. They help you learn and test your knowledge, but they don't guarantee success in an interview or assessment. This course isn't affiliated with or endorsed by the PostgreSQL project or any of the other products mentioned. All product names are trademarks of their respective owners.