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 distinct manufacturers are there?
assistant
SELECT COUNT( DISTINCT manufacturer_id ) FROM manufacturer;
human
How many produce furniture?
assistant
SELECT COUNT( DISTINCT t1.manufacturer_id ) FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id ;