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 the game name that has most number of hours played.
assistant
SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid ORDER BY SUM( hours_played ) DESC LIMIT 1;
human
Show the game that least number of hours played.
assistant
SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid ORDER BY SUM( hours_played ) ASC LIMIT 1;
human
how many student played the game? | Would you like to know how many entries in the plays games table correspond to The Vanishing of Eric Calder? | yes
assistant
SELECT COUNT( * ) FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid WHERE GName = "The Vanishing of Eric Calder" ;