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
Show the company of the tallest entrepreneur.
assistant
SELECT T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Height DESC LIMIT 1
human
What are the investors of entrepreneurs and the corresponding number of entrepreneurs invested by each investor?
assistant
SELECT Investor , COUNT(*) FROM entrepreneur GROUP BY Investor
human
List the companies of entrepreneurs in descending order of money requested.
assistant
SELECT Company FROM entrepreneur ORDER BY Money_Requested DESC
human
List the companies and the investors of entrepreneurs.
assistant
SELECT Company , Investor FROM entrepreneur
human
List the names of entrepreneurs and their companies in descending order of money requested?
assistant
SELECT T2.Name , T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Money_Requested
human
Count the number of different companies.
assistant
SELECT COUNT( DISTINCT Company ) FROM entrepreneur ;