Logistics teams at DoorDash categorize orders based on how quickly the customer wants their food. If the customer's preferred delivery date is the same as the order date, the order is called immediate; otherwise, it is called scheduled.
Write an SQL query to find the percentage of immediate orders in the table, rounded to 2 decimal places.
| delivery_id(INTEGER) | customer_id(INTEGER) | order_date(DATE) | customer_pref_delivery_date(DATE) |
|---|---|---|---|
| 1 | 1 | 2024-08-01 | 2024-08-01 |
| 2 | 2 | 2024-08-02 | 2024-08-05 |
| 3 | 1 | 2024-08-11 | 2024-08-12 |
| 4 | 3 | 2024-08-24 | 2024-08-24 |
| 5 | 3 | 2024-08-21 | 2024-08-22 |
| 6 | 2 | 2024-08-11 | 2024-08-13 |
| immediate_percentage(FLOAT) |
|---|
| 33.33 |