SQL learning guides
Learn the reasoning behind a query before testing it against real rows. These PostgreSQL guides are free to read and do not require an account.
Choose a topic
- NULL, joins and missing customers โ preserve unmatched rows, avoid NOT IN traps and choose reliable counts.
- SQL aggregation without misleading counts โ define the row grain, filter paid orders and distinguish missing amounts from zero.
- Window functions: order, frames and ties โ build running totals, choose ranking rules and make ordering deterministic.
A useful practice routine
Read the example, predict the output and explain why each row should appear. Run the query, then change one edge case: remove matching rows, add a duplicate or introduce NULL. Compare the new result with your prediction. Use public SQL practice for authored datasets, actual output and debugging feedback.
Browser checks are learning feedback. For information about how MockDojo distinguishes local practice, AI estimates and verified evidence, read About MockDojo. Send corrections through Contact.