human
Schema:
Activity (actid, activity_name)
Participates_in (stuid, actid)
Faculty_Participates_in (FacID, actid)
Student (StuID, LName, Fname, Age, Sex, Major, Advisor, city_code)
Faculty (FacID, Lname, Fname, Rank, Sex, Phone, Room, Building)
Please answer with SQL.
assistant
Sure, I understand.
human
Hello there! Thank you for taking the time to work with me! Can you provide me with a list of all of the different activity names?
assistant
SELECT activity_name FROM Activity;
human
Can you filter that list to show the activity with the most student participants?
assistant
SELECT T1.activity_name FROM Activity AS T1 JOIN Participates_in AS T2 ON T1.actID = T2.actID GROUP BY T1.actID ORDER BY COUNT( * ) DESC LIMIT 1;
human
Great! Can you tell me how many students in total participated in football?
assistant
SELECT COUNT( distinct T2.stuid ) FROM Activity AS T1 JOIN Participates_in AS T2 ON T1.actID = T2.actID WHERE T1.activity_name = "Soccer" ;