Gap Between Apple and Orange Sales
For each sale date return the difference between apples sold and oranges sold. Return sale_date and diff.
Expected output sample
This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables.
| diff | sale_date |
|---|---|
| 4 | 2024-01-01 |
| -5 | 2024-01-02 |
| 15 | 2024-01-03 |
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign in