signups and daily_sales tables.Return
day: the calendar daytotal_revenue: total sales revenue across all regions for that daytotal_orders: total number of orders across all regions for that dayavg_order_value: average revenue per order for that daysignup_count of 20 or more, and list results in ascending order by day.Expected output
| day | total_revenue | total_orders | avg_order_value |
|---|---|---|---|
| 2023-01-01 | 900 | 18 | 50 |
| 2023-01-02 | 1786 | 36 | 49.61111111111111 |
| 2023-01-03 | 1772 | 35 | 50.62857142857143 |
First 3 of 40 rows your query should return. Your column aliases don't need to match.
daily_sales
| day | region | revenue | orders |
|---|---|---|---|
| 2023-01-01 | US | 490 | 10 |
| 2023-01-02 | US | 1028 | 21 |
| 2023-01-03 | US | 966 | 19 |
| 2023-01-04 | US | 1014 | 20 |
| 2023-01-05 | US | 1062 | 21 |
signups
| day | signup_count |
|---|---|
| 2023-01-01 | 25 |
| 2023-01-02 | 92 |
| 2023-01-03 | 24 |
| 2023-01-04 | 66 |
| 2023-01-05 | 108 |
0 of 4 hints revealed
Submit an attempt first.