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
Which nations have hosts older than 45?
assistant
SELECT distinct Nationality FROM HOST WHERE Age > 45;
human
Which nations have hosts younger than 35?
assistant
SELECT distinct Nationality FROM HOST WHERE Age < 35;
human
Which nation has hosts both older than 45 and younger than 35?
assistant
SELECT Nationality FROM HOST WHERE Age > 45 INTERSECT SELECT Nationality FROM HOST WHERE Age < 35 ;