NATURAL_LANG stringlengths 0 446 | SCHEMA stringlengths 27 2.21k | SQL stringlengths 18 453 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|
Which score has a Set 2 of 17–25, and a Total of 48–75? | CREATE TABLE table_name_10 (score VARCHAR, set_2 VARCHAR, total VARCHAR) | SELECT score FROM table_name_10 WHERE set_2 = "17–25" AND total = "48–75" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1714,
41,
7,
9022,
584,
4280,
28027,
6,
356,
834,
357,
584,
4280,
28027,
6,
792,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
2604,
65,
3,
9,
2821,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2604,
21680,
953,
834,
4350,
834,
1714,
549,
17444,
427,
356,
834,
357,
3274,
96,
2517,
104,
1828,
121,
3430,
792,
3274,
96,
3707,
104,
3072,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
List names for drivers from Hartford city and younger than 40. | CREATE TABLE driver (name VARCHAR, home_city VARCHAR, age VARCHAR) | SELECT name FROM driver WHERE home_city = 'Hartford' AND age < 40 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2535,
41,
4350,
584,
4280,
28027,
6,
234,
834,
6726,
584,
4280,
28027,
6,
1246,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
6792,
3056,
21,
3863,
45,
26069,
690,
11,
5868,
145... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
564,
21680,
2535,
549,
17444,
427,
234,
834,
6726,
3274,
3,
31,
15537,
17,
2590,
31,
3430,
1246,
3,
2,
1283,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What group was sunline in when he was at moonee valley? | CREATE TABLE table_2581397_2 (group VARCHAR, venue VARCHAR) | SELECT group FROM table_2581397_2 WHERE venue = "Moonee Valley" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
3449,
2368,
4327,
834,
357,
41,
10739,
584,
4280,
28027,
6,
5669,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
563,
47,
1997,
747,
16,
116,
3,
88,
47,
44,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
563,
21680,
953,
834,
357,
3449,
2368,
4327,
834,
357,
549,
17444,
427,
5669,
3274,
96,
16334,
29,
15,
15,
3460,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What are the year(s) of manufacture for railway number(s) 26 (ii) 63 (ii) , 188 193? | CREATE TABLE table_name_35 (
year_s__of_manufacture VARCHAR,
railway_number_s_ VARCHAR
) | SELECT year_s__of_manufacture FROM table_name_35 WHERE railway_number_s_ = "26 (ii) …63 (ii) , 188–193" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2469,
41,
215,
834,
7,
834,
834,
858,
834,
348,
76,
8717,
1462,
584,
4280,
28027,
6,
14421,
834,
5525,
1152,
834,
7,
834,
584,
4280,
28027,
3,
61,
3,
32102,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
215,
834,
7,
834,
834,
858,
834,
348,
76,
8717,
1462,
21680,
953,
834,
4350,
834,
2469,
549,
17444,
427,
14421,
834,
5525,
1152,
834,
7,
834,
3274,
96,
2688,
41,
23,
23,
61,
3,
233,
3891,
41,
23,
23,
61,
3,
6,... |
count the number of patients whose gender is f and age is less than 70? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.age < "70" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
122,
3868,
3274,
96,
371,
121,
3430,
14798,
5,
545,
3,
2,
96,
2518,
121,
1,
-100,
-100,
-100,
... |
In the game where Collingwood is the home team what is the score of the away team? | CREATE TABLE table_name_18 (
away_team VARCHAR,
home_team VARCHAR
) | SELECT away_team AS score FROM table_name_18 WHERE home_team = "collingwood" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2606,
41,
550,
834,
11650,
584,
4280,
28027,
6,
234,
834,
11650,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
86,
8,
467,
213,
9919,
53,
2037,
19,
8,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
550,
834,
11650,
6157,
2604,
21680,
953,
834,
4350,
834,
2606,
549,
17444,
427,
234,
834,
11650,
3274,
96,
3297,
697,
2037,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
How much Against has Losses smaller than 7, and a Wimmera FL of horsham? | CREATE TABLE table_name_66 (against INTEGER, losses VARCHAR, wimmera_fl VARCHAR) | SELECT SUM(against) FROM table_name_66 WHERE losses < 7 AND wimmera_fl = "horsham" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3539,
41,
9,
16720,
7,
17,
3,
21342,
17966,
6,
8467,
584,
4280,
28027,
6,
3,
210,
12174,
9,
834,
89,
40,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
9,
16720,
7,
17,
61,
21680,
953,
834,
4350,
834,
3539,
549,
17444,
427,
8467,
3,
2,
489,
3430,
3,
210,
12174,
9,
834,
89,
40,
3274,
96,
107,
127,
7,
1483,
121,
1,
-100,
-100,
-100,
-100,
-100,
... |
What is Gary David Saunders' Tenure? | CREATE TABLE table_name_23 (tenure VARCHAR, name VARCHAR) | SELECT tenure FROM table_name_23 WHERE name = "gary david saunders" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2773,
41,
324,
1462,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
13439,
1955,
1138,
7248,
7,
31,
4738,
1462,
58,
1,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
20752,
21680,
953,
834,
4350,
834,
2773,
549,
17444,
427,
564,
3274,
96,
1478,
63,
836,
6961,
3,
7,
9,
7248,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
provide the number of patients whose drug code is warf2 and lab test fluid is other body fluid? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.formulary_drug_cd = "WARF2" AND lab.fluid = "Other Body Fluid" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7744,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7744,
7,
5,
8399,
51,
834,
23,
26,
338... |
What Elector was Elevated on December 18, 1182? | CREATE TABLE table_name_31 (elector VARCHAR, elevated VARCHAR) | SELECT elector FROM table_name_31 WHERE elevated = "december 18, 1182" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3341,
41,
400,
5317,
584,
4280,
28027,
6,
15712,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
3,
21543,
127,
47,
8021,
208,
920,
30,
1882,
14985,
850,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
11924,
127,
21680,
953,
834,
4350,
834,
3341,
549,
17444,
427,
15712,
3274,
96,
221,
75,
18247,
14985,
850,
4613,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What place is Fred Funk in? | CREATE TABLE table_name_30 (
place VARCHAR,
player VARCHAR
) | SELECT place FROM table_name_30 WHERE player = "fred funk" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1458,
41,
286,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
286,
19,
12264,
21867,
16,
58,
1,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
286,
21680,
953,
834,
4350,
834,
1458,
549,
17444,
427,
1959,
3274,
96,
89,
1271,
3,
15668,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
GT Force of no, and a Driving Force Pro of no, and a G27 Racing Wheel of no has what driving force gt? | CREATE TABLE table_name_2 (
driving_force_gt VARCHAR,
g27_racing_wheel VARCHAR,
gt_force VARCHAR,
driving_force_pro VARCHAR
) | SELECT driving_force_gt FROM table_name_2 WHERE gt_force = "no" AND driving_force_pro = "no" AND g27_racing_wheel = "no" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
357,
41,
2191,
834,
10880,
834,
122,
17,
584,
4280,
28027,
6,
3,
122,
2555,
834,
3738,
53,
834,
14074,
584,
4280,
28027,
6,
3,
122,
17,
834,
10880,
584,
4280,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2191,
834,
10880,
834,
122,
17,
21680,
953,
834,
4350,
834,
357,
549,
17444,
427,
3,
122,
17,
834,
10880,
3274,
96,
29,
32,
121,
3430,
2191,
834,
10880,
834,
1409,
3274,
96,
29,
32,
121,
3430,
3,
122,
2555,
834,
... |
Which average Played has a Drawn smaller than 1, and Points larger than 4? | CREATE TABLE table_name_83 (
played INTEGER,
drawn VARCHAR,
points VARCHAR
) | SELECT AVG(played) FROM table_name_83 WHERE drawn < 1 AND points > 4 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4591,
41,
1944,
3,
21342,
17966,
6,
6796,
584,
4280,
28027,
6,
979,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
1348,
2911,
15,
26,
65,
3,
9,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
71,
17217,
599,
4895,
15,
26,
61,
21680,
953,
834,
4350,
834,
4591,
549,
17444,
427,
6796,
3,
2,
209,
3430,
979,
2490,
314,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
count the number of patients whose age is less than 59 and procedure short title is attach pedicle graft nec? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "59" AND procedures.short_title = "Attach pedicle graft NEC" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7690,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
2118,
23,
26,
1499,
6,
5059,
715,
1499,
6,
5692,
1499,
6,
701,
834,
15129,
1499,
6,
3783,
1499,
6,
5798,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
what is the number of patients whose primary disease is mesenteric ischemia and age is less than 86? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "MESENTERIC ISCHEMIA" AND demographic.age < "86" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
25930,
4844,
159,
3274,
96,
22759,
6431,
427,
23503,
27,
20557,
25284,
188,
121,
3430,
14798,
5,
5... |
Which event has a Round larger than 2? | CREATE TABLE table_9776 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
) | SELECT "Event" FROM table_9776 WHERE "Round" > '2' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4327,
3959,
41,
96,
1649,
7,
535,
1499,
6,
96,
1649,
7621,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
23351,
107,
32,
26,
121,
1499,
6,
96,
427,
2169,
121,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
427,
2169,
121,
21680,
953,
834,
4327,
3959,
549,
17444,
427,
96,
448,
32,
1106,
121,
2490,
3,
31,
357,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
what is the number of patients whose gender is f and diagnoses short title is ulcer of heel & midfoot? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "F" AND diagnoses.short_title = "Ulcer of heel & midfoot" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
5... |
What club has 536 points for? | CREATE TABLE table_13741576_6 (
club VARCHAR,
points_for VARCHAR
) | SELECT club FROM table_13741576_6 WHERE points_for = "536" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4581,
1808,
3959,
834,
948,
41,
1886,
584,
4280,
28027,
6,
979,
834,
1161,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
1886,
65,
305,
3420,
979,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1886,
21680,
953,
834,
2368,
4581,
1808,
3959,
834,
948,
549,
17444,
427,
979,
834,
1161,
3274,
96,
755,
3420,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Name the surfaace where outcome is runner-up and championship is us open | CREATE TABLE table_1547951_3 (surface VARCHAR, outcome VARCHAR, championship VARCHAR) | SELECT surface FROM table_1547951_3 WHERE outcome = "Runner-up" AND championship = "US Open" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
27308,
4440,
5553,
834,
519,
41,
26899,
584,
4280,
28027,
6,
6138,
584,
4280,
28027,
6,
10183,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
12245,
9,
3302,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1774,
21680,
953,
834,
27308,
4440,
5553,
834,
519,
549,
17444,
427,
6138,
3274,
96,
23572,
18,
413,
121,
3430,
10183,
3274,
96,
3063,
2384,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Which player had a To par of 13? | CREATE TABLE table_46673 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" real,
"Money ( $ )" text
) | SELECT "Player" FROM table_46673 WHERE "To par" = '13' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4448,
3708,
519,
41,
96,
345,
11706,
121,
1499,
6,
96,
15800,
49,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
3696,
260,
121,
490,
6,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
15800,
49,
121,
21680,
953,
834,
4448,
3708,
519,
549,
17444,
427,
96,
3696,
260,
121,
3274,
3,
31,
2368,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What venue has 19 against? | CREATE TABLE table_name_47 (venue VARCHAR, against VARCHAR) | SELECT venue FROM table_name_47 WHERE against = 19 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4177,
41,
15098,
584,
4280,
28027,
6,
581,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
5669,
65,
957,
581,
58,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
5669,
21680,
953,
834,
4350,
834,
4177,
549,
17444,
427,
581,
3274,
957,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What stamp design has a denomination of $1.18? | CREATE TABLE table_58443 (
"Date of Issue" text,
"Denomination" text,
"Design" text,
"Paper Type" text,
"First Day Cover Cancellation" text
) | SELECT "Design" FROM table_58443 WHERE "Denomination" = '$1.18' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3449,
3628,
519,
41,
96,
308,
342,
13,
13235,
121,
1499,
6,
96,
308,
35,
32,
14484,
121,
1499,
6,
96,
19103,
121,
1499,
6,
96,
15182,
49,
6632,
121,
1499,
6,
96,
25171,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
19103,
121,
21680,
953,
834,
3449,
3628,
519,
549,
17444,
427,
96,
308,
35,
32,
14484,
121,
3274,
3,
31,
3229,
11039,
927,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Select the names of manufacturer whose products have an average price higher than or equal to $150. | CREATE TABLE Manufacturers (
name VARCHAR,
code VARCHAR
)
CREATE TABLE products (
Price INTEGER,
manufacturer VARCHAR,
price INTEGER
) | SELECT AVG(T1.price), T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name HAVING AVG(T1.price) >= 150 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
15248,
7,
41,
564,
584,
4280,
28027,
6,
1081,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
494,
41,
5312,
3,
21342,
17966,
6,
4818,
584,
4280,
28027,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
382,
5411,
102,
4920,
201,
332,
4416,
4350,
21680,
494,
6157,
332,
536,
3,
15355,
3162,
15248,
7,
6157,
332,
357,
9191,
332,
5411,
348,
76,
8717,
450,
49,
3274,
332,
4416,
4978,
350,
4630,
6880,
272,... |
which venue hosted the largest amount of events within this table ? | CREATE TABLE table_203_431 (
id number,
"#" number,
"date" text,
"venue" text,
"opponent" text,
"score" text,
"result" text,
"competition" text
) | SELECT "venue" FROM table_203_431 GROUP BY "venue" ORDER BY COUNT(*) DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
591,
3341,
41,
3,
23,
26,
381,
6,
96,
4663,
121,
381,
6,
96,
5522,
121,
1499,
6,
96,
15098,
121,
1499,
6,
96,
32,
102,
9977,
121,
1499,
6,
96,
7,
9022,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
15098,
121,
21680,
953,
834,
23330,
834,
591,
3341,
350,
4630,
6880,
272,
476,
96,
15098,
121,
4674,
11300,
272,
476,
2847,
17161,
599,
1935,
61,
309,
25067,
8729,
12604,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100... |
count the number of patients whose death status is 0 and diagnoses short title is hx-skin malignancy nec? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "0" AND diagnoses.short_title = "Hx-skin malignancy NEC" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7690,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
2118,
23,
26,
1499,
6,
5059,
715,
1499,
6,
5692,
1499,
6,
701,
834,
15129,
1499,
6,
3783,
1499,
6,
5798,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
5... |
On Race 14 when the FLap is larger than 1, what is the podium number? | CREATE TABLE table_49304 (
"Season" text,
"Race" real,
"Podium" real,
"Pole" real,
"FLap" real
) | SELECT COUNT("Podium") FROM table_49304 WHERE "Race" = '14' AND "FLap" > '1' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3647,
23702,
41,
96,
134,
15,
9,
739,
121,
1499,
6,
96,
448,
3302,
121,
490,
6,
96,
16665,
2552,
121,
490,
6,
96,
8931,
15,
121,
490,
6,
96,
10765,
9,
102,
121,
490,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
16665,
2552,
8512,
21680,
953,
834,
3647,
23702,
549,
17444,
427,
96,
448,
3302,
121,
3274,
3,
31,
2534,
31,
3430,
96,
10765,
9,
102,
121,
2490,
3,
31,
536,
31,
1,
-100,
-100,
-100,
-100,
-1... |
Who had 0.00% in 2004? | CREATE TABLE table_name_71 (party VARCHAR, results_2004 VARCHAR) | SELECT party FROM table_name_71 WHERE results_2004 = "0.00%" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4450,
41,
8071,
584,
4280,
28027,
6,
772,
834,
21653,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
141,
3,
10667,
1454,
16,
4406,
58,
1,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1088,
21680,
953,
834,
4350,
834,
4450,
549,
17444,
427,
772,
834,
21653,
3274,
96,
10667,
1454,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many votes did Obama have at 32.12% | CREATE TABLE table_20722805_1 (obama_number INTEGER, obama_percentage VARCHAR) | SELECT MIN(obama_number) FROM table_20722805_1 WHERE obama_percentage = "32.12%" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1755,
5865,
2577,
3076,
834,
536,
41,
32,
115,
265,
9,
834,
5525,
1152,
3,
21342,
17966,
6,
3,
32,
115,
265,
9,
834,
883,
3728,
545,
584,
4280,
28027,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
32,
115,
265,
9,
834,
5525,
1152,
61,
21680,
953,
834,
1755,
5865,
2577,
3076,
834,
536,
549,
17444,
427,
3,
32,
115,
265,
9,
834,
883,
3728,
545,
3274,
96,
2668,
5,
26821,
121,
1,
-100,
-100,
-10... |
What years did the player with the jersey number bigger than 20 play? | CREATE TABLE table_77078 (
"Player" text,
"Nationality" text,
"Jersey Number(s)" real,
"Position" text,
"Years" text,
"From" text
) | SELECT "Years" FROM table_77078 WHERE "Jersey Number(s)" > '20' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26920,
3940,
41,
96,
15800,
49,
121,
1499,
6,
96,
24732,
485,
121,
1499,
6,
96,
683,
277,
15,
63,
7720,
599,
7,
61,
121,
490,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
476,
2741,
7,
121,
21680,
953,
834,
26920,
3940,
549,
17444,
427,
96,
683,
277,
15,
63,
7720,
599,
7,
61,
121,
2490,
3,
31,
1755,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is Team, when Tries Against is 8? | CREATE TABLE table_name_40 (team VARCHAR, tries_against VARCHAR) | SELECT team FROM table_name_40 WHERE tries_against = "8" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2445,
41,
11650,
584,
4280,
28027,
6,
3,
9000,
834,
9,
16720,
7,
17,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
2271,
6,
116,
332,
2593,
3,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
372,
21680,
953,
834,
4350,
834,
2445,
549,
17444,
427,
3,
9000,
834,
9,
16720,
7,
17,
3274,
96,
927,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
If the equation is 8 × 9² + 8 × 9 + 8, what is the 2nd throw? | CREATE TABLE table_17265535_7 (equation VARCHAR) | SELECT MIN(2 AS nd_throw) FROM table_17265535_7 WHERE equation = "8 × 9² + 8 × 9 + 8" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2517,
2688,
3769,
2469,
834,
940,
41,
15,
2436,
257,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
156,
8,
13850,
19,
505,
3,
2,
3,
4508,
1768,
505,
3,
2,
668,
176... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
357,
6157,
3,
727,
834,
189,
3623,
61,
21680,
953,
834,
2517,
2688,
3769,
2469,
834,
940,
549,
17444,
427,
13850,
3274,
96,
927,
3,
2,
3,
4508,
1768,
505,
3,
2,
668,
1768,
505,
121,
1,
-100,
-100,... |
How large of a crowd can the Brunswick Street Oval hold? | CREATE TABLE table_53425 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT COUNT("Crowd") FROM table_53425 WHERE "Venue" = 'brunswick street oval' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
755,
3710,
1828,
41,
96,
19040,
372,
121,
1499,
6,
96,
19040,
372,
2604,
121,
1499,
6,
96,
188,
1343,
372,
121,
1499,
6,
96,
188,
1343,
372,
2604,
121,
1499,
6,
96,
553,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
254,
3623,
26,
8512,
21680,
953,
834,
755,
3710,
1828,
549,
17444,
427,
96,
553,
35,
76,
15,
121,
3274,
3,
31,
9052,
29,
7,
5981,
2815,
17986,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Which Total has a Date of 1602, and Greater Doubles smaller than 16? | CREATE TABLE table_64475 (
"Date" real,
"Doubles, I Class" real,
"Doubles, II Class" real,
"Greater Doubles" real,
"Doubles" real,
"Semidoubles" real,
"Total" real
) | SELECT MAX("Total") FROM table_64475 WHERE "Date" = '1602' AND "Greater Doubles" < '16' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4389,
591,
3072,
41,
96,
308,
342,
121,
490,
6,
96,
4135,
76,
2296,
7,
6,
27,
4501,
121,
490,
6,
96,
4135,
76,
2296,
7,
6,
2466,
4501,
121,
490,
6,
96,
24189,
49,
840... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
121,
3696,
1947,
8512,
21680,
953,
834,
4389,
591,
3072,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
19129,
357,
31,
3430,
96,
24189,
49,
8405,
7,
121,
3,
2,
3,
31,
2938,
31,
1,
-100,
-100,
... |
Name the crew chief for rhonda thorson | CREATE TABLE table_24535095_2 (
crew_chief VARCHAR,
listed_owner_s_ VARCHAR
) | SELECT crew_chief FROM table_24535095_2 WHERE listed_owner_s_ = "Rhonda Thorson" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
2128,
16975,
3301,
834,
357,
41,
4627,
834,
20053,
584,
4280,
28027,
6,
2616,
834,
13238,
834,
7,
834,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4627,
834,
20053,
21680,
953,
834,
357,
2128,
16975,
3301,
834,
357,
549,
17444,
427,
2616,
834,
13238,
834,
7,
834,
3274,
96,
448,
31782,
10632,
739,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
how many nations won more than ten silver medals ? | CREATE TABLE table_204_822 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
) | SELECT COUNT("nation") FROM table_204_822 WHERE "silver" > 10 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
4613,
357,
41,
3,
23,
26,
381,
6,
96,
6254,
121,
381,
6,
96,
29,
257,
121,
1499,
6,
96,
14910,
121,
381,
6,
96,
7,
173,
624,
121,
381,
6,
96,
13711,
776,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
29,
257,
8512,
21680,
953,
834,
26363,
834,
4613,
357,
549,
17444,
427,
96,
7,
173,
624,
121,
2490,
335,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the average Lost that has a Name of ec amberg (n), and a Position smaller than 4? | CREATE TABLE table_name_63 (lost INTEGER, name VARCHAR, position VARCHAR) | SELECT AVG(lost) FROM table_name_63 WHERE name = "ec amberg (n)" AND position < 4 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3891,
41,
2298,
17,
3,
21342,
17966,
6,
564,
584,
4280,
28027,
6,
1102,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1348,
19576,
24,
65,
3,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
3,
23143,
14196,
71,
17217,
599,
2298,
17,
61,
21680,
953,
834,
4350,
834,
3891,
549,
17444,
427,
564,
3274,
96,
15,
75,
183,
2235,
41,
29,
61,
121,
3430,
1102,
3,
2,
314,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Raiders of the Lost Ark had pieces of 277 for what lowest number? | CREATE TABLE table_name_8 (number INTEGER, film VARCHAR, pieces VARCHAR) | SELECT MIN(number) FROM table_name_8 WHERE film = "raiders of the lost ark" AND pieces = 277 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
927,
41,
5525,
1152,
3,
21342,
17966,
6,
814,
584,
4280,
28027,
6,
2161,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
13016,
588,
7,
13,
8,
19576,
22710,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
5525,
1152,
61,
21680,
953,
834,
4350,
834,
927,
549,
17444,
427,
814,
3274,
96,
52,
18900,
7,
13,
8,
1513,
3,
6604,
121,
3430,
2161,
3274,
204,
4013,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
How many courses have more than 2 credits? | CREATE TABLE COURSE (Credits INTEGER) | SELECT COUNT(*) FROM COURSE WHERE Credits > 2 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
205,
9131,
4132,
41,
254,
1271,
7085,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
2996,
43,
72,
145,
204,
11893,
58,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
205,
9131,
4132,
549,
17444,
427,
6529,
7,
2490,
204,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Tell me the pole winner of may 12 | CREATE TABLE table_74484 (
"Date" text,
"Track" text,
"Event Name" text,
"Pole Winner" text,
"Race Winner" text
) | SELECT "Pole Winner" FROM table_74484 WHERE "Date" = 'may 12' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4581,
3707,
591,
41,
96,
308,
342,
121,
1499,
6,
96,
382,
16729,
121,
1499,
6,
96,
427,
2169,
5570,
121,
1499,
6,
96,
8931,
15,
18125,
121,
1499,
6,
96,
448,
3302,
18125,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
3,
23143,
14196,
96,
8931,
15,
18125,
121,
21680,
953,
834,
4581,
3707,
591,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
13726,
586,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Which player number is 2.10 meters tall? | CREATE TABLE table_582 (
"No" real,
"Player" text,
"Height" text,
"Position" text,
"Year born" real,
"Current Club" text
) | SELECT "No" FROM table_582 WHERE "Height" = '2.10' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3449,
357,
41,
96,
4168,
121,
490,
6,
96,
15800,
49,
121,
1499,
6,
96,
3845,
2632,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
476,
2741,
2170,
121,
490,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
4168,
121,
21680,
953,
834,
3449,
357,
549,
17444,
427,
96,
3845,
2632,
121,
3274,
3,
31,
4416,
1714,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How long is the total lesson time took by customer with first name as Rylan and last name as Goodwin? | CREATE TABLE customers (
customer_id number,
customer_address_id number,
customer_status_code text,
date_became_customer time,
date_of_birth time,
first_name text,
last_name text,
amount_outstanding number,
email_address text,
phone_number text,
cell_mobile_phone_number text
)
CREATE TABLE addresses (
address_id number,
line_1_number_building text,
city text,
zip_postcode text,
state_province_county text,
country text
)
CREATE TABLE staff (
staff_id number,
staff_address_id number,
nickname text,
first_name text,
middle_name text,
last_name text,
date_of_birth time,
date_joined_staff time,
date_left_staff time
)
CREATE TABLE customer_payments (
customer_id number,
datetime_payment time,
payment_method_code text,
amount_payment number
)
CREATE TABLE lessons (
lesson_id number,
customer_id number,
lesson_status_code text,
staff_id number,
vehicle_id number,
lesson_date time,
lesson_time text,
price number
)
CREATE TABLE vehicles (
vehicle_id number,
vehicle_details text
) | SELECT SUM(T1.lesson_time) FROM lessons AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = "Rylan" AND T2.last_name = "Goodwin" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
722,
41,
884,
834,
23,
26,
381,
6,
884,
834,
9,
26,
12039,
834,
23,
26,
381,
6,
884,
834,
8547,
302,
834,
4978,
1499,
6,
833,
834,
346,
6527,
15,
834,
25697,
49,
97,
6,
833,
83... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
382,
5411,
924,
106,
834,
715,
61,
21680,
5182,
6157,
332,
536,
3,
15355,
3162,
722,
6157,
332,
357,
9191,
332,
5411,
25697,
49,
834,
23,
26,
3274,
332,
4416,
25697,
49,
834,
23,
26,
549,
17444,
42... |
What is the largest amount of wins when there are less than 5 points, the class is 500cc, the team is norton, and the year is more recent than 1955? | CREATE TABLE table_name_1 (wins INTEGER, year VARCHAR, team VARCHAR, points VARCHAR, class VARCHAR) | SELECT MAX(wins) FROM table_name_1 WHERE points < 5 AND class = "500cc" AND team = "norton" AND year > 1955 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
536,
41,
3757,
7,
3,
21342,
17966,
6,
215,
584,
4280,
28027,
6,
372,
584,
4280,
28027,
6,
979,
584,
4280,
28027,
6,
853,
584,
4280,
28027,
61,
3,
32102,
32103,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
3757,
7,
61,
21680,
953,
834,
4350,
834,
536,
549,
17444,
427,
979,
3,
2,
305,
3430,
853,
3274,
96,
2560,
75,
75,
121,
3430,
372,
3274,
96,
29,
32,
17330,
121,
3430,
215,
2490,
23652,
1,
-100,
-100... |
How many areas have a population of 703379? | CREATE TABLE table_2135222_2 (
area VARCHAR,
population VARCHAR
) | SELECT COUNT(area) FROM table_2135222_2 WHERE population = 703379 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2658,
2469,
26144,
834,
357,
41,
616,
584,
4280,
28027,
6,
2074,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
844,
43,
3,
9,
2074,
13,
2861,
4201,
4440... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
498,
61,
21680,
953,
834,
2658,
2469,
26144,
834,
357,
549,
17444,
427,
2074,
3274,
2861,
4201,
4440,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the attendance number for December 2, 1979? | CREATE TABLE table_70615 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) | SELECT SUM("Attendance") FROM table_70615 WHERE "Date" = 'december 2, 1979' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2518,
948,
1808,
41,
96,
518,
10266,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
20119,
121,
1499,
6,
96,
188,
17,
324,
26,
663,
121,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
121,
188,
17,
324,
26,
663,
8512,
21680,
953,
834,
2518,
948,
1808,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
221,
75,
18247,
3547,
15393,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
what is the played when the wins is 21 and the positions is higher than 3? | CREATE TABLE table_name_55 (
played INTEGER,
wins VARCHAR,
position VARCHAR
) | SELECT SUM(played) FROM table_name_55 WHERE wins = 21 AND position > 3 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3769,
41,
1944,
3,
21342,
17966,
6,
9204,
584,
4280,
28027,
6,
1102,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
125,
19,
8,
1944,
116,
8,
9204,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
180,
6122,
599,
4895,
15,
26,
61,
21680,
953,
834,
4350,
834,
3769,
549,
17444,
427,
9204,
3274,
1401,
3430,
1102,
2490,
220,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What's the highest season number of an episode in the series? | CREATE TABLE table_10718192_2 (
no_in_season INTEGER
) | SELECT MAX(no_in_season) FROM table_10718192_2 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
18057,
2606,
19978,
834,
357,
41,
150,
834,
77,
834,
9476,
3,
21342,
17966,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
31,
7,
8,
2030,
774,
381,
13,
46,
5640,
16,
8,
939,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
29,
32,
834,
77,
834,
9476,
61,
21680,
953,
834,
18057,
2606,
19978,
834,
357,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the result in Pennsylvania 13? | CREATE TABLE table_1342256_38 (result VARCHAR, district VARCHAR) | SELECT result FROM table_1342256_38 WHERE district = "Pennsylvania 13" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
19337,
834,
3747,
41,
60,
7,
83,
17,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
741,
16,
8913,
1179,
58,
1,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
741,
21680,
953,
834,
2368,
4165,
19337,
834,
3747,
549,
17444,
427,
3939,
3274,
96,
345,
35,
29,
7,
63,
40,
16658,
9,
1179,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
find the maximum age of patients admitted in or before the year 2195 and stayed in the hospital for 30 days. | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT MAX(demographic.age) FROM demographic WHERE demographic.days_stay = "30" AND demographic.admityear >= "2195" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
1778,
16587,
5,
545,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
1135,
7,
834,
21545,
3274,
96,
1458,
121,
3430,
14798,
5,
20466,
17,
1201,
2490,
2423,
96,
2658,
3301,
121,
1,
-100,
-100,
-100,
-100,
... |
Which Pos has a Car # of 33? | CREATE TABLE table_name_72 (
pos INTEGER,
car__number VARCHAR
) | SELECT SUM(pos) FROM table_name_72 WHERE car__number = 33 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5865,
41,
3,
2748,
3,
21342,
17966,
6,
443,
834,
834,
5525,
1152,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
13995,
65,
3,
9,
1184,
1713,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
180,
6122,
599,
2748,
61,
21680,
953,
834,
4350,
834,
5865,
549,
17444,
427,
443,
834,
834,
5525,
1152,
3274,
5400,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What number pick is Ray Hall? | CREATE TABLE table_name_91 (
pick VARCHAR,
player VARCHAR
) | SELECT pick FROM table_name_91 WHERE player = "ray hall" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4729,
41,
1432,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
381,
1432,
19,
8279,
2501,
58,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1432,
21680,
953,
834,
4350,
834,
4729,
549,
17444,
427,
1959,
3274,
96,
2866,
6358,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Home result of 1 0, and a Away result of 0 1 involves what club? | CREATE TABLE table_name_56 (
club VARCHAR,
home_result VARCHAR,
away_result VARCHAR
) | SELECT club FROM table_name_56 WHERE home_result = "1–0" AND away_result = "0–1" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4834,
41,
1886,
584,
4280,
28027,
6,
234,
834,
60,
7,
83,
17,
584,
4280,
28027,
6,
550,
834,
60,
7,
83,
17,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
1886,
21680,
953,
834,
4350,
834,
4834,
549,
17444,
427,
234,
834,
60,
7,
83,
17,
3274,
96,
536,
104,
632,
121,
3430,
550,
834,
60,
7,
83,
17,
3274,
96,
632,
104,
536,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,... |
Which Format has a Region of united states, and a Catalog of kem 072? | CREATE TABLE table_name_61 (format VARCHAR, region VARCHAR, catalog VARCHAR) | SELECT format FROM table_name_61 WHERE region = "united states" AND catalog = "kem 072" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4241,
41,
8995,
584,
4280,
28027,
6,
1719,
584,
4280,
28027,
6,
10173,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
12439,
65,
3,
9,
6163,
13,
18279,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1910,
21680,
953,
834,
4350,
834,
4241,
549,
17444,
427,
1719,
3274,
96,
15129,
15,
26,
2315,
121,
3430,
10173,
3274,
96,
1050,
51,
10668,
357,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the lowest number of losses for Nottingham City with fewer than 0 wins? | CREATE TABLE table_name_28 (
losses INTEGER,
team VARCHAR,
wins VARCHAR
) | SELECT MIN(losses) FROM table_name_28 WHERE team = "nottingham city" AND wins < 0 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2577,
41,
8467,
3,
21342,
17966,
6,
372,
584,
4280,
28027,
6,
9204,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
7402,
381,
13,
8467,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
2298,
2260,
61,
21680,
953,
834,
4350,
834,
2577,
549,
17444,
427,
372,
3274,
96,
2264,
17,
14799,
690,
121,
3430,
9204,
3,
2,
3,
632,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
For all employees who have the letters D or S in their first name, return a bar chart about the distribution of hire_date and the average of manager_id bin hire_date by weekday, and could you order the average of manager id in ascending order? | CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
) | SELECT HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY AVG(MANAGER_ID) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2476,
41,
446,
10539,
834,
4309,
3,
4331,
4059,
599,
16968,
6,
446,
10539,
834,
382,
3177,
3765,
3,
4331,
4059,
599,
2469,
201,
3,
17684,
834,
134,
4090,
24721,
7908,
1982,
599,
11071,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
454,
14132,
834,
308,
6048,
6,
71,
17217,
599,
9312,
188,
17966,
834,
4309,
61,
21680,
1652,
549,
17444,
427,
30085,
834,
567,
17683,
8729,
9914,
3,
31,
1454,
308,
1454,
31,
4674,
30085,
834,
567,
17683,
8729,
9914,
... |
How many patients diagnosed with arthropathy unspecified and site unspecified had an urobilinogen lab test? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Arthropathy NOS-unspec" AND lab.label = "Urobilinogen" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
3... |
what is the number of patients with diagnoses icd9 code 41031 who had ascitic lab fluid test? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "41031" AND lab.fluid = "Ascites" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
3... |
What are the memories and carriers of phones, could you sort total number in desc order please? | CREATE TABLE phone_market (
Market_ID int,
Phone_ID text,
Num_of_stock int
)
CREATE TABLE phone (
Name text,
Phone_ID int,
Memory_in_G int,
Carrier text,
Price real
)
CREATE TABLE market (
Market_ID int,
District text,
Num_of_employees int,
Num_of_shops real,
Ranking int
) | SELECT Carrier, SUM(Memory_in_G) FROM phone GROUP BY Carrier ORDER BY SUM(Memory_in_G) DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
951,
834,
8809,
41,
3611,
834,
4309,
16,
17,
6,
8924,
834,
4309,
1499,
6,
1174,
51,
834,
858,
834,
7149,
16,
17,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
951,
41... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
1184,
6711,
6,
180,
6122,
599,
329,
15,
2528,
63,
834,
77,
834,
517,
61,
21680,
951,
350,
4630,
6880,
272,
476,
1184,
6711,
4674,
11300,
272,
476,
180,
6122,
599,
329,
15,
2528,
63,
834,
77,
834,
517,
61,
309,
2... |
what is the name a[ ] when the borough or a[ ] census area is ketchikan gateway and the dam or a[ ] reservoir is reservoir? | CREATE TABLE table_14300 (
"Name A[\u203a ]" text,
"Dam or A[\u203a ] Reservoir" text,
"GNIS Feature ID # Link A[\u203a ] B[\u203a ]" real,
"Elevation A[\u203a ]" text,
"Borough or A[\u203a ] Census area" text
) | SELECT "Name A[\u203a ]" FROM table_14300 WHERE "Borough or A[\u203a ] Census area" = 'ketchikan gateway' AND "Dam or A[\u203a ] Reservoir" = 'reservoir' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2534,
5426,
41,
96,
23954,
71,
6306,
2,
76,
23330,
9,
3,
908,
121,
1499,
6,
96,
308,
265,
42,
71,
6306,
2,
76,
23330,
9,
3,
908,
7127,
49,
8239,
121,
1499,
6,
96,
137... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
23954,
71,
6306,
2,
76,
23330,
9,
3,
908,
121,
21680,
953,
834,
2534,
5426,
549,
17444,
427,
96,
279,
32,
13245,
42,
71,
6306,
2,
76,
23330,
9,
3,
908,
23086,
616,
121,
3274,
3,
31,
8044,
1436,
3304,
17090,
... |
How many values for attendance correspond to the 1986 Peach Bowl? | CREATE TABLE table_15647838_3 (attendance VARCHAR, bowl_game VARCHAR) | SELECT COUNT(attendance) FROM table_15647838_3 WHERE bowl_game = "1986 Peach Bowl" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1808,
4389,
3940,
3747,
834,
519,
41,
15116,
663,
584,
4280,
28027,
6,
3047,
834,
7261,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
2620,
21,
11364,
10423,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
15116,
663,
61,
21680,
953,
834,
1808,
4389,
3940,
3747,
834,
519,
549,
17444,
427,
3047,
834,
7261,
3274,
96,
2294,
3840,
1276,
1836,
9713,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What title runs for 3:22? | CREATE TABLE table_name_5 (
title VARCHAR,
time VARCHAR
) | SELECT title FROM table_name_5 WHERE time = "3:22" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
755,
41,
2233,
584,
4280,
28027,
6,
97,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
2233,
3154,
21,
220,
10,
2884,
58,
1,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2233,
21680,
953,
834,
4350,
834,
755,
549,
17444,
427,
97,
3274,
96,
519,
10,
2884,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
what is the report called where the circuit took place at the nazareth speedway? | CREATE TABLE table_16257 (
"Rnd" text,
"Race Name" text,
"Circuit" text,
"City/Location" text,
"Date" text,
"Pole position" text,
"Winning driver" text,
"Winning team" text,
"Report" text
) | SELECT "Report" FROM table_16257 WHERE "Circuit" = 'Nazareth Speedway' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2938,
357,
3436,
41,
96,
448,
727,
121,
1499,
6,
96,
448,
3302,
5570,
121,
1499,
6,
96,
254,
23,
52,
21560,
121,
1499,
6,
96,
254,
485,
87,
434,
32,
75,
257,
121,
1499,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
1649,
1493,
121,
21680,
953,
834,
2938,
357,
3436,
549,
17444,
427,
96,
254,
23,
52,
21560,
121,
3274,
3,
31,
567,
5246,
60,
189,
9913,
1343,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which location has the promotor Frank Moloney, and the opponent Gennadiy Rasalev? | CREATE TABLE table_name_21 (location VARCHAR, promotor VARCHAR, opponent VARCHAR) | SELECT location FROM table_name_21 WHERE promotor = "frank moloney" AND opponent = "gennadiy rasalev" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2658,
41,
14836,
584,
4280,
28027,
6,
813,
18271,
584,
4280,
28027,
6,
15264,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
1128,
65,
8,
813,
18271,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
3,
23143,
14196,
1128,
21680,
953,
834,
4350,
834,
2658,
549,
17444,
427,
813,
18271,
3274,
96,
89,
6254,
3,
4641,
782,
63,
121,
3430,
15264,
3274,
96,
729,
29,
9,
26,
23,
63,
28246,
10912,
121,
1,
-100,
-100,
-100,
-100,
-100,
-1... |
How many times was performer 3 Kate Robbins? | CREATE TABLE table_14934885_1 (date VARCHAR, performer_3 VARCHAR) | SELECT COUNT(date) FROM table_14934885_1 WHERE performer_3 = "Kate Robbins" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2534,
4271,
3707,
4433,
834,
536,
41,
5522,
584,
4280,
28027,
6,
1912,
49,
834,
519,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
648,
47,
1912,
49,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
5522,
61,
21680,
953,
834,
2534,
4271,
3707,
4433,
834,
536,
549,
17444,
427,
1912,
49,
834,
519,
3274,
96,
439,
342,
5376,
4517,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
give me the number of patients whose discharge location is home health care and diagnoses long title is psoas muscle abscess? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.discharge_location = "HOME HEALTH CARE" AND diagnoses.long_title = "Psoas muscle abscess" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
5... |
How many calibers require the type LB/RN? | CREATE TABLE table_21538523_1 (
caliber VARCHAR,
type VARCHAR
) | SELECT COUNT(caliber) FROM table_21538523_1 WHERE type = "LB/RN" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2658,
4867,
4433,
2773,
834,
536,
41,
212,
10661,
584,
4280,
28027,
6,
686,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
212,
10661,
7,
1457,
8,
686,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
658,
10661,
61,
21680,
953,
834,
2658,
4867,
4433,
2773,
834,
536,
549,
17444,
427,
686,
3274,
96,
16976,
87,
14151,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Result of missed*, and a Game time of 2nd quarter (0:00), and a Kicker of mason crosby involves what date? | CREATE TABLE table_35081 (
"Date" text,
"Kicker" text,
"Kicking team" text,
"Opponent" text,
"Yards" real,
"Result" text,
"Game time" text
) | SELECT "Date" FROM table_35081 WHERE "Result" = 'missed*' AND "Game time" = '2nd quarter (0:00)' AND "Kicker" = 'mason crosby' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
16975,
4959,
41,
96,
308,
342,
121,
1499,
6,
96,
439,
23,
3383,
121,
1499,
6,
96,
439,
3142,
53,
372,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
476,
986,
7,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
308,
342,
121,
21680,
953,
834,
16975,
4959,
549,
17444,
427,
96,
20119,
121,
3274,
3,
31,
11502,
15,
26,
1935,
31,
3430,
96,
23055,
97,
121,
3274,
3,
31,
357,
727,
2893,
41,
25713,
61,
31,
3430,
96,
439,
23... |
What is College/Junior/Club Team (League), when Position is 'Defence', when Nationality is 'Canada', when Round is less than 5, and when Player is 'Josiah Didier'? | CREATE TABLE table_name_18 (
college_junior_club_team__league_ VARCHAR,
player VARCHAR,
round VARCHAR,
position VARCHAR,
nationality VARCHAR
) | SELECT college_junior_club_team__league_ FROM table_name_18 WHERE position = "defence" AND nationality = "canada" AND round < 5 AND player = "josiah didier" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2606,
41,
1900,
834,
6959,
23,
127,
834,
13442,
834,
11650,
834,
834,
29512,
834,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
6,
1751,
584,
4280,
28027,
6,
1102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
1900,
834,
6959,
23,
127,
834,
13442,
834,
11650,
834,
834,
29512,
834,
21680,
953,
834,
4350,
834,
2606,
549,
17444,
427,
1102,
3274,
96,
221,
89,
1433,
121,
3430,
1157,
485,
3274,
96,
658,
18089,
121,
3430,
1751,
... |
Which opponent played on July 15? | CREATE TABLE table_name_3 (opponent VARCHAR, date VARCHAR) | SELECT opponent FROM table_name_3 WHERE date = "july 15" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
519,
41,
32,
102,
9977,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
15264,
1944,
30,
1718,
627,
58,
1,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
15264,
21680,
953,
834,
4350,
834,
519,
549,
17444,
427,
833,
3274,
96,
2047,
120,
627,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Which Attendance has a Date of november 19, 1961? | CREATE TABLE table_77173 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) | SELECT MIN("Attendance") FROM table_77173 WHERE "Date" = 'november 19, 1961' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4013,
2517,
519,
41,
96,
518,
10266,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
20119,
121,
1499,
6,
96,
188,
17,
324,
26,
663,
121,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
121,
188,
17,
324,
26,
663,
8512,
21680,
953,
834,
4013,
2517,
519,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
5326,
18247,
12370,
21018,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
provide the number of patients whose diagnosis short title is acute kidney failure nos and drug route is nu. | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Acute kidney failure NOS" AND prescriptions.route = "NU" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
3... |
what is the number of patients with unspecified osteomyelitis, other specified sites who were hospitalized for more than 4 days? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "4" AND diagnoses.long_title = "Unspecified osteomyelitis, other specified sites" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
14798,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
564,
1499,
6,
2774,
1947,
834,
8547,
302,
1499,
6,
1246,
1499,
6,
103,
115,
1499,
6,
7285,
1499,
6,
1612,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
5... |
Which country is the director Roland Verhavert from? | CREATE TABLE table_80035 (
"Country" text,
"Film title used in nomination" text,
"Language" text,
"Original name" text,
"Director" text
) | SELECT "Country" FROM table_80035 WHERE "Director" = 'roland verhavert' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
6192,
2469,
41,
96,
10628,
651,
121,
1499,
6,
96,
371,
173,
51,
2233,
261,
16,
13588,
121,
1499,
6,
96,
434,
1468,
76,
545,
121,
1499,
6,
96,
667,
3380,
10270,
564,
121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
10628,
651,
121,
21680,
953,
834,
6192,
2469,
549,
17444,
427,
96,
23620,
127,
121,
3274,
3,
31,
3491,
232,
548,
1024,
3027,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Which Round is pick 112 in? | CREATE TABLE table_name_2 (round VARCHAR, pick VARCHAR) | SELECT round FROM table_name_2 WHERE pick = 112 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
357,
41,
7775,
584,
4280,
28027,
6,
1432,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
9609,
19,
1432,
850,
357,
16,
58,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1751,
21680,
953,
834,
4350,
834,
357,
549,
17444,
427,
1432,
3274,
850,
357,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What are the number of the name of rooms booked by customers whose first name has 'ROY' in part?, list y axis in ascending order. | CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adults INTEGER,
Kids INTEGER
)
CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
basePrice INTEGER,
decor TEXT
) | SELECT roomName, COUNT(roomName) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE FirstName LIKE '%ROY%' GROUP BY roomName ORDER BY COUNT(roomName) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
27659,
7,
41,
3636,
3,
21342,
17966,
6,
4181,
3,
3463,
4,
382,
6,
1972,
1570,
3,
3463,
4,
382,
6,
1972,
15767,
3,
3463,
4,
382,
6,
13002,
17833,
6,
2506,
23954,
3,
3463,
4,
382,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
562,
23954,
6,
2847,
17161,
599,
3082,
23954,
61,
21680,
27659,
7,
6157,
332,
536,
3,
15355,
3162,
4181,
7,
6157,
332,
357,
9191,
332,
5411,
22778,
51,
3274,
332,
4416,
22778,
51,
196,
26,
549,
17444,
427,
1485,
239... |
what is drug route of subject id 6983? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT prescriptions.route FROM prescriptions WHERE prescriptions.subject_id = "6983" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
7744,
7,
5,
20300,
21680,
7744,
7,
549,
17444,
427,
7744,
7,
5,
7304,
11827,
834,
23,
26,
3274,
96,
3951,
4591,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Tell me the total number of positions with goal difference more than -17 and played less than 38 | CREATE TABLE table_name_12 (
position VARCHAR,
goal_difference VARCHAR,
played VARCHAR
) | SELECT COUNT(position) FROM table_name_12 WHERE goal_difference > -17 AND played < 38 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2122,
41,
1102,
584,
4280,
28027,
6,
1288,
834,
26,
99,
11788,
584,
4280,
28027,
6,
1944,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
8779,
140,
8,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
4718,
61,
21680,
953,
834,
4350,
834,
2122,
549,
17444,
427,
1288,
834,
26,
99,
11788,
2490,
3,
10794,
3430,
1944,
3,
2,
6654,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Who were the partners in 2012? | CREATE TABLE table_2259502_2 (
partner VARCHAR,
year VARCHAR
) | SELECT partner FROM table_2259502_2 WHERE year = 2012 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
20489,
25188,
357,
834,
357,
41,
2397,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
130,
8,
3222,
16,
1673,
58,
1,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2397,
21680,
953,
834,
20489,
25188,
357,
834,
357,
549,
17444,
427,
215,
3274,
1673,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Who had all of the blocks in 2012? | CREATE TABLE table_13050003_2 (blocks VARCHAR, year VARCHAR) | SELECT blocks FROM table_13050003_2 WHERE year = 2012 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
21448,
12814,
519,
834,
357,
41,
10734,
7,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
141,
66,
13,
8,
6438,
16,
1673,
58,
1,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
6438,
21680,
953,
834,
21448,
12814,
519,
834,
357,
549,
17444,
427,
215,
3274,
1673,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Show the budget type code and description and the corresponding document id. | CREATE TABLE Ref_budget_codes (budget_type_code VARCHAR, budget_type_description VARCHAR); CREATE TABLE Documents_with_expenses (document_id VARCHAR, budget_type_code VARCHAR) | SELECT T2.budget_type_code, T2.budget_type_description, T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_budget_codes AS T2 ON T1.budget_type_code = T2.budget_type_code | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
419,
89,
834,
11073,
2782,
834,
4978,
7,
41,
11073,
2782,
834,
6137,
834,
4978,
584,
4280,
28027,
6,
1487,
834,
6137,
834,
221,
11830,
584,
4280,
28027,
61,
3,
32102,
32103,
32102,
205... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
332,
4416,
11073,
2782,
834,
6137,
834,
4978,
6,
332,
4416,
11073,
2782,
834,
6137,
834,
221,
11830,
6,
332,
5411,
28244,
834,
23,
26,
21680,
11167,
7,
834,
4065,
834,
994,
3801,
15,
7,
6157,
332,
536,
3,
15355,
3... |
What is the average loss with a goal higher than 51 and wins higher than 14? | CREATE TABLE table_80130 (
"Position" real,
"Club" text,
"Played" real,
"Points" text,
"Wins" real,
"Draws" real,
"Losses" real,
"Goals for" real,
"Goals against" real,
"Goal Difference" real
) | SELECT AVG("Losses") FROM table_80130 WHERE "Goals against" > '51' AND "Wins" > '14' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2079,
21448,
41,
96,
345,
32,
7,
4749,
121,
490,
6,
96,
254,
11158,
121,
1499,
6,
96,
15800,
15,
26,
121,
490,
6,
96,
22512,
7,
121,
1499,
6,
96,
18455,
7,
121,
490,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
121,
434,
13526,
7,
8512,
21680,
953,
834,
2079,
21448,
549,
17444,
427,
96,
6221,
5405,
581,
121,
2490,
3,
31,
5553,
31,
3430,
96,
18455,
7,
121,
2490,
3,
31,
2534,
31,
1,
-100,
-100,
-100,
-100,
... |
What is the score when the attendance is greater than 134 and Workington is the home team? | CREATE TABLE table_12565 (
"Tie no" real,
"Home team" text,
"Score" text,
"Away team" text,
"Attendance" real
) | SELECT "Score" FROM table_12565 WHERE "Attendance" > '134' AND "Home team" = 'workington' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
10124,
4122,
41,
96,
382,
23,
15,
150,
121,
490,
6,
96,
19040,
372,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
188,
1343,
372,
121,
1499,
6,
96,
188,
17,
324,
26,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
134,
9022,
121,
21680,
953,
834,
10124,
4122,
549,
17444,
427,
96,
188,
17,
324,
26,
663,
121,
2490,
3,
31,
23747,
31,
3430,
96,
19040,
372,
121,
3274,
3,
31,
1981,
6029,
31,
1,
-100,
-100,
-100,
-100,
-100,
... |
What game in the season does this list start? | CREATE TABLE table_27713030_7 (game INTEGER) | SELECT MIN(game) FROM table_27713030_7 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2555,
4450,
1458,
1458,
834,
940,
41,
7261,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
363,
467,
16,
8,
774,
405,
48,
570,
456,
58,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
7261,
61,
21680,
953,
834,
2555,
4450,
1458,
1458,
834,
940,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What were the dates of the games where Jalen Rose (32) had the highest points? | CREATE TABLE table_15872814_5 (
date VARCHAR,
high_points VARCHAR
) | SELECT date FROM table_15872814_5 WHERE high_points = "Jalen Rose (32)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1808,
4225,
2577,
2534,
834,
755,
41,
833,
584,
4280,
28027,
6,
306,
834,
2700,
7,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
130,
8,
5128,
13,
8,
1031,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
833,
21680,
953,
834,
1808,
4225,
2577,
2534,
834,
755,
549,
17444,
427,
306,
834,
2700,
7,
3274,
96,
683,
138,
35,
5088,
6918,
7318,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Find the ids of the problems that are reported by the staff whose last name is Bosco. | CREATE TABLE problems (
problem_id number,
product_id number,
closure_authorised_by_staff_id number,
reported_by_staff_id number,
date_problem_reported time,
date_problem_closed time,
problem_description text,
other_problem_details text
)
CREATE TABLE staff (
staff_id number,
staff_first_name text,
staff_last_name text,
other_staff_details text
)
CREATE TABLE problem_category_codes (
problem_category_code text,
problem_category_description text
)
CREATE TABLE product (
product_id number,
product_name text,
product_details text
)
CREATE TABLE problem_log (
problem_log_id number,
assigned_to_staff_id number,
problem_id number,
problem_category_code text,
problem_status_code text,
log_entry_date time,
log_entry_description text,
log_entry_fix text,
other_log_details text
)
CREATE TABLE problem_status_codes (
problem_status_code text,
problem_status_description text
) | SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_last_name = "Bosco" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
982,
41,
682,
834,
23,
26,
381,
6,
556,
834,
23,
26,
381,
6,
12493,
834,
23429,
834,
969,
834,
26416,
834,
23,
26,
381,
6,
2196,
834,
969,
834,
26416,
834,
23,
26,
381,
6,
833,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
332,
5411,
19307,
834,
23,
26,
21680,
982,
6157,
332,
536,
3,
15355,
3162,
871,
6157,
332,
357,
9191,
332,
5411,
60,
16262,
834,
969,
834,
26416,
834,
23,
26,
3274,
332,
4416,
26416,
834,
23,
26,
549,
17444,
427,
... |
List the studios which average gross is above 4500000. | CREATE TABLE market (
market_id number,
country text,
number_cities number
)
CREATE TABLE film_market_estimation (
estimation_id number,
low_estimate number,
high_estimate number,
film_id number,
type text,
market_id number,
year number
)
CREATE TABLE film (
film_id number,
title text,
studio text,
director text,
gross_in_dollar number
) | SELECT studio FROM film GROUP BY studio HAVING AVG(gross_in_dollar) >= 4500000 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
512,
41,
512,
834,
23,
26,
381,
6,
684,
1499,
6,
381,
834,
75,
2197,
381,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
814,
834,
8809,
834,
3340,
51,
257,
41,
22781,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3100,
21680,
814,
350,
4630,
6880,
272,
476,
3100,
454,
6968,
2365,
71,
17217,
599,
3844,
7,
7,
834,
77,
834,
26748,
61,
2490,
2423,
3,
10593,
19568,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
When was the original air date written by michael s. chernuchin & joe morgenstern? | CREATE TABLE table_28377 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real
) | SELECT "Original air date" FROM table_28377 WHERE "Written by" = 'Michael S. Chernuchin & Joe Morgenstern' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2577,
519,
4013,
41,
96,
4168,
5,
16,
939,
121,
490,
6,
96,
4168,
5,
16,
774,
121,
490,
6,
96,
382,
155,
109,
121,
1499,
6,
96,
23620,
15,
26,
57,
121,
1499,
6,
96,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
667,
3380,
10270,
799,
833,
121,
21680,
953,
834,
2577,
519,
4013,
549,
17444,
427,
96,
24965,
324,
57,
121,
3274,
3,
31,
329,
362,
9,
15,
40,
180,
5,
16028,
29,
2295,
77,
3,
184,
4967,
20147,
13072,
31,
1,
... |
When the Away team was hawthorn, what's the Home team? | CREATE TABLE table_name_84 (
home_team VARCHAR,
away_team VARCHAR
) | SELECT home_team FROM table_name_84 WHERE away_team = "hawthorn" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4608,
41,
234,
834,
11650,
584,
4280,
28027,
6,
550,
834,
11650,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
366,
8,
71,
1343,
372,
47,
4244,
210,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
234,
834,
11650,
21680,
953,
834,
4350,
834,
4608,
549,
17444,
427,
550,
834,
11650,
3274,
96,
1024,
210,
17,
6293,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What School did Terrence Jones play for? | CREATE TABLE table_51717 (
"Player" text,
"Height" text,
"School" text,
"Hometown" text,
"College" text,
"NBA Draft" text
) | SELECT "School" FROM table_51717 WHERE "Player" = 'terrence jones' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
755,
2517,
2517,
41,
96,
15800,
49,
121,
1499,
6,
96,
3845,
2632,
121,
1499,
6,
96,
29364,
121,
1499,
6,
96,
19040,
3540,
121,
1499,
6,
96,
9939,
7883,
121,
1499,
6,
96,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
29364,
121,
21680,
953,
834,
755,
2517,
2517,
549,
17444,
427,
96,
15800,
49,
121,
3274,
3,
31,
449,
52,
1433,
3,
1927,
1496,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
did it take scott rudin more or less than 30 years to complete egot ? | CREATE TABLE table_204_673 (
id number,
"name" text,
"egot completed" text,
"emmy" number,
"grammy" number,
"oscar" number,
"tony" number
) | SELECT (SELECT "egot completed" FROM table_204_673 WHERE "name" = 'scott rudin') > 30 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
3708,
519,
41,
3,
23,
26,
381,
6,
96,
4350,
121,
1499,
6,
96,
6066,
17,
2012,
121,
1499,
6,
96,
15,
635,
63,
121,
381,
6,
96,
16582,
63,
121,
381,
6,
96,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
41,
23143,
14196,
96,
6066,
17,
2012,
121,
21680,
953,
834,
26363,
834,
3708,
519,
549,
17444,
427,
96,
4350,
121,
3274,
3,
31,
7,
10405,
3,
17237,
77,
31,
61,
2490,
604,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
How many series numbers are there when there were 15.8 u.s. viewers (millions)? | CREATE TABLE table_27833469_1 (series__number VARCHAR, us_viewers__millions_ VARCHAR) | SELECT COUNT(series__number) FROM table_27833469_1 WHERE us_viewers__millions_ = "15.8" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2555,
4591,
3710,
3951,
834,
536,
41,
10833,
7,
834,
834,
5525,
1152,
584,
4280,
28027,
6,
178,
834,
4576,
277,
834,
834,
17030,
7,
834,
584,
4280,
28027,
61,
3,
32102,
321... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
10833,
7,
834,
834,
5525,
1152,
61,
21680,
953,
834,
2555,
4591,
3710,
3951,
834,
536,
549,
17444,
427,
178,
834,
4576,
277,
834,
834,
17030,
7,
834,
3274,
96,
1808,
5,
927,
121,
1,
-100,
-100,
-... |
What is the maximum number of wins? | CREATE TABLE table_28447 (
"Season" real,
"Series" text,
"Team" text,
"Races" real,
"Wins" real,
"Poles" real,
"F/Laps" real,
"Podiums" real,
"Points" text,
"Position" text
) | SELECT MAX("Wins") FROM table_28447 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
4608,
4177,
41,
96,
134,
15,
9,
739,
121,
490,
6,
96,
12106,
7,
121,
1499,
6,
96,
18699,
121,
1499,
6,
96,
448,
9,
2319,
121,
490,
6,
96,
18455,
7,
121,
490,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
121,
18455,
7,
8512,
21680,
953,
834,
357,
4608,
4177,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the number of laps of the grid larger than 22 with a +1:29.001 time? | CREATE TABLE table_name_44 (laps VARCHAR, grid VARCHAR, time VARCHAR) | SELECT laps FROM table_name_44 WHERE grid > 22 AND time = "+1:29.001" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3628,
41,
8478,
7,
584,
4280,
28027,
6,
8634,
584,
4280,
28027,
6,
97,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
381,
13,
14941,
7,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
3,
23143,
14196,
14941,
7,
21680,
953,
834,
4350,
834,
3628,
549,
17444,
427,
8634,
2490,
1630,
3430,
97,
3274,
96,
18446,
10,
3166,
5,
17465,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
If a team has a grid of over 8 with less than 4 points, what's the team name? | CREATE TABLE table_name_31 (
team VARCHAR,
grid VARCHAR,
points VARCHAR
) | SELECT team FROM table_name_31 WHERE grid > 8 AND points < 4 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3341,
41,
372,
584,
4280,
28027,
6,
8634,
584,
4280,
28027,
6,
979,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
156,
3,
9,
372,
65,
3,
9,
8634,
13,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
3,
23143,
14196,
372,
21680,
953,
834,
4350,
834,
3341,
549,
17444,
427,
8634,
2490,
505,
3430,
979,
3,
2,
314,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Who is the forward from Grambling State? | CREATE TABLE table_name_24 (player VARCHAR, position VARCHAR, school_club_team VARCHAR) | SELECT player FROM table_name_24 WHERE position = "forward" AND school_club_team = "grambling state" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2266,
41,
20846,
584,
4280,
28027,
6,
1102,
584,
4280,
28027,
6,
496,
834,
13442,
834,
11650,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
19,
8,
103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1959,
21680,
953,
834,
4350,
834,
2266,
549,
17444,
427,
1102,
3274,
96,
26338,
121,
3430,
496,
834,
13442,
834,
11650,
3274,
96,
5096,
7428,
538,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
I want the site for september 29, 2013 | CREATE TABLE table_name_51 (
site VARCHAR,
date VARCHAR
) | SELECT site FROM table_name_51 WHERE date = "september 29, 2013" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5553,
41,
353,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
27,
241,
8,
353,
21,
16022,
18247,
14405,
2038,
1,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
353,
21680,
953,
834,
4350,
834,
5553,
549,
17444,
427,
833,
3274,
96,
7,
6707,
18247,
14405,
2038,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What year was Barclay Henley first elected? | CREATE TABLE table_name_77 (
first_elected VARCHAR,
incumbent VARCHAR
) | SELECT COUNT(first_elected) FROM table_name_77 WHERE incumbent = "barclay henley" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4013,
41,
166,
834,
19971,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
215,
47,
1386,
4651,
63,
216,
29,
1306,
166,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
14672,
834,
19971,
61,
21680,
953,
834,
4350,
834,
4013,
549,
17444,
427,
28406,
3274,
96,
1047,
4651,
63,
3,
3225,
1306,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Who is the academic & University affairs when the Human resources & operations is N. Charles Hamilton? | CREATE TABLE table_12113818_1 (
academic_ VARCHAR,
_university_affairs VARCHAR,
human_resources_ VARCHAR,
_operations VARCHAR
) | SELECT academic_ & _university_affairs FROM table_12113818_1 WHERE human_resources_ & _operations = "N. Charles Hamilton" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
22011,
22744,
2606,
834,
536,
41,
2705,
834,
584,
4280,
28027,
6,
3,
834,
7846,
485,
834,
4127,
2256,
7,
584,
4280,
28027,
6,
936,
834,
60,
7928,
7,
834,
584,
4280,
28027,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2705,
834,
3,
184,
3,
834,
7846,
485,
834,
4127,
2256,
7,
21680,
953,
834,
22011,
22744,
2606,
834,
536,
549,
17444,
427,
936,
834,
60,
7928,
7,
834,
3,
184,
3,
834,
22280,
7,
3274,
96,
567,
5,
5417,
13450,
121,... |
For all employees who have the letters D or S in their first name, a bar chart shows the distribution of hire_date and the average of manager_id bin hire_date by weekday, rank in descending by the y axis. | CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
) | SELECT HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY AVG(MANAGER_ID) DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
10521,
41,
3396,
19846,
11810,
834,
4309,
7908,
1982,
599,
8525,
632,
201,
3396,
19846,
11810,
834,
567,
17683,
3,
4331,
4059,
599,
1458,
201,
283,
15610,
17966,
834,
4309,
7908,
1982,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
454,
14132,
834,
308,
6048,
6,
71,
17217,
599,
9312,
188,
17966,
834,
4309,
61,
21680,
1652,
549,
17444,
427,
30085,
834,
567,
17683,
8729,
9914,
3,
31,
1454,
308,
1454,
31,
4674,
30085,
834,
567,
17683,
8729,
9914,
... |
Which Surface has a Semifinalist of stefan edberg thomas muster? | CREATE TABLE table_name_98 (
surface VARCHAR,
semifinalists VARCHAR
) | SELECT surface FROM table_name_98 WHERE semifinalists = "stefan edberg thomas muster" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3916,
41,
1774,
584,
4280,
28027,
6,
4772,
28077,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
18884,
65,
3,
9,
22217,
12406,
343,
13,
3,
7,
240... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1774,
21680,
953,
834,
4350,
834,
3916,
549,
17444,
427,
4772,
28077,
3274,
96,
7,
24018,
3,
15,
26,
2235,
3,
189,
32,
2754,
398,
49,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many points were there when tries for were 84? | CREATE TABLE table_17369472_2 (
points VARCHAR,
tries_for VARCHAR
) | SELECT points FROM table_17369472_2 WHERE tries_for = "84" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2517,
3420,
4240,
5865,
834,
357,
41,
979,
584,
4280,
28027,
6,
3,
9000,
834,
1161,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
979,
130,
132,
116,
3,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
979,
21680,
953,
834,
2517,
3420,
4240,
5865,
834,
357,
549,
17444,
427,
3,
9000,
834,
1161,
3274,
96,
4608,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.