db_id
stringclasses
11 values
instruction
stringlengths
1.63k
14k
role
stringclasses
45 values
policy
unknown
input
stringlengths
23
477
output
stringlengths
23
2.22k
difficulty
stringclasses
3 values
metadata
dict
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
What proportion of cards do not have a text box with a normal layout?
SELECT CAST(SUM(CASE WHEN isTextless = 1 AND layout = 'normal' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM cards;
simple
{ "gold_sql": "SELECT CAST(SUM(CASE WHEN isTextless = 1 AND layout = 'normal' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*)\nFROM cards;", "permission": "allowed", "query_columns": { "cards": [ "isTextless", "layout" ] }, "missing_columns": {}, "reason": "All required columns are permitte...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
What are the card numbers that don't have multiple faces on a single card and have the subtypes Angel and Wizard?
SELECT id FROM cards WHERE subtypes = 'Angel,Wizard' AND side IS NULL
simple
{ "gold_sql": "SELECT id FROM cards WHERE subtypes = 'Angel,Wizard' AND side IS NULL", "permission": "allowed", "query_columns": { "cards": [ "id", "side", "subtypes" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "question_id": 425, "evidence": "do...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Please provide top three sets that don't appear in Magic: The Gathering Online, along with their names in in alphabetical order.
SELECT name FROM sets WHERE mtgoCode IS NULL ORDER BY name LIMIT 3
simple
{ "gold_sql": "SELECT name FROM sets WHERE mtgoCode IS NULL ORDER BY name LIMIT 3", "permission": "allowed", "query_columns": { "sets": [ "mtgoCode", "name" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "question_id": 426, "evidence": "don't appear in Ma...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
What languages are available in the set known as Archenemy on the magic card market and having the code ARC?
SELECT T2.language FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T1.mcmName = 'Archenemy' AND T2.setCode = 'ARC'
moderate
{ "gold_sql": "SELECT T2.language FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T1.mcmName = 'Archenemy' AND T2.setCode = 'ARC'", "permission": "allowed", "query_columns": { "sets": [ "code", "mcmName" ], "set_translations": [ "language", "setC...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
What is the name of set number 5 and its translation?
SELECT T1.name, T2.translation FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T2.id = 5 GROUP BY T1.name, T2.translation
simple
{ "gold_sql": "SELECT T1.name, T2.translation FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T2.id = 5 GROUP BY T1.name, T2.translation", "permission": "allowed", "query_columns": { "sets": [ "code", "name" ], "set_translations": [ "id", "setCod...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
What is the language and expansion type of set number 207?
SELECT T2.language, T1.type FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T1.id = 207
simple
{ "gold_sql": "SELECT T2.language, T1.type FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T1.id = 207", "permission": "allowed", "query_columns": { "sets": [ "code", "id", "type" ], "set_translations": [ "language", "setCode" ] }, ...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Please list top two sets of cards with their IDs that have Italian-language cards and are located in the Shadowmoor block in alphabetical order.
SELECT DISTINCT T1.name, T1.id FROM sets AS T1 JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T1.block = 'Shadowmoor' AND T2.language = 'Italian' ORDER BY T1.name ASC LIMIT 2;
simple
{ "gold_sql": "SELECT DISTINCT T1.name, T1.id FROM sets AS T1 JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T1.block = 'Shadowmoor' AND T2.language = 'Italian' ORDER BY T1.name ASC LIMIT 2;", "permission": "allowed", "query_columns": { "sets": [ "block", "code", "id", "name...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Which set is not available outside of the United States and has foil cards with Japanese writing on them? Please include the set ID in your response.
SELECT T1.name, T1.id FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T2.language = 'Japanese' AND T1.isFoilOnly = 1 AND T1.isForeignOnly = 0
challenging
{ "gold_sql": "SELECT T1.name, T1.id FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T2.language = 'Japanese' AND T1.isFoilOnly = 1 AND T1.isForeignOnly = 0", "permission": "allowed", "query_columns": { "sets": [ "code", "id", "isFoilOnly", "isForeignOnl...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Which Russian set of cards contains the most cards overall?
SELECT T1.id, T1.name, T1.totalSetSize FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T2.language = 'Russian' AND T1.totalSetSize = ( SELECT MAX(s.totalSetSize) FROM sets AS s INNER JOIN set_translations AS st ON s.code = st.setCode WHERE st.language = 'Russian' ) OR...
moderate
{ "gold_sql": "SELECT T1.id, T1.name, T1.totalSetSize\nFROM sets AS T1\nINNER JOIN set_translations AS T2 ON T1.code = T2.setCode\nWHERE T2.language = 'Russian'\n AND T1.totalSetSize = (\n SELECT MAX(s.totalSetSize)\n FROM sets AS s\n INNER JOIN set_translations AS st ON s.code = st.setCode\n WHERE st.la...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
What is the percentage of the set of cards that have Chinese Simplified as the language and are only available for online games?
SELECT CAST(SUM(CASE WHEN T2.language = 'Chinese Simplified' AND T1.isOnlineOnly = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode
moderate
{ "gold_sql": "SELECT CAST(SUM(CASE WHEN T2.language = 'Chinese Simplified' AND T1.isOnlineOnly = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode", "permission": "allowed", "query_columns": { "sets": [ "code", "isOnlineOnly" ...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
How many sets are available just in Japanese and not in Magic: The Gathering Online?
SELECT COUNT(T1.id) FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T2.language = 'Japanese' AND (T1.mtgoCode IS NULL OR T1.mtgoCode = '')
moderate
{ "gold_sql": "SELECT COUNT(T1.id) FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T2.language = 'Japanese' AND (T1.mtgoCode IS NULL OR T1.mtgoCode = '')", "permission": "allowed", "query_columns": { "sets": [ "code", "id", "mtgoCode" ], "set_translat...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
How many card border with black color ? List out the card id.
SELECT id FROM cards WHERE borderColor = 'black'
simple
{ "gold_sql": "SELECT id FROM cards WHERE borderColor = 'black'", "permission": "allowed", "query_columns": { "cards": [ "borderColor", "id" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "question_id": 435, "evidence": "border with black color refers to ...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
How many cards have frame effect as extendedart? List out the id of those cards.
SELECT id FROM cards WHERE frameEffects = 'extendedart'
simple
{ "gold_sql": "SELECT id FROM cards WHERE frameEffects = 'extendedart'", "permission": "allowed", "query_columns": { "cards": [ "frameEffects", "id" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "question_id": 436, "evidence": "\nframe effect as extended...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Among black card borders, which card has full artwork?
SELECT id FROM cards WHERE borderColor = 'black' AND isFullArt = 1
simple
{ "gold_sql": "SELECT id FROM cards WHERE borderColor = 'black' AND isFullArt = 1", "permission": "allowed", "query_columns": { "cards": [ "borderColor", "id", "isFullArt" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "question_id": 437, "evidence"...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Point out the language of set id "174"?
SELECT language FROM set_translations WHERE id = 174
simple
{ "gold_sql": "SELECT language FROM set_translations WHERE id = 174", "permission": "allowed", "query_columns": { "set_translations": [ "id" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "question_id": 438, "evidence": "" }
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
List out the set name of the set code "ALL".
SELECT name FROM sets WHERE code = 'ALL'
simple
{ "gold_sql": "SELECT name FROM sets WHERE code = 'ALL'", "permission": "allowed", "query_columns": { "sets": [ "code", "name" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "question_id": 439, "evidence": "" }
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Which foreign language used by "A Pedra Fellwar"?
SELECT DISTINCT language FROM foreign_data WHERE name = 'A Pedra Fellwar'
simple
{ "gold_sql": "SELECT DISTINCT language FROM foreign_data WHERE name = 'A Pedra Fellwar'", "permission": "allowed", "query_columns": { "foreign_data": [ "name" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "question_id": 440, "evidence": "\"A Pedra Fellwar\" r...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
State the set code of the set with release date of 07/13/2007?
SELECT T2.setCode FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T1.releaseDate = '2007-07-13'
simple
{ "gold_sql": "SELECT T2.setCode FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T1.releaseDate = '2007-07-13'", "permission": "allowed", "query_columns": { "sets": [ "code", "releaseDate" ], "set_translations": [ "setCode" ] }, "missing_column...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Mention the base set size and set code of the set that was in block named "Masques" and "Mirage".
SELECT baseSetSize, code FROM sets WHERE block IN ('Masques', 'Mirage')
simple
{ "gold_sql": "SELECT baseSetSize, code FROM sets WHERE block IN ('Masques', 'Mirage')", "permission": "allowed", "query_columns": { "sets": [ "baseSetSize", "code" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "question_id": 442, "evidence": "" }
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Give the code of sets that have type of 'expansion'.
SELECT DISTINCT code FROM sets WHERE type = 'expansion';
simple
{ "gold_sql": "SELECT DISTINCT code\nFROM sets\nWHERE type = 'expansion';", "permission": "allowed", "query_columns": { "sets": [ "code" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "question_id": 443, "evidence": "" }
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Name the foreign name of the card that has boros watermark? List out the type of this card.
SELECT DISTINCT T2.name AS foreign_card_name, T1.type AS card_type FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T1.watermark = 'boros';
simple
{ "gold_sql": "SELECT DISTINCT T2.name AS foreign_card_name, T1.type AS card_type\nFROM cards AS T1\nINNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid\nWHERE T1.watermark = 'boros';", "permission": "allowed", "query_columns": { "cards": [ "type", "uuid", "watermark" ], "foreign_data...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
What is the language and flavor text of the card that has colorpie watermark? List out the type of this card.
SELECT DISTINCT T2.language, T2.flavorText, T1.type FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T2.uuid = T1.uuid WHERE T1.watermark = 'colorpie'
simple
{ "gold_sql": "SELECT DISTINCT T2.language, T2.flavorText, T1.type\nFROM cards AS T1\nINNER JOIN foreign_data AS T2 ON T2.uuid = T1.uuid\nWHERE T1.watermark = 'colorpie'", "permission": "allowed", "query_columns": { "cards": [ "type", "uuid", "watermark" ], "foreign_data": [ "f...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
What is percentage of the cards with a converted Mana Cost of 10 in set of Abyssal Horror?
SELECT CAST(SUM(CASE WHEN T1.convertedManaCost = 10 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id), T1.name FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T1.name = 'Abyssal Horror'
moderate
{ "gold_sql": "SELECT CAST(SUM(CASE WHEN T1.convertedManaCost = 10 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id), T1.name FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T1.name = 'Abyssal Horror'", "permission": "allowed", "query_columns": { "cards": [ "convertedManaCost", ...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Give the code of sets have expansion commander type?
SELECT T2.setCode FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T1.type = 'commander';
simple
{ "gold_sql": "SELECT T2.setCode\nFROM sets AS T1\nINNER JOIN set_translations AS T2 ON T2.setCode = T1.code\nWHERE T1.type = 'commander';", "permission": "allowed", "query_columns": { "sets": [ "code", "type" ], "set_translations": [ "setCode" ] }, "missing_columns": {}, "...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Name the foreign name of the card that has abzan watermark? List out the type of this card.
SELECT DISTINCT T1.name, T1.type FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T2.uuid = T1.uuid WHERE T1.watermark = 'abzan'
simple
{ "gold_sql": "SELECT DISTINCT T1.name, T1.type FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T2.uuid = T1.uuid WHERE T1.watermark = 'abzan'", "permission": "allowed", "query_columns": { "cards": [ "name", "type", "uuid", "watermark" ], "foreign_data": [ "uuid" ] ...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
What is the language of the card that has azorius watermark? List out the type of this card.
SELECT DISTINCT T2.language, T1.type FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T2.uuid = T1.uuid WHERE T1.watermark = 'azorius'
simple
{ "gold_sql": "SELECT DISTINCT T2.language, T1.type FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T2.uuid = T1.uuid WHERE T1.watermark = 'azorius'", "permission": "allowed", "query_columns": { "cards": [ "type", "uuid", "watermark" ], "foreign_data": [ "language", "uu...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Of all the cards that are designed by Aaron Miller, how many of them are incredibly powerful?
SELECT SUM(CASE WHEN artist = 'Aaron Miller' AND cardKingdomFoilId IS NOT NULL AND cardKingdomId IS NOT NULL THEN 1 ELSE 0 END) FROM cards
moderate
{ "gold_sql": "SELECT SUM(CASE WHEN artist = 'Aaron Miller' AND cardKingdomFoilId IS NOT NULL AND cardKingdomId IS NOT NULL THEN 1 ELSE 0 END) FROM cards", "permission": "allowed", "query_columns": { "cards": [ "artist", "cardKingdomFoilId", "cardKingdomId" ] }, "missing_columns": {}...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
How many cards available in paper have a positive starting maximum hand size?
SELECT COUNT(*) FROM cards WHERE availability LIKE '%paper%' AND hand IS NOT NULL AND CAST(hand AS INTEGER) > 0;
simple
{ "gold_sql": "SELECT COUNT(*)\nFROM cards\nWHERE availability LIKE '%paper%'\n AND hand IS NOT NULL\n AND CAST(hand AS INTEGER) > 0;", "permission": "allowed", "query_columns": { "cards": [ "availability", "hand" ] }, "missing_columns": {}, "reason": "All required columns are permitte...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Please list the names of the cards that have a text box.
SELECT DISTINCT name FROM cards WHERE isTextless = 0
simple
{ "gold_sql": "SELECT DISTINCT name FROM cards WHERE isTextless = 0", "permission": "allowed", "query_columns": { "cards": [ "isTextless", "name" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "question_id": 452, "evidence": "have a text box refers to isT...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
What's the unconverted mana cost of the card "Ancestor's Chosen"?
SELECT DISTINCT manaCost FROM cards WHERE name = 'Ancestor''s Chosen'
simple
{ "gold_sql": "SELECT DISTINCT manaCost FROM cards WHERE name = 'Ancestor''s Chosen'", "permission": "allowed", "query_columns": { "cards": [ "manaCost", "name" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "question_id": 453, "evidence": "card \"Ancesto...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Among the cards with a white border color, how many of them have unknown power?
SELECT SUM(CASE WHEN power = '*' OR power IS NULL THEN 1 ELSE 0 END) FROM cards WHERE borderColor = 'white'
simple
{ "gold_sql": "SELECT SUM(CASE WHEN power = '*' OR power IS NULL THEN 1 ELSE 0 END) FROM cards WHERE borderColor = 'white'", "permission": "allowed", "query_columns": { "cards": [ "borderColor", "power" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "questi...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Which of the cards that are a promotional painting have multiple faces on the same card? Please list their names.
SELECT DISTINCT name FROM cards WHERE isPromo = 1 AND side IS NOT NULL
simple
{ "gold_sql": "SELECT DISTINCT name FROM cards WHERE isPromo = 1 AND side IS NOT NULL", "permission": "allowed", "query_columns": { "cards": [ "isPromo", "name", "side" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "question_id": 455, "evidence": "...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
What's the list of all types for the card "Molimo, Maro-Sorcerer"?
SELECT DISTINCT subtypes, supertypes, types FROM cards WHERE name = 'Molimo, Maro-Sorcerer'
simple
{ "gold_sql": "SELECT DISTINCT subtypes, supertypes, types FROM cards WHERE name = 'Molimo, Maro-Sorcerer'", "permission": "allowed", "query_columns": { "cards": [ "name", "subtypes", "supertypes", "types" ] }, "missing_columns": {}, "reason": "All required columns are permit...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Please list the websites where I can purchase the cards that have the promotional type of "bundle".
SELECT DISTINCT purchaseUrls FROM cards WHERE promoTypes = 'bundle'
simple
{ "gold_sql": "SELECT DISTINCT purchaseUrls FROM cards WHERE promoTypes = 'bundle'", "permission": "allowed", "query_columns": { "cards": [ "promoTypes", "purchaseUrls" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "question_id": 457, "evidence": "promot...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
How many artists have designed a card with a black border color and is available in both "arena" and "mtgo" printing type?
SELECT COUNT(CASE WHEN availability LIKE '%arena,mtgo%' AND borderColor = 'black' THEN 1 ELSE NULL END) FROM cards
simple
{ "gold_sql": "SELECT COUNT(CASE WHEN availability LIKE '%arena,mtgo%' AND borderColor = 'black' THEN 1 ELSE NULL END) FROM cards", "permission": "allowed", "query_columns": { "cards": [ "availability", "borderColor" ] }, "missing_columns": {}, "reason": "All required columns are permitt...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Which card costs more converted mana, "Serra Angel" or "Shrine Keeper"?
SELECT name FROM cards WHERE name IN ('Serra Angel', 'Shrine Keeper') ORDER BY convertedManaCost DESC LIMIT 1
moderate
{ "gold_sql": "SELECT name FROM cards WHERE name IN ('Serra Angel', 'Shrine Keeper') ORDER BY convertedManaCost DESC LIMIT 1", "permission": "allowed", "query_columns": { "cards": [ "convertedManaCost", "name" ] }, "missing_columns": {}, "reason": "All required columns are permitted", ...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Which artist designed the card whose promotional name is "Battra, Dark Destroyer"?
SELECT artist FROM cards WHERE flavorName = 'Battra, Dark Destroyer'
simple
{ "gold_sql": "SELECT artist FROM cards WHERE flavorName = 'Battra, Dark Destroyer'", "permission": "allowed", "query_columns": { "cards": [ "artist", "flavorName" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "question_id": 460, "evidence": "promotional...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Please list the names of the top 3 cards with the highest converted mana cost and have a 2003 card frame style.
SELECT name FROM cards WHERE frameVersion = 2003 ORDER BY convertedManaCost DESC LIMIT 3
simple
{ "gold_sql": "SELECT name FROM cards WHERE frameVersion = 2003 ORDER BY convertedManaCost DESC LIMIT 3", "permission": "allowed", "query_columns": { "cards": [ "convertedManaCost", "frameVersion", "name" ] }, "missing_columns": {}, "reason": "All required columns are permitted", ...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
What's the Italian name of the set of cards with "Ancestor's Chosen" is in?
SELECT translation FROM set_translations WHERE setCode IN (SELECT setCode FROM cards WHERE name = 'Ancestor''s Chosen') AND language = 'Italian' LIMIT 1;
moderate
{ "gold_sql": "SELECT translation \nFROM set_translations \nWHERE setCode IN (SELECT setCode FROM cards WHERE name = 'Ancestor''s Chosen') \n AND language = 'Italian'\nLIMIT 1;", "permission": "allowed", "query_columns": { "cards": [ "name", "setCode" ], "set_translations": [] }, "mis...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
How many translations are there for the set of cards with "Angel of Mercy" in it?
SELECT COUNT(DISTINCT translation) FROM set_translations WHERE setCode IN ( SELECT setCode FROM cards WHERE name = 'Angel of Mercy' ) AND translation IS NOT NULL
simple
{ "gold_sql": "SELECT COUNT(DISTINCT translation) FROM set_translations WHERE setCode IN ( SELECT setCode FROM cards WHERE name = 'Angel of Mercy' ) AND translation IS NOT NULL", "permission": "allowed", "query_columns": { "cards": [ "name", "setCode" ], "set_translations": [] }, "miss...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Please list the names of the cards in the set "Hauptset Zehnte Edition".
SELECT DISTINCT T1.name FROM cards AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.setCode WHERE T2.translation = 'Hauptset Zehnte Edition'
simple
{ "gold_sql": "SELECT DISTINCT T1.name FROM cards AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.setCode WHERE T2.translation = 'Hauptset Zehnte Edition'", "permission": "allowed", "query_columns": { "cards": [ "name", "setCode" ], "set_translations": [ "setCode", "...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
For the set of cards with "Ancestor's Chosen" in it, is there a Korean version of it?
SELECT IIF(SUM(CASE WHEN T2.language = 'Korean' AND T2.translation IS NOT NULL THEN 1 ELSE 0 END) > 0, 'YES', 'NO') FROM cards AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.setCode WHERE T1.name = 'Ancestor''s Chosen'
moderate
{ "gold_sql": "SELECT IIF(SUM(CASE WHEN T2.language = 'Korean' AND T2.translation IS NOT NULL THEN 1 ELSE 0 END) > 0, 'YES', 'NO') FROM cards AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.setCode WHERE T1.name = 'Ancestor''s Chosen'", "permission": "allowed", "query_columns": { "cards": [ "...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Among the cards in the set "Hauptset Zehnte Edition", how many of them are designed by Adam Rex?
SELECT COUNT(T1.id) FROM cards AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.setCode WHERE T2.translation = 'Hauptset Zehnte Edition' AND T1.artist = 'Adam Rex'
moderate
{ "gold_sql": "SELECT COUNT(T1.id) FROM cards AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.setCode WHERE T2.translation = 'Hauptset Zehnte Edition' AND T1.artist = 'Adam Rex'", "permission": "allowed", "query_columns": { "cards": [ "artist", "id", "setCode" ], "set_tran...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
How many cards are there in the base set of "Hauptset Zehnte Edition"?
SELECT T1.baseSetSize FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T2.translation = 'Hauptset Zehnte Edition'
simple
{ "gold_sql": "SELECT T1.baseSetSize FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T2.translation = 'Hauptset Zehnte Edition'", "permission": "allowed", "query_columns": { "sets": [ "baseSetSize", "code" ], "set_translations": [ "setCode", "tra...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
What is the Simplified Chinese translation of the name of the set "Eighth Edition"?
SELECT T2.translation FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T1.name = 'Eighth Edition' AND T2.language = 'Chinese Simplified'
moderate
{ "gold_sql": "SELECT T2.translation FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T1.name = 'Eighth Edition' AND T2.language = 'Chinese Simplified'", "permission": "allowed", "query_columns": { "sets": [ "code", "name" ], "set_translations": [ "lang...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Did the set of cards with "Angel of Mercy" appear on Magic: The Gathering Online?
SELECT IIF(EXISTS (SELECT 1 FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T1.name = 'Angel of Mercy' AND T2.mtgoCode IS NOT NULL), 'YES', 'NO')
moderate
{ "gold_sql": "SELECT IIF(EXISTS (SELECT 1 FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T1.name = 'Angel of Mercy' AND T2.mtgoCode IS NOT NULL), 'YES', 'NO')", "permission": "allowed", "query_columns": { "cards": [ "name", "setCode" ], "sets": [ "code", ...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
When was the set of cards with "Ancestor's Chosen" released?
SELECT DISTINCT T2.releaseDate FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T1.name = 'Ancestor''s Chosen'
simple
{ "gold_sql": "SELECT DISTINCT T2.releaseDate FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T1.name = 'Ancestor''s Chosen'", "permission": "allowed", "query_columns": { "cards": [ "name", "setCode" ], "sets": [ "code", "releaseDate" ] }, "missing_...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
What is the expansion type of the set "Hauptset Zehnte Edition"?
SELECT T1.type FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T2.translation = 'Hauptset Zehnte Edition'
simple
{ "gold_sql": "SELECT T1.type FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T2.translation = 'Hauptset Zehnte Edition'", "permission": "allowed", "query_columns": { "sets": [ "code", "type" ], "set_translations": [ "setCode", "translation" ...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Among the sets in the block "Ice Age", how many of them have an Italian translation?
SELECT COUNT(DISTINCT T1.id) FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T1.block = 'Ice Age' AND T2.language = 'Italian' AND T2.translation IS NOT NULL
moderate
{ "gold_sql": "SELECT COUNT(DISTINCT T1.id) FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T1.block = 'Ice Age' AND T2.language = 'Italian' AND T2.translation IS NOT NULL", "permission": "allowed", "query_columns": { "sets": [ "block", "code", "id" ], ...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Is the set of cards with Adarkar Valkyrie only available outside the United States?
SELECT IIF(isForeignOnly = 1, 'YES', 'NO') FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T1.name = 'Adarkar Valkyrie'
moderate
{ "gold_sql": "SELECT IIF(isForeignOnly = 1, 'YES', 'NO') FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T1.name = 'Adarkar Valkyrie'", "permission": "allowed", "query_columns": { "cards": [ "name", "setCode" ], "sets": [ "code", "isForeignOnly" ] },...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Among the sets of cards that have an Italian translation, how many of them have a base set number of under 100?
SELECT COUNT(T1.id) FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T2.translation IS NOT NULL AND T1.baseSetSize < 100 AND T2.language = 'Italian'
moderate
{ "gold_sql": "SELECT COUNT(T1.id) FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T2.translation IS NOT NULL AND T1.baseSetSize < 100 AND T2.language = 'Italian'", "permission": "allowed", "query_columns": { "sets": [ "baseSetSize", "code", "id" ], "s...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
How many cards in the set Coldsnap have a black border color?
SELECT SUM(CASE WHEN T1.borderColor = 'black' THEN 1 ELSE 0 END) FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T2.name = 'Coldsnap'
simple
{ "gold_sql": "SELECT SUM(CASE WHEN T1.borderColor = 'black' THEN 1 ELSE 0 END) FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T2.name = 'Coldsnap'", "permission": "allowed", "query_columns": { "cards": [ "borderColor", "setCode" ], "sets": [ "code", "name...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Please list the name of the cards in the set Coldsnap with the highest converted mana cost.
SELECT T1.name FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T2.name = 'Coldsnap' AND T1.convertedManaCost = ( SELECT MAX(convertedManaCost) FROM cards T3 INNER JOIN sets T4 ON T4.code = T3.setCode WHERE T4.name = 'Coldsnap' ) ORDER BY T1.name ASC;
simple
{ "gold_sql": "SELECT T1.name \nFROM cards AS T1 \nINNER JOIN sets AS T2 ON T2.code = T1.setCode \nWHERE T2.name = 'Coldsnap' \nAND T1.convertedManaCost = (\n SELECT MAX(convertedManaCost) \n FROM cards T3 \n INNER JOIN sets T4 ON T4.code = T3.setCode \n WHERE T4.name = 'Coldsnap'\n)\nORDER BY T1.name ASC...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Which of the following artists, Jeremy Jarvis, Aaron Miller or Chippy, have designed a card in the set Coldsnap.
SELECT DISTINCT T1.artist FROM cards as T1 INNER JOIN sets as T2 ON T2.code = T1.setCode WHERE T2.name = 'Coldsnap' AND T1.artist in ('Jeremy Jarvis', 'Aaron Miller', 'Chippy')
challenging
{ "gold_sql": "SELECT DISTINCT T1.artist FROM cards as T1 INNER JOIN sets as T2 ON T2.code = T1.setCode WHERE T2.name = 'Coldsnap' AND T1.artist in ('Jeremy Jarvis', 'Aaron Miller', 'Chippy')", "permission": "allowed", "query_columns": { "cards": [ "artist", "setCode" ], "sets": [ "c...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
What is card number 4 in the set Coldsnap?
SELECT T1.name FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T2.name = 'Coldsnap' AND T1.number = 4
simple
{ "gold_sql": "SELECT T1.name FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T2.name = 'Coldsnap' AND T1.number = 4", "permission": "allowed", "query_columns": { "cards": [ "name", "number", "setCode" ], "sets": [ "code", "name" ] }, "missing...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Among the cards with converted mana cost higher than 5 in the set Coldsnap, how many of them have unknown power?
SELECT SUM(CASE WHEN T1.power LIKE '*' OR T1.power IS NULL THEN 1 ELSE 0 END) FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T2.name = 'Coldsnap' AND T1.convertedManaCost > 5
moderate
{ "gold_sql": "SELECT SUM(CASE WHEN T1.power LIKE '*' OR T1.power IS NULL THEN 1 ELSE 0 END) FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T2.name = 'Coldsnap' AND T1.convertedManaCost > 5", "permission": "allowed", "query_columns": { "cards": [ "convertedManaCost", "power",...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
What is the Italian flavor text of the card "Ancestor's Chosen"?
SELECT T2.flavorText FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T2.uuid = T1.uuid WHERE T1.name = 'Ancestor''s Chosen' AND T2.language = 'Italian'
moderate
{ "gold_sql": "SELECT T2.flavorText FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T2.uuid = T1.uuid WHERE T1.name = 'Ancestor''s Chosen' AND T2.language = 'Italian'", "permission": "allowed", "query_columns": { "cards": [ "name", "uuid" ], "foreign_data": [ "flavorText", "l...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Please list all the foreign languages in which the card "Ancestor's Chosen" has a flavor text.
SELECT T2.language FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T2.uuid = T1.uuid WHERE T1.name = 'Ancestor''s Chosen' AND T2.flavorText IS NOT NULL
simple
{ "gold_sql": "SELECT T2.language FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T2.uuid = T1.uuid WHERE T1.name = 'Ancestor''s Chosen' AND T2.flavorText IS NOT NULL", "permission": "allowed", "query_columns": { "cards": [ "name", "uuid" ], "foreign_data": [ "flavorText", "l...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
What's the German type of the card "Ancestor's Chosen"?
SELECT DISTINCT T1.type FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T2.uuid = T1.uuid WHERE T1.name = 'Ancestor''s Chosen' AND T2.language = 'German'
simple
{ "gold_sql": "SELECT DISTINCT T1.type FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T2.uuid = T1.uuid WHERE T1.name = 'Ancestor''s Chosen' AND T2.language = 'German'", "permission": "allowed", "query_columns": { "cards": [ "name", "type", "uuid" ], "foreign_data": [ "langu...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Please list the Italian text ruling of all the cards in the set Coldsnap.
SELECT DISTINCT T1.text FROM foreign_data AS T1 INNER JOIN cards AS T2 ON T2.uuid = T1.uuid INNER JOIN sets AS T3 ON T3.code = T2.setCode WHERE T3.name = 'Coldsnap' AND T1.language = 'Italian'
moderate
{ "gold_sql": "SELECT DISTINCT T1.text FROM foreign_data AS T1 INNER JOIN cards AS T2 ON T2.uuid = T1.uuid INNER JOIN sets AS T3 ON T3.code = T2.setCode WHERE T3.name = 'Coldsnap' AND T1.language = 'Italian'", "permission": "allowed", "query_columns": { "foreign_data": [ "language", "text", ...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Please list the Italian names of the cards in the set Coldsnap with the highest converted mana cost.
SELECT T2.name FROM foreign_data AS T1 INNER JOIN cards AS T2 ON T2.uuid = T1.uuid INNER JOIN sets AS T3 ON T3.code = T2.setCode WHERE T3.name = 'Coldsnap' AND T1.language = 'Italian' ORDER BY T2.convertedManaCost DESC
moderate
{ "gold_sql": "SELECT T2.name FROM foreign_data AS T1 INNER JOIN cards AS T2 ON T2.uuid = T1.uuid INNER JOIN sets AS T3 ON T3.code = T2.setCode WHERE T3.name = 'Coldsnap' AND T1.language = 'Italian' ORDER BY T2.convertedManaCost DESC", "permission": "allowed", "query_columns": { "foreign_data": [ "langu...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
When was the ruling for the card 'Reminisce' created?
SELECT T2.date FROM cards AS T1 INNER JOIN rulings AS T2 ON T2.uuid = T1.uuid WHERE T1.name = 'Reminisce'
simple
{ "gold_sql": "SELECT T2.date FROM cards AS T1 INNER JOIN rulings AS T2 ON T2.uuid = T1.uuid WHERE T1.name = 'Reminisce'", "permission": "allowed", "query_columns": { "cards": [ "name", "uuid" ], "rulings": [ "date", "uuid" ] }, "missing_columns": {}, "reason": "All r...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
What is the percentage of the cards with a converted mana cost of 7 in the set Coldsnap?
SELECT CAST(SUM(CASE WHEN T1.convertedManaCost = 7 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id) FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T2.name = 'Coldsnap'
moderate
{ "gold_sql": "SELECT CAST(SUM(CASE WHEN T1.convertedManaCost = 7 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id) FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T2.name = 'Coldsnap'", "permission": "allowed", "query_columns": { "cards": [ "convertedManaCost", "id", "se...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
What is the percentage of incredibly powerful cards in the set Coldsnap?
SELECT CAST(SUM(CASE WHEN T1.cardKingdomFoilId IS NOT NULL AND T1.cardKingdomId IS NOT NULL THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id) FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T2.name = 'Coldsnap'
challenging
{ "gold_sql": "SELECT CAST(SUM(CASE WHEN T1.cardKingdomFoilId IS NOT NULL AND T1.cardKingdomId IS NOT NULL THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id) FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T2.name = 'Coldsnap'", "permission": "allowed", "query_columns": { "cards": [ "...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
What's the code for the set which was released on 2017/7/14?
SELECT code FROM sets WHERE releaseDate = '2017-07-14' GROUP BY releaseDate, code
simple
{ "gold_sql": "SELECT code FROM sets WHERE releaseDate = '2017-07-14' GROUP BY releaseDate, code", "permission": "allowed", "query_columns": { "sets": [ "code", "releaseDate" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "question_id": 488, "evidence": "...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
List the keyrune code for the set whose code is 'PKHC'.
SELECT keyruneCode FROM sets WHERE code = 'PKHC'
simple
{ "gold_sql": "SELECT keyruneCode FROM sets WHERE code = 'PKHC'", "permission": "allowed", "query_columns": { "sets": [ "code", "keyruneCode" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "question_id": 489, "evidence": "" }
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
For the set which had 'SS2' as the code, what is its magic card market id?
SELECT mcmId FROM sets WHERE code = 'SS2'
simple
{ "gold_sql": "SELECT mcmId FROM sets WHERE code = 'SS2'", "permission": "allowed", "query_columns": { "sets": [ "code", "mcmId" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "question_id": 490, "evidence": "magic card market id refers to mcmId" }
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
What's the magic card market name for the set which was released on 2017/6/9?
SELECT mcmName FROM sets WHERE releaseDate = '2017-06-09'
simple
{ "gold_sql": "SELECT mcmName FROM sets WHERE releaseDate = '2017-06-09'", "permission": "allowed", "query_columns": { "sets": [ "mcmName", "releaseDate" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "question_id": 491, "evidence": "magic card market nam...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
For the set "From the Vault: Lore", what is its expansion type?
SELECT type FROM sets WHERE name LIKE '%FROM the Vault: Lore%'
simple
{ "gold_sql": "SELECT type FROM sets WHERE name LIKE '%FROM the Vault: Lore%'", "permission": "allowed", "query_columns": { "sets": [ "name" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "question_id": 492, "evidence": "set \"From the Vault refers to name whic...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
For the set "Commander 2014 Oversized" , give its parent code.
SELECT parentCode FROM sets WHERE name = 'Commander 2014 Oversized'
simple
{ "gold_sql": "SELECT parentCode FROM sets WHERE name = 'Commander 2014 Oversized'", "permission": "allowed", "query_columns": { "sets": [ "name", "parentCode" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "question_id": 493, "evidence": "the set \"Comma...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
For all cards illustrated by Jim Pavelec. and describe the text of the ruling of these cards. Do these cards have missing or degraded properties and values.
SELECT T2.text , CASE WHEN T1.hasContentWarning = 1 THEN 'YES' ELSE 'NO' END FROM cards AS T1 INNER JOIN rulings AS T2 ON T2.uuid = T1.uuid WHERE T1.artist = 'Jim Pavelec'
challenging
{ "gold_sql": "SELECT T2.text , CASE WHEN T1.hasContentWarning = 1 THEN 'YES' ELSE 'NO' END FROM cards AS T1 INNER JOIN rulings AS T2 ON T2.uuid = T1.uuid WHERE T1.artist = 'Jim Pavelec'", "permission": "allowed", "query_columns": { "cards": [ "artist", "hasContentWarning", "uuid" ], ...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
What was the release date for the set which card "Evacuation" in it?
SELECT T2.releaseDate FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T1.name = 'Evacuation'
simple
{ "gold_sql": "SELECT T2.releaseDate FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T1.name = 'Evacuation'", "permission": "allowed", "query_columns": { "cards": [ "name", "setCode" ], "sets": [ "code", "releaseDate" ] }, "missing_columns": {}, "...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
How many cards are there in the set of "Rinascita di Alara"?
SELECT T1.baseSetSize FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T2.translation = 'Rinascita di Alara'
simple
{ "gold_sql": "SELECT T1.baseSetSize FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T2.translation = 'Rinascita di Alara'", "permission": "allowed", "query_columns": { "sets": [ "baseSetSize", "code" ], "set_translations": [ "setCode", "translat...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
List the expansion type of the set "Huitième édition".
SELECT type FROM sets WHERE code IN ( SELECT setCode FROM set_translations WHERE translation = 'Huitième édition' )
simple
{ "gold_sql": "SELECT type FROM sets WHERE code IN ( SELECT setCode FROM set_translations WHERE translation = 'Huitième édition' )", "permission": "allowed", "query_columns": { "sets": [ "code" ], "set_translations": [ "setCode" ] }, "missing_columns": {}, "reason": "All required...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
What's the French name of the set of cards with "Tendo Ice Bridge" is in?
SELECT T2.translation FROM cards AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.setCode WHERE T1.name = 'Tendo Ice Bridge' AND T2.language = 'French' AND T2.translation IS NOT NULL
moderate
{ "gold_sql": "SELECT T2.translation FROM cards AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.setCode WHERE T1.name = 'Tendo Ice Bridge' AND T2.language = 'French' AND T2.translation IS NOT NULL", "permission": "allowed", "query_columns": { "cards": [ "name", "setCode" ], "set...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
How many translations of the name of the set "Tenth Edition"?
SELECT COUNT(DISTINCT T2.translation) FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T1.name = 'Tenth Edition'
moderate
{ "gold_sql": "SELECT COUNT(DISTINCT T2.translation) FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T1.name = 'Tenth Edition'", "permission": "allowed", "query_columns": { "sets": [ "code", "name" ], "set_translations": [ "setCode", "translation...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Tell the Japanese name of the set which card "Fellwar Stone" is in it.
SELECT T2.translation FROM cards AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.setCode WHERE T1.name = 'Fellwar Stone' AND T2.language = 'Japanese' AND T2.translation IS NOT NULL
moderate
{ "gold_sql": "SELECT T2.translation FROM cards AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.setCode WHERE T1.name = 'Fellwar Stone' AND T2.language = 'Japanese' AND T2.translation IS NOT NULL", "permission": "allowed", "query_columns": { "cards": [ "name", "setCode" ], "set_...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Which card name in the set 'Journey into Nyx Hero's Path' has the highest converted mana cost.
WITH MaxCMC AS ( SELECT MAX(T1.convertedManaCost) AS max_cmc FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T2.name = 'Journey into Nyx Hero''s Path' ) SELECT T1.name FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode CROSS JOIN MaxCMC WHERE T2.name = 'Journey into Nyx ...
moderate
{ "gold_sql": "WITH MaxCMC AS (\n SELECT MAX(T1.convertedManaCost) AS max_cmc\n FROM cards AS T1\n INNER JOIN sets AS T2 ON T2.code = T1.setCode\n WHERE T2.name = 'Journey into Nyx Hero''s Path'\n)\nSELECT T1.name\nFROM cards AS T1\nINNER JOIN sets AS T2 ON T2.code = T1.setCode\nCROSS JOIN MaxCMC\nWHERE T...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
What is the release date for the set "Ola de frío"?
SELECT T1.releaseDate FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T2.translation = 'Ola de frío'
simple
{ "gold_sql": "SELECT T1.releaseDate FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T2.translation = 'Ola de frío'", "permission": "allowed", "query_columns": { "sets": [ "code", "releaseDate" ], "set_translations": [ "setCode", "translation" ...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
What was the expansion type for the set which card "Samite Pilgrim" in it?
SELECT type FROM sets WHERE code IN ( SELECT setCode FROM cards WHERE name = 'Samite Pilgrim' )
simple
{ "gold_sql": "SELECT type FROM sets WHERE code IN ( SELECT setCode FROM cards WHERE name = 'Samite Pilgrim' )", "permission": "allowed", "query_columns": { "cards": [ "name", "setCode" ], "sets": [ "code" ] }, "missing_columns": {}, "reason": "All required columns are perm...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
How many cards are there in the set 'World Championship Decks 2004' with the converted mana cost as '3'.
SELECT COUNT(id) FROM cards WHERE setCode IN ( SELECT code FROM sets WHERE name = 'World Championship Decks 2004' ) AND convertedManaCost = 3
simple
{ "gold_sql": "SELECT COUNT(id) FROM cards WHERE setCode IN ( SELECT code FROM sets WHERE name = 'World Championship Decks 2004' ) AND convertedManaCost = 3", "permission": "allowed", "query_columns": { "cards": [ "convertedManaCost", "id", "name", "setCode" ], "sets": [ ...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Show the Simplified Chinese translation of the name of the set "Mirrodin"?
SELECT translation FROM set_translations WHERE setCode IN ( SELECT code FROM sets WHERE name = 'Mirrodin' ) AND language = 'Chinese Simplified'
moderate
{ "gold_sql": "SELECT translation FROM set_translations WHERE setCode IN ( SELECT code FROM sets WHERE name = 'Mirrodin' ) AND language = 'Chinese Simplified'", "permission": "allowed", "query_columns": { "sets": [ "code", "name" ], "set_translations": [ "setCode" ] }, "missi...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
For all the set of cards that has Japanese translation, what is the percentage of them are only available in non-foil?
SELECT CAST(SUM(CASE WHEN isNonFoilOnly = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(id) FROM sets WHERE code IN ( SELECT setCode FROM set_translations WHERE language = 'Japanese' )
challenging
{ "gold_sql": "SELECT CAST(SUM(CASE WHEN isNonFoilOnly = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(id) FROM sets WHERE code IN ( SELECT setCode FROM set_translations WHERE language = 'Japanese' )", "permission": "allowed", "query_columns": { "sets": [ "code", "id", "isNonFoilOnly" ], ...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
For all the cards that have a Brazilian Portuguese translation, what is the percentage of them that are only available online?
SELECT CAST(SUM(CASE WHEN T1.isOnlineOnly = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(DISTINCT T1.id) FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T2.language = 'Portuguese (Brazil)'
challenging
{ "gold_sql": "SELECT CAST(SUM(CASE WHEN T1.isOnlineOnly = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(DISTINCT T1.id) FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T2.language = 'Portuguese (Brazil)'", "permission": "allowed", "query_columns": { "cards": [ "id", "isOnl...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
What are the available printing types of the cards that doesn't have a text box created by Aleksi Briclot?
SELECT DISTINCT availability FROM cards WHERE artist = 'Aleksi Briclot' AND isTextless = 1
moderate
{ "gold_sql": "SELECT DISTINCT availability FROM cards WHERE artist = 'Aleksi Briclot' AND isTextless = 1", "permission": "allowed", "query_columns": { "cards": [ "artist", "availability", "isTextless" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "q...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
What is the unique id of the set that has the highest number of cards?
SELECT id FROM sets ORDER BY baseSetSize DESC LIMIT 1
simple
{ "gold_sql": "SELECT id FROM sets ORDER BY baseSetSize DESC LIMIT 1", "permission": "allowed", "query_columns": { "sets": [ "baseSetSize", "id" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "question_id": 509, "evidence": "the highest number of cards re...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Among the cards that doesn't have multiple faces on the same card, who is the illustrator of the card art that has the highest cost of converted mana?
SELECT artist FROM cards WHERE side IS NULL ORDER BY convertedManaCost DESC LIMIT 1
simple
{ "gold_sql": "SELECT artist FROM cards WHERE side IS NULL ORDER BY convertedManaCost DESC LIMIT 1", "permission": "allowed", "query_columns": { "cards": [ "artist", "convertedManaCost", "side" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "question_...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
What is the most common visual frame effects among the incredibly powerful foils?
SELECT frameEffects FROM cards WHERE cardKingdomFoilId IS NOT NULL AND cardKingdomId IS NOT NULL GROUP BY frameEffects ORDER BY COUNT(frameEffects) DESC LIMIT 1
moderate
{ "gold_sql": "SELECT frameEffects FROM cards WHERE cardKingdomFoilId IS NOT NULL AND cardKingdomId IS NOT NULL GROUP BY frameEffects ORDER BY COUNT(frameEffects) DESC LIMIT 1", "permission": "allowed", "query_columns": { "cards": [ "cardKingdomFoilId", "cardKingdomId", "frameEffects" ] ...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
How many cards with unknown power that can't be found in foil is in duel deck A?
SELECT SUM(CASE WHEN power = '*' OR power IS NULL THEN 1 ELSE 0 END) FROM cards WHERE hasFoil = 0 AND duelDeck = 'a'
simple
{ "gold_sql": "SELECT SUM(CASE WHEN power = '*' OR power IS NULL THEN 1 ELSE 0 END) FROM cards WHERE hasFoil = 0 AND duelDeck = 'a'", "permission": "allowed", "query_columns": { "cards": [ "duelDeck", "hasFoil", "power" ] }, "missing_columns": {}, "reason": "All required columns ar...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Among the sets whose expansion type is Commander, which set has the highest total number of cards including promotional and related supplemental products but excluding Alchemy modifications? Indicate the id of the set.
SELECT id FROM sets WHERE type = 'commander' ORDER BY totalSetSize DESC, id ASC LIMIT 1
challenging
{ "gold_sql": "SELECT id FROM sets WHERE type = 'commander' ORDER BY totalSetSize DESC, id ASC LIMIT 1", "permission": "allowed", "query_columns": { "sets": [ "id", "totalSetSize" ] }, "missing_columns": {}, "reason": "All required columns are permitted", "question_id": 513, "evidenc...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
In duels, what are the top 10 cards with the highest converted mana cost?
SELECT DISTINCT name FROM cards WHERE uuid IN ( SELECT uuid FROM legalities WHERE format = 'duel' ) ORDER BY convertedManaCost DESC, name ASC LIMIT 10
simple
{ "gold_sql": "SELECT DISTINCT name FROM cards WHERE uuid IN ( SELECT uuid FROM legalities WHERE format = 'duel' ) ORDER BY convertedManaCost DESC, name ASC LIMIT 10", "permission": "allowed", "query_columns": { "cards": [ "convertedManaCost", "name" ], "legalities": [ "format" ]...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
When was the oldest mythic card released and what are its legal play formats?
SELECT T1.originalReleaseDate, T2.format FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.rarity = 'mythic' AND T1.originalReleaseDate IS NOT NULL AND T2.status = 'Legal' AND T1.originalReleaseDate = (SELECT MIN(originalReleaseDate) FROM cards WHERE rarity = 'mythic' AND originalReleaseDate IS...
moderate
{ "gold_sql": "SELECT T1.originalReleaseDate, T2.format FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.rarity = 'mythic' AND T1.originalReleaseDate IS NOT NULL AND T2.status = 'Legal' AND T1.originalReleaseDate = (SELECT MIN(originalReleaseDate) FROM cards WHERE rarity = 'mythic' AND origi...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
How many cards did Volkan Baǵa illustrated whose foreign language is in French?
SELECT COUNT(T1.id) FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T2.uuid = T1.uuid WHERE T1.artist = 'Volkan Baǵa' AND T2.language = 'French'
moderate
{ "gold_sql": "SELECT COUNT(T1.id) FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T2.uuid = T1.uuid WHERE T1.artist = 'Volkan Baǵa' AND T2.language = 'French'", "permission": "allowed", "query_columns": { "cards": [ "artist", "id", "uuid" ], "foreign_data": [ "language", ...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
How many distinct rare enchantment Abundance cards have at least one legal play format?
SELECT COUNT(DISTINCT T1.id) FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid WHERE T1.rarity = 'rare' AND T1.types = 'Enchantment' AND T1.name = 'Abundance' AND T2.status = 'Legal'
moderate
{ "gold_sql": "SELECT COUNT(DISTINCT T1.id) FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid WHERE T1.rarity = 'rare' AND T1.types = 'Enchantment' AND T1.name = 'Abundance' AND T2.status = 'Legal'", "permission": "allowed", "query_columns": { "cards": [ "id", "name", "rarity...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Which of the play format has the highest number of banned status? Indicate the play format and the names of all the card meet the condition.
WITH MaxBanned AS (SELECT format, COUNT(*) AS count_banned FROM legalities WHERE status = 'Banned' GROUP BY format ORDER BY COUNT(*) DESC LIMIT 1) SELECT T2.format, T1.name FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid INNER JOIN MaxBanned MB ON MB.format = T2.format WHERE T2.status = 'Banned'
moderate
{ "gold_sql": "WITH MaxBanned AS (SELECT format, COUNT(*) AS count_banned FROM legalities WHERE status = 'Banned' GROUP BY format ORDER BY COUNT(*) DESC LIMIT 1) SELECT T2.format, T1.name FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid INNER JOIN MaxBanned MB ON MB.format = T2.format WHERE T2.status...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
What is the language of the "Battlebond" set?
SELECT language FROM set_translations WHERE id IN ( SELECT id FROM sets WHERE name = 'Battlebond' )
simple
{ "gold_sql": "SELECT language FROM set_translations WHERE id IN ( SELECT id FROM sets WHERE name = 'Battlebond' )", "permission": "allowed", "query_columns": { "sets": [ "id", "name" ], "set_translations": [] }, "missing_columns": {}, "reason": "All required columns are permitted", ...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Who is the illustrator that illustrated the least amount of cards? List the format of play of the cards that he/she illustrated.
SELECT T1.artist, T2.format FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid GROUP BY T1.artist ORDER BY COUNT(T1.id) ASC LIMIT 1
moderate
{ "gold_sql": "SELECT T1.artist, T2.format FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid GROUP BY T1.artist ORDER BY COUNT(T1.id) ASC LIMIT 1", "permission": "allowed", "query_columns": { "cards": [ "artist", "id", "uuid" ], "legalities": [ "format", "...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Among the cards whose version of frame style is 1997, what is the status of the card illustrated by D. Alexander Gregory in legacy play format that has sensitive content?
SELECT DISTINCT T2.status FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid WHERE T1.frameVersion = 1997 AND T1.hasContentWarning = 1 AND T1.artist = 'D. Alexander Gregory' AND T2.format = 'legacy'
challenging
{ "gold_sql": "SELECT DISTINCT T2.status FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid WHERE T1.frameVersion = 1997 AND T1.hasContentWarning = 1 AND T1.artist = 'D. Alexander Gregory' AND T2.format = 'legacy'", "permission": "allowed", "query_columns": { "cards": [ "artist", "f...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
Which cards are ranked 1st on EDHRec? List all of the cards name and its banned play format.
SELECT T1.name, T2.format FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid WHERE T1.edhrecRank = 1 AND T2.status = 'Banned' GROUP BY T1.name, T2.format
moderate
{ "gold_sql": "SELECT T1.name, T2.format FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid WHERE T1.edhrecRank = 1 AND T2.status = 'Banned' GROUP BY T1.name, T2.format", "permission": "allowed", "query_columns": { "cards": [ "edhrecRank", "name", "uuid" ], "legalities...
card_games
##Instruction: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Database: card_games Total Tables: 6 Total Columns: 115 Table Schemas: Table: cards (74 columns) ------------------------- • id (integer) • artist (text): The name of the artist that illustrated the card art. • asciiName (text): T...
CardCatalogManager
{ "cards": [ "*" ], "foreign_data": [ "*" ], "legalities": [ "*" ], "sets": [ "*" ], "set_translations": [ "*" ], "rulings": [ "*" ] }
What is the annual average number of sets that were released between 1/1/2012 to 12/31/2015? Indicate the common langugage of the card.
SELECT (CAST(SUM(T1.id) AS REAL) / COUNT(T1.id)) / 4, T2.language FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.id = T2.id WHERE T1.releaseDate BETWEEN '2012-01-01' AND '2015-12-31' GROUP BY T1.releaseDate ORDER BY COUNT(T2.language) DESC LIMIT 1
challenging
{ "gold_sql": "SELECT (CAST(SUM(T1.id) AS REAL) / COUNT(T1.id)) / 4, T2.language FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.id = T2.id WHERE T1.releaseDate BETWEEN '2012-01-01' AND '2015-12-31' GROUP BY T1.releaseDate ORDER BY COUNT(T2.language) DESC LIMIT 1", "permission": "allowed", "query_columns"...