db_id stringclasses 69
values | schema stringclasses 69
values | m_schema stringclasses 69
values | question stringlengths 24 325 | sql stringlengths 23 804 | evidence stringlengths 0 673 |
|---|---|---|---|---|---|
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Which is the publisher for the game "Prism: Light the Way"? | SELECT T1.publisher_name FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id INNER JOIN game AS T3 ON T2.game_id = T3.id WHERE T3.game_name = 'Prism: Light the Way' | publisher refers to publisher_name; game "Prism: Light the Way" refers to game_name = 'Prism: Light the Way' |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | List the platforms that release the most games each year. | SELECT T1.platform_name FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN game_publisher AS T3 ON T2.game_publisher_id = T3.id GROUP BY T2.release_year, T1.platform_name ORDER BY COUNT(DISTINCT T3.game_id) DESC | platform refers to platform_id; the most games refers to max(count(game_publisher_id)) |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | How many games do not have any sales in Europe? | SELECT COUNT(*) FROM region_sales AS T1 INNER JOIN region AS T2 ON T1.region_id = T2.id WHERE T2.region_name = 'Europe' AND T1.num_sales = 0 | do not have any sales refers to num_sales = 0; in Europe refers to region_name = 'Europe' |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | What are the games that were released in 2006? | SELECT T3.game_name FROM game_platform AS T1 INNER JOIN game_publisher AS T2 ON T1.game_publisher_id = T2.id INNER JOIN game AS T3 ON T2.game_id = T3.id WHERE T1.release_year = 2006 | game refers to game_name; released in 2006 refers to release_year = 2006 |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | What is the genre of the game "Mario vs. Donkey Kong"? | SELECT T1.genre_name FROM genre AS T1 INNER JOIN game AS T2 ON T1.id = T2.genre_id WHERE T2.game_name = 'Mario vs. Donkey Kong' | genre refers to genre_name; game "Mario vs. Donkey Kong" refers to game_name = 'Mario vs. Donkey Kong' |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Which publisher published the most games? | SELECT T.publisher_name FROM ( SELECT T1.publisher_name, COUNT(DISTINCT T2.game_id) FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id GROUP BY T1.publisher_name ORDER BY COUNT(DISTINCT T2.game_id) DESC LIMIT 1 ) t | publisher refers to publisher_name; the most games refers to max(count(game_id)) |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | List all the platform games. | SELECT T2.game_name FROM genre AS T1 INNER JOIN game AS T2 ON T1.id = T2.genre_id WHERE T1.genre_name = 'Platform' | platform game refers to genre_name = 'Platform'; game refers to game_name |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | What are the years that "WiiU" got a new game? | SELECT T2.release_year FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id WHERE T1.platform_name = 'WiiU' ORDER BY T2.release_year DESC LIMIT 1 | year refers to release_year; "WiiU" refers to platform_name = 'WiiU' |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Which game has the most sales in Japan? | SELECT T5.game_name FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id INNER JOIN game_platform AS T3 ON T2.game_platform_id = T3.id INNER JOIN game_publisher AS T4 ON T3.game_publisher_id = T4.id INNER JOIN game AS T5 ON T4.game_id = T5.id WHERE T1.region_name = 'Japan' ORDER BY T2.num_sales DESC ... |
which game refers to game_name; most sales refers to MAX(num_sales); Japan refers to region_name = 'Japan'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | List the games from the publisher "Activision". | SELECT T3.game_name FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id INNER JOIN game AS T3 ON T2.game_id = T3.id WHERE T1.publisher_name = 'Activision' | games refers to game_name; "Activision" refers to publisher_name = 'Activision'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | How many different publishers have published a game that starts with "Marvel"? | SELECT COUNT(DISTINCT T1.publisher_id) FROM game_publisher AS T1 INNER JOIN game AS T2 ON T1.game_id = T2.id WHERE T2.game_name LIKE 'Marvel%' | game that starts with "Marvel" refers to game_name LIKE 'Marvel%'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | What percentage of games are sports? | SELECT CAST(COUNT(CASE WHEN T1.genre_name = 'Sports' THEN T2.id ELSE NULL END) AS REAL) * 100 / COUNT(T2.id) FROM genre AS T1 INNER JOIN game AS T2 ON T1.id = T2.genre_id | percentage = MULTIPLY(DIVIDE(SUM(genre_name = 'sport'), COUNT(game_name)), 100.0); sports refers to genre_name = 'sport'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | What is the ratio of game sales between North America and Japan? | SELECT SUM(CASE WHEN T2.region_name = 'North America' THEN T1.num_sales ELSE 0 END) / SUM(CASE WHEN T2.region_name = 'Japan' THEN T1.num_sales ELSE 0 END) FROM region_sales AS T1 INNER JOIN region AS T2 ON T1.region_id = T2.id | ratio = DIVIDE(SUM(num_sales WHERE region_name = 'North America'), SUM(num_sales WHERE region_name = 'Japan')); North America refers to region_name = 'North America'; Japan refers to region_name = 'Japan'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Which year has the most number of video game releases? | SELECT T1.release_year FROM ( SELECT T.release_year, COUNT(id) FROM game_platform AS T GROUP BY T.release_year ORDER BY COUNT(T.id) DESC LIMIT 1 ) T1 | year that has the most number of video game releases refers to MAX(COUNT(release_year)); |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | How many video game publishers have Interactive in their names? | SELECT COUNT(T.id) FROM publisher AS T WHERE T.publisher_name LIKE '%Interactive%' | publishers that have Interactive in their names refers to publisher_name LIKE '%Interactive%'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | What are the top 2 platforms with the most sales in North America? | SELECT T4.platform_name FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id INNER JOIN game_platform AS T3 ON T2.game_platform_id = T3.id INNER JOIN platform AS T4 ON T3.platform_id = T4.id WHERE T1.region_name = 'North America' ORDER BY T2.num_sales DESC LIMIT 2 | platforms refers to platform_name; most sales refers to MAX(num_sales); North America refers to region_name = 'North America'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | How many games did BMG Interactive Entertainment release in 2012? | SELECT COUNT(DISTINCT T2.game_id) FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id INNER JOIN game_platform AS T3 ON T2.id = T3.game_publisher_id WHERE T3.release_year = 2012 | BMG Interactive Entertainment refers to publisher_name = 'BMG Interactive Entertainment'; release in 2012 refers to release_year = 2012; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | What is the name of the publisher that released the most video games in 2007? | SELECT T3.publisher_name FROM game_platform AS T1 INNER JOIN game_publisher AS T2 ON T1.game_publisher_id = T2.id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id WHERE T1.release_year = 2007 GROUP BY T3.publisher_name ORDER BY COUNT(DISTINCT T2.game_id) DESC LIMIT 1 | name of the publisher refers to publisher_name; publisher that released the most video games in 2007 refers to MAX(COUNT(publisher_name)) WHERE release_year = 2007; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | How many publishers published the Minecraft game? | SELECT COUNT(T2.publisher_id) FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id WHERE T1.game_name = 'Minecraft' | Minecraft refers to game_name = 'Minecraft'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Which publisher has published the most number of Action games? | SELECT T.publisher_name FROM ( SELECT T4.publisher_name, COUNT(DISTINCT T2.id) FROM genre AS T1 INNER JOIN game AS T2 ON T1.id = T2.genre_id INNER JOIN game_publisher AS T3 ON T2.id = T3.game_id INNER JOIN publisher AS T4 ON T3.publisher_id = T4.id WHERE T1.genre_name = 'Action' GROUP BY T4.publisher_name ORDER BY COUN... | which publisher refers to publisher_name; publisher that has published the most number of Action games refers to MAX(COUNT(publisher_name)) WHERE genre_name = 'Action'; Action games refers to game_name WHERE genre_name = 'Action'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | How many Sports games did Nintendo publish? | SELECT COUNT(T3.id) FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id INNER JOIN game AS T3 ON T2.game_id = T3.id INNER JOIN genre AS T4 ON T3.genre_id = T4.id WHERE T4.genre_name = 'Sports' AND T1.publisher_name = 'Nintendo' | Sports games refers to game_name WHERE genre_name = 'Sports'; Nintendo refers to publisher_name = 'Nintendo'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | What is the genre of the game '2 Games in 1: Sonic Advance & ChuChu Rocket!'? | SELECT T2.genre_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T1.game_name = '2 Games in 1: Sonic Advance & ChuChu Rocket!' | genre refers to genre_name; '2 Games in 1: Sonic Advance & ChuChu Rocket!' is a game name; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | How many times did other regions make positive sales in DS platform? | SELECT COUNT(DISTINCT T2.id) FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN region_sales AS T3 ON T1.id = T3.game_platform_id INNER JOIN region AS T4 ON T3.region_id = T4.id WHERE T1.platform_name = 'DS' AND T4.region_name = 'Other' AND T3.num_sales > 0 | other regions refers to region_name = 'Other'; positive sales refers to num_sales > 0; DS platform refers to platform_name = 'DS'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | What are the names of the games published by American Softworks? | SELECT T3.game_name FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id INNER JOIN game AS T3 ON T2.game_id = T3.id WHERE T1.publisher_name = 'American Softworks' | names of the games refers to game_name; American Softworks refers to publisher_name = 'American Softworks'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | How many strategy games are there? | SELECT COUNT(CASE WHEN T1.genre_name = 'Strategy' THEN T2.id ELSE NULL END) FROM genre AS T1 INNER JOIN game AS T2 ON T1.id = T2.genre_id | strategy games refers game_name WHERE genre_name = 'Strategy'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Which publisher published Overwatch? | SELECT T3.publisher_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id WHERE T1.game_name = 'Overwatch' | which publisher refers to publisher_name; Overwatch refers to game_name = 'Overwatch'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | What is the name of the genre with the most number of video games? | SELECT T2.genre_name FROM game AS T1 INNER JOIN genre AS T2 ON T2.id = T1.genre_id GROUP BY T2.genre_name ORDER BY COUNT(T1.genre_id) DESC LIMIT 1 | name of the genre refers to genre_name; genre with the most number of video games refers to MAX(COUNT(genre_name)); |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | What is the number of games sold in Europe for game platform ID 26? | SELECT T2.num_sales * 100000 AS nums_eur FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id WHERE T2.game_platform_id = 26 AND T1.region_name = 'Europe' | total number of games sold = MULTIPLY(num_sales, 100000); Europe refers to region_name = 'Europe'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | How many games were released in the year 2001? | SELECT COUNT(id) FROM game_platform AS T WHERE T.release_year = 2001 | released in the year 2001 refers to release_year = 2001; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | How many games include the word 'Box' in their name? | SELECT COUNT(*) FROM ( SELECT T.game_name FROM game AS T WHERE T.game_name LIKE '%Box%' ) | games include the word 'Box' in their name refers to game_name = '%Box%'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | What are the three largest numbers of games sold? | SELECT T.game_platform_id, SUM(T.num_sales) * 100000 FROM region_sales AS T GROUP BY game_platform_id ORDER BY SUM(T.num_sales) * 100000 DESC LIMIT 3 | 3 largest numbers of games sold refers to game_name where MAX(num_sales) LIMIT 3; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | What year were the first game released? | SELECT T.release_year FROM game_platform AS T ORDER BY T.release_year ASC LIMIT 1 | year the first game was released refers to MIN(release_year); |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | What publishers have the word 'Entertainment' in their name? | SELECT T.publisher_name FROM publisher AS T WHERE T.publisher_name LIKE '%Entertainment%' | publishers that have the word 'Entertainment' in their name refers to publisher_name LIKE '%Entertainment%'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Indicate the name of all adventure games. | SELECT T2.game_name FROM genre AS T1 INNER JOIN game AS T2 ON T1.id = T2.genre_id WHERE T1.genre_name = 'Adventure' | name of games refers to game_name; adventure games refers to game_name WHERE genre_name = 'Adventure'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | List the name of all games published by 'Pioneer LDC'. | SELECT T3.game_name FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id INNER JOIN game AS T3 ON T2.game_id = T3.id WHERE T1.publisher_name = 'Pioneer LDC' | name of games refers to game_name; 'Pioneer LDC' refers to publisher_name = 'Pioneer LDC'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Indicate the name of all the games published for the 'SCD' platform. | SELECT T1.game_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN game_platform AS T3 ON T2.id = T3.game_publisher_id INNER JOIN platform AS T4 ON T3.platform_id = T4.id WHERE T4.platform_name = 'SCD' | name of games refers to game_name; 'SCD' platform refers to platform_name = 'SCD'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | List the name of all games published in Japan. | SELECT T1.game_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN game_platform AS T3 ON T2.id = T3.game_publisher_id INNER JOIN region_sales AS T4 ON T3.id = T4.game_platform_id INNER JOIN region AS T5 ON T4.region_id = T5.id WHERE T5.region_name = 'Japan' | name of games refers to game_name; Japan refers to region_name = 'Japan'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | What genres are the games published by 'Agatsuma Entertainment'? | SELECT T4.genre_name FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id INNER JOIN game AS T3 ON T2.game_id = T3.id INNER JOIN genre AS T4 ON T3.genre_id = T4.id WHERE T1.publisher_name = 'Agatsuma Entertainment' | genres refers to genre_name; 'Agatsuma Entertainment' refers to publisher_name = 'Agatsuma Entertainment'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | How many games are not of the genres 'Role-Playing', 'Shooter' and 'Simulation'? | SELECT COUNT(T2.id) FROM genre AS T1 INNER JOIN game AS T2 ON T1.id = T2.genre_id WHERE T1.genre_name NOT IN ('Role-Playing', 'Shooter', 'Simulation') | not of the genres 'Role-Playing', 'Shooter' and 'Simulation' refers to genre_name NOT IN ('Role-Playing', 'Shooter', 'Simulation'); |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Indicate, by region, which platform has sold the most games. | SELECT T.region_name FROM ( SELECT T1.platform_name, T4.region_name, SUM(T3.num_sales) FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN region_sales AS T3 ON T1.id = T3.game_platform_id INNER JOIN region AS T4 ON T3.region_id = T4.id GROUP BY T1.platform_name, T4.region_name ORDER... | region refers to region_name; platform refers to game_platform; sold the most games refers to MAX(SUM(num_sales)); |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Which publisher has published the most games in the 'Puzzle' genre? | SELECT T.publisher_name FROM ( SELECT T1.publisher_name, COUNT(T3.id) FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id INNER JOIN game AS T3 ON T2.game_id = T3.id INNER JOIN genre AS T4 ON T3.genre_id = T4.id WHERE T4.genre_name = 'Puzzle' GROUP BY T1.publisher_name ORDER BY COUNT(T3.id) ... | which publisher refers to publisher_name; publisher that has published the most games refers to MAX(COUNT(publisher_name)); puzzle genre refers to genre_name = 'Puzzle'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Which game has sold the fewest units? | SELECT T.game_name FROM ( SELECT T1.game_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN game_platform AS T3 ON T2.id = T3.game_publisher_id INNER JOIN region_sales AS T4 ON T3.id = T4.game_platform_id ORDER BY T4.num_sales LIMIT 1 ) t | which game refers to game_name; sold the fewest units refers to MIN(num_sales); |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Which publisher has published the game 'Pachi-Slot Kanzen Kouryaku 3: Universal Koushiki Gaido Volume 3'? | SELECT T1.publisher_name FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id INNER JOIN game AS T3 ON T2.game_id = T3.id WHERE T3.game_name = 'Pachi-Slot Kanzen Kouryaku 3: Universal Koushiki Gaido Volume 3' | which publisher refers to publisher_name; 'Pachi-Slot Kanzen Kouryaku 3: Universal Koushiki Gaido Volume 3' refers to game_name = 'Pachi-Slot Kanzen Kouryaku 3: Universal Koushiki Gaido Volume 3'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | In which regions has the game 'Pengo' been sold? | SELECT T5.region_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN game_platform AS T3 ON T2.id = T3.game_publisher_id INNER JOIN region_sales AS T4 ON T3.id = T4.game_platform_id INNER JOIN region AS T5 ON T4.region_id = T5.id WHERE T1.game_name = 'Pengo' | which regions refers to region_name; 'Pengo' refers to game_name = 'Pengo'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | List by name all the games released in the year 2010. | SELECT T1.game_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN game_platform AS T3 ON T2.id = T3.game_publisher_id WHERE T3.release_year = '2010' | name of the games refers to game_name; released in the year 2010 refers to release_year = 2010; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Calculate the average game sales for the PS2 platform. | SELECT SUM(T3.num_sales * 100000) / COUNT(T1.id) FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN region_sales AS T3 ON T2.id = T3.game_platform_id WHERE T1.platform_name = 'PS2' | average = AVG(MULTIPLY(num_sales), 100000); PS2 refers to platform_name = 'PS2'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Calculate the percentage of games published by 'Brash Entertainment'? | SELECT CAST(COUNT(CASE WHEN T1.publisher_name = 'Brash Entertainment' THEN T2.game_id ELSE NULL END) AS REAL) * 100 / COUNT(T2.game_id) FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id | percentage = MULTIPLY(DIVIDE(SUM(publisher_name = 'Brash Entertainment'), COUNT(game_id)), 100.0); 'Brash Entertainment' refers to publisher_name = 'Brash Entertainment'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | What is the total number of games sold in region ID 1? | SELECT SUM(T.num_sales * 100000) FROM region_sales AS T WHERE T.region_id = 1 | total number of games sold = MULTIPLY(SUM(num_sales), 100000); |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | How many FIFA games are there across all platforms? | SELECT COUNT(*) FROM ( SELECT T.game_name FROM game AS T WHERE T.game_name LIKE '%FIFA%' ) | FIFA games refers to game_name LIKE '%FIFA%'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Which platform is the most popular in Europe? | SELECT T.platform_name FROM ( SELECT T4.platform_name FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id INNER JOIN game_platform AS T3 ON T2.game_platform_id = T3.id INNER JOIN platform AS T4 ON T3.platform_id = T4.id WHERE T1.region_name = 'Europe' ORDER BY T2.num_sales DESC LIMIT 1 ) t | platform that is the most popular refers to platform_name WHERE MAX(num_sales); in Europe refers to region_name = 'Europe' ; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Who is the publisher of the game 2002 FIFA World Cup? | SELECT T2.publisher_name FROM game_publisher AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN game AS T3 ON T1.game_id = T3.id WHERE T3.game_name = '2002 FIFA World Cup' | who is the publisher refers to publisher_name; 2002 FIFA World Cup refers to game_name = '2002 FIFA World Cup'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | What platform is the game 3Xtreme available on? | SELECT T2.platform_name FROM game_platform AS T1 INNER JOIN platform AS T2 ON T1.platform_id = T2.id INNER JOIN game_publisher AS T3 ON T1.game_publisher_id = T3.id INNER JOIN game AS T4 ON T3.game_id = T4.id WHERE T4.game_name = '3Xtreme' | what platform refers to platform_name; 3Xtreme refers to game_name = '3Xtreme'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | What genre is the game 2010 FIFA World Cup South Africa? | SELECT T2.genre_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T1.game_name = '2010 FIFA World Cup South Africa' | genre refers to genre_name; 2010 FIFA World Cup South Africa refers to game_name = '2010 FIFA World Cup South Africa'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Which region has the highest number of games sold on all platforms? | SELECT T.region_name FROM ( SELECT T2.region_name, SUM(T1.num_sales) FROM region_sales AS T1 INNER JOIN region AS T2 ON T1.region_id = T2.id INNER JOIN game_platform AS T3 ON T1.game_platform_id = T3.id INNER JOIN platform AS T4 ON T3.platform_id = T4.id GROUP BY T4.platform_name ORDER BY SUM(T1.num_sales) DESC LIMIT 1... | which region refers to region_name; highest number of games sold on all platforms refers to MAX(SUM(num_sales)); |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | How many games were sold on PS3 platform in Japan? | SELECT SUM(T1.num_sales * 100000) FROM region_sales AS T1 INNER JOIN region AS T2 ON T1.region_id = T2.id INNER JOIN game_platform AS T3 ON T1.game_platform_id = T3.id INNER JOIN platform AS T4 ON T3.platform_id = T4.id WHERE T2.region_name = 'Japan' AND T4.platform_name = 'PS3' | how many games = MULTIPLY(SUM(num_sales), 100000); PS3 refers to platform_name = 'PS3'; Japan refers to region_name = 'Japan'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | What are the names of games that were released in 2007? | SELECT T3.game_name FROM game_platform AS T1 INNER JOIN game_publisher AS T2 ON T1.game_publisher_id = T2.id INNER JOIN game AS T3 ON T2.game_id = T3.id WHERE T1.release_year = 2007 | names of games refers to game_name; released in 2007 refers to release_year = 2007; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | How many games were published by Activision? | SELECT COUNT(DISTINCT T3.id) FROM game_publisher AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN game AS T3 ON T1.game_id = T3.id WHERE T2.publisher_name = 'Activision' | Activision refers to publisher_name = 'Activision'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Indicate the release year of the game with more than 200000 sales in Japan. | SELECT DISTINCT T3.release_year FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id INNER JOIN game_platform AS T3 ON T2.game_platform_id = T3.id WHERE T2.num_sales * 100000 > 200000 AND T1.region_name = 'Japan' | more than 200000 sales refers to SUM(num_sales) > 2; Japan refers to region_name = 'Japan'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | In 2010, how many PS3 games were released? | SELECT COUNT(T3.game_id) FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN game_publisher AS T3 ON T2.game_publisher_id = T3.id WHERE T1.platform_name = 'PS3' AND T2.release_year = 2010 | in 2010 refers to release_year = 2010; PS3 refers to platform_name = 'PS3'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Indicate the publisher who has published the most games of all time. | SELECT T.publisher_name FROM ( SELECT T2.publisher_name, COUNT(DISTINCT T1.game_id) FROM game_publisher AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id GROUP BY T2.publisher_name ORDER BY COUNT(DISTINCT T1.game_id) DESC LIMIT 1 ) t | publisher refers to publisher_name; publisher who has published the most games of all time refers to MAX(COUNT(publisher_name)); |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | How many shooter games are there? | SELECT COUNT(T1.id) FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T2.genre_name = 'Shooter' | shooter games refers to game_name WHERE genre_name = 'shooter'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | What is the percentage of games that were released on PS4 in 2014 among all platforms? | SELECT CAST(COUNT(CASE WHEN T2.platform_name = 'PS4' THEN T3.game_id ELSE NULL END) AS REAL) * 100 / COUNT(T3.game_id) FROM game_platform AS T1 INNER JOIN platform AS T2 ON T1.platform_id = T2.id INNER JOIN game_publisher AS T3 ON T1.game_publisher_id = T3.id WHERE T1.release_year = 2014 | percentage - MULTIPLY(DIVIDE(SUM(platform_name = 'PS4'), COUNT(game_id)), 100); in 2014 refers to release_year = 2014; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | How much are the sales of the games in region ID 4? | SELECT SUM(T.num_sales) * 100000 FROM region_sales AS T WHERE T.region_id = 4 | how much are the sales = SUM(num_sales); |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | List down the game platform IDs of games with a region ID of 1. | SELECT T.game_platform_id FROM region_sales AS T WHERE T.region_id = 1 | |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Calculate the difference between sales of games from region ID 2 and region ID 3. | SELECT SUM(CASE WHEN T.region_id = 2 THEN T.num_sales ELSE 0 END) - SUM(CASE WHEN T.region_id = 3 THEN T.num_sales ELSE 0 END) FROM region_sales t | difference = SUBTRACT(SUM(num_sales WHERE region_id = 2), SUM(num_sales WHERE region_id = 3)); |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | List down the platform IDs of the games released in 2007. | SELECT DISTINCT T.platform_id FROM game_platform AS T WHERE T.release_year = 2007 | released in 2007 refers to release_year = 2007; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | State the game publisher IDs of the games with a platform ID of 16. | SELECT T.game_publisher_id FROM game_platform AS T WHERE T.platform_id = 16 | |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Calculate the number of game publisher IDs for games released in 1984. | SELECT COUNT(T.game_publisher_id) FROM game_platform AS T WHERE T.release_year = 1984 | released in 1984 refers to release_year = 1984; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | List down the platform IDs of the games with a region ID of 3. | SELECT T2.id FROM region_sales AS T1 INNER JOIN game_platform AS T2 ON T1.game_platform_id = T2.id WHERE T1.region_id = 3 | |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | What are the sales made by the games in Japan region? | SELECT SUM(CASE WHEN T2.region_name = 'Japan' THEN T1.num_sales ELSE 0 END) AS nums FROM region_sales AS T1 INNER JOIN region AS T2 ON T1.region_id = T2.id | sales = SUM(num_sales); Japan region refers to region_name = 'Japan'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | How many game publisher IDs have published games on the X360 platform? | SELECT COUNT(T1.game_publisher_id) FROM game_platform AS T1 INNER JOIN platform AS T2 ON T1.platform_id = T2.id WHERE T2.platform_name = 'X360' | X360 refers to platform_name = 'X360'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | State the name of the platforms for games released in 2000. | SELECT DISTINCT T2.platform_name FROM game_platform AS T1 INNER JOIN platform AS T2 ON T1.platform_id = T2.id WHERE T1.release_year = 2000 | name of the platforms refers to platform_name; released in 2000 refers to release_year = 2000; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Find out the difference between the number of publishers who released the games on the PS3 and X360. | SELECT COUNT(CASE WHEN T2.platform_name = 'PS3' THEN T1.game_publisher_id ELSE NULL END) - COUNT(CASE WHEN T2.platform_name = 'X360' THEN T1.game_publisher_id ELSE NULL END) FROM game_platform AS T1 INNER JOIN platform AS T2 ON T1.platform_id = T2.id | difference = SUBTRACT(SUM(platform_name = 'PS3'), SUM(platform_name = 'X360')); PS3 refers to platform_name = 'PS3'; X360 refers to platform_name = 'X360'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | What are the game IDs of the games published by Bethesda Softworks? | SELECT T1.game_id FROM game_publisher AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.publisher_name = 'Bethesda Softworks' | Bethesda Softworks refers to publisher_name = 'Bethesda Softworks'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Calculate the total number of IDs for the game published by Capcom and Sony Computer Entertainment. | SELECT COUNT(DISTINCT T1.game_id) FROM game_publisher AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.publisher_name IN ('Capcom', 'Sony Computer Entertainment') | Capcom refers to publisher_name = 'Capcom'; Sony Computer Entertainment refers to publisher_name = 'Sony Computer Entertainment'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | What is the genre of the game "Grand Theft Auto V"? | SELECT T2.genre_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T1.game_name = 'Grand Theft Auto V' | genre refers to genre_name; "Grand Theft Auto V" refers to game_name = 'Grand Theft Auto V'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | List down the names of the games in the racing genre. | SELECT T1.game_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T2.genre_name = 'Racing' | name of games refers to game_name; racing genre refers to genre_name = 'Racing'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Calculate the number of games in the fighting genre. | SELECT COUNT(T1.id) FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T2.genre_name = 'Fighting' | fighting genre refers to genre_name = 'Fighting'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | What are the genres of games published by the publisher with an ID of 464? | SELECT DISTINCT T2.genre_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id INNER JOIN game_publisher AS T3 ON T1.id = T3.game_id WHERE T3.publisher_id = 464 | genres of games refers to genre_name; publisher with an ID of 464 refers to publisher_id = 464; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Find out the platform of the game "Final Fantasy XIII-2". | SELECT T4.platform_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN game_platform AS T3 ON T2.id = T3.game_publisher_id INNER JOIN platform AS T4 ON T3.platform_id = T4.id WHERE T1.game_name = 'Final Fantasy XIII-2' | platform of the game refers to platform_name; "Final Fantasy XIII-2" refers to game_name = 'Final Fantasy XIII-2'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Calculate the total sales made by the games released in 2000. | SELECT SUM(T1.num_sales) FROM region_sales AS T1 INNER JOIN game_platform AS T2 ON T1.game_platform_id = T2.id WHERE T2.release_year = 2000 | total sales = SUM(num_sales); released in 2000 refers to release_year = 2000; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Calculate the difference in sales between the games released in 1990 and 2000. | SELECT SUM(CASE WHEN T2.release_year = 2000 THEN T1.num_sales ELSE 0 END) - SUM(CASE WHEN T2.release_year = 1990 THEN T1.num_sales ELSE 0 END) FROM region_sales AS T1 INNER JOIN game_platform AS T2 ON T1.game_platform_id = T2.id | difference = SUBTRACT(SUM(num_sales WHERE release_year = 2000), SUM(num_sales WHERE release_year = 1990)); |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | What are the platform IDs of records released in 2006? | SELECT DISTINCT T.platform_id FROM game_platform AS T WHERE T.release_year = 2006 | released in 1990 refers to release_year = 1990; 2000 refers to release_year = 2000; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Compute the average number of sales in region ID 3. | SELECT AVG(T.num_sales * 100000) FROM region_sales AS T WHERE T.region_id = 3 | average = AVG(MULTIPLY(num_sales, 100000)); |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | In which year did the record ID 19 with game publisher ID 6657 released? | SELECT T.release_year FROM game_platform AS T WHERE T.game_publisher_id = 6657 AND T.id = 19 | which year refers to release_year; record ID 19 refers to game platform.id; id = 19 |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Calculate the total sales in all regions with game platform ID 66. | SELECT SUM(T.num_sales) * 100000 FROM region_sales AS T WHERE T.game_platform_id = 66 | total sales in all regions = MULTIPLY(SUM(num_sales), 100000); |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Give the game name of the game ID 44. | SELECT T.game_name FROM game AS T WHERE T.id = 44 | |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | List the games available on Wii. | SELECT T4.game_name FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN game_publisher AS T3 ON T2.game_publisher_id = T3.id INNER JOIN game AS T4 ON T3.game_id = T4.id WHERE T1.platform_name = 'Wii' | games available refers to game_name; Wii refers to platform_name = 'Wii'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Provide the name of games released in 2015. | SELECT T3.game_name FROM game_platform AS T1 INNER JOIN game_publisher AS T2 ON T1.game_publisher_id = T2.id INNER JOIN game AS T3 ON T2.game_id = T3.id WHERE T1.release_year = 2015 | names of games refers to game_name; released in 2015 refers to release_year = 2015; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | What is the total number of adventure games released in 2005? | SELECT COUNT(DISTINCT T3.id) FROM game_platform AS T1 INNER JOIN game_publisher AS T2 ON T1.game_publisher_id = T2.id INNER JOIN game AS T3 ON T2.game_id = T3.id INNER JOIN genre AS T4 ON T3.genre_id = T4.id WHERE T4.genre_name = 'Adventure' AND T1.release_year = 2005 | adventure games refers to game_name WHERE genre_name = 'Adventure'; released in 2005 refers to release_year = 2005; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | What is the name of the company that produced the game titled Adventure Time: Explore the Dungeon Because I Don't Know!? | SELECT T3.publisher_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id WHERE T1.game_name = 'Adventure Time: Explore the Dungeon Because I Don''t Know!' | name of the company that produced the game refers to publisher_name; Adventure Time: Explore the Dungeon Because I Don't Know! Refers to game_name = 'Adventure Time: Explore the Dungeon Because I Don''t Know!'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | List down the game platform ID and region name where the games achieved 20000 sales and below. | SELECT T2.game_platform_id, T1.region_name FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id WHERE T2.num_sales * 100000 <= 20000 | 20000 sales and below refers to num_sales < 0.2; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Provide the name of game produced by 505 Games in 2006. | SELECT T3.game_name FROM game_platform AS T1 INNER JOIN game_publisher AS T2 ON T1.game_publisher_id = T2.id INNER JOIN game AS T3 ON T2.game_id = T3.id INNER JOIN publisher AS T4 ON T2.publisher_id = T4.id WHERE T4.publisher_name = '505 Games' AND T1.release_year = 2006 | name of game refers to game_name; 505 Games refers to publisher_name = '505 Games'; in 2006 refers to release_year = 2006; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | What is the genre of the game ID 119? | SELECT T2.genre_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T1.id = 119 | genre of the game refers to genre_name; game ID 119 refers to game.id = 119; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | List the game IDs of the games produced by Abylight. | SELECT T1.game_id FROM game_publisher AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.publisher_name = 'Abylight' | Abylight refers to publisher_name = 'Abylight'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | In which region where a game had the lowest number of sales? | SELECT DISTINCT T1.region_name FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id ORDER BY T2.num_sales LIMIT 1 | which region refers to region_name; lowest number of sales refers to MIN(num_sales); |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | List down the name of strategy games. | SELECT T1.game_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T2.genre_name = 'Strategy' | strategy games refers to game_name WHERE genre_name = 'Strategy'; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | In what platform does the game ID 178 available? | SELECT T3.platform_name FROM game_publisher AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.game_publisher_id INNER JOIN platform AS T3 ON T2.platform_id = T3.id WHERE T1.game_id = 178 | platform refers to platform_name; |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Give the genre of the following game titled 'Airlock' , 'Airline Tycoon' , and 'Airblade', respectively. | SELECT T2.genre_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T1.game_name IN ('Airlock', 'Airline Tycoon', 'Airblade') | genre refers to genre_name; 'Airlock', 'Airline Tycoon' , and 'Airblade' refers to game_name IN ('Airlock', 'Airline Tycoon', 'Airblade'); |
video_games | CREATE TABLE genre
(
id INTEGER not null
primary key,
genre_name TEXT default NULL
);
CREATE TABLE game
(
id INTEGER not null
primary key,
genre_id INTEGER default NULL,
game_name TEXT default NULL,
foreign key (genre_id) references genre(id)
);
... | 【DB_ID】 video_games
【Schema】
# Table: main.game
[
(id:INTEGER, Primary Key, Examples: [44, 45, 46]),
(genre_id:INTEGER, Examples: [4, 5, 11]),
(game_name:TEXT, Examples: [2 Games in 1: Sonic Advance & ChuChu Rocket!])
]
# Table: main.game_platform
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(game_publisher_id:INT... | Calculate the total number of sales in North America. | SELECT SUM(T2.num_sales) * 100000 AS nums FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id WHERE T1.region_name = 'North America' | total number of sales = MULTIPLY(SUM(num_sales), 100000); North America refers to region_name = 'North America'; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.