INNER JOIN Practice
INNER JOIN returns only rows that have matches in BOTH tables. If there's no match, the row is excluded.
INNER JOIN Visualization
Table A Table B
+----+ +----+
| 1 | JOIN | 1 | ← Matched (included)
| 2 | ==== | 3 |
| 3 | | 4 | ← No match in A (excluded)
+----+ +----+
↑ No match in B (2 excluded)
Result: Only rows 1 and 3
Exercises
Loading exercise...
Loading exercise...
Loading exercise...
Loading exercise...
Loading exercise...
Using Table Aliases
Table aliases make queries more readable:
Loading exercise...
Free Practice
Loading SQL editor...
Try:
- Find the total spent by each user
- List products that have been ordered (join with order_items)
- Count products per category

