Services Work Learn About Contact
0/9
Lesson 7 of 9

JOINs

JOIN combines data from two or more tables. INNER JOIN returns only matching rows. LEFT JOIN returns all rows from the left table and matching rows from the right.

SQL
-- Inner Join: users who have orders
SELECT users.name, orders.total
FROM users
INNER JOIN orders ON users.id = orders.user_id;

-- Left Join: all users, even without orders
SELECT users.name, orders.total
FROM users
LEFT JOIN orders ON users.id = orders.user_id;
🧠

Quick Quiz

Answer correctly to unlock the next lesson.

Support the mission

This learning platform is 100% free: no ads, no tracking, no paywalls. If it helped you learn something useful, you can support future lessons or donate to Doctors Without Borders, which provides emergency medical care in crisis zones worldwide.

🎉

You completed SQL!

You finished all 9 lessons and quizzes. You now know the basics of SQL.