Chinastark/bird_dataset huggingface dataset:
Database: toxicology
Note: double bond refers to bond_type = ' = '; label = '+' mean molecules are carcinogenic;
Question: How many molecules have a double bond type and among these molecule, how many are labeled as carcinogenic compound?
SQL: SELECT count(DISTINCT molecule.molecule_id), sum(CASE WHEN molecule.label = '+' THEN 1 ELSE 0 END) FROM bond INNER JOIN molecule ON bond.molecule_id = molecule.molecule_id WHERE bond.bond_type = '='
Database: toxicology
Note: double bond refers to bond_type = ' = '; bond_type ! = ' = '; sulphur refers to element = 's';
Question: How many molecules without sulphur element is not having double bond?
SQL: SELECT count(DISTINCT atom.molecule_id) FROM atom INNER JOIN bond ON atom.molecule_id = bond.molecule_id WHERE atom.element <> 's' AND bond.bond_type <> '='
Database: toxicology
Note: label = '+' mean molecules are carcinogenic;
Question: What is the carcinogenic label for bond TR001_2_4?
SQL: SELECT DISTINCT molecule.label FROM atom INNER JOIN molecule ON atom.molecule_id = molecule.molecule_id INNER JOIN bond ON molecule.molecule_id = bond.molecule_id WHERE bond.bond_id = 'TR001_2_4'
Database: toxicology
Question: How many atoms belong to molecule id TR001?
SQL: SELECT count(t.atom_id) FROM atom AS t WHERE t.molecule_id = 'TR001'
Database: toxicology
Note: single bond refers to bond_type = '-';
Question: How many single bonds are there in the list?
SQL: SELECT count(t.bond_id) FROM bond AS t WHERE t.bond_type = '-'
Database: toxicology
Note: label = '+' mean molecules are carcinogenic;
Question: Among the molecules which contain "cl" element, which of them are carcinogenic?
SQL: SELECT DISTINCT atom.molecule_id FROM atom INNER JOIN molecule ON atom.molecule_id = molecule.molecule_id WHERE atom.element = 'cl' AND molecule.label = '+'
Database: toxicology
Note: label = '-' means molecules are non-carcinogenic;
Question: Among the molecules which contain "c" element, which of them are not carcinogenic?
SQL: SELECT DISTINCT atom.molecule_id FROM atom INNER JOIN molecule ON atom.molecule_id = molecule.molecule_id WHERE atom.element = 'c' AND molecule.label = '-'
Database: toxicology
Note: label = '+' mean molecules are carcinogenic; percentage = DIVIDE(SUM(label = '+' and element = 'cl'), COUNT(molecule_id)) as percentage;
Question: Calculate the percentage of carcinogenic molecules which contain the Chlorine element.
SQL: SELECT count(CASE WHEN molecule.label = '+' AND atom.element = 'cl' THEN molecule.molecule_id ELSE NULL END) * 100 / count(molecule.molecule_id) FROM atom INNER JOIN molecule ON atom.molecule_id = molecule.molecule_id
Database: toxicology
Question: What is the molecule id of bond id TR001_1_7?
SQL: SELECT DISTINCT atom.molecule_id FROM atom INNER JOIN connected ON atom.atom_id = connected.atom_id WHERE connected.bond_id = 'TR001_1_7'
Database: toxicology
Note: 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;
Question: How many elements are contained in bond_id TR001_3_4?
SQL: SELECT count(DISTINCT atom.element) FROM atom INNER JOIN connected ON atom.atom_id = connected.atom_id WHERE connected.bond_id = 'TR001_3_4'
Database: toxicology
Note: 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 = '#';
Question: What is the type of the bond which is presenting the connection between two atoms TR000_1 and TR000_2?
SQL: SELECT bond.bond_type FROM bond INNER JOIN connected ON bond.bond_id = connected.bond_id WHERE connected.atom_id = 'TR000_1' AND connected.atom_id2 = 'TR000_2'
Database: toxicology
Question: What is the molecule of atom id "TR000_2" and atom id 2 "TR000_4"?
SQL: SELECT bond.molecule_id FROM bond INNER JOIN connected ON bond.bond_id = connected.bond_id WHERE connected.atom_id = 'TR000_2' AND connected.atom_id2 = 'TR000_4'
Database: toxicology
Note: 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;
Question: What is the element of toxicology for the atom with the ID of TR000_1?
SQL: SELECT t.element FROM atom AS t WHERE t.atom_id = 'TR000_1'
Database: toxicology
Note: label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic;
Question: Is molecule TR000 is carcinogenic or not?
SQL: SELECT label FROM molecule AS t WHERE t.molecule_id = 'TR000'
Database: toxicology
Note: single bond refers to bond_type = '-'; percentage = DIVIDE(SUM(bond_type = '-'), COUNT(bond_id)) as percentage;
Question: Find the percentage of atoms with single bond.
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
Note: nitrogen refers to element = 'n'; label = '+' mean molecules are carcinogenic;
Question: How many carcinogenic molecules that consisted of Nitrogen?
SQL: SELECT count(DISTINCT molecule.molecule_id) FROM molecule INNER JOIN atom ON molecule.molecule_id = atom.molecule_id WHERE atom.element = 'n' AND molecule.label = '+'
Database: toxicology
Note: sulphur refers to element - 's'; double bond refers to bond_type = ' = ';
Question: Which molecule consisted of Sulphur atom with double bond?
SQL: SELECT DISTINCT atom.molecule_id FROM atom INNER JOIN bond ON atom.molecule_id = bond.molecule_id WHERE atom.element = 's' AND bond.bond_type = '='
Database: toxicology
Note: label = '-' means molecules are non-carcinogenic; molecules consisted more than 5 atoms refers to COUNT(molecule_id) > 5;
Question: Which non-carcinogenic molecules consisted more than 5 atoms?
SQL: SELECT t.molecule_id FROM ( SELECT molecule.molecule_id, count(atom.atom_id) FROM molecule INNER JOIN atom ON molecule.molecule_id = atom.molecule_id WHERE molecule.label = '-' GROUP BY molecule.molecule_id HAVING count(atom.atom_id) > 5 ) t
Database: toxicology
Note: double bond refers to bond_type = '='; 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;
Question: List all the elements with double bond, consisted in molecule TR024.
SQL: SELECT atom.element FROM atom INNER JOIN bond ON atom.molecule_id = bond.molecule_id WHERE atom.molecule_id = 'TR024' AND bond.bond_type = '='
Database: toxicology
Note: label = '+' mean molecules are carcinogenic; molecule that have the highest number of atoms consisted in in refers to MAX(COUNT(atom.molecule_id));
Question: Which carcinogenic molecule have the highest number of atoms consisted in it?
SQL: SELECT t.molecule_id FROM ( SELECT molecule.molecule_id, count(atom.atom_id) FROM atom INNER JOIN molecule ON atom.molecule_id = molecule.molecule_id WHERE molecule.label = '+' GROUP BY molecule.molecule_id ORDER BY count(atom.atom_id) DESC LIMIT 1 ) t
Database: toxicology
Note: 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 = '#';
Question: Calculate the percentage of carcinogenic molecules with triple bonded Hidrogen atoms.
SQL: SELECT cast(sum(CASE WHEN molecule.label = '+' THEN 1 ELSE 0 END) AS REAL) * 100 / count(DISTINCT molecule.molecule_id) FROM molecule INNER JOIN atom ON molecule.molecule_id = atom.molecule_id INNER JOIN bond ON molecule.molecule_id = bond.molecule_id WHERE bond.bond_type = '#' AND atom.element = 'h'
Database: toxicology
Note: label = '+' mean molecules are carcinogenic;
Question: How many of the molecules are carcinogenic?
SQL: SELECT count(t.molecule_id) FROM molecule AS t WHERE t.label = '+'
Database: toxicology
Note: single bond refers to bond_type = '-'; molecules between TR004 to TR010 refers molecule_id BETWEEN 'TR004' and 'TR010';
Question: Among the molecules between TR004 to TR010, how many of them has single bonds?
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
Note: carbon refers to element = 'c';
Question: In the molecule TR008, how many carbons are present?
SQL: SELECT count(t.atom_id) FROM atom AS t WHERE t.molecule_id = 'TR008' AND t.element = 'c'
Database: toxicology
Note: label = '-' means molecules are non-carcinogenic; 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;
Question: What is the element with the atom ID of TR004_7 in molecule that is not carcinogenic?
SQL: SELECT atom.element FROM atom INNER JOIN molecule ON atom.molecule_id = molecule.molecule_id WHERE atom.atom_id = 'TR004_7' AND molecule.label = '-'
Database: toxicology
Note: oxygen refers to element = 'o'; double bond refers to bond_type = ' = ';
Question: What is the total number of molecules with double bonded oxygen?
SQL: SELECT count(DISTINCT atom.molecule_id) FROM atom INNER JOIN bond ON atom.molecule_id = bond.molecule_id WHERE bond.bond_type = '=' AND atom.element = 'o'
Database: toxicology
Note: triple bond refers to bond_type = '#'; label = '-' means molecules are non-carcinogenic;
Question: in molecules with triple bonds, how many of them are not carcinogenic?
SQL: SELECT count(DISTINCT molecule.molecule_id) FROM molecule INNER JOIN bond ON molecule.molecule_id = bond.molecule_id WHERE bond.bond_type = '#' AND molecule.label = '-'
Database: toxicology
Note: TR002 is the molecule id;
Question: List the element and bond type included in the molecule with molecule ID of TR002.
SQL: SELECT DISTINCT atom.element, bond.bond_type FROM atom INNER JOIN bond ON atom.molecule_id = bond.molecule_id WHERE atom.molecule_id = 'TR002'
Database: toxicology
Note: carbon refers to element = 'c'; double bond refers to bond_type = ' = ';
Question: What is the atom ID of double bonded carbon in TR012 molecule?
SQL: SELECT atom.atom_id FROM atom INNER JOIN molecule ON atom.molecule_id = molecule.molecule_id INNER JOIN bond ON molecule.molecule_id = bond.molecule_id WHERE molecule.molecule_id = 'TR012' AND bond.bond_type = '=' AND atom.element = 'c'
Database: toxicology
Note: label = '+' mean molecules are carcinogenic; oxygen refers to element = 'o';
Question: List the atom ID of the carcinogenic molecule that contains oxygen?
SQL: SELECT atom.atom_id FROM atom INNER JOIN molecule ON atom.molecule_id = molecule.molecule_id WHERE atom.element = 'o' AND molecule.label = '+'
Database: card_games
Note: incredibly poweful foils refers to cardkingdomfoilid is not null AND cardkingdomid is not null;
Question: Which are the cards that have incredibly powerful foils.
SQL: SELECT id FROM cards WHERE cardkingdomfoilid IS NOT NULL AND cardkingdomid IS NOT NULL
Database: card_games
Note: borderless' refers to bordercolor; poweful foils refers to cardkingdomfoilid paired with cardkingdomid AND cardkingdomid is not null;
Question: What are the borderless cards available without powerful foils?
SQL: SELECT id FROM cards WHERE bordercolor = 'borderless' AND (cardkingdomid IS NULL OR cardkingdomid IS NULL)
Database: card_games
Note: more converted mana for the face refers to Max(faceconvertedmanacost);
Question: List the card names with value that cost more converted mana for the face.
SQL: SELECT name FROM cards ORDER BY faceconvertedmanacost LIMIT 1
Database: card_games
Note: below 100 on EDHRec refers to EDHRec <100; with 2015 frame style refers to frameversion = 2015;
Question: Name all cards with 2015 frame style ranking below 100 on EDHRec.
SQL: SELECT id FROM cards WHERE edhrecrank < 100 AND frameversion = 2015
Database: card_games
Note: mythic rarity printing refers to rarity = 'mythic'; card banned refers to status = 'Banned'; in gladiator format refers to format = 'gladiator';
Question: List all the mythic rarity print cards banned in gladiator format.
SQL: SELECT DISTINCT cards.id FROM cards INNER JOIN legalities ON cards.uuid = legalities.uuid WHERE legalities.format = 'gladiator' AND legalities.status = 'Banned' AND cards.rarity = 'mythic'
Database: card_games
Note: Artifact type of cards refers to types = 'Artifact'; card does not have multiple faces on the same card refers to side is NULL'; vintage play format refers to format = 'vintage';
Question: For artifact type of cards that do not have multiple faces on the same card, state its legalities status for vintage play format.
SQL: SELECT DISTINCT legalities.status FROM cards INNER JOIN legalities ON cards.uuid = legalities.uuid WHERE cards.type = 'Artifact' AND legalities.format = 'vintage' AND cards.side IS NULL
Database: card_games
Note: 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';
Question: List all the card id and artist with unknown power which are legal for commander play format.
SQL: SELECT cards.id, cards.artist FROM cards INNER JOIN legalities ON cards.uuid = legalities.uuid WHERE legalities.status = 'Legal' AND legalities.format = 'commander' AND (cards.power IS NULL OR cards.power = '*')
Database: card_games
Note: cards have missing or degraded properties and value refers to hascontentwarning = 1; 'Stephen Daniele' is artist; Find all cards refers to return card id;
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.
SQL: SELECT cards.id, rulings.text, cards.hascontentwarning FROM cards INNER JOIN rulings ON cards.uuid = rulings.uuid WHERE cards.artist = 'Stephen Daniele'
Database: card_games
Note: Sublime Epiphany' is name of cards; number 74s refers to number = '74s'; information refers to text;
Question: Describe the information about rulings for card named 'Sublime Epiphany' with number 74s.
SQL: SELECT rulings.text FROM cards INNER JOIN rulings ON cards.uuid = rulings.uuid WHERE cards.name = 'Sublime Epiphany' AND cards.number = '74s'
Database: card_games
Note: with the most ruling information refers to Max(count(rulings.uuid)); the card is the promotional printing refers to ispromo = 1;
Question: Name the card and artist with the most ruling information. Also state if the card is a promotional printing.
SQL: SELECT cards.name, cards.artist, cards.ispromo FROM cards INNER JOIN rulings ON cards.uuid = rulings.uuid WHERE cards.ispromo = 1 AND cards.artist = (SELECT artist FROM cards WHERE ispromo = 1 GROUP BY artist HAVING count(DISTINCT UUID) = (SELECT max(count_uuid) FROM ( SELECT count(DISTINCT UUID) AS count_uuid FROM cards WHERE ispromo = 1 GROUP BY artist ))) LIMIT 1
Database: card_games
Note: annul refers to name = 'annul'; numbered 29 refers to number = '29';
Question: State the alternative languages available for card named Annul numbered 29.
SQL: SELECT foreign_data.language FROM cards INNER JOIN foreign_data ON cards.uuid = foreign_data.uuid WHERE cards.name = 'Annul' AND cards.number = 29
Database: card_games
Note: Japanese' is the language;
Question: Name all the cards which have alternative language in Japanese.
SQL: SELECT cards.name FROM cards INNER JOIN foreign_data ON cards.uuid = foreign_data.uuid WHERE foreign_data.language = 'Japanese'
Database: card_games
Note: Chinese Simplified' is the language; percentage = Divide(Sum(id where language = 'Chinese Simplified'), Count(id)) *100;
Question: Calculate the percentage of the cards availabe in Chinese Simplified.
SQL: SELECT cast(sum(CASE WHEN foreign_data.language = 'Chinese Simplified' THEN 1 ELSE 0 END) AS REAL) * 100 / count(cards.id) FROM cards INNER JOIN foreign_data ON cards.uuid = foreign_data.uuid
Database: card_games
Note: Italian translation refers to language = 'Italian'; total number of card per set refers to totalsetsize;
Question: List all the sets available in Italian translation. State the total number of cards per set.
SQL: SELECT SETS.name, SETS.totalsetsize FROM SETS INNER JOIN set_translations ON SETS.code = set_translations.setcode WHERE set_translations.language = 'Italian'
Database: card_games
Note: Aaron Boyd' is artist;
Question: How many types of cards does the artist Aaron Boyd illustrated about card art?
SQL: SELECT count(TYPE) FROM cards WHERE artist = 'Aaron Boyd'
Database: card_games
Note: Angel of Mercy' is the name of card;
Question: What is the keyword found on card 'Angel of Mercy'?
SQL: SELECT DISTINCT keywords FROM cards WHERE name = 'Angel of Mercy'
Database: card_games
Note: infinite power refers to power = '*';
Question: How many cards have infinite power?
SQL: SELECT count(*) FROM cards WHERE power = '*'
Database: card_games
Note: card Duress refers to name = 'Duress'; type of promotion refers to promotypes;
Question: What type of promotion is of card 'Duress'?
SQL: SELECT promotypes FROM cards WHERE name = 'Duress' AND promotypes IS NOT NULL
Database: card_games
Note: name of card  = 'Ancestor''s Chosen' ;
Question: What is the border color of card "Ancestor's Chosen"?
SQL: SELECT DISTINCT bordercolor FROM cards WHERE name = 'Ancestor''s Chosen'
Database: card_games
Note: Ancestor's Chosen' is the name of card; type of the card as originally printed refers to originaltype;
Question: What is the type of the card "Ancestor's Chosen" as originally printed?
SQL: SELECT originaltype FROM cards WHERE name = 'Ancestor''s Chosen' AND originaltype IS NOT NULL
Database: card_games
Note: Angel of Mercy' is the name of card;
Question: cards are not directly linked to language but through table 'set'. you need to add set in covered table & rephrase your question What are the languages available for the set that card 'Angel of Mercy' is in?
SQL: SELECT LANGUAGE FROM set_translations WHERE id IN ( SELECT id FROM cards WHERE name = 'Angel of Mercy' )
Database: card_games
Note: restricted refers to status = 'restricted'; have text boxes refers to is textless = 0;
Question: How many cards of legalities whose status is restricted have text boxes?
SQL: SELECT count(DISTINCT cards.id) FROM cards INNER JOIN legalities ON cards.uuid = legalities.uuid WHERE legalities.status = 'Restricted' AND cards.istextless = 0
Database: card_games
Note: Ancestor's Chosen' is the name of card; description about the ruling refers to text;
Question: What is the description about the ruling of card "Condemn"?
SQL: SELECT rulings.text FROM cards INNER JOIN rulings ON cards.uuid = rulings.uuid WHERE cards.name = 'Condemn'
Database: card_games
Note: restricted refers to status = 'restricted'; found in the starter deck refers to isstarter = 1;
Question: How many cards of legalities whose status is restricted are found in a starter deck?
SQL: SELECT count(DISTINCT cards.id) FROM cards INNER JOIN legalities ON cards.uuid = legalities.uuid WHERE legalities.status = 'Restricted' AND cards.isstarter = 1
Database: card_games
Note: Cloudchaser Eagle is the name of card;
Question: What is the status of card "Cloudchaser Eagle"?
SQL: SELECT DISTINCT legalities.status FROM cards INNER JOIN legalities ON cards.uuid = legalities.uuid WHERE cards.name = 'Cloudchaser Eagle'
Database: card_games
Note: Benalish Knight' is the name of card;
Question: What is the type of card "Benalish Knight"?
SQL: SELECT DISTINCT cards.type FROM cards INNER JOIN foreign_data ON cards.uuid = foreign_data.uuid WHERE cards.name = 'Benalish Knight'
Database: card_games
Note: Benalish Knight' is the name of card; rule of playing card refers to format;
Question: What is the rule of playing card "Benalish Knight"?
SQL: SELECT legalities.format FROM cards INNER JOIN legalities ON cards.uuid = legalities.uuid WHERE cards.name = 'Benalish Knight'
Database: card_games
Note: Phyrexian' is the language; name of artists refers to artist;
Question: Please provide the names of the artists who illustrated the card art in Phyrexian.
SQL: SELECT cards.artist FROM cards INNER JOIN foreign_data ON cards.uuid = foreign_data.uuid WHERE foreign_data.language = 'Phyrexian'
Database: card_games
Note: borderless card refers to bordercolor = 'borderless'; percentage = Divide(Count (id) where bordercolor = 'borderless', Count(id)) *100;
Question: What is the percentage of borderless cards?
SQL: SELECT cast(sum(CASE WHEN bordercolor = 'borderless' THEN 1 ELSE 0 END) AS REAL) * 100 / count(id) FROM cards
Database: card_games
Note: German' is the language; reprinted refers to isreprint = 1;
Question: How many cards that illusrtated in German have been reprinted?
SQL: SELECT count(cards.id) FROM cards INNER JOIN foreign_data ON cards.uuid = foreign_data.uuid WHERE foreign_data.language = 'German' AND cards.isreprint = 1
Database: card_games
Note: borderless card refers to bordercolor = 'borderless'; 'Russian' is the language;
Question: How many borderless cards are illustrated in Russian?
SQL: SELECT count(cards.id) FROM cards INNER JOIN foreign_data ON cards.uuid = foreign_data.uuid WHERE cards.bordercolor = 'borderless' AND foreign_data.language = 'Russian'
Database: card_games
Note: 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;
Question: What is the percentage of cards whose language is French among the Story Spotlight cards?
SQL: SELECT cast(sum(CASE WHEN foreign_data.language = 'French' THEN 1 ELSE 0 END) AS REAL) * 100 / count(cards.id) FROM cards INNER JOIN foreign_data ON cards.uuid = foreign_data.uuid WHERE cards.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
Note: Aaron Boyd' is artist;
Question: Name the cards that were illustrated by Aaron Boyd.
SQL: SELECT DISTINCT name FROM cards WHERE artist = 'Aaron Boyd'
Database: card_games
Note: black border card refers to bordercolor = black; available on mtgo refers to availability = mtgo;  add quotes for string = 'black' and = 'mtgo';
Question: How many black border cards are only available on mtgo?
SQL: SELECT count(id) FROM cards WHERE availability = 'mtgo' AND bordercolor = 'black'
Database: card_games
Note: converted mana cost of 0 refers to covertedmanacost = 0;
Question: List down all the card IDs with converted mana cost of 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 layout FROM cards WHERE keywords = 'Flying'
Database: card_games
Note: subtype other than Angel refers to subtypes is not 'Angel';
Question: How many cards with original type of "Summon - Angel" have subtype other than "Angel"?
SQL: SELECT count(id) FROM cards WHERE originaltype = 'Summon - Angel' AND subtypes != 'Angel'
Database: card_games
Note: Incredibly powerful refers to both cardkingdomfoilid and cardkingdomid IS NOT Null;
Question: What are the foiled cards that are incredibly powerful when paired with non foiled cards? List the IDs.
SQL: SELECT id FROM cards WHERE cardkingdomid IS NOT NULL AND cardkingdomfoilid IS NOT NULL