Home / SQL / Combining data

JOINs

A JOIN combines rows from two tables that share a matching column. INNER JOIN keeps only matches. You pick the columns with select.

SELECT c.name, o.total
FROM customers c
JOIN orders o ON o.customer_id = c.id;

Test yourself on this