human
Schema:
entrepreneur (Entrepreneur_ID, People_ID, Company, Money_Requested, Investor)
people (People_ID, Name, Height, Weight, Date_of_Birth)
Please answer with SQL.
assistant
Sure, I understand.
human
What are the names of entrepreneurs?
assistant
SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID
human
List the companies and the investors of entrepreneurs.
assistant
SELECT Company , Investor FROM entrepreneur
human
How many entrepreneurs are there?
assistant
SELECT count(*) FROM entrepreneur
human
What are the investors that have invested in at least two entrepreneurs?
assistant
SELECT Investor FROM entrepreneur GROUP BY Investor HAVING COUNT(*) >= 2
human
What is the investor that has invested in the most number of entrepreneurs?
assistant
SELECT Investor FROM entrepreneur GROUP BY Investor ORDER BY COUNT(*) DESC LIMIT 1
human
How many entrepreneurs correspond to each investor?
assistant
SELECT Investor , COUNT( * ) FROM entrepreneur GROUP BY Investor ;