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
Which game type has least number of games?
assistant
SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) LIMIT 1
human
How many video games have type Massively multiplayer online game?
assistant
SELECT count(*) FROM Video_games WHERE gtype = 'Massively multiplayer online game'
human
Show all video game types.
assistant
SELECT DISTINCT gtype FROM Video_games
human
Which game type has most number of games?
assistant
SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) DESC LIMIT 1
human
How many video games exist?
assistant
SELECT count(*) FROM Video_games
human
How many video game types exist?
assistant
SELECT COUNT( DISTINCT gtype ) FROM Video_games ;