birdsql/bird_sql_dev_20251106 huggingface dataset:
Database: toxicology
Question: Calculate the percentage of carcinogenic molecules which contain the Chlorine element.
Evidence: label = '+' mean molecules are carcinogenic; percentage = DIVIDE(SUM(label = '+' and element = 'cl'), COUNT(molecule_id)) as percentage
SQL:
SELECT 
    (COUNT(CASE WHEN m.label = '+' AND EXISTS (SELECT 1 FROM atom a WHERE a.molecule_id = m.molecule_id AND a.element = 'cl') THEN 1 END) * 100.0) 
    / COUNT(*) AS percentage
FROM molecule m
Database: toxicology
Question: What is the molecule id of bond id TR001_1_7?
SQL:
SELECT DISTINCT T1.molecule_id FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T2.bond_id = 'TR001_1_7'
Database: toxicology
Question: How many elements are contained in bond_id TR001_3_4?
Evidence: element = 'cl' means Chlorine; element = 'c' means Carbon; element = 'h' means Hydrogen; element = 'o' means Oxygen, element = 's' means Sulfur; element = 'n' means Nitrogen, element = 'p' means Phosphorus, element = 'na' means Sodium, element = 'br' means Bromine, element = 'f' means Fluorine; element = 'i' means Iodine; element = 'sn' means Tin; element = 'pb' means Lead; element = 'te' means Tellurium; element = 'ca' means Calcium
SQL:
SELECT COUNT(DISTINCT T1.element) FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T2.bond_id = 'TR001_3_4'
Database: toxicology
Question: What is the type of the bond which is presenting the connection between two atoms TR000_1 and TR000_2?
Evidence: type of bond refers to bond_type; double bond refers to bond_type = ' = '; single bond refers to bond_type = '-'; triple bond refers to bond_type = '#';
SQL:
SELECT T1.bond_type FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id WHERE T2.atom_id = 'TR000_1' AND T2.atom_id2 = 'TR000_2'
Database: toxicology
Question: What is the molecule of atom id "TR000_2" and atom id 2 "TR000_4"?
SQL:
SELECT T1.molecule_id FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id WHERE T2.atom_id = 'TR000_2' AND T2.atom_id2 = 'TR000_4'
Database: toxicology
Question: What is the element of toxicology for the atom with the ID of TR000_1?
Evidence: atom with ID refers to atom_id; element = 'cl' means Chlorine; element = 'c' means Carbon; element = 'h' means Hydrogen; element = 'o' means Oxygen, element = 's' means Sulfur; element = 'n' means Nitrogen, element = 'p' means Phosphorus, element = 'na' means Sodium, element = 'br' means Bromine, element = 'f' means Fluorine; element = 'i' means Iodine; element = 'sn' means Tin; element = 'pb' means Lead; element = 'te' means Tellurium; element = 'ca' means Calcium
SQL:
SELECT T.element FROM atom AS T WHERE T.atom_id = 'TR000_1'
Database: toxicology
Question: Is molecule TR000 is carcinogenic or not?
Evidence: label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic
SQL:
SELECT label FROM molecule AS T WHERE T.molecule_id = 'TR000'
Database: toxicology
Question: Find the percentage of atoms with single bond.
Evidence: single bond refers to bond_type = '-'; percentage is calculated as (single bonds / total bonds) × 100
SQL:
SELECT CAST(COUNT(CASE WHEN T.bond_type = '-' THEN T.bond_id ELSE NULL END) AS REAL) * 100 / COUNT(T.bond_id) FROM bond t
Database: toxicology
Question: How many carcinogenic molecules that consisted of Nitrogen?
Evidence: nitrogen refers to element = 'n'; label = '+' mean molecules are carcinogenic;
SQL:
SELECT COUNT(DISTINCT T1.molecule_id) FROM molecule AS T1 INNER JOIN atom AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.element = 'n' AND T1.label = '+'
Database: toxicology
Question: Which molecule consisted of Sulphur atom with double bond?
Evidence: sulphur refers to element - 's'; double bond refers to bond_type = ' = ';
SQL:
SELECT DISTINCT T1.molecule_id FROM atom AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 's' AND T2.bond_type = '='
Database: toxicology
Question: Which non-carcinogenic molecules consisted more than 5 atoms?
Evidence: non-carcinogenic molecules have a label value of '-'
SQL:
SELECT T.molecule_id FROM ( SELECT T1.molecule_id, COUNT(T2.atom_id) FROM molecule AS T1 INNER JOIN atom AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.label = '-' GROUP BY T1.molecule_id HAVING COUNT(T2.atom_id) > 5 ) t
Database: toxicology
Question: List all the elements with double bond, consisted in molecule TR024.
Evidence: double bond refers to bond_type = '='
SQL:
SELECT DISTINCT T1.element FROM atom AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.molecule_id = 'TR024' AND T2.bond_type = '='
Database: toxicology
Question: Which carcinogenic molecule have the highest number of atoms consisted in it?
Evidence: label = '+' mean molecules are carcinogenic; molecule that have the highest number of atoms consisted in in refers to MAX(COUNT(atom.molecule_id))
SQL:
SELECT T.molecule_id 
FROM ( 
    SELECT T2.molecule_id, COUNT(T1.atom_id) 
    FROM atom AS T1 
    INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id 
    WHERE T2.label = '+' 
    GROUP BY T2.molecule_id 
    ORDER BY COUNT(T1.atom_id) DESC, T2.molecule_id ASC 
    LIMIT 1 
) t
Database: toxicology
Question: Calculate the percentage of carcinogenic molecules with triple bonded Hidrogen atoms.
Evidence: hydrogen refers to element = 'h'; label = '+' mean molecules are carcinogenic; triple bond refers to bond_type = '#'; percentage = DIVIDE(SUM(label = '+'), COUNT(molecule_id)) * 100.0 where element = 'h' AND bond_type = '#';
SQL:
SELECT CAST(SUM(CASE WHEN T1.label = '+' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(DISTINCT T1.molecule_id) FROM molecule AS T1 INNER JOIN atom AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN bond AS T3 ON T1.molecule_id = T3.molecule_id WHERE T3.bond_type = '#' AND T2.element = 'h'
Database: toxicology
Question: How many of the molecules are carcinogenic?
Evidence: label = '+' mean molecules are carcinogenic;
SQL:
SELECT COUNT(T.molecule_id) FROM molecule AS T WHERE T.label = '+'
Database: toxicology
Question: Among the molecules between TR004 to TR010, how many of them has single bonds?
Evidence: single bond refers to bond_type = '-'; molecules between TR004 to TR010 refers molecule_id BETWEEN 'TR004' and 'TR010';
SQL:
SELECT COUNT(DISTINCT T.molecule_id) FROM bond AS T WHERE T.molecule_id BETWEEN 'TR004' AND 'TR010' AND T.bond_type = '-'
Database: toxicology
Question: In the molecule TR008, how many carbons are present?
Evidence: carbon refers to element = 'c'
SQL:
SELECT COUNT(T.atom_id) FROM atom AS T WHERE T.molecule_id = 'TR008' AND T.element = 'c'
Database: toxicology
Question: What is the element with the atom ID of TR004_7 in molecule that is not carcinogenic?
Evidence: A non-carcinogenic molecule is labeled as '-'
SQL:
SELECT T1.element FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.atom_id = 'TR004_7' AND T2.label = '-'
Database: toxicology
Question: What is the total number of molecules with double bonded oxygen?
Evidence: oxygen refers to element = 'o'; double bond refers to bond_type = ' = ';
SQL:
SELECT COUNT(DISTINCT T1.molecule_id) FROM atom AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.bond_type = '=' AND T1.element = 'o'
Database: toxicology
Question: in molecules with triple bonds, how many of them are not carcinogenic?
Evidence: triple bond refers to bond_type = '#'; label = '-' means molecules are non-carcinogenic
SQL:
SELECT COUNT(DISTINCT T1.molecule_id) FROM molecule AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.bond_type = '#' AND T1.label = '-'
Database: toxicology
Question: List the element and bond type included in the molecule with molecule ID of TR002.
Evidence: TR002 is the molecule id
SQL:
SELECT DISTINCT T1.element, T2.bond_type FROM atom AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.molecule_id = 'TR002'
Database: toxicology
Question: What is the atom ID of double bonded carbon in TR012 molecule?
Evidence: carbon refers to element = 'c'; double bond refers to bond_type = ' = ';
SQL:
SELECT T1.atom_id FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN bond AS T3 ON T2.molecule_id = T3.molecule_id WHERE T2.molecule_id = 'TR012' AND T3.bond_type = '=' AND T1.element = 'c'
Database: toxicology
Question: List the atom ID of the carcinogenic molecule that contains oxygen?
Evidence: label = '+' mean molecules are carcinogenic; oxygen refers to element = 'o'
SQL:
SELECT T1.atom_id FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'o' AND T2.label = '+'
Database: card_games
Question: Which are the cards that have incredibly powerful foils.
Evidence: incredibly powerful foils refers to cardKingdomFoilId is not null AND cardKingdomId is not null
SQL:
SELECT id FROM cards WHERE cardKingdomFoilId IS NOT NULL AND cardKingdomId IS NOT NULL
Database: card_games
Question: What are the borderless cards available without powerful foils?
Evidence: borderless' refers to borderColor; poweful foils refers to cardKingdomFoilId paired with cardKingdomId AND cardKingdomId is not null
SQL:
SELECT id FROM cards WHERE borderColor = 'borderless' AND (cardKingdomFoilId IS NULL OR cardKingdomId IS NULL)
Database: card_games
Question: List the card names with value that cost more converted mana.
Evidence: more converted mana refers to Max(ConvertedManaCost);
SQL:
SELECT DISTINCT name FROM cards WHERE ConvertedManaCost = (SELECT MAX(ConvertedManaCost) FROM cards)
Database: card_games
Question: Name all cards with 2015 frame style ranking below 100 on EDHRec.
Evidence: below 100 on EDHRec refers to EDHRec <100; with 2015 frame style refers to frameVersion = 2015;
SQL:
SELECT id FROM cards WHERE edhrecRank < 100 AND frameVersion = 2015
Database: card_games
Question: List all the mythic rarity print cards banned in gladiator format.
Evidence: mythic rarity printing refers to rarity = 'mythic'; card banned refers to status = 'Banned'; in gladiator format refers to format = 'gladiator';
SQL:
SELECT DISTINCT T1.id FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T2.format = 'gladiator' AND T2.status = 'Banned' AND T1.rarity = 'mythic'
Database: card_games
Question: For artifact type of cards that do not have multiple faces on the same card, state its legalities status for vintage play format.
Evidence: Artifact type of cards refers to types = 'Artifact'; cards without multiple faces are those that don't have a side designation; vintage refers to a play format.
SQL:
SELECT DISTINCT T2.status FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.type = 'Artifact' AND T2.format = 'vintage' AND T1.side IS NULL
Database: card_games
Question: List all the card id and artist with unknown power which are legal for commander play format.
Evidence: unknown power refers to power = '*' or POWER IS NULL; commander play format refers to format = 'commander'; legal for commander play format refers to format = 'commander' where status = 'Legal'
SQL:
SELECT T1.id, T1.artist FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T2.status = 'Legal' AND T2.format = 'commander' AND (T1.power IS NULL OR T1.power = '*')
Database: card_games
Question: Find all cards illustrated by Stephen Daniel and describe the text of the ruling of these cards. State if these cards have missing or degraded properties and values.
Evidence: cards have missing or degraded properties and value refers to hasContentWarning = 1; 'Stephen Daniele' is artist; Find all cards refers to return card id
SQL:
SELECT T1.id, T2.text, T1.hasContentWarning FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE T1.artist = 'Stephen Daniele'
Database: card_games
Question: Describe the information about rulings for card named 'Sublime Epiphany' with number 74s.
Evidence: Sublime Epiphany' is name of cards; number 74s refers to number = '74s'; information refers to text;
SQL:
SELECT T2.text FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE T1.name = 'Sublime Epiphany' AND T1.number = '74s'
Database: card_games
Question: Name the card and artist with the most ruling information. Also state if the card is a promotional printing.
Evidence: with the most ruling information refers to Max(count(rulings.uuid)); the card is the promotional printing refers to isPromo = 1;
SQL:
SELECT
  T1.name,
  T1.artist,
  CASE WHEN T1.isPromo = 1 THEN 'yes' ELSE 'no' END AS isPromo
FROM cards AS T1
JOIN rulings AS T2 ON T2.uuid = T1.uuid
GROUP BY T1.uuid, T1.name, T1.artist, T1.isPromo
ORDER BY COUNT(T2.uuid) DESC, T1.uuid ASC
LIMIT 1;
Database: card_games
Question: State the alternative languages available for card named Annul numbered 29.
Evidence: Annul refers to the card name; numbered 29 refers to the card's collector number; alternative languages are stored in foreign language data records
SQL:
SELECT T2.language FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T1.name = 'Annul' AND T1.number = '29'
Database: card_games
Question: Name all the cards which have alternative language in Japanese.
Evidence: Japanese' is the language;
SQL:
SELECT DISTINCT T1.name FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T2.language = 'Japanese'
Database: card_games
Question: Calculate the percentage of the cards availabe in Chinese Simplified.
Evidence: Chinese Simplified' is the language; percentage = Divide(Sum(id where language = 'Chinese Simplified'), Count(id)) *100
SQL:
SELECT CAST(SUM(CASE WHEN T2.language = 'Chinese Simplified' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id) FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid
Database: card_games
Question: List all the sets available in Italian translation. State the total number of cards per set.
Evidence: Italian translation refers to language = 'Italian'; total number of card per set refers to totalSetSize;
SQL:
SELECT T1.name, T1.totalSetSize FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T2.language = 'Italian'
Database: card_games
Question: How many types of cards does the artist Aaron Boyd illustrated about card art?
Evidence: 'Aaron Boyd' is artist;
SQL:
SELECT COUNT(type) FROM cards WHERE artist = 'Aaron Boyd'
Database: card_games
Question: What is the keyword found on card 'Angel of Mercy'?
Evidence: Angel of Mercy' is the name of card;
SQL:
SELECT DISTINCT keywords FROM cards WHERE name = 'Angel of Mercy'
Database: card_games
Question: How many cards have infinite power?
Evidence: infinite power refers to power = '*';
SQL:
SELECT COUNT(*) FROM cards WHERE power = '*'
Database: card_games
Question: What type of promotion is of card 'Duress'?
Evidence: card Duress refers to name = 'Duress'; type of promotion refers to promoTypes;
SQL:
SELECT DISTINCT promoTypes 
FROM cards 
WHERE name = 'Duress' AND promoTypes IS NOT NULL
Database: card_games
Question: What is the border color of card "Ancestor's Chosen"?
Evidence: name of card  = 'Ancestor''s Chosen' ;
SQL:
SELECT DISTINCT borderColor FROM cards WHERE name = 'Ancestor''s Chosen'
Database: card_games
Question: What is the type of the card "Ancestor's Chosen" as originally printed?
Evidence: `Ancestor's Chosen` is the name of card; type of the card as originally printed refers to originalType;
SQL:
SELECT originalType FROM cards WHERE name = "Ancestor's Chosen" AND originalType IS NOT NULL
Database: card_games
Question: What are the languages available for the set that card 'Angel of Mercy' is in?
Evidence: Angel of Mercy' is the name of card;
SQL:
SELECT DISTINCT
  s.`language`
FROM cards AS c
JOIN set_translations AS s ON s.setCode = c.setCode
WHERE c.name = 'Angel of Mercy'
Database: card_games
Question: How many cards of legalities whose status is restricted have text boxes?
Evidence: restricted refers to status = 'restricted'; have text boxes refers to isTextless = 0;
SQL:
SELECT COUNT(DISTINCT T1.id) FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T2.status = 'Restricted' AND T1.isTextless = 0
Database: card_games
Question: What is the description about the ruling of card "Condemn"?
Evidence: Ancestor's Chosen' is the name of card; description about the ruling refers to text;
SQL:
SELECT T2.text FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE T1.name = 'Condemn'
Database: card_games
Question: How many cards of legalities whose status is restricted are found in a starter deck?
Evidence: restricted refers to status = 'Restricted'; found in the starter deck refers to isStarter = 1;
SQL:
SELECT COUNT(T1.id) 
FROM cards AS T1 
INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid 
WHERE T2.status = 'Restricted' AND T1.isStarter = 1
Database: card_games
Question: What is the status of card "Cloudchaser Eagle"?
Evidence: Cloudchaser Eagle is the name of card;
SQL:
SELECT DISTINCT T2.status FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.name = 'Cloudchaser Eagle'
Database: card_games
Question: What is the type of card "Benalish Knight"?
Evidence: Benalish Knight' is the name of card;
SQL:
SELECT type 
FROM cards 
WHERE name = 'Benalish Knight';
Database: card_games
Question: What is the rule of playing card "Benalish Knight"?
Evidence: Benalish Knight' is the name of card; rule of playing card refers to format;
SQL:
SELECT T2.format FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.name = 'Benalish Knight'
Database: card_games
Question: Please provide the names of the artists who illustrated the card art in Phyrexian.
Evidence: Phyrexian' is the language; name of artists refers to artist;
SQL:
SELECT T1.artist FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T2.language = 'Phyrexian'
Database: card_games
Question: What is the percentage of borderless cards?
Evidence: borderless card refers to borderColor = 'borderless'; percentage = Divide(Count (id) where borderColor = 'borderless', Count(id)) *100
SQL:
SELECT CAST(SUM(CASE WHEN borderColor = 'borderless' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(id) FROM cards
Database: card_games
Question: How many cards that illusrtated in German have been reprinted?
Evidence: German' is the language; reprinted refers to isReprint = 1;
SQL:
SELECT COUNT(T1.id) FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T2.language = 'German' AND T1.isReprint = 1
Database: card_games
Question: How many borderless cards are illustrated in Russian?
Evidence: borderless card refers to borderColor = 'borderless'; 'Russian' is the language;
SQL:
SELECT COUNT(T1.id) FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T1.borderColor = 'borderless' AND T2.language = 'Russian'
Database: card_games
Question: What is the percentage of cards whose language is French among the Story Spotlight cards?
Evidence: Story Spotlight card refers to isStorySpotlight = 1; French is the language; Percentage = Divide(Count(id) where language = 'French' and isStorySpotlight = 1, Count(id) where isStorySpotlight = 1)*100
SQL:
SELECT CAST(SUM(CASE WHEN T2.language = 'French' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id) FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T1.isStorySpotlight = 1
Database: card_games
Question: How many cards are there with toughness of 99?
SQL:
SELECT COUNT(id) FROM cards WHERE toughness = 99
Database: card_games
Question: Name the cards that were illustrated by Aaron Boyd.
Evidence: Aaron Boyd' is artist;
SQL:
SELECT DISTINCT name FROM cards WHERE artist = 'Aaron Boyd'
Database: card_games
Question: How many black border cards are only available on mtgo?
Evidence: black border card refers to borderColor = black; available on mtgo refers to availability = mtgo;

add quotes for string = 'black' and = 'mtgo'
SQL:
SELECT COUNT(id) FROM cards WHERE availability = 'mtgo' AND borderColor = 'black'
Database: card_games
Question: List down all the card IDs with converted mana cost of 0.
Evidence: converted mana cost of 0 refers to covertedManaCost = 0;
SQL:
SELECT id FROM cards WHERE convertedManaCost = 0
Database: card_games
Question: What are the card layout of cards with keyword of flying?
SQL:
SELECT DISTINCT layout FROM cards WHERE keywords LIKE '%Flying%'
Database: card_games
Question: How many cards with original type of "Summon - Angel" have subtype other than "Angel"?
Evidence: subtype other than Angel refers to subtypes is not 'Angel';
SQL:
SELECT COUNT(id) FROM cards WHERE originalType = 'Summon - Angel' AND subtypes != 'Angel'
Database: card_games
Question: What are the foiled cards that are incredibly powerful when paired with non foiled cards? List the IDs.
Evidence: Incredibly powerful refers to both cardKingdomFoilId and cardKingdomId IS NOT Null;
SQL:
SELECT id FROM cards WHERE cardKingdomId IS NOT NULL AND cardKingdomFoilId IS NOT NULL
Database: card_games
Question: What are the cards belong to duel deck a? List the ID.
Evidence: duel deck a refers to duelDeck = a;
SQL:
SELECT id FROM cards WHERE duelDeck = 'a'
Database: card_games
Question: List the edhrecRank for cards with frame version 2015.
SQL:
SELECT edhrecRank FROM cards WHERE frameVersion = 2015
Database: card_games
Question: List down the name of artists for cards in Chinese Simplified.
Evidence: Chinese Simplified' is the language;
SQL:
SELECT T1.artist
FROM cards AS T1
INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid
WHERE T2.language = 'Chinese Simplified';
Database: card_games
Question: What are the cards that only available in paper and Japanese language?
Evidence: available in paper refers to availability = 'paper'; 'Japanese is the language;
SQL:
SELECT T1.name FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T1.availability = 'paper' AND T2.language = 'Japanese'
Database: card_games
Question: How many of the cards which is banned at least in one format are white border?
Evidence: banned card refers to status = 'Banned'; white border refers to borderColor = 'white';
SQL:
SELECT COUNT(DISTINCT T1.id) FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T2.status = 'Banned' AND T1.borderColor = 'white'
Database: card_games
Question: List down the uuid for legacy cards and the foreign language of these cards.
Evidence: legacy card refers to format = 'legacy'; foreign language refers to language in foreign_data
SQL:
SELECT T1.uuid, T3.language FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid INNER JOIN foreign_data AS T3 ON T1.uuid = T3.uuid WHERE T2.format = 'legacy'
Database: card_games
Question: Write down the ruling of Beacon of Immortality.
Evidence: Beacon of Immortality' is the name of card;
SQL:
SELECT T2.text FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE T1.name = 'Beacon of Immortality'
Database: card_games
Question: How many legal cards are having future frame version?
Evidence: future frame version refers to frameVersion = 'future'; legal refers to status = 'Legal';
SQL:
SELECT COUNT(T1.id) FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.frameVersion = 'future' AND T2.status = 'Legal'
Database: card_games
Question: What are the cards for set OGW? State the colour for these cards.
Evidence: set OGW refers to setCode = 'OGW';
SQL:
SELECT id, colors FROM cards WHERE setCode = 'OGW'
Database: card_games
Question: What are the cards in set 10E with converted mana of 5 have translation and what are the languages?
Evidence: set 10E refers to setCode = '10E'; converted mana of 5 refers to convertedManaCost = 5;
SQL:
SELECT c.id, c.name, f.language
FROM cards c
JOIN foreign_data f ON c.uuid = f.uuid
WHERE c.setCode = '10E' AND c.convertedManaCost = 5
ORDER BY c.name, f.language;
Database: card_games
Question: List down the name of cards with original types of Creature - Elf and the date of rulings for these cards.
Evidence: Creature - Elf is the originalType;
SQL:
SELECT T1.id, T2.date FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE T1.originalType = 'Creature - Elf'
Database: card_games
Question: What are the colors of cards from ID 1-20? What are the format of these cards?
Evidence: ID 1-20 refers to id BETWEEN 1 and 20;
SQL:
SELECT T1.colors, T2.format FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.id BETWEEN 1 AND 20
Database: card_games
Question: Among the Artifact cards, which are black color and comes with foreign languague translation?
Evidence: Artifact card refers to originalType = 'Artifact'; black color refers to colors = 'B'; foreign language refers to language in foreign_data
SQL:
SELECT DISTINCT T1.name FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T1.originalType = 'Artifact' AND T1.colors = 'B'
Database: card_games
Question: Pick 3 cards with rarity of uncommon, list down name these cards according to ascending order of it's ruling date.
Evidence: uncommon refers to rarity = 'uncommon';
SQL:
SELECT DISTINCT T1.name FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE T1.rarity = 'uncommon' ORDER BY T2.date ASC LIMIT 3
Database: card_games
Question: On how many cards designed by John Avon is its foil non-powerful?
Evidence: John Avon refer to artist; foil poweful foils refers to cardKingdomId and cardKingdomFoildId is NOT NULL 

SQL:
SELECT COUNT(id) FROM cards WHERE (cardKingdomId IS NULL OR cardKingdomFoilId IS NULL) AND artist = 'John Avon'
Database: card_games
Question: How many white bordered cards are powerful?
Evidence: white bordered cards refer to borderColor = 'white'; powerful cards refers to cardKingdomFoilId is not null AND cardKingdomId is not null (replace)
SQL:
SELECT COUNT(id) FROM cards WHERE borderColor = 'white' AND cardKingdomId IS NOT NULL AND cardKingdomFoilId IS NOT NULL
Database: card_games
Question: How many cards designed by UDON and available in mtgo print type has a starting maximum hand size of -1?
Evidence: UDON refer to artist; availabe in mtgo refers to availability = 'mtgo'; starting maximum hand size of -1 refers to hand = -1
SQL:
SELECT COUNT(id) FROM cards WHERE hAND = '-1' AND artist = 'UDON' AND Availability = 'mtgo'
Database: card_games
Question: How many cards with a 1993 frame version and available on paper have a sensitive content warning?
Evidence: 1993 refers to frameVersion = '1993'
SQL:
SELECT COUNT(id) FROM cards WHERE frameVersion = '1993' AND availability = 'paper' AND hasContentWarning = 1
Database: card_games
Question: What is the mana cost of cards with a normal layout, a 2003 frame version, with a black border color, and available in paper and mtgo?
Evidence: available in paper and mtgo refers to availability = 'mtgo,paper'; frameVersion = 2003;borderColor = 'black'
SQL:
SELECT manaCost
FROM cards
WHERE availability = 'mtgo,paper'
  AND borderColor = 'black'
  AND frameVersion = 2003
  AND layout = 'normal';
Database: card_games
Question: What is the  unconverted mana do all the cards created by Rob Alexander cost in total?
Evidence: unconverted mana refer to manaCost; Rob Alexander refer to artist
SQL:
SELECT manaCost FROM cards WHERE artist = 'Rob Alexander'
Database: card_games
Question: Lists all types of cards available in arena.
Evidence: all types refer to subtypes and supertypes

availble in arena refers to availability = 'arena'
SQL:
SELECT DISTINCT subtypes, supertypes FROM cards WHERE availability = 'arena' AND subtypes IS NOT NULL AND supertypes IS NOT NULL
Database: card_games
Question: Lists the set code of all cards translated into Spanish.
SQL:
SELECT setCode FROM set_translations WHERE language = 'Spanish'
Database: card_games
Question: What percentage of legendary frame effect cards that are only available in online game variations?
Evidence: only available in online game variationsrefer to isOnlineOnly =1 ; legendary frame effect cards refer to frameEffects = 'legendary'; percentage refer to DIVIDE(COUNT(isOnlineOnly=1), COUNT(id)) from cards where frameEffects = 'legendary'
SQL:
SELECT SUM(CASE WHEN isOnlineOnly = 1 THEN 1.0 ELSE 0 END) / COUNT(id) * 100 FROM cards WHERE frameEffects = 'legendary'
Database: card_games
Question: What is the percentage of Story Spotlight cards that do not have a text box?
Evidence: Story Spotlight cards that do not have a text box refers to isStorylight = 1 and isTextless = 1; Percentage = DIVIDE(SUM(count(id) where isStorySpotlight = 1 AND isTextless = 1 ), SUM(count(id) where isStorySpotlight = 1)) * 100
SQL:
SELECT (SELECT COUNT (id) FROM cards WHERE isTextless = 1 AND isStorySpotlight = 1) * 100 / COUNT(id) FROM cards WHERE isStorySpotlight = 1
Database: card_games
Question: Calculate the percentage of cards in Spanish. List them by name.
Evidence: Spanish refer to language; Percentage refer to DIVIDE(SUM(ID where language = 'Spanish'), COUNT(id))*100
SQL:
SELECT (SELECT CAST(SUM(CASE WHEN language = 'Spanish' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM foreign_data) AS percentage, name FROM foreign_data WHERE language = 'Spanish' ORDER BY name
Database: card_games
Question: Indicates the name of all the languages into which the set whose number of cards is 309 is translated.
Evidence: set refer to setCode; number of cards refers to baseSetSize; baseSetsize = 309


SQL:
SELECT T2.language FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T1.baseSetSize = 309
Database: card_games
Question: How many Brazilian Portuguese translated sets are inside the Commander block?
Evidence: Commander block refer to block = 'Commander'; sets refer to code = setCode; Portuguese refer to language = 'Portuguese (Brasil)'
SQL:
SELECT COUNT(T1.id) FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T2.language = 'Portuguese (Brazil)' AND T1.block = 'Commander'
Database: card_games
Question: List by ID all Creature-type cards with legal status.
Evidence: legal status refer to status = 'legal'; Creature-type cards refer to types = 'Creature';
SQL:
SELECT DISTINCT T1.id FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T2.status = 'Legal' AND T1.types = 'Creature'
Database: card_games
Question: Lists all types of cards in German.
Evidence: German refer to language; all types refer to the subtypes, supertypes; subtypes is not null AND supertypes is not null
SQL:
SELECT T1.subtypes, T1.supertypes FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T2.language = 'German' AND T1.subtypes IS NOT NULL AND T1.supertypes IS NOT NULL
Database: card_games
Question: How many unknown power cards contain info about the triggered ability
Evidence: unknown power cards refers to power is null or power = '*';contain info about the triggered ability refers to text contains 'triggered ability'
SQL:
SELECT T2.text FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE (T1.power IS NULL OR T1.power = '*') AND T2.text LIKE '%triggered ability%'
Database: card_games
Question: Indicates the number of cards with pre-modern format, ruling text "This is a triggered mana ability." that do not have multiple faces.
Evidence: pre-modern format refers to format = 'premodern' ;do not have multiple faces refers to side IS NULL
SQL:
SELECT COUNT(T1.id) FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid INNER JOIN rulings AS T3 ON T1.uuid = T3.uuid WHERE T2.format = 'premodern' AND T3.text = 'This is a triggered mana ability.' AND T1.Side IS NULL
Database: card_games
Question: Is there any card from Erica Yang artist in pauper format and available in paper? If so, indicate its ID.
Evidence: available in paper refers to availability = 'paper'
SQL:
SELECT T1.id
FROM cards AS T1
INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid
WHERE T1.artist = 'Erica Yang'
  AND T2.format = 'pauper'
  AND T1.availability = 'paper';
Database: card_games
Question: To which artist does the card with the text "Das perfekte Gegenmittel zu einer dichten Formation" belong?
SQL:
SELECT DISTINCT T1.artist FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T2.flavorText LIKE '%DAS perfekte Gegenmittel zu einer dichten Formation%'
Database: card_games
Question: What is the foreign name of the card in French of type Creature, normal layout and black border color, by artist Matthew D. Wilson?
Evidence: in French refers to language = 'French'; black border color refers to borderColor = 'black'
SQL:
SELECT name FROM foreign_data WHERE uuid IN ( SELECT uuid FROM cards WHERE types = 'Creature' AND layout = 'normal' AND borderColor = 'black' AND artist = 'Matthew D. Wilson' ) AND language = 'French'
Database: card_games
Question: How many rare cards have ruling text that were printed on 01/02/2007?
Evidence: Date format '01/02/2007' should be interpreted as '2007-02-01'
SQL:
SELECT COUNT(DISTINCT T1.id) FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE T1.rarity = 'rare' AND T2.date = '2007-02-01'
Database: card_games
Question: What language is the set of 180 cards that belongs to the Ravnica block translated into?
Evidence: set of 180 cards refers to baseSetSize = 180
SQL:
SELECT T2.language FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T1.block = 'Ravnica' AND T1.baseSetSize = 180
Database: card_games
Question: What percentage of cards with format commander and legal status do not have a content warning?
Evidence: do not have a content warning refers to hasContentWarning = 0; percentage = (cards without content warning / total cards) × 100
SQL:
SELECT CAST(SUM(CASE WHEN T1.hasContentWarning = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id) FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T2.format = 'commander' AND T2.status = 'Legal'
Database: card_games
Question: What percentage of cards without power are in French?
Evidence: in French refers to language = 'French'; cards without power refers to power IS NULL OR power = '*'; percentage = DIVIDE(COUNT(language = 'French' and power is NULL or power = '*'), COUNT( power is NULL or power = '*'))*100
SQL:
SELECT 
    (COUNT(DISTINCT CASE WHEN f.language = 'French' THEN c.id END) * 100.0 
    / NULLIF(COUNT(DISTINCT c.id), 0)) AS french_percentage
FROM 
    cards c
LEFT JOIN 
    foreign_data f ON c.uuid = f.uuid
WHERE 
    c.power IS NULL OR c.power = '*';
Database: card_games
Question: What percentage of Japanese translated sets are expansion sets?
Evidence: Japanese translated refers to language = 'Japanese'; expansion sets refers to type = 'expansion'; percentage = DIVIDE(COUNT(language = 'Japanese'),COUNT(language))*100
SQL:
SELECT CAST(SUM(CASE WHEN T2.language = 'Japanese' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id) FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T1.type = 'expansion'
Database: card_games
Question: What kind of printing is on the card that Daren Bader created?
Evidence: kind of printing refers to availability; Daren Bader created refers to artist = 'Daren Bader'
SQL:
SELECT DISTINCT availability FROM cards WHERE artist = 'Daren Bader'
Database: card_games
Question: How many color cards with no borders have been ranked higher than 12000 on EDHRec?
Evidence: color cards with no borders refers to borderColor = 'borderless'; ranked higher than 12000 on EDHRec refers to edhrecRank > 12000
SQL:
SELECT COUNT(id) FROM cards WHERE edhrecRank > 12000 AND borderColor = 'borderless'
Database: card_games
Question: How many cards are oversized, reprinted, and printed for promotions?
Evidence: are oversized refers to isOversized = 1; reprinted refers to isReprint = 1; printed for promotions refers to isPromo = 1
SQL:
SELECT COUNT(id) FROM cards WHERE isOversized = 1 AND isReprint = 1 AND isPromo = 1
Database: card_games
Question: Please list top three unknown power cards that have promotional types for arena league in alphabetical order.
Evidence: unknown power cards refers to power is null or power = '*'; promotional types for arena league refers to promoTypes = 'arenaleague'
SQL:
SELECT name FROM cards WHERE (power IS NULL OR power LIKE '%*%') AND promoTypes = 'arenaleague' ORDER BY name LIMIT 3
Database: card_games
Question: What is the language of the card with the multiverse number 149934?
Evidence: multiverse number 149934 refers to multiverseid = 149934;
SQL:
SELECT language FROM foreign_data WHERE multiverseid = 149934
Database: card_games
Question: Please provide the ids of top three powerful pairs of Kingdom Foil and Kingdom Cards sorted by Kingdom Foil id in alphabetical order.
Evidence: poweful refers to cardKingdomFoilId is not null AND cardKingdomId is not null
SQL:
SELECT cardKingdomFoilId, cardKingdomId FROM cards WHERE cardKingdomFoilId IS NOT NULL AND cardKingdomId IS NOT NULL ORDER BY cardKingdomFoilId LIMIT 3
Database: card_games
Question: What proportion of cards do not have a text box with a normal layout?
Evidence: do not have a text box refers to isTextless = 1; proportion refers to DIVIDE(COUNT(Textless = 1 and layout = 'normal'),COUNT(Textless))*100
SQL:
SELECT CAST(SUM(CASE WHEN isTextless = 1 AND layout = 'normal' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*)
FROM cards;
Database: card_games
Question: What are the card numbers that don't have multiple faces on a single card and have the subtypes Angel and Wizard?
Evidence: don't have multiple faces on a single card side is null
SQL:
SELECT id FROM cards WHERE subtypes = 'Angel,Wizard' AND side IS NULL
Database: card_games
Question: Please provide top three sets that don't appear in Magic: The Gathering Online, along with their names in in alphabetical order.
Evidence: don't appear in Magic: The Gathering Online refers to mtgoCode is NULL or mtgoCode = ''
SQL:
SELECT name FROM sets WHERE mtgoCode IS NULL ORDER BY name LIMIT 3
Database: card_games
Question: What languages are available in the set known as Archenemy on the magic card market and having the code ARC?
Evidence: known as Archenemy refers to mcmName = 'Archenemy'; having the code ARC refers to setCode = 'ARC'
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'
Database: card_games
Question: What is the name of set number 5 and its translation?
Evidence: set number 5 refers to id = 5
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
Database: card_games
Question: What is the language and expansion type of set number 207?
Evidence: set number 207 refers to id = 207
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
Database: card_games
Question: 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.
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;
Database: card_games
Question: 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.
Evidence: not available outside of the United States refers to isForeignOnly = 0; has foil cards refers to isFoilOnly = 1; with Japanese writing on them refers to language = 'Japanese'
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
Database: card_games
Question: Which Russian set of cards contains the most cards overall?
SQL:
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'
  )
ORDER BY T1.id ASC;
Database: card_games
Question: What is the percentage of the set of cards that have Chinese Simplified as the language and are only available for online games?
Evidence: are only available for online games refers to isOnlineOnly = 1; percentage = DIVIDE(COUNT(isOnlineOnly = 1),COUNT(isOnlineOnly))*100
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
Database: card_games
Question: How many sets are available just in Japanese and not in Magic: The Gathering Online?
Evidence: Japanese refers to language = 'Japanese'; not in Magic: The Gathering Online refers to mtgoCode is null or mtgoCode = ''
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 = '')
Database: card_games
Question: How many card border with black color ? List out the card id.
Evidence: border with black color refers to borderColor = 'black'
SQL:
SELECT id FROM cards WHERE borderColor = 'black'
Database: card_games
Question: How many cards have frame effect as extendedart? List out the id of those cards.
Evidence: 
frame effect as extendedart refers to frameEffects = 'extendedart'

SQL:
SELECT id FROM cards WHERE frameEffects = 'extendedart'
Database: card_games
Question: Among black card borders, which card has full artwork?
Evidence: white card borders refers to borderColor = 'white'; has full artwork refers to isFullArt = 1
SQL:
SELECT id FROM cards WHERE borderColor = 'black' AND isFullArt = 1
Database: card_games
Question: Point out the language of set id "174"?
SQL:
SELECT language FROM set_translations WHERE id = 174
Database: card_games
Question: List out the set name of the set code "ALL".
SQL:
SELECT name FROM sets WHERE code = 'ALL'
Database: card_games
Question: Which foreign language used by "A Pedra Fellwar"?
Evidence: "A Pedra Fellwar" refers to name = 'A Pedra Fellwar'
SQL:
SELECT DISTINCT language FROM foreign_data WHERE name = 'A Pedra Fellwar'
Database: card_games
Question: State the set code of the set with release date of 07/13/2007?
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'
Database: card_games
Question: Mention the base set size and set code of the set that was in block named "Masques" and "Mirage".
SQL:
SELECT baseSetSize, code FROM sets WHERE block IN ('Masques', 'Mirage')
Database: card_games
Question: Give the code of sets that have type of 'expansion'.
SQL:
SELECT DISTINCT code
FROM sets
WHERE type = 'expansion';
Database: card_games
Question: Name the foreign name of the card that has boros watermark? List out the type of this card.
SQL:
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';
Database: card_games
Question: What is the language and flavor text of the card that has colorpie watermark? List out the type of this card.
SQL:
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'
Database: card_games
Question: What is percentage of the cards with a converted Mana Cost of 10 in set of Abyssal Horror?
Evidence: set of Abyssal Horror refers to name = 'Abyssal Horror'; percentage refers to DIVIDE(COUNT(convertedManaCost = 16),COUNT(convertedManaCost))*100
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'
Database: card_games
Question: Give the code of sets have expansion commander type?
Evidence: code of sets refers to setCode
SQL:
SELECT T2.setCode
FROM sets AS T1
INNER JOIN set_translations AS T2 ON T2.setCode = T1.code
WHERE T1.type = 'commander';
Database: card_games
Question: Name the foreign name of the card that has abzan watermark? List out the type of this card.
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'
Database: card_games
Question: What is the language of the card that has azorius watermark? List out the type of this card.
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'
Database: card_games
Question: Of all the cards that are designed by Aaron Miller, how many of them are incredibly powerful?
Evidence: designed by Aaron Miller refers to artist = 'Aaron Miller'; are icredibily powerful refers to cardKingdomFoilId is not null AND cardKingdomId is not null
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
Database: card_games
Question: How many cards available in paper have a positive starting maximum hand size?
Evidence: “Available in paper” includes any availability listing that contains paper.
SQL:
SELECT COUNT(*)
FROM cards
WHERE availability LIKE '%paper%'
  AND hand IS NOT NULL
  AND CAST(hand AS INTEGER) > 0;
Database: card_games
Question: Please list the names of the cards that have a text box.
Evidence: have a text box refers to isTextless = 0
SQL:
SELECT DISTINCT name FROM cards WHERE isTextless = 0
Database: card_games
Question: What's the unconverted mana cost of the card "Ancestor's Chosen"?
Evidence: card "Ancestor's Chosen" refers to name = 'Ancestor`s Chosen'
SQL:
SELECT DISTINCT manaCost FROM cards WHERE name = 'Ancestor''s Chosen'
Database: card_games
Question: Among the cards with a white border color, how many of them have unknown power?
Evidence: unknown power refers to power = '*' or power is null
SQL:
SELECT SUM(CASE WHEN power = '*' OR power IS NULL THEN 1 ELSE 0 END) FROM cards WHERE borderColor = 'white'
Database: card_games
Question: Which of the cards that are a promotional painting have multiple faces on the same card? Please list their names.
Evidence: are a promotional painting refers to isPromo = 1; have multiple faces on the same card refers to side is not Null
SQL:
SELECT DISTINCT name FROM cards WHERE isPromo = 1 AND side IS NOT NULL
Database: card_games
Question: What's the list of all types for the card "Molimo, Maro-Sorcerer"?
Evidence: card "Molimo, Maro-Sorcerer" refers to name = 'Molimo, Maro-Sorcerer'; list of all types refers to subtypes,supertypes, types
SQL:
SELECT DISTINCT subtypes, supertypes, types FROM cards WHERE name = 'Molimo, Maro-Sorcerer'
Database: card_games
Question: Please list the websites where I can purchase the cards that have the promotional type of "bundle".
Evidence: promotional type of "bundle" refers to promoTypes = 'bundle'; websites refers to purchaseUrls
SQL:
SELECT DISTINCT purchaseUrls FROM cards WHERE promoTypes = 'bundle'
Database: card_games
Question: How many artists have designed a card with a black border color and is available in both "arena" and "mtgo" printing type?
Evidence: available in both "arena" and "mtgo" refers to availability like '%arena,mtgo%'
SQL:
SELECT COUNT(CASE WHEN availability LIKE '%arena,mtgo%' AND borderColor = 'black' THEN 1 ELSE NULL END) FROM cards
Database: card_games
Question: Which card costs more converted mana, "Serra Angel" or "Shrine Keeper"?
Evidence: "Serra Angel" refers to name = 'Serra Angel'; "Shrine Keeper" refers to name = 'Shrine Keeper'; card costs more converted mana when the value of convertedManaCost is greater
SQL:
SELECT name FROM cards WHERE name IN ('Serra Angel', 'Shrine Keeper') ORDER BY convertedManaCost DESC LIMIT 1
Database: card_games
Question: Which artist designed the card whose promotional name is "Battra, Dark Destroyer"?
Evidence: promotional name refers to column "flavorName".
SQL:
SELECT artist FROM cards WHERE flavorName = 'Battra, Dark Destroyer'
Database: card_games
Question: Please list the names of the top 3 cards with the highest converted mana cost and have a 2003 card frame style.
Evidence: name of cards refers to name; 2003 card frame style refers to frameVersion = '2003'
SQL:
SELECT name FROM cards WHERE frameVersion = 2003 ORDER BY convertedManaCost DESC LIMIT 3
Database: card_games
Question: What's the Italian name of the set of cards with "Ancestor's Chosen" is in?
Evidence: Italian is a language which refers to language = 'Italian'; with "Ancestor's Chosen" in the card set refers to name = 'Ancestor''s Chosen'
SQL:
SELECT translation 
FROM set_translations 
WHERE setCode IN (SELECT setCode FROM cards WHERE name = 'Ancestor''s Chosen') 
  AND language = 'Italian'
LIMIT 1;