← SQL Analyst Starter

Lesson 3 of 4

Join and keep unmatched orders

Use a left join for a complete order list.

Do the work

  1. Join orders.customer_id to customers.customer_id.
  2. LEFT JOIN keeps unmatched and NULL-key orders.
  3. A missing name remains SQL NULL, not an empty string.

See the method

Orders are the left table.

Read every demonstration step
  1. Orders are the left table.
  2. Join customers by their ID.
  3. Order 5 has no matching customer and remains in the output.

Practice independently

Take it further

Joining by email would duplicate customers sharing an email.