Consider a database called deliveryDB that has a table named driver_data . This table includes the columns driver_id (int), delivery_count (int), driving_time (float), and delivery_date (date). The delivery_count indicates how many deliveries the driver has completed, driving_time reflects the total hours spent driving, and delivery_date denotes the date of each delivery. The following SQL query filters the data for the past two months, calculates the efficiency of each driver, and identifies the least efficient driver: SELECT driver_id, SUM(delivery_count)/SUM(driving_time) AS efficiency FROM driver_data WHERE delivery_date >= CURDATE() - INTERVAL 2 MONTH GROUP BY driver_id ORDER BY efficiency ASC LIMIT 1; This query employs SUM to compute the overall delivery_count and driving_time for each driver over the past two months. The GROUP BY clause aggregates these totals by driver_id . Efficiency is determined by dividing the total delivery_count by the total driving_time . Finally, the ORDER BY and LIMIT clauses are utilized to select the driver with the lowest efficiency.