Company: Intuit_21_jan
Difficulty: medium
SQL Problem: Detect Anomalies in Delivery Times SQL: Detect Anomalies in Delivery Times Description/Schema A logistics company wants to identify unusually long delivery times for different routes to optimize their delivery operations and improve customer satisfaction. The goal is to generate a report highlighting orders that took significantly longer than expected based on historical route performance. The result should have the following columns: order_id / route_id / actual_delivery_time / avg_route_delivery_time . order_id - Unique identifier for the order. route_id - Unique identifier for the route. actual_delivery_time - The time taken to deliver the order, calculated in hours as the difference between delivery_end and delivery_start , converted to hours and set to two decimal places, including trailing zeros if necessary (e.g., 5.00). avg_route_delivery_time - The average delivery time for the same route, calculated in hours across all orders for that route and set to two decimal