Look up each order's customer city (bakery)
Merge Orders with Customers on Customer and expand City, keeping every order.
- Level
- intermediate
- Time
- ~9 min
- Task
- Build the query
- Access
- Pro
Checking your access…
About this exercise
What you'll practise
Use a left outer join to add lookup columns without losing rows.
The scenario, sample data, step list, hints and solution open with Pro. Grading checks your query against hidden data as well as the visible sample, so a query that only fits the sample doesn't pass.
Input
- Orders (table)
- OrderID: text
- Customer: text
- Region: text
- Product: text
- Qty: number
- UnitPrice: number
- OrderDate: text
- Status: text
- Customers (table)
- Customer: text
- City: text
- Segment: text
Expected output columns
OrderID (text), Customer (text), Region (text), Product (text), Qty (number), UnitPrice (number), OrderDate (text), Status (text), City (text (some rows null))