Pivot months into columns, summing repeated entries (garden)
Each store can have several sales lines per month. Pivot Month into columns with the total Sales per store and month.
- Level
- intermediate
- Time
- ~9 min
- Task
- Build the query
- Access
- Pro
Checking your access…
About this exercise
What you'll practise
Pivot with an aggregation so duplicate combinations are summed, not an error.
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
- Lines (table)
- Store: text
- Month: text
- Sales: number
Expected output columns
Store (text), Jan (number), Feb (number), Mar (number)