A car rental company has a rentals table with columns car_ty…
A car rental company has a rentals table with columns car_type and days_rented. The operations team wants to know the longest rental period for each car type. Which SQL query should they use? SELECT car_type, MAX(days_rented) FROM rentals GROUP BY car_type SELECT car_type, days_rented FROM rentals ORDER BY days_rented DESC SELECT MAX(days_rented) FROM rentals SELECT car_type, SUM(days_rented) FROM rentals GROUP BY car_type Answer: SELECT car_type, MAX(days_rented) FROM rentals GROUP BY car_type Explanation: MAX(days_rented) finds the longest rental per car type when grouped accordingly. Simply ordering by days_rented shows all rentals but not summaries. A plain MAX(days_rented) gives the longest rental overall, not per type. SUM(days_rented) would calculate totals, not maximums.