For each order, return customer_id, order_id, order_date and days_since_prev — days since that customer's previous order (NULL for their first).
25 rows with columns customer_id, order_id, order_date, days_since_prev — first 3 shown:
| # | ||||
|---|---|---|---|---|
| 1 | 3 | 1003 | 2024-01-20 | NULL |
| 2 | 3 | 1008 | 2024-03-15 | 55 |
| 3 | 3 | 1020 | 2024-09-08 | 177 |
Run your code to see the output here.