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
How many game types do you have?
assistant
SELECT COUNT( distinct gtype ) FROM Video_games;
human
What is the average number of games in all game types?
assistant
SELECT gtype , COUNT( * ) FROM Video_games GROUP BY gtype;
human
Finally, which game type has the least number of games?
assistant
SELECT gtype FROM Video_games GROUP BY gtype ORDER BY COUNT( * ) LIMIT 1 ;