We use analytics and advertising cookies to understand how the site is used and whether our ads on Facebook and Instagram work. They are set only if you accept. See our Privacy Policy for details.
Joins combine rows from two or more tables on a matching key - INNER JOIN keeps only matches, LEFT JOIN keeps every row from the left side and fills the right with NULLs. Nearly every SQL screen leans on them, from a simple two-table lookup to three-table chains and the classic LEFT JOIN + IS NULL anti-join ("customers who never ordered"). If you only drill one topic before an interview, make it this one.
24 problems across 4 schemas · 3 free for registered users. Each runs your query in an isolated SQLite sandbox with instant, graded feedback.
A quick data question to warm up before you write SQL. No signup needed.
Product data arrives in three normalised source tables: product, subcategory and category. The reporting model needs a single product dimension, and a product's category history must be kept when it changes. How should the data be prepared?
Keep the syntax at your fingertips with the free SQL quick references, then come back and solve.