Skip to content
Pricing

SQL Joins, Explained Visually

The same two tables, four joins: see the SQL, the rows, and where the NULLs come from.

  • Free
  • Interactive
  • No sign-up
query.sql
SELECT c.id, c.name, o.id, o.amount
FROM customers c
INNER JOIN orders o ON o.customer_id = c.id;

Only rows that match on BOTH sides. Dana (no orders) and order 103 (no customer) both vanish.

customersorders
Shaded: the rows INNER JOIN keeps
Result (3 rows)
c.idc.nameo.ido.amount
1Ava10040
1Ava10125
2Ben10260
customers
idname
1Ava
2Ben
3Cara
4Dana
orders
idcustomer_idamount
100140
101125
102260
103510

Runs entirely in your browser.

Other free tools

SQL is the core analyst skill

Data, business and product analyst roles, scraped daily from company career pages.

Browse analyst jobs
Raj