Return
day: the date of activityregion: the sales regionsignup_count: number of signups on that day (from signups table)orders: number of orders in that region on that daysignup_per_order: the ratio of signups to orders (as a decimal)
Only include rows where orders is at least 10. Order the results by day ascending, then region ascending.Expected output
| day | region | signup_count | orders | signup_per_order |
|---|---|---|---|---|
| 2023-01-01 | GB | 33 | 10 | 3.3 |
| 2023-01-01 | US | 33 | 11 | 3 |
| 2023-01-02 | DE | 61 | 17 | 3.588235294117647 |
First 3 of 186 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 4 hints revealed
Submit an attempt first.