human
Schema:
Manufacturers (Code, Name, Headquarter, Founder, Revenue)
Products (Code, Name, Price, Manufacturer)
Please answer with SQL.
assistant
Sure, I understand.
human
What is the average price of all products?
assistant
SELECT AVG ( price ) FROM products;
human
And what is the average price for each company?
assistant
SELECT AVG ( price ) , manufacturer FROM products GROUP by manufacturer;
human
What are all companies names?
assistant
SELECT name FROM manufacturers ;