human
Schema:
manufacturer (Manufacturer_ID, Open_Year, Name, Num_of_Factories, Num_of_Shops)
furniture (Furniture_ID, Name, Num_of_Component, Market_Rate)
furniture_manufacte (Manufacturer_ID, Furniture_ID, Price_in_Dollar)
Please answer with SQL.
assistant
Sure, I understand.
human
What is the average number of shops for manufacturers?
assistant
SELECT AVG ( Num_of_Shops ) FROM manufacturer;
human
How about the minimum?
assistant
SELECT MIN( Num_of_Shops ) FROM manufacturer;
human
Which manufacturer has the fewest shops?
assistant
SELECT * FROM manufacturer ORDER BY Num_of_Shops DESC LIMIT 1 ;