human
Schema:
Manufacturers (Code, Name, Headquarter, Founder, Revenue)
Products (Code, Name, Price, Manufacturer)
Please answer with SQL.
assistant
Sure, I understand.
human
Find the total revenue of companies of each founder.
assistant
SELECT sum(revenue) , founder FROM manufacturers GROUP BY founder
human
How many companies were created by Andy?
assistant
SELECT count(*) FROM manufacturers WHERE founder = 'Andy'
human
Find the name, headquarter and founder of the manufacturer that has the highest revenue.
assistant
SELECT name , headquarter , founder FROM manufacturers ORDER BY revenue DESC LIMIT 1
human
Who is the founder of Sony?
assistant
SELECT founder FROM manufacturers WHERE name = 'Sony'
human
Find the founder of the company whose name begins with the letter 'S'.
assistant
SELECT founder FROM manufacturers WHERE name LIKE 'S%'
human
What is the headquarter of the company whose founder is James?
assistant
SELECT headquarter FROM manufacturers WHERE founder = "James" ;