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; 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;