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
Who are all the party hosts?
assistant
SELECT * FROM party_host;
human
What are their names?
assistant
SELECT T2.NAME FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID;
human
Show the locations of parties they host along with their names.
assistant
SELECT T3.Location , T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID ;