human
Schema:
Student (StuID, LName, Fname, Age, Sex, Major, Advisor, city_code)
Video_Games (GameID, GName, GType)
Plays_Games (StuID, GameID, Hours_Played)
SportsInfo (StuID, SportName, HoursPerWeek, GamesPlayed, OnScholarship)
Please answer with SQL.
assistant
Sure, I understand.
human
Show all student IDs with more than a total of 10 hours per week on all sports played please.
assistant
SELECT StuID FROM Sportsinfo GROUP BY StuID HAVING SUM( hoursperweek ) > 10;
human
Which of those were just football?
assistant
SELECT StuID FROM Sportsinfo WHERE SportName = 'Football';
human
What's the average hours per week all students played football?
assistant
SELECT AVG ( HoursPerWeek ) FROM SportsInfo WHERE SportName = 'Football';
human
What's the average hours per week all students played athletics?
assistant
SELECT AVG ( HoursPerWeek ) FROM SportsInfo;
human
What are all sports names?
assistant
SELECT distinct SportName FROM SportsInfo ;