WeCodeAcademy

LEFT JOIN

INNER JOIN drops rows with no match. LEFT JOIN keeps every row from the left table and fills the gaps with NULL. Which customers never ordered anything?

Examplesql
Open in editor »
Examplesql
Open in editor »

Only Zoe appears: she is the one customer with no matching order row. Her order_id was NULL in the first query.

Quick check

What does LEFT JOIN do that INNER JOIN does not?

Your turn: write the code

Return the names of customers who have never placed an order.

Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.

Tip: use the left and right arrow keys to move between lessons.