Pivot categories and add a total that includes future columns (consultancy)
Pivot expense categories into columns (summing amounts), then add a Total across every category column, including new ones.
- Level
- advanced
- Time
- ~12 min
- Task
- Build the query
- Access
- Pro
Checking your access…
About this exercise
What you'll practise
Compute a row total across columns that are created dynamically.
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
- Claims (table)
- Employee: text
- Category: text
- Amount: number
Expected output columns
Employee (text), Travel (number), Meals (number), Lodging (number), Total (number)