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
How many different manufacturers are there?
assistant
SELECT COUNT( * ) FROM manufacturer;
human
How many of them have fewer than 10 factories?
assistant
SELECT COUNT( * ) FROM manufacturer WHERE num_of_shops < 10;
human
Show their names and the years they opened.
assistant
SELECT name , open_year FROM manufacturer WHERE num_of_shops < 10 ;