order_date from the Delivery table.AVG() function with a condition that checks if order_date equals customer_pref_delivery_date. This condition will return 1 for immediate orders and 0 for scheduled orders.ROUND() function to round the result to two decimal places.order_date.order_date in ascending order.
erDiagram
Delivery {
int delivery_id PK "Unique delivery identifier"
int customer_id "Identifier of the customer"
date order_date "Date when the order was placed"
date customer_pref_delivery_date "Preferred delivery date by the customer"
}