CodeAgeBy Sitezack
SQL for ProsSQL with SQLite0 XP
Chapter progress0/6

Lesson 6 of 7

JOIN: cross two tables

Relational databases shine with JOIN: link orders to customers via orders.customer_id = customers.id.

SELECT customers.name FROM customers JOIN orders ON orders.customer_id = customers.id WHERE … — and every order finds its customer.

SELECT customers.name FROM customers JOIN orders ON orders.customer_id = customers.id WHERE orders.amount > 100;

🎯 Exercise

Both tables are provided. Return the name of customers who bought a laptop (JOIN + WHERE product = 'laptop'), sorted by name.

PRO lesson

This advanced chapter is part of CodeAge PRO. Unlock it to keep your adventure going.

Discover PRO