Return
region: the sales regionyear_week: the year and week label in 'YYYY-WW' formattotal_revenue: total revenue generated in that weektotal_orders: total number of orders in that weektotal_signups: total number of new signups in that week
Include all region-week combinations where there were sales, even if there were no signups (showing signups as 0 in that case). Order the results by region and then by year_week ascending.Expected output
| region | year_week | total_revenue | total_orders | total_signups |
|---|---|---|---|---|
| DE | 2023-00 | 467.5 | 9 | 33 |
| DE | 2023-01 | 5373.28 | 108 | 382 |
| DE | 2023-02 | 5736.23 | 116 | 413 |
First 3 of 35 rows your query should return. Your column aliases don't need to match.
daily_sales
| day | region | revenue | orders |
|---|---|---|---|
| 2023-01-01 | US | 550 | 11 |
| 2023-01-02 | US | 1010 | 20 |
| 2023-01-03 | US | 1020 | 20 |
| 2023-01-04 | US | 1030 | 21 |
| 2023-01-05 | US | 1040 | 21 |
signups
| day | signup_count |
|---|---|
| 2023-01-01 | 33 |
| 2023-01-02 | 61 |
| 2023-01-03 | 61 |
| 2023-01-04 | 62 |
| 2023-01-05 | 63 |
0 of 3 hints revealed
Submit an attempt first.