Company: Uber Data science_8oct
Difficulty: medium
Problem Description Write a SQL query to generate a report summarizing the offer statistics for all available auction lots. The report should detail the total number of offers as well as the minimum, average, and maximum offer amounts for each lot. Schema Table: lots Column Name Data Type Constraint Description id INT PRIMARY KEY Lot ID name VARCHAR(255) Name of the auction lot Table: offers Column Name Data Type Constraint Description lot_id INT FOREIGN KEY (lots.id) Associated Lot ID amount DECIMAL(6,2) Amount of the offer Required Output Your query should return a result set with the following columns in exact order: name : The name of the lot. offers : The total number of offers made for the lot. min_offer : The minimum offer amount. avg_offer : The average offer amount. max_offer : The maximum offer amount. Constraints or Notes All Lots Inclusion: Include all lots in the result, even those with no offers. For lots with zero offers, the offers count should be 0 , and the min_offer