Junior data analyst interview · question 5
Be sure of the number before you say it.
Week of 21 September: sales −91% on the week before. Your manager wants to warn the CEO today. What do you say?
SELECT date_trunc('week', created_at),
SUM(items_total_eur)
FROM orders
WHERE status = 'paid'
GROUP BY 1
ORDER BY 1| week | SUM |
|---|---|
| 31 Aug | €149,812 |
| 7 Sep | €150,503 |
| 14 Sep | €230,967 |
| 21 Sep | €21,363 |
Pick your answer
New to SQL? Learn SQL from zero — free Keep your progress: free account