Show Shipping Addresses With No Orders

#3 · 3 of 10Free sample
Question

Show Shipping Addresses With No Orders

Which shipping addresses are never used by any order? Return shipping_id, address, and city. Use LEFT JOIN from shipping_addresses to orders; filter where order_id is NULL.
Tables
10 tables · 36 columns
customers7 cols
  • customer_idINTEGER
  • first_nameTEXT
  • last_nameTEXT
  • emailTEXT
  • cityTEXT
  • join_dateTEXT
  • phoneTEXT
orders4 cols
  • order_idINTEGER
  • customer_idINTEGER
  • shipping_idINTEGER
  • order_dateTEXT
categories2 cols
  • category_idINTEGER
  • category_nameTEXT
products3 cols
  • product_idINTEGER
  • product_nameTEXT
  • category_idINTEGER
departments2 cols
  • department_idINTEGER
  • department_nameTEXT
employees5 cols
  • employee_idINTEGER
  • first_nameTEXT
  • last_nameTEXT
  • hire_dateTEXT
  • department_idINTEGER
cities3 cols
  • city_idINTEGER
  • city_nameTEXT
  • stateTEXT
suppliers3 cols
  • supplier_idINTEGER
  • supplier_nameTEXT
  • city_idINTEGER
shipping_addresses3 cols
  • shipping_idINTEGER
  • addressTEXT
  • cityTEXT
inventory_movements4 cols
  • inventory_idINTEGER
  • product_idINTEGER
  • change_quantityINTEGER
  • reasonTEXT
Loading the practice editor and dataset…
Your answer(autosaved)
query.sql
Loading editor…
Sign up to unlock

The reference answer is one click away.

Free account unlocks the reference answer, the explanation, and the GPT tutor on every exercise in the library.

  • Reference answer + explanation revealed after each attempt
  • GPT tutor for every problem
  • Progress saved on the platform
  • 1,598 graded exercises
  • Free forever — no credit card
All exercises in SQL: LEFT JOIN