SQL
stringlengths
29
1.45k
difficulty
stringclasses
3 values
question_id
int64
0
1.53k
db_id
stringclasses
11 values
evidence
stringlengths
0
591
question
stringlengths
23
286
SELECT DISTINCT T2.molecule_id FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.bond_type = '#' AND T2.label = '+'
simple
200
toxicology
triple-bonded molecules refers to bond_type = '#'; carcinogenic refers to label = '+'
Find the triple-bonded molecules which are carcinogenic.
SELECT CAST(COUNT(DISTINCT CASE WHEN T1.element = 'c' THEN T1.atom_id ELSE NULL END) AS REAL) * 100 / COUNT(DISTINCT T1.atom_id) FROM atom AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.bond_type = '='
moderate
201
toxicology
carbon refers to element = 'c'; double-bond molecules refers to bond_type = ' = '; percentage = DIVIDE(SUM(element = 'c'), COUNT(atom_id))
What is the percentage of carbon in double-bond molecules?
SELECT COUNT(T.bond_id) FROM bond AS T WHERE T.bond_type = '#'
simple
202
toxicology
triple type bonds refers to bond_type = '#'
How many triple type bonds are there?
SELECT COUNT(DISTINCT T.atom_id) FROM atom AS T WHERE T.element <> 'br'
simple
203
toxicology
atoms with no bromine refers to element ! = 'br'
In how many atoms is there no bromine?
SELECT COUNT(T.molecule_id) FROM molecule AS T WHERE molecule_id BETWEEN 'TR000' AND 'TR099' AND T.label = '+'
simple
204
toxicology
first 100 molecules in number order refers to molecule_id between 'TR000' and 'TR099'; label = '+' means molecules are carcinogenic
Of the first 100 molecules in number order, how many are carcinogenic?
SELECT T.atom_id FROM atom AS T WHERE T.element = 'si'
simple
205
toxicology
silicon refers to element = 'si';
Identify by their ID the molecules in which there is silicon.
SELECT DISTINCT T1.element FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T2.bond_id = 'TR004_8_9'
challenging
206
toxicology
TR004_8_9 bond atoms refers to bond_id = 'TR004_8_9'; 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
What elements are in the TR004_8_9 bond atoms?
SELECT DISTINCT T1.element FROM atom AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN connected AS T3 ON T1.atom_id = T3.atom_id WHERE T2.bond_type = '='
challenging
207
toxicology
double type 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
What elements are in a double type bond?
SELECT T.label FROM ( SELECT T2.label, COUNT(T2.molecule_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'h' GROUP BY T2.label ORDER BY COUNT(T2.molecule_id) DESC LIMIT 1 ) t
moderate
208
toxicology
with hydrogen refers to element = 'h'; label most numerous in atoms refers to MAX(COUNT(label)); label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic
Which type of label is the most numerous in atoms with hydrogen?
SELECT DISTINCT T1.bond_type FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id INNER JOIN atom AS T3 ON T2.atom_id = T3.atom_id WHERE T3.element = 'te'
simple
209
toxicology
type of bond refers to bond_type; Tellurium refers to element = 'te'
Tellurium is in what type of bond?
SELECT T2.atom_id, T2.atom_id2 FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id WHERE T1.bond_type = '-'
simple
210
toxicology
single type bond refers to bond_type = '-';
What atoms are connected in single type bonds?
SELECT DISTINCT T1.atom_id FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN connected AS T3 ON T1.atom_id = T3.atom_id WHERE T2.label = '-'
simple
211
toxicology
label = '-' means molecules are non-carcinogenic
Indicate which atoms are connected in non-carcinogenic type molecules.
SELECT T.element FROM ( SELECT T1.element, COUNT(DISTINCT T1.molecule_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '-' GROUP BY T1.element ORDER BY COUNT(DISTINCT T1.molecule_id) ASC LIMIT 4 ) t
challenging
212
toxicology
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
Which element is the least numerous in non-carcinogenic molecules?
SELECT T1.bond_type FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id WHERE T2.atom_id = 'TR004_8' AND T2.atom_id2 = 'TR004_20' OR T2.atom_id2 = 'TR004_8' AND T2.atom_id = 'TR004_20'
moderate
213
toxicology
type of bond refers to bond_type; between the atoms TR004_8 and TR004_20 refers to atom_id between atom_id = 'TR004_8' and atom_id = 'TR004_20';
What type of bond is there between the atoms TR004_8 and TR004_20?
SELECT DISTINCT T2.label FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element != 'sn'
simple
214
toxicology
tin refers to element ! = 'sn'; label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic
What type of label is not on molecules with atoms with tin?
SELECT COUNT(DISTINCT CASE WHEN T1.element = 'i' THEN T1.atom_id ELSE NULL END) AS iodine_nums , COUNT(DISTINCT CASE WHEN T1.element = 's' THEN T1.atom_id ELSE NULL END) AS sulfur_nums FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id INNER JOIN bond AS T3 ON T2.bond_id = T3.bond_id WHERE T3.bond_type = '-'
challenging
215
toxicology
with iodine element refer to element = 'i'; with sulfur element refers to element = 's'; single type bond refers to bond_type = '-';
How many atoms with iodine and sulfur type elements are there in single bond molecules?
SELECT T2.atom_id, T2.atom_id2 FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id WHERE T1.bond_type = '#'
simple
216
toxicology
triple bond refers to bond_type = '#';
Identify all connected atoms with a triple bond.
SELECT T2.atom_id, T2.atom_id2 FROM atom AS T1 INNER JOIN connected AS T2 ON T2.atom_id = T1.atom_id WHERE T1.molecule_id = 'TR181'
simple
217
toxicology
TR181 molecule refers to molecule_id = 'TR181'
Identify all the atoms that are connected to the atoms of the TR181 molecule.
SELECT CAST(COUNT(DISTINCT CASE WHEN T1.element <> 'f' THEN T2.molecule_id ELSE NULL END) AS REAL) * 100 / COUNT(DISTINCT T2.molecule_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+'
challenging
218
toxicology
label = '+' mean molecules are carcinogenic; contain fluorine refers to element = 'f'; percentage = DIVIDE(SUM(element = 'f'), COUNT(molecule_id)) as percent where label = '+'
What percentage of carcinogenic-type molecules does not contain fluorine?
SELECT CAST(COUNT(DISTINCT CASE WHEN T2.label = '+' THEN T2.molecule_id ELSE NULL END) AS REAL) * 100 / COUNT(DISTINCT T2.molecule_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 T3.bond_type = '#'
challenging
219
toxicology
label = '+' mean molecules are carcinogenic; triple bond refers to bond_type = '#'; percentage = DIVIDE(SUM(bond_type = '#'), COUNT(bond_id)) as percent where label = '+'
What is the percentage of carcinogenic molecules in triple type bonds?
SELECT DISTINCT T.element FROM atom AS T WHERE T.molecule_id = 'TR000' ORDER BY T.element LIMIT 3
challenging
220
toxicology
TR000 is the molecule 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
Please list top three elements of the toxicology of the molecule TR000 in alphabetical order.
SELECT SUBSTR(T.bond_id, 1, 7) AS atom_id1 , T.molecule_id || SUBSTR(T.bond_id, 8, 2) AS atom_id2 FROM bond AS T WHERE T.molecule_id = 'TR001' AND T.bond_id = 'TR001_2_6'
simple
221
toxicology
TR001 is the molecule id; TR001_2_6 is the bond id
What are the atoms that are bonded in the molecule TR001 with the bond ID of TR001_2_6?
SELECT COUNT(CASE WHEN T.label = '+' THEN T.molecule_id ELSE NULL END) - COUNT(CASE WHEN T.label = '-' THEN T.molecule_id ELSE NULL END) AS diff_car_notcar FROM molecule t
moderate
222
toxicology
label = '+' means molecules are carcinogenic; label = '-' means molecules are non-carcinogenic; difference = SUBTRACT(SUM(label = '+'), SUM(label = '-'))
What is the difference between the number of molecules that are carcinogenic and those that are not?
SELECT T.atom_id FROM connected AS T WHERE T.bond_id = 'TR000_2_5'
simple
223
toxicology
TR_000_2_5 is the bond id
What are the atom IDs of the bond TR_000_2_5?
SELECT T.bond_id FROM connected AS T WHERE T.atom_id2 = 'TR000_2'
simple
224
toxicology
TR000_2 is the atom id; atom ID 2 refers to atom_id2
What are the bond IDs that have the same atom ID 2 of TR000_2?
SELECT DISTINCT T.molecule_id FROM bond AS T WHERE T.bond_type = '=' ORDER BY T.molecule_id LIMIT 5
simple
225
toxicology
double bond refers to bond_type = ' = ';
Please list top five molecules that have double bonds in alphabetical order.
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 = 'TR008'
moderate
226
toxicology
double bond refers to bond_type = ' = '; TR008 is the molecule id; percentage = DIVIDE(SUM(bond_type = ' = '), COUNT(bond_id)) as percent where molecule_id = 'TR008'
What is the percentage of double bonds in the molecule TR008?
SELECT CAST(COUNT(CASE WHEN T.label = '+' THEN T.molecule_id ELSE NULL END) AS REAL) * 100 / COUNT(T.molecule_id) FROM molecule t
simple
227
toxicology
label = '+' mean molecules are carcinogenic; percentage = DIVIDE(SUM(label = '+'), COUNT(molecule_id)) as percent
What is the percentage of molecules that are carcinogenic?
SELECT CAST(COUNT(CASE WHEN T.element = 'h' THEN T.atom_id ELSE NULL END) AS REAL) * 100 / COUNT(T.atom_id) FROM atom AS T WHERE T.molecule_id = 'TR206'
moderate
228
toxicology
hydrogen refers to element = 'h'; TR206 is the molecule id; percentage = DIVIDE(SUM(element = 'h'), COUNT(atom_id)) as percent where molecule_id = 'TR206'
How much of the hydrogen in molecule TR206 is accounted for? Please provide your answer in percentage.
SELECT DISTINCT T.bond_type FROM bond AS T WHERE T.molecule_id = 'TR000'
simple
229
toxicology
type of bond refers to bond_type; TR000 is the molecule id
What is the type of bond that molecule TR000 has when involved in any bonds?
SELECT DISTINCT T1.element, T2.label FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.molecule_id = 'TR060'
challenging
230
toxicology
TR060 is the molecule id; label = '+' mean molecules are carcinogenic; 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
What are the elements of the toxicology and label of molecule TR060?
SELECT T.bond_type FROM ( SELECT T1.bond_type, COUNT(T1.molecule_id) FROM bond AS T1 WHERE T1.molecule_id = 'TR018' GROUP BY T1.bond_type ORDER BY COUNT(T1.molecule_id) DESC LIMIT 1 ) AS T
challenging
231
toxicology
TR018 is the molecule id; majority of the bond found refers to MAX(COUNT(bond_type)); label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic
Which bond type accounted for the majority of the bonds found in molecule TR018 and state whether or not this molecule is carcinogenic?
SELECT DISTINCT T2.molecule_id FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.bond_type = '-' AND T2.label = '-' ORDER BY T2.molecule_id LIMIT 3
moderate
232
toxicology
label = '-' means molecules are not carcinogenic; single type bond refers to bond_type = '-'
Please list top three molecules that have single bonds between two atoms and are not carcinogenic in alphabetical order.
SELECT DISTINCT T2.bond_id FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T1.molecule_id = 'TR006' ORDER BY T2.bond_id LIMIT 2
simple
233
toxicology
TR006 is the molecule id
Please list top two bonds that happened with the molecule TR006 in alphabetical order.
SELECT COUNT(T2.bond_id) FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id WHERE T1.molecule_id = 'TR009' AND T2.atom_id = T1.molecule_id || '_1' AND T2.atom_id2 = T1.molecule_id || '_2'
moderate
234
toxicology
TR009 is the molecule id; molecule_id = 'TR009' means the bond_id LIKE 'TR009_%'; involved atom 12 refers to atom_id = 'TR009_12' or atom_id2 = 'TR009_12'
How many bonds which involved atom 12 does molecule TR009 have?
SELECT COUNT(DISTINCT T2.molecule_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+' AND T1.element = 'br'
simple
235
toxicology
label = '+' mean molecules are carcinogenic; have bromine element refers to element = 'br'
How many molecules are carcinogenic and have the bromine element?
SELECT T1.bond_type, T2.atom_id, T2.atom_id2 FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id WHERE T2.bond_id = 'TR001_6_9'
moderate
236
toxicology
double bond refers to bond_type = ' = '; single bond refers to bond_type = '-'; triple bond refers to bond_type = '#'; atoms refer to atom_id or atom_id2
What are the bond type and the atoms of the bond ID of TR001_6_9?
SELECT T2.molecule_id , IIF(T2.label = '+', 'YES', 'NO') AS flag_carcinogenic FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.atom_id = 'TR001_10'
moderate
237
toxicology
TR001_10 is the atom id; label = '+' mean molecules are carcinogenic
Which molecule does the atom TR001_10 belong to? Please state whether this molecule is carcinogenic or not.
SELECT COUNT(DISTINCT T.molecule_id) FROM bond AS T WHERE T.bond_type = '#'
simple
238
toxicology
triple bond refers to bond_type = '#';
How many molecules have a triple bond type?
SELECT COUNT(T.bond_id) FROM connected AS T WHERE SUBSTR(T.atom_id, -2) = '19'
simple
239
toxicology
connections refers to bond_id; atom 19 refers to atom_id like 'TR%_19';
How many connections does the atom 19 have?
SELECT DISTINCT T.element FROM atom AS T WHERE T.molecule_id = 'TR004'
challenging
240
toxicology
TR004 is the molecule 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
List all the elements of the toxicology of the molecule "TR004".
SELECT COUNT(T.molecule_id) FROM molecule AS T WHERE T.label = '-'
simple
241
toxicology
label = '-' means molecules are non-carcinogenic
How many of the molecules are not carcinogenic?
SELECT DISTINCT T2.molecule_id FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE SUBSTR(T1.atom_id, -2) BETWEEN '21' AND '25' AND T2.label = '+'
moderate
242
toxicology
atoms from 21 to 25 refers to SUBSTRING(atom_id, 7, 2) between 21 and 25; label = '+' mean molecules are carcinogenic
Among all the atoms from 21 to 25, list all the molecules that are carcinogenic.
SELECT T2.bond_id FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T2.bond_id IN ( SELECT T3.bond_id FROM connected AS T3 INNER JOIN atom AS T4 ON T3.atom_id = T4.atom_id WHERE T4.element = 'p' ) AND T1.element = 'n'
moderate
243
toxicology
have phosphorus as atom elements refers to element = 'p'; have nitrogen as atom elements refers to element = 'n'
What are the bonds that have phosphorus and nitrogen as their atom elements?
SELECT T1.label FROM molecule AS T1 INNER JOIN ( SELECT T.molecule_id, COUNT(T.bond_type) FROM bond AS T WHERE T.bond_type = '=' GROUP BY T.molecule_id ORDER BY COUNT(T.bond_type) DESC LIMIT 1 ) AS T2 ON T1.molecule_id = T2.molecule_id
moderate
244
toxicology
double bond refers to bond_type = ' = '; label = '+' mean molecules are carcinogenic
Is the molecule with the most double bonds carcinogenic?
SELECT CAST(COUNT(T2.bond_id) AS REAL) / COUNT(T1.atom_id) FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T1.element = 'i'
moderate
245
toxicology
atoms with the element iodine refers to element = 'i'; average = DIVIDE(COUND(bond_id), COUNT(atom_id)) where element = 'i'
What is the average number of bonds the atoms with the element iodine have?
SELECT T1.bond_type, T1.bond_id FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id WHERE SUBSTR(T2.atom_id, 7, 2) = '45'
moderate
246
toxicology
bond ID of atom 45 refers to SUBSTR(atom_id, 7, 2) + 0 = 45; double bond refers to bond_type = ' = '; single bond refers to bond_type = '-'; triple bond refers to bond_type = '#';
List the bond type and the bond ID of the atom 45.
SELECT DISTINCT T.element FROM atom AS T WHERE T.element NOT IN ( SELECT DISTINCT T1.element FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id )
challenging
247
toxicology
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; atoms cannot bond with other atoms means atom_id NOT in connected table;
List all the elements of atoms that can not bond with any other atoms.
SELECT T2.atom_id, T2.atom_id2 FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id INNER JOIN bond AS T3 ON T2.bond_id = T3.bond_id WHERE T3.bond_type = '#' AND T3.molecule_id = 'TR447'
simple
248
toxicology
TR447 is the molecule id; triple bond refers to bond_type = '#';
What are the atoms of the triple bond with the molecule "TR447"?
SELECT T2.element FROM connected AS T1 INNER JOIN atom AS T2 ON T1.atom_id = T2.atom_id WHERE T1.bond_id = 'TR144_8_19'
challenging
249
toxicology
TR144_8_19 is the bond 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
What are the elements of the atoms of TR144_8_19?
SELECT T.molecule_id FROM ( SELECT T3.molecule_id, COUNT(T1.bond_type) FROM bond AS T1 INNER JOIN molecule AS T3 ON T1.molecule_id = T3.molecule_id WHERE T3.label = '+' AND T1.bond_type = '=' GROUP BY T3.molecule_id ORDER BY COUNT(T1.bond_type) DESC LIMIT 1 ) AS T
moderate
250
toxicology
label = '+' mean molecules are carcinogenic; double bond refers to bond_type = ' = ';
Of all the carcinogenic molecules, which one has the most double bonds?
SELECT T.element FROM ( SELECT T2.element, COUNT(DISTINCT T2.molecule_id) FROM molecule AS T1 INNER JOIN atom AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.label = '+' GROUP BY T2.element ORDER BY COUNT(DISTINCT T2.molecule_id) LIMIT 1 ) t
moderate
251
toxicology
label = '+' mean molecules are carcinogenic
What is the least common element of all carcinogenic molecules?
SELECT T2.atom_id, T2.atom_id2 FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T1.element = 'pb'
simple
252
toxicology
atom that has the element lead refers to atom_id where element = 'pb'
What are the atoms that can bond with the atom that has the element lead?
SELECT DISTINCT T3.element FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id INNER JOIN atom AS T3 ON T2.atom_id = T3.atom_id WHERE T1.bond_type = '#'
challenging
253
toxicology
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
List the elements of all the triple bonds.
SELECT CAST((SELECT COUNT(T1.atom_id) FROM connected AS T1 INNER JOIN bond AS T2 ON T1.bond_id = T2.bond_id GROUP BY T2.bond_type ORDER BY COUNT(T2.bond_id) DESC LIMIT 1 ) AS REAL) * 100 / ( SELECT COUNT(atom_id) FROM connected )
moderate
254
toxicology
DIVIDE(COUNT(bond_id), COUNT(atom_id where MAX(COUNT(atom_id)) ))
What percentage of bonds have the most common combination of atoms' elements?
SELECT CAST(COUNT(CASE WHEN T2.label = '+' THEN T1.bond_id ELSE NULL END) AS REAL) * 100 / COUNT(T1.bond_id) FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.bond_type = '-'
moderate
255
toxicology
single bond refers to bond_type = '-'; label = '+' mean molecules are carcinogenic; proportion = DIVIDE(SUM(label = '+'), COUNT(bond_id)) where bond_type = '-'
What proportion of single bonds are carcinogenic?
SELECT COUNT(T.atom_id) FROM atom AS T WHERE T.element = 'c' OR T.element = 'h'
simple
256
toxicology
consisting of element carbon and hydrogen refers to element in('c', 'h')
Calculate the total atoms consisting of the element carbon and hydrogen.
SELECT DISTINCT T2.atom_id2 FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T1.element = 's'
simple
257
toxicology
element sulfur refers to element = 's'
List down atom id2 for atoms with element sulfur.
SELECT DISTINCT T3.bond_type FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id INNER JOIN bond AS T3 ON T3.bond_id = T2.bond_id WHERE T1.element = 'sn'
moderate
258
toxicology
element Tin refers to element = 'sn'; double bond refers to bond_type = ' = '; single bond refers to bond_type = '-'; triple bond refers to bond_type = '#'
What are the bond type for atoms with element Tin?
SELECT COUNT(DISTINCT T.element) FROM ( SELECT DISTINCT T2.molecule_id, T1.element 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 T3.bond_type = '-' ) AS T
simple
259
toxicology
single bond refers to bond_type = '-';
How many elements are there for single bond molecules?
SELECT COUNT(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 T3.bond_type = '#' AND T1.element IN ('p', 'br')
moderate
260
toxicology
triple bond refers to bond_type = '#'; phosphorus refers to element = 'p'; bromine refers to element = 'br'
Calculate the total atoms with triple-bond molecules containing the element phosphorus or bromine.
SELECT DISTINCT T1.bond_id FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+'
simple
261
toxicology
label = '+' mean molecules are carcinogenic
Write down bond id for molecules that are carcinogenic.
SELECT DISTINCT T1.molecule_id FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '-' AND T1.bond_type = '-'
simple
262
toxicology
label = '-' means molecules are non-carcinogenic; single bond refers to bond_type = '-';
Among the single bond molecule id, which molecules are not carcinogenic?
SELECT CAST(COUNT(CASE WHEN T.element = 'cl' THEN T.atom_id ELSE NULL END) AS REAL) * 100 / COUNT(T.atom_id) FROM ( SELECT T1.atom_id, T1.element 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 T3.bond_type = '-' ) AS T
challenging
263
toxicology
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 = '-'
What is the composition of element chlorine in percentage among the single bond molecules?
SELECT molecule_id, T.label FROM molecule AS T WHERE T.molecule_id IN ('TR000', 'TR001', 'TR002')
simple
264
toxicology
TR000, TR001 and TR002 are molecule id; label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic
What are the labels for TR000, TR001 and TR002?
SELECT T.molecule_id FROM molecule AS T WHERE T.label = '-'
simple
265
toxicology
label = '-' means molecules are non-carcinogenic
List down the molecule id for non carcinogenic molecules.
SELECT COUNT(T.molecule_id) FROM molecule AS T WHERE T.molecule_id BETWEEN 'TR000' AND 'TR030' AND T.label = '+'
simple
266
toxicology
label = '+' mean molecules are carcinogenic
Calculate the total carcinogenic molecules for molecule id from TR000 to TR030.
SELECT T2.molecule_id, T2.bond_type FROM molecule AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.molecule_id BETWEEN 'TR000' AND 'TR050'
moderate
267
toxicology
double bond refers to bond_type = ' = '; single bond refers to bond_type = '-'; triple bond refers to bond_type = '#';
List down the bond type for molecules from molecule id TR000 to TR050.
SELECT T2.element FROM connected AS T1 INNER JOIN atom AS T2 ON T1.atom_id = T2.atom_id WHERE T1.bond_id = 'TR001_10_11'
challenging
268
toxicology
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
What are the elements for bond id TR001_10_11?
SELECT COUNT(T3.bond_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 T1.element = 'i'
simple
269
toxicology
iodine refers to element = 'i'
How many bond id have element iodine?
SELECT T2.label FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'ca' GROUP BY T2.label ORDER BY COUNT(T2.label) DESC LIMIT 1
moderate
270
toxicology
calcium refers to element = 'ca'; label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic; MAX(label)
Among the molecules with element Calcium, are they mostly carcinogenic or non carcinogenic?
SELECT T2.bond_id, T2.atom_id2, T1.element AS flag_have_CaCl FROM atom AS T1 INNER JOIN connected AS T2 ON T2.atom_id = T1.atom_id WHERE T2.bond_id = 'TR001_1_8' AND (T1.element = 'c1' OR T1.element = 'c')
simple
271
toxicology
chlorine refers to element = 'cl'; carbon refers to element = 'c'
Does bond id TR001_1_8 have both element of chlorine and carbon?
SELECT DISTINCT T2.molecule_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 T3.bond_type = '#' AND T1.element = 'c' AND T2.label = '-'
moderate
272
toxicology
carbon refers to element = 'c'; triple bond refers to bond_type = '#'; label = '-' means molecules are non-carcinogenic
List down two molecule id of triple bond non carcinogenic molecules with element carbon.
SELECT CAST(COUNT( CASE WHEN T1.element = 'cl' THEN T1.element ELSE NULL END) AS REAL) * 100 / COUNT(T1.element) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+'
moderate
273
toxicology
chlorine refers to element = 'cl'; label = '+' mean molecules are carcinogenic; percentage = DIVIDE(SUM(element = 'pb'); COUNT(molecule_id)) as percentage where label = '+'
What is the percentage of element chlorine in carcinogenic molecules?
SELECT DISTINCT T.element FROM atom AS T WHERE T.molecule_id = 'TR001'
simple
274
toxicology
TR001 is the molecule id
List the toxicology elements associated with molecule TR001.
SELECT DISTINCT T.molecule_id FROM bond AS T WHERE T.bond_type = '='
simple
275
toxicology
double bond refers to bond_type = ' = ';
Give me the molecule ID of the double bond type.
SELECT T2.atom_id, T2.atom_id2 FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id WHERE T1.bond_type = '#'
simple
276
toxicology
first atom refers to atom_id; second atom refers to atom_id2; triple bond refers to bond_type = '#';
Write down the atom IDs of the first and second atoms of triple bond type molecules.
SELECT T1.element FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T2.bond_id = 'TR005_16_26'
challenging
277
toxicology
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
What are the toxicology elements associated with bond ID TR005_16_26?
SELECT COUNT(DISTINCT T2.molecule_id) FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '-' AND T1.bond_type = '-'
simple
278
toxicology
label = '-' means molecules are non-carcinogenic; single bond refers to bond_type = '-';
How many of the single bond type molecules are non-carcinogenic?
SELECT T2.label FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.bond_id = 'TR001_10_11'
simple
279
toxicology
label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic
What is the label for bond ID TR001_10_11?
SELECT DISTINCT T1.bond_id, T2.label FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.bond_type = '#'
moderate
280
toxicology
triple bond refers to bond_type = '#'; label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic
Enumerate the bond ID of triple bond type molecules and tell me if they are carcinogenic or not.
SELECT DISTINCT T1.element FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+' AND SUBSTR(T1.atom_id, -1) = '4' AND LENGTH(T1.atom_id) = 7
challenging
281
toxicology
label = '+' means molecules are carcinogenic; 4th atom of each molecule refers to substr(atom_id, 7, 1) = 4; 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
Tally the toxicology element of the 4th atom of each molecule that was carcinogenic.
SELECT CAST(COUNT(CASE WHEN T.element = 'h' THEN T.atom_id ELSE NULL END) AS REAL) / COUNT(T.atom_id) FROM ( SELECT DISTINCT T1.atom_id, T1.element, T1.molecule_id, T2.label FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.molecule_id = 'TR006' ) AS T UNION ALL SELECT DISTINCT T3.label FROM ( SELECT DISTINCT T1.atom_id, T1.element, T1.molecule_id, T2.label FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.molecule_id = 'TR006' ) AS T3
challenging
282
toxicology
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
What is the ratio of Hydrogen elements in molecule ID TR006? Please indicate its label.
SELECT T2.label AS flag_carcinogenic FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'ca'
moderate
283
toxicology
calcium refers to element = 'ca'; label = '+' mean molecules are carcinogenic; label = '-' means molecules are non-carcinogenic;
Identify whether the chemical compound that contains Calcium is carcinogenic.
SELECT DISTINCT T2.bond_type FROM atom AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'te'
moderate
284
toxicology
Tellurium refers to element = 'te'; double bond refers to bond_type = ' = '; single bond refers to bond_type = '-'; triple bond refers to bond_type = '#';
Determine the bond type that is formed in the chemical compound containing element Tellurium.
SELECT T1.element FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id INNER JOIN bond AS T3 ON T2.bond_id = T3.bond_id WHERE T3.bond_id = 'TR001_10_11'
challenging
285
toxicology
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)
Name chemical elements that form a bond TR001_10_11.
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
simple
286
toxicology
triple bond refers to bond_type = '#';
Among all chemical compounds identified in the database, what percent of compounds form a triple-bond.
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'
moderate
287
toxicology
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'
Among all chemical compounds that contain molecule TR047, identify the percent that form a double-bond.
SELECT T2.label AS flag_carcinogenic FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.atom_id = 'TR001_1'
simple
288
toxicology
label = '+' mean molecules are carcinogenic;
Identify whether the molecule that contains atom TR001_1 is carcinogenic.
SELECT T.label FROM molecule AS T WHERE T.molecule_id = 'TR151'
simple
289
toxicology
label = '+' mean molecules are carcinogenic;
Is molecule TR151 carcinogenic?
SELECT DISTINCT T.element FROM atom AS T WHERE T.molecule_id = 'TR151'
challenging
290
toxicology
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
Which toxic element can be found in the molecule TR151?
SELECT COUNT(T.molecule_id) FROM molecule AS T WHERE T.label = '+'
simple
291
toxicology
label = '+' mean molecules are carcinogenic;
How many chemical compounds in the database are identified as carcinogenic.
SELECT T.atom_id FROM atom AS T WHERE T.molecule_id BETWEEN 'TR010' AND 'TR050' AND T.element = 'c'
simple
292
toxicology
carbon refers to element = 'c'; between TR010 to TR050 refers to substr(molecule_id, 3, 3)>10 AND substr(molecule_id, 3, 3) < 50
Identify the atoms belong to the molecule with ID between TR010 to TR050 that contain the element carbon.
SELECT COUNT(T1.atom_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+'
simple
293
toxicology
label = '+' mean molecules are carcinogenic;
How many atoms belong to the molecule labeled with carcinogenic compounds?
SELECT T1.bond_id FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+' AND T1.bond_type = '='
simple
294
toxicology
label = '+' mean molecules are carcinogenic; double bond refers to bond_type = ' = ';
Which bond ids are double-bond with carcinogenic compound?
SELECT COUNT(T1.atom_id) AS atomnums_h FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+' AND T1.element = 'h'
simple
295
toxicology
label = '+' mean molecules are carcinogenic; hydrogen refers to element = h'
How many atoms belong to the molecule that element is hydrogen and labeled with carcinogenic compound?
SELECT T2.molecule_id, T2.bond_id, T1.atom_id FROM connected AS T1 INNER JOIN bond AS T2 ON T1.bond_id = T2.bond_id WHERE T1.atom_id = 'TR000_1' AND T2.bond_id = 'TR000_1_2'
simple
296
toxicology
Indicate the molecule id is belonging to the TR00_1_2 bond that has the first atom named TR00_1.
SELECT T1.atom_id FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'c' AND T2.label = '-'
simple
297
toxicology
label = '-' means molecules are non-carcinogenic; carbon refers to element = 'c'
Among the atoms that contain element carbon, which one does not contain compound carcinogenic?
SELECT CAST(COUNT(CASE WHEN T1.element = 'h' THEN T2.molecule_id ELSE NULL END) AS REAL) * 100 / COUNT(T2.molecule_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+'
moderate
298
toxicology
hydrogen refers to element = 'h'; label = '+' mean molecules are carcinogenic; percentage = DIVIDE(SUM(label = '+' and element = 'h'), COUNT(molecule_id)) * 100.0
Calculate the percentage of molecules containing carcinogenic compounds that element is hydrogen.
SELECT T.label FROM molecule AS T WHERE T.molecule_id = 'TR124'
simple
299
toxicology
label = '+' mean molecules are carcinogenic;
Is molecule TR124 carcinogenic?