Write a SQL query to calculate the difference in days between consecutive order dates for each customer in a transactions table.
Exclude transactions with a NULL order date. Use transaction_id to break ties when a customer has multiple transactions on the same date.
customer_id, transaction_id, order_date, previous_order_date, and days_since_previous_order.customer_id, order_date, and transaction_id ascending.| Column | Type | Description |
|---|---|---|
| transaction_idPK | INT | Unique transaction identifier |
| customer_id | INT | Customer associated with the transaction |
| order_date | DATE | Date on which the order was placed |