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
How many people have ever been on the affirmative side of debates?
assistant
SELECT COUNT( * ) FROM people WHERE People_id IN ( SELECT Affirmative FROM debate_people );
human
What is the average size of the audience in a debate?
assistant
SELECT AVG ( Num_of_Audience ) FROM debate;
human
How many debates have an audience size bigger than 200?
assistant
SELECT COUNT( * ) FROM debate WHERE Num_of_Audience > 200 ;