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
What are the student IDs for every student?
assistant
SELECT StuID FROM Sportsinfo GROUP BY StuID;
human
Which of those are for students who played more than 10 hours of a week for all sports?
assistant
SELECT StuID FROM Sportsinfo GROUP BY StuID HAVING SUM( hoursperweek ) > 10 ;