Keep the last seven days of data, relative to the data (kite shop)
Keep orders from the 7 days ending on the latest OrderDate in the export, so the query rolls forward on every refresh.
- Level
- intermediate
- Time
- ~8 min
- Task
- Build the query
- Access
- Pro
Checking your access…
About this exercise
What you'll practise
Filter relative to a value computed from the data instead of a typed date or the clock.
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
Expected output columns
OrderID (text), Customer (text), Region (text), Product (text), Qty (number), UnitPrice (number), OrderDate (date), Status (text)