Your question is SQL: Revenue Per Customer and Change. Start with the requirements and the one table on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Given table column names, write SQL to calculate the revenue per customer for July, and then calculate the change from June to July.
Asked in the Round 1 Video Interview stage.
| Column | Type | Description |
|---|---|---|
| order_idPK | INT | Unique order identifier |
| customer_id | INT | Customer placing the order |
| order_date | DATE | Date the order was placed |
| revenue | DECIMAL(10,2) | Revenue from the order |