Artificial Intelligence, Machine Learning, Data Science, Python, Programming.
input: query_str: Calculate the average number of days between order placement and shipment for all orders shipped last year, and identify the customer with the longest average shipping delay? sql_query: SELECT AVG(DATEDIFF(SalesOrder.ShippedDate, SalesOrder.OrderDate)) AS AverageDays,