Chinastark/bird_dataset huggingface dataset:
Database: toxicology
Note: TR041 is the molecule id; triple bond refers to bond_type = '#';
Question: What are the atoms of the triple bond with the molecule "TR041"?
SQL: SELECT connected.atom_id, connected.atom_id2 FROM atom INNER JOIN connected ON atom.atom_id = connected.atom_id INNER JOIN bond ON connected.bond_id = bond.bond_id WHERE bond.bond_type = '#' AND bond.molecule_id = 'TR041'
Database: toxicology
Note: TR144_8_19 is the bond id;
Question: What are the elements of the atoms of TR144_8_19?
SQL: SELECT atom.element FROM connected INNER JOIN atom ON connected.atom_id = atom.atom_id WHERE connected.bond_id = 'TR144_8_19'
Database: toxicology
Note: label = '+' mean molecules are carcinogenic; double bond refers to bond_type = ' = ';
Question: Of all the carcinogenic molecules, which one has the most double bonds?
SQL: SELECT t.molecule_id FROM ( SELECT molecule.molecule_id, count(bond.bond_type) FROM bond INNER JOIN molecule ON bond.molecule_id = molecule.molecule_id WHERE molecule.label = '+' AND bond.bond_type = '=' GROUP BY molecule.molecule_id ORDER BY count(bond.bond_type) DESC LIMIT 1 ) AS t
Database: toxicology
Note: label = '+' mean molecules are carcinogenic;
Question: What is the least common element of all carcinogenic molecules?
SQL: SELECT t.element FROM ( SELECT atom.element, count(DISTINCT atom.molecule_id) FROM molecule INNER JOIN atom ON molecule.molecule_id = atom.molecule_id WHERE molecule.label = '+' GROUP BY atom.element ORDER BY count(DISTINCT atom.molecule_id) LIMIT 1 ) t
Database: toxicology
Note: atom that has the element lead refers to atom_id where element = 'pb';
Question: What are the atoms that can bond with the atom that has the element lead?
SQL: SELECT connected.atom_id, connected.atom_id2 FROM atom INNER JOIN connected ON atom.atom_id = connected.atom_id WHERE atom.element = 'pb'
Database: toxicology
Note: triple bond refers to bond_type = '#';
Question: List the elements of all the triple bonds.
SQL: SELECT DISTINCT atom.element FROM bond INNER JOIN connected ON bond.bond_id = connected.bond_id INNER JOIN atom ON connected.atom_id = atom.atom_id WHERE bond.bond_type = '#'
Database: toxicology
Note: DIVIDE(COUNT(bond_id), COUNT(atom_id where MAX(COUNT(atom_id)) ));
Question: What percentage of bonds have the most common combination of atoms' elements?
SQL: SELECT cast((SELECT count(connected.atom_id) FROM connected INNER JOIN bond ON connected.bond_id = bond.bond_id GROUP BY bond.bond_type ORDER BY count(bond.bond_id) DESC LIMIT 1 ) AS REAL) * 100 / ( SELECT count(atom_id) FROM connected )
Database: toxicology
Note: single bond refers to bond_type = '-'; label = '+' mean molecules are carcinogenic; proportion = DIVIDE(SUM(label = '+') * 100, COUNT(bond_id)) where bond_type = '-';
Question: What proportion of single bonds are carcinogenic? Please provide your answer as a percentage with five decimal places.
SQL: SELECT round(cast(count(CASE WHEN molecule.label = '+' THEN bond.bond_id ELSE NULL END) AS REAL) * 100 / count(bond.bond_id),5) FROM bond INNER JOIN molecule ON bond.molecule_id = molecule.molecule_id WHERE bond.bond_type = '-'
Database: toxicology
Note: consisting of element carbon and hydrogen refers to element in('c', 'h');
Question: Calculate the total atoms consisting of the element carbon and hydrogen.
SQL: SELECT count(t.atom_id) FROM atom AS t WHERE t.element = 'c' OR t.element = 'h'
Database: toxicology
Note: element sulfur refers to element = 's';
Question: List down atom id2 for atoms with element sulfur.
SQL: SELECT DISTINCT connected.atom_id2 FROM atom INNER JOIN connected ON atom.atom_id = connected.atom_id WHERE atom.element = 's'
Database: toxicology
Note: element Tin refers to element = 'sn'; double bond refers to bond_type = ' = '; single bond refers to bond_type = '-'; triple bond refers to bond_type = '#';
Question: What are the bond type for atoms with element Tin?
SQL: SELECT DISTINCT bond.bond_type FROM atom INNER JOIN connected ON atom.atom_id = connected.atom_id INNER JOIN bond ON bond.bond_id = connected.bond_id WHERE atom.element = 'sn'
Database: toxicology
Note: single bond refers to bond_type = '-';
Question: How many elements are there for single bond molecules?
SQL: SELECT count(DISTINCT t.element) FROM ( SELECT DISTINCT molecule.molecule_id, atom.element 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_type = '-' ) AS t
Database: toxicology
Note: triple bond refers to bond_type = '#'; phosphorus refers to element = 'p'; bromine refers to element = 'br';
Question: Calculate the total atoms with triple-bond molecules containing the element phosphorus or bromine.
SQL: SELECT count(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 bond.bond_type = '#' AND atom.element IN ('p', 'br')
Database: toxicology
Note: label = '+' mean molecules are carcinogenic;
Question: Write down bond id for molecules that are carcinogenic.
SQL: SELECT DISTINCT bond.bond_id FROM bond INNER JOIN molecule ON bond.molecule_id = molecule.molecule_id WHERE molecule.label = '+'
Database: toxicology
Note: label = '-' means molecules are non-carcinogenic; single bond refers to bond_type = '-';
Question: Among the single bond molecule id, which molecules are not carcinogenic?
SQL: SELECT DISTINCT bond.molecule_id FROM bond INNER JOIN molecule ON bond.molecule_id = molecule.molecule_id WHERE molecule.label = '-' AND bond.bond_type = '-'
Database: toxicology
Note: element chlorine refers to element = 'cl'; single bond refers to bond_type = '-'; percentage = DIVIDE(SUM(element = 'cl'), COUNT(atom_id)) as percent where bond_type = '-';
Question: What is the composition of element chlorine in percentage among the single bond molecules?
SQL: SELECT cast(count(CASE WHEN t.element = 'cl' THEN t.atom_id ELSE NULL END) AS REAL) * 100 / count(t.atom_id) FROM ( SELECT atom.atom_id, atom.element 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_type = '-' ) AS t
Database: toxicology
Note: TR000, TR001 and TR002 are molecule id; label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic;
Question: What are the labels for TR000, TR001 and TR002?
SQL: SELECT molecule_id, t.label FROM molecule AS t WHERE t.molecule_id IN ('TR000', 'TR001', 'TR002')
Database: toxicology
Note: label = '-' means molecules are non-carcinogenic;
Question: List down the molecule id for non carcinogenic molecules.
SQL: SELECT t.molecule_id FROM molecule AS t WHERE t.label = '-'
Database: toxicology
Note: label = '+' mean molecules are carcinogenic;
Question: Calculate the total carcinogenic molecules for molecule id from TR000 to TR030.
SQL: SELECT count(t.molecule_id) FROM molecule AS t WHERE t.molecule_id BETWEEN 'TR000' AND 'TR030' AND t.label = '+'
Database: toxicology
Note: double bond refers to bond_type = ' = '; single bond refers to bond_type = '-'; triple bond refers to bond_type = '#';
Question: List down the bond type for molecules from molecule id TR000 to TR050.
SQL: SELECT bond.molecule_id, bond.bond_type FROM molecule INNER JOIN bond ON molecule.molecule_id = bond.molecule_id WHERE molecule.molecule_id BETWEEN 'TR000' AND 'TR050'
Database: toxicology
Note: TR001_10_11 is the bond id;
Question: What are the elements for bond id TR001_10_11?
SQL: SELECT atom.element FROM connected INNER JOIN atom ON connected.atom_id = atom.atom_id WHERE connected.bond_id = 'TR001_10_11'
Database: toxicology
Note: iodine refers to element = 'i';
Question: How many bond id have element iodine?
SQL: SELECT count(bond.bond_id) FROM atom INNER JOIN molecule ON atom.molecule_id = molecule.molecule_id INNER JOIN bond ON molecule.molecule_id = bond.molecule_id WHERE atom.element = 'i'
Database: toxicology
Note: calcium refers to element = 'ca'; label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic; MAX(label);
Question: Among the molecules with element Calcium, are they mostly carcinogenic or non carcinogenic?
SQL: SELECT molecule.label FROM atom INNER JOIN molecule ON atom.molecule_id = molecule.molecule_id WHERE atom.element = 'ca' GROUP BY molecule.label ORDER BY count(molecule.label) DESC LIMIT 1
Database: toxicology
Note: chlorine refers to element = 'cl'; carbon refers to element = 'c';
Question: Does bond id TR001_1_8 have both element of chlorine and carbon?
SQL: SELECT connected.bond_id, connected.atom_id2, atom.element AS flag_have_cacl FROM atom INNER JOIN connected ON connected.atom_id = atom.atom_id WHERE connected.bond_id = 'TR001_1_8' AND (atom.element = 'c1' OR atom.element = 'c')
Database: toxicology
Note: carbon refers to element = 'c'; triple bond refers to bond_type = '#'; label = '-' means molecules are non-carcinogenic;
Question: List down two molecule id of triple bond non carcinogenic molecules with element carbon.
SQL: SELECT DISTINCT molecule.molecule_id 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_type = '#' AND atom.element = 'c' AND molecule.label = '-'
Database: toxicology
Note: chlorine refers to element = 'cl'; label = '+' mean molecules are carcinogenic; percentage = DIVIDE(SUM(element = 'pb'); COUNT(molecule_id)) as percentage where label = '+';
Question: What is the percentage of element chlorine in carcinogenic molecules?
SQL: SELECT cast(count( CASE WHEN atom.element = 'cl' THEN atom.element ELSE NULL END) AS REAL) * 100 / count(atom.element) FROM atom INNER JOIN molecule ON atom.molecule_id = molecule.molecule_id WHERE molecule.label = '+'
Database: toxicology
Note: TR001 is the molecule id;
Question: List the toxicology elements associated with molecule TR001.
SQL: SELECT DISTINCT t.element FROM atom AS t WHERE t.molecule_id = 'TR001'
Database: toxicology
Note: double bond refers to bond_type = ' = ';
Question: Give me the molecule ID of the double bond type.
SQL: SELECT DISTINCT t.molecule_id FROM bond AS t WHERE t.bond_type = '='
Database: toxicology
Note: first atom refers to atom_id; second atom refers to atom_id2; triple bond refers to bond_type = '#';
Question: Write down the atom IDs of the first and second atoms of triple bond type molecules.
SQL: SELECT connected.atom_id, connected.atom_id2 FROM bond INNER JOIN connected ON bond.bond_id = connected.bond_id WHERE bond.bond_type = '#'
Database: toxicology
Note: TR000_1_2 is the bond id;
Question: What are the toxicology elements associated with bond ID TR000_1_2?
SQL: SELECT atom.element FROM atom INNER JOIN connected ON atom.atom_id = connected.atom_id WHERE connected.bond_id = 'TR000_1_2'
Database: toxicology
Note: label = '-' means molecules are non-carcinogenic; single bond refers to bond_type = '-';
Question: How many of the single bond type molecules are non-carcinogenic?
SQL: SELECT count(DISTINCT molecule.molecule_id) FROM bond INNER JOIN molecule ON bond.molecule_id = molecule.molecule_id WHERE molecule.label = '-' AND bond.bond_type = '-'
Database: toxicology
Note: label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic;
Question: What is the label for bond ID TR001_10_11?
SQL: SELECT molecule.label FROM bond INNER JOIN molecule ON bond.molecule_id = molecule.molecule_id WHERE bond.bond_id = 'TR001_10_11'
Database: toxicology
Note: triple bond refers to bond_type = '#'; label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic;
Question: Enumerate the bond ID of triple bond type molecules and tell me if they are carcinogenic or not.
SQL: SELECT DISTINCT bond.bond_id, molecule.label FROM bond INNER JOIN molecule ON bond.molecule_id = molecule.molecule_id WHERE bond.bond_type = '#'
Database: toxicology
Note: label = '+' means molecules are carcinogenic; 4th atom of each molecule refers to substr(atom_id, 7, 1) = '4';
Question: Tally the toxicology element of the 4th atom of each molecule that was carcinogenic.
SQL: SELECT DISTINCT atom.element FROM atom INNER JOIN molecule ON atom.molecule_id = molecule.molecule_id WHERE molecule.label = '+' AND substr(atom.atom_id, -1) = '4' AND length(atom.atom_id) = 7
Database: toxicology
Note: hydrogen refers to element = 'h'; ratio = DIVIDE(SUM(element = 'h'), count(element)) where molecule_id = 'TR006' ; label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic;
Question: What is the ratio of Hydrogen elements in molecule ID TR006? List the ratio with its label.
SQL: WITH subquery AS (SELECT DISTINCT atom.atom_id, atom.element, atom.molecule_id, molecule.label FROM atom INNER JOIN molecule ON atom.molecule_id = molecule.molecule_id WHERE molecule.molecule_id = 'TR006') SELECT cast(count(CASE WHEN element = 'h' THEN atom_id ELSE NULL END) AS REAL) / (CASE WHEN count(atom_id) = 0 THEN NULL ELSE count(atom_id) END) AS ratio, label FROM subquery GROUP BY label
Database: toxicology
Note: calcium refers to element = 'ca'; label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic;
Question: Identify whether the chemical compound that contains Calcium is carcinogenic.
SQL: SELECT molecule.label AS flag_carcinogenic FROM atom INNER JOIN molecule ON atom.molecule_id = molecule.molecule_id WHERE atom.element = 'ca'
Database: toxicology
Note: Carbon refers to element = 'c'; double bond refers to bond_type = ' = '; single bond refers to bond_type = '-'; triple bond refers to bond_type = '#';
Question: Determine the bond type that is formed in the chemical compound containing element Carbon.
SQL: SELECT DISTINCT bond.bond_type FROM atom INNER JOIN bond ON atom.molecule_id = bond.molecule_id WHERE atom.element = 'c'
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; TR001_10_11 is the bond id; molecule id refers to SUBSTR(bond_id, 1, 5); atom 1 refers to SUBSTR(bond_id, 7, 2); atom 2 refers to SUBSTR(bond_id, 10, 2);
Question: Name chemical elements that form a bond TR001_10_11.
SQL: SELECT atom.element FROM atom INNER JOIN connected ON atom.atom_id = connected.atom_id INNER JOIN bond ON connected.bond_id = bond.bond_id WHERE bond.bond_id = 'TR001_10_11'
Database: toxicology
Note: triple bond refers to bond_type = '#';
Question: Among all chemical compounds identified in the database, what percent of compounds form a triple-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 AS t
Database: toxicology
Note: TR047 is the molecule id; double bond refers to bond_type = ' = '; percentage = DIVIDE(SUM(bond_type = ' = '), COUNT(all bond_id)) as percent where molecule_id = 'TR047';
Question: Among all chemical compounds that contain molecule TR047, identify the percent that form a double-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 AS t WHERE t.molecule_id = 'TR047'
Database: toxicology
Note: label = '+' mean molecules are carcinogenic;
Question: Identify whether the molecule that contains atom TR001_1 is carcinogenic.
SQL: SELECT molecule.label AS flag_carcinogenic FROM atom INNER JOIN molecule ON atom.molecule_id = molecule.molecule_id WHERE atom.atom_id = 'TR001_1'
Database: toxicology
Note: label = '+' mean molecules are carcinogenic;
Question: Is molecule TR151 carcinogenic?
SQL: SELECT t.label FROM molecule AS t WHERE t.molecule_id = 'TR151'
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: Which toxic element can be found in the molecule TR151?
SQL: SELECT DISTINCT t.element FROM atom AS t WHERE t.molecule_id = 'TR151'
Database: toxicology
Note: label = '+' mean molecules are carcinogenic;
Question: How many chemical compounds in the database are identified as carcinogenic.
SQL: SELECT count(t.molecule_id) FROM molecule AS t WHERE t.label = '+'
Database: toxicology
Note: carbon refers to element = 'c'; between TR010 to TR050 refers to substr(molecule_id, 3, 3)>=10 AND substr(molecule_id, 3, 3) <= 50;
Question: Identify the atoms belong to the molecule with ID between TR010 to TR050 that contain the element carbon.
SQL: SELECT t.atom_id FROM atom AS t WHERE t.molecule_id BETWEEN 'TR010' AND 'TR050' AND t.element = 'c'
Database: toxicology
Note: label = '+' mean molecules are carcinogenic;
Question: How many atoms belong to the molecule labeled with carcinogenic compounds?
SQL: SELECT count(atom.atom_id) FROM atom INNER JOIN molecule ON atom.molecule_id = molecule.molecule_id WHERE molecule.label = '+'
Database: toxicology
Note: label = '+' mean molecules are carcinogenic; double bond refers to bond_type = ' = ';
Question: Which bond ids are double-bond with carcinogenic compound?
SQL: SELECT bond.bond_id FROM bond INNER JOIN molecule ON bond.molecule_id = molecule.molecule_id WHERE molecule.label = '+' AND bond.bond_type = '='
Database: toxicology
Note: label = '+' mean molecules are carcinogenic; hydrogen refers to element = h';
Question: How many atoms belong to the molecule that element is hydrogen and labeled with carcinogenic compound?
SQL: SELECT count(atom.atom_id) AS atomnums_h FROM atom INNER JOIN molecule ON atom.molecule_id = molecule.molecule_id WHERE molecule.label = '+' AND atom.element = 'h'
Database: toxicology
Question: Indicate the molecule id is belonging to the TR000_1_2 bond that has the first atom named TR000_1.
SQL: SELECT bond.molecule_id, bond.bond_id, connected.atom_id FROM connected INNER JOIN bond ON connected.bond_id = bond.bond_id WHERE connected.atom_id = 'TR000_1' AND bond.bond_id = 'TR000_1_2'
Database: toxicology
Note: label = '-' means molecules are non-carcinogenic; carbon refers to element = 'c';
Question: Among the atoms that contain element carbon, which one does not contain compound carcinogenic?
SQL: SELECT atom.atom_id FROM atom INNER JOIN molecule ON atom.molecule_id = molecule.molecule_id WHERE atom.element = 'c' AND molecule.label = '-'
Database: toxicology
Note: hydrogen refers to element = 'h'; label = '+' mean molecules are carcinogenic; percentage = DIVIDE(SUM(label = '+' and element = 'h'), COUNT(molecule_id)) * 100.0;
Question: Calculate the percentage of molecules containing carcinogenic compounds that element is hydrogen.
SQL: SELECT cast(count(CASE WHEN atom.element = 'h' AND molecule.label = '+' THEN molecule.molecule_id ELSE NULL END) AS REAL) * 100 / count(molecule.molecule_id) FROM atom INNER JOIN molecule ON atom.molecule_id = molecule.molecule_id
Database: toxicology
Note: label = '+' mean molecules are carcinogenic;
Question: Is molecule TR124 carcinogenic?
SQL: SELECT t.label FROM molecule AS t WHERE t.molecule_id = 'TR124'
Database: toxicology
Note: TR186 is a molecule id;
Question: What atoms comprise TR186?
SQL: SELECT t.atom_id FROM atom AS t WHERE t.molecule_id = 'TR186'
Database: toxicology
Note: double bond refers to bond_type = ' = '; single bond refers to bond_type = '-'; triple bond refers to bond_type = '#';
Question: What is the bond type of TR007_4_19?
SQL: SELECT t.bond_type FROM bond AS t WHERE t.bond_id = 'TR007_4_19'
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: Name the elements that comprise the atoms of bond TR001_2_4.
SQL: SELECT DISTINCT atom.element FROM atom INNER JOIN connected ON atom.atom_id = connected.atom_id WHERE connected.bond_id = 'TR001_2_4'
Database: toxicology
Note: label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic; double bond refers to bond_type = ' = ';
Question: How many double bonds does TR006 have and is it carcinogenic?
SQL: SELECT count(bond.bond_id), molecule.label FROM bond INNER JOIN molecule ON bond.molecule_id = molecule.molecule_id WHERE bond.bond_type = '=' AND molecule.molecule_id = 'TR006' GROUP BY molecule.label
Database: toxicology
Note: label = '+' mean molecules are 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: List all carcinogenic molecules and their elements.
SQL: SELECT DISTINCT molecule.molecule_id, atom.element FROM atom INNER JOIN molecule ON atom.molecule_id = molecule.molecule_id WHERE molecule.label = '+'
Database: toxicology
Note: single bond refers to bond_type = '-';
Question: Name all bonds with single bond types and what atoms are connected to the molecules.
SQL: SELECT bond.bond_id, connected.atom_id, connected.atom_id2 FROM bond INNER JOIN connected ON bond.bond_id = connected.bond_id WHERE bond.bond_type = '-'
Database: toxicology
Note: triple 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: Which molecules have triple bonds and list all the elements they contain.
SQL: SELECT DISTINCT bond.molecule_id, atom.element FROM bond INNER JOIN atom ON bond.molecule_id = atom.molecule_id WHERE bond.bond_type = '#'
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: Name the atoms' elements that form bond TR000_2_3.
SQL: SELECT atom.element FROM connected INNER JOIN atom ON connected.atom_id = atom.atom_id WHERE connected.bond_id = 'TR000_2_3'
Database: toxicology
Note: chlorine refers to element = 'cl';
Question: How many bonds are created by bonding atoms with chlorine element?
SQL: SELECT count(connected.bond_id) FROM connected INNER JOIN atom ON connected.atom_id = atom.atom_id WHERE atom.element = 'cl'
Database: toxicology
Question: List out the atom id that belongs to the TR346 molecule and how many bond type can be created by this molecule?
SQL: SELECT atom.atom_id, count(DISTINCT bond.bond_type),atom.molecule_id FROM atom INNER JOIN bond ON atom.molecule_id = bond.molecule_id WHERE atom.molecule_id = 'TR000' GROUP BY atom.atom_id, bond.bond_type