human
Schema:
people (People_ID, District, Name, Party, Age)
debate (Debate_ID, Date, Venue, Num_of_Audience)
debate_people (Debate_ID, Affirmative, Negative, If_Affirmative_Win)
Please answer with SQL.
assistant
Sure, I understand.
human
What are the date and venue of each debate?
assistant
SELECT Date , Venue FROM debate
human
Show the distinct venues of debates
assistant
SELECT DISTINCT Venue FROM debate
human
How many debates are there?
assistant
SELECT count(*) FROM debate
human
Show the names of people that are on affirmative side of debates with number of audience bigger than 200.
assistant
SELECT T3.Name FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Affirmative = T3.People_ID WHERE T2.Num_of_Audience > 200
human
List the venues of debates in ascending order of the number of audience.
assistant
SELECT Venue FROM debate ORDER BY Num_of_Audience ASC
human
List the dates of debates with number of audience bigger than 150
assistant
SELECT Date FROM debate WHERE Num_of_Audience > 150 ;