SQL Mastery: Tricky PostgreSQL MCQ Practice Tests
200 tricky SQL questions on NULLs, joins, grouping, CTEs, window functions, upserts and transactions on PostgreSQL 19
100% OFF- 0s on-demand video
- Certificate of Completion
- Mobile, TV & Desktop Access
- Full Lifetime Access
What you'll learn
Course Description
Test How Well You Really Know SQL
SQL looks simple until a query returns something you did not expect. Why does a filter for every status except closed skip some rows? Why does NOT IN suddenly return nothing? Why does a LEFT JOIN behave like an inner join once you add a WHERE clause? Why do two rows with the same date get the same running total? These practice tests check how well you can predict what PostgreSQL really does, one short query at a time.
What this practice test course offers:
- 200 original multiple-choice questions in 4 practice tests of 50, grouped by topic
- Short, self-contained queries you must reason about: what does the query return, what error does it raise, or what happens when two sessions run at the same time
- An explanation for every answer option, plus an overall explanation of the rule behind it
- Every query was run on PostgreSQL 19 in a fresh database, and every concurrency question in two real sessions, so every answer matches what the database really does
- Current PostgreSQL included: IGNORE NULLS for window functions and ON CONFLICT DO SELECT (19), RETURNING old and new and virtual generated columns (18), MERGE with RETURNING and NOT MATCHED BY SOURCE (17)
Topics covered:
- NULL and three-valued logic, IS DISTINCT FROM, COALESCE and NULLIF, sorting with NULLS FIRST and LAST
- Inner, outer, full, cross, natural and lateral joins, and conditions in ON versus WHERE
- Aggregates, GROUP BY, HAVING, FILTER, ROLLUP, CUBE, GROUPING and DISTINCT ON
- Scalar and correlated subqueries, EXISTS, IN, ANY and ALL, CTEs, recursive CTEs, CYCLE and SEARCH
- Window functions: ranking, lag and lead, frames with ROWS, RANGE and GROUPS, frame exclusion
- Data types: integer division, numeric versus float, rounding, casts, text, arrays, json and jsonb, dates, timestamps, time zones and intervals
- INSERT, UPDATE, DELETE, upserts with ON CONFLICT, MERGE, RETURNING, constraints, foreign keys, sequences and identity columns
- UNION, INTERSECT and EXCEPT, pagination, transactions, savepoints, isolation levels, row locks, and when an index can be used
Who should take this course?
- Developers and data analysts preparing for interviews where SQL questions come up
- Backend developers who write SQL every day and want to stop guessing about NULLs, joins and transactions
- Engineers moving to PostgreSQL from MySQL, SQL Server or Oracle who want to learn where it behaves differently
If you have never written a SELECT statement, start with an SQL fundamentals course and come back here to test yourself.
How to use the tests: take one test at a time, then read every explanation, including the ones for questions you answered correctly. Retake a test a few days later to check that the rules have stuck.
This course is independent and is not affiliated with or endorsed by the PostgreSQL Global Development Group.
Who this course is for:
- Developers and data analysts preparing for technical interviews that include SQL questions.
- Backend developers who use PostgreSQL every day and want a precise model of how queries behave.
- Engineers moving to PostgreSQL from MySQL, SQL Server or Oracle.
- Students who have finished an SQL course and want challenging practice questions.
More free Development courses
100% OFFTransformer Architectures & Attention Mechanisms Explained
100% OFFDesigning Automated AI Workflows & Pipelines
100% OFFFundamentals of Agentic AI and Multi-Agent Systems
100% OFF500+ Cloud Platform Engineer Interview Questions and Answers
Never miss a free coupon
Instructor coupons expire fast — often within hours of reaching 1,000 enrollments. Join our Telegram channel for instant alerts when new verified coupons drop.