SQL LEARNING PLATFORM
Aggregating by category — the analytics workhorse.
Learning Blocks
Interactive Queries
Concepts you'll master
Why JOINs exist and what problem they solve
INNER JOIN — only rows with a match in both tables
LEFT JOIN — all left rows, matched right rows (NULLs where no match)
RIGHT JOIN — the mirror of LEFT JOIN
SELF JOIN — a table joined to itself
Finding rows with no match using LEFT JOIN + IS NULL
🌟 Think of it this way: Two spreadsheets: one with customer names+IDs, another with order amounts+customer IDs. A JOIN merges them so you can see 'Ananya spent ₹1,45,148'. Without JOINs, you would have to manually cross-reference the sheets.
Returns rows only where there is a match in BOTH tables. Lisa (no orders) is excluded.
SELECT c.name, o.order_id, o.total, o.status FROM customers c INNER JOIN orders o ON c.customer_id = o.customer_id ORDER BY c.name, o.order_id;
Find customers and their order details only for orders greater than 3000. This shows how INNER JOIN works with filtering conditions.
SELECT c.name, o.order_id, o.total FROM customers c INNER JOIN orders o ON c.customer_id = o.customer_id WHERE o.total > 3000;
✅ Pro Tip: This is commonly used in business to identify high-value customers.
Practice your SQL skills