See exactly which rows match, which disappear, and where SQL adds NULL—then practice the logic yourself.
Local only
01 Choose your JOIN
Advanced joins · SEMI / ANTI
02 Match condition
Matching key values appear together.
All rows run in your browser. No account or external database. The generated SQL illustrates the selected JOIN; this is not a general SQL query executor.
LESSON 01 / 32
LIVE DATA · EDIT THE CELLS
Two tables. One relationship.
LIVE JOIN ENGINE
LIVE RESULT · FROM YOUR DATA
INNER JOIN results
0 rows
No rows satisfy this JOIN. Try a different key or JOIN type.
▦ Row-by-row match explorerUnderstand every pair
Select a pair to see why it matches.
⌘ Generated SQLCopy into your editor
✎ Edit tables & import CSVUse your own rows
Left table · CSV
Right table · CSV
CSV first row contains column names. Up to 8 columns and 30 rows per side. Empty cells represent NULL. Quoted commas are supported.
BUILT TO LEARN BY DOING
Go beyond the Venn diagram.
A Venn diagram can show which sets remain, but it hides duplicate matches and the NULL rows created by outer joins. This studio computes the full output table, lets you inspect every matching pair, and generates the corresponding SQL.
Why are there duplicate rows after JOIN?
A one-to-many relationship creates one output row for each matching pair. If a customer has three orders, their details appear three times in an INNER JOIN.
Does NULL ever match NULL with =?
No. SQL equality involving NULL is UNKNOWN; it is not TRUE. Empty CSV fields in this teaching studio are treated as SQL NULL, and NULL never matches in the ON comparison.
What do SEMI and ANTI mean?
LEFT SEMI returns each left row with at least one right-side match. LEFT ANTI returns each left row with no right-side match. The generated SQL uses EXISTS and NOT EXISTS.
Does this support arbitrary SQL?
No. This focuses on precise two-table JOIN semantics, comparison conditions, editable datasets, and 32 prediction challenges. It generates SQL but does not execute arbitrary pasted queries.