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