Return the last step, not an earlier one (kite shop)
The query builds a Line Total column, but the result doesn't show it: the `in` clause returns an earlier step.
- Level
- beginner
- Time
- ~5 min
- Task
- Fix a broken query
- Access
- Free — no account needed
Loading the practice workspace…
About this exercise
What you'll practise
Understand that a query's result is the step named after `in`.
Northwind Kites sells kites and accessories through three regional stores. Orders are exported from the till system every week.
Steps
- The starter query keeps orders with
Qtyof 3 or more and addsLine Total= Qty × UnitPrice, but its result has no Line Total column. - Fix the query so it returns the final step. Don't change what the steps do.
- Keep all order columns plus
Line Total.
Your result must
- Only orders with Qty ≥ 3
- Line Total = Qty × UnitPrice
- All order columns kept
Input
- Orders (table)
- OrderID: text
- Customer: text
- Region: text
- Product: text
- Qty: number
- UnitPrice: number
- OrderDate: text
- Status: text
Expected output columns
OrderID (text), Customer (text), Region (text), Product (text), Qty (number), UnitPrice (number), OrderDate (text), Status (text), Line Total (number)
| OrderID | Customer | Region | Product | Qty | UnitPrice | OrderDate | Status | Line Total |
|---|---|---|---|---|---|---|---|---|
| 0002 | Quinn Whitlock | North | Stunt Kite | 6 | 54.24 | 2026-03-10 | Cancelled | 325.44 |
| 0003 | Dmitri Haddad | South | Stunt Kite | 3 | 33.7 | 2026-03-28 | Pending | 101.1 |
| 0005 | Sven Mensah | South | Delta Kite | 9 | 42.02 | 2026-02-19 | Pending | 378.18 |