human
Schema:
party (Party_ID, Party_Theme, Location, First_year, Last_year, Number_of_hosts)
host (Host_ID, Name, Nationality, Age)
party_host (Party_ID, Host_ID, Is_Main_in_Charge)
Please answer with SQL.
assistant
Sure, I understand.
human
whats the average age of the hosts?
assistant
SELECT AVG ( age ) FROM HOST;
human
and how many of those 8 hosts are younger than 40?
assistant
SELECT COUNT( * ) FROM HOST WHERE Nationality = "United States" AND age < 40 ;