NATURAL_LANG stringlengths 0 446 | SCHEMA stringlengths 27 2.21k | SQL stringlengths 18 453 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|
what number of patients under the age of 27 underwent the lab test for creatine kinase (ck)? | 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 procedures (
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
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "27" AND lab.label = "Creatine Kinase (CK)" | [
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,
7690,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7690,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
What is the highest episode number written by Harry Winkler? | CREATE TABLE table_26053 (
"Episode #" real,
"Season #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original airdate" text,
"Production code #" real
) | SELECT MAX("Episode #") FROM table_26053 WHERE "Written by" = 'Harry Winkler' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
18365,
4867,
41,
96,
427,
102,
159,
32,
221,
1713,
121,
490,
6,
96,
134,
15,
9,
739,
1713,
121,
490,
6,
96,
382,
155,
109,
121,
1499,
6,
96,
23620,
15,
26,
57,
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,
1... | [
3,
23143,
14196,
4800,
4,
599,
121,
427,
102,
159,
32,
221,
1713,
8512,
21680,
953,
834,
18365,
4867,
549,
17444,
427,
96,
24965,
324,
57,
121,
3274,
3,
31,
15537,
651,
4871,
157,
1171,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
what is the number of patients whose gender is m and diagnoses long title is other chest pain? | 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
)
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 = "M" AND diagnoses.long_title = "Other chest pain" | [
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 was the name of the episode that aired originally on March 11, 1988? | CREATE TABLE table_20967430_4 (
title VARCHAR,
original_air_date VARCHAR
) | SELECT title FROM table_20967430_4 WHERE original_air_date = "March 11, 1988" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1755,
4314,
4581,
1458,
834,
591,
41,
2233,
584,
4280,
28027,
6,
926,
834,
2256,
834,
5522,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
564,
13,
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,
2233,
21680,
953,
834,
1755,
4314,
4581,
1458,
834,
591,
549,
17444,
427,
926,
834,
2256,
834,
5522,
3274,
96,
25019,
9694,
10414,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
provide the number of patients whose procedure short title is percu endosc jejunostomy? | 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
)
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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.short_title = "Percu endosc jejunostomy" | [
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,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
What is saturday day seven when thursday day five is hamus? | CREATE TABLE table_1277350_7 (
saturday_day_seven VARCHAR,
thursday_day_five VARCHAR
) | SELECT saturday_day_seven FROM table_1277350_7 WHERE thursday_day_five = "ሐሙስ hamus" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2122,
4013,
16975,
834,
940,
41,
3,
7,
6010,
1135,
834,
1135,
834,
7,
6190,
584,
4280,
28027,
6,
3,
189,
3589,
1135,
834,
1135,
834,
16443,
584,
4280,
28027,
3,
61,
3,
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,
3,
7,
6010,
1135,
834,
1135,
834,
7,
6190,
21680,
953,
834,
2122,
4013,
16975,
834,
940,
549,
17444,
427,
3,
189,
3589,
1135,
834,
1135,
834,
16443,
3274,
96,
2,
3,
1483,
302,
121,
1,
-100,
-100,
-100,
-100,
-100,... |
What is the School/Club Team with a nationality of United States for Arron Afflalo? | CREATE TABLE table_name_91 (
school_club_team VARCHAR,
nationality VARCHAR,
player VARCHAR
) | SELECT school_club_team FROM table_name_91 WHERE nationality = "united states" AND player = "arron afflalo" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4729,
41,
496,
834,
13442,
834,
11650,
584,
4280,
28027,
6,
1157,
485,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
496,
834,
13442,
834,
11650,
21680,
953,
834,
4350,
834,
4729,
549,
17444,
427,
1157,
485,
3274,
96,
15129,
15,
26,
2315,
121,
3430,
1959,
3274,
96,
19996,
29,
3,
4127,
40,
138,
32,
121,
1,
-100,
-100,
-100,
-100,
... |
what is the number of patients whose marital status is divorced and procedure short title is contr abd arteriogrm nec? | 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "DIVORCED" AND procedures.short_title = "Contr abd arteriogrm NEC" | [
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,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
Who are the players that have attended Stanford? | CREATE TABLE table_16494599_10 (player VARCHAR, school_club_team VARCHAR) | SELECT player FROM table_16494599_10 WHERE school_club_team = "Stanford" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2938,
3647,
2128,
3264,
834,
1714,
41,
20846,
584,
4280,
28027,
6,
496,
834,
13442,
834,
11650,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
33,
8,
1508,
24,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1959,
21680,
953,
834,
2938,
3647,
2128,
3264,
834,
1714,
549,
17444,
427,
496,
834,
13442,
834,
11650,
3274,
96,
134,
17,
152,
2590,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What was the pick # for round 11? | CREATE TABLE table_name_68 (pick__number VARCHAR, round VARCHAR) | SELECT pick__number FROM table_name_68 WHERE round = 11 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3651,
41,
17967,
834,
834,
5525,
1152,
584,
4280,
28027,
6,
1751,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
1432,
1713,
21,
1751,
850,
58,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1432,
834,
834,
5525,
1152,
21680,
953,
834,
4350,
834,
3651,
549,
17444,
427,
1751,
3274,
850,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the story code of the story published on 2002-12? | CREATE TABLE table_name_38 (
story VARCHAR,
date VARCHAR
) | SELECT story AS code FROM table_name_38 WHERE date = "2002-12" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3747,
41,
733,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
733,
1081,
13,
8,
733,
1790,
30,
4407,
5947,
58,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
733,
6157,
1081,
21680,
953,
834,
4350,
834,
3747,
549,
17444,
427,
833,
3274,
96,
24898,
5947,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name the tournament for 2009 2r | CREATE TABLE table_name_32 (
tournament VARCHAR
) | SELECT tournament FROM table_name_32 WHERE 2009 = "2r" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2668,
41,
5892,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
5892,
21,
2464,
204,
52,
1,
0,
0,
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,
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,
0... | [
3,
23143,
14196,
5892,
21680,
953,
834,
4350,
834,
2668,
549,
17444,
427,
2464,
3274,
96,
357,
52,
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 points for when the played is 22 and tries against is 68? | CREATE TABLE table_12828723_4 (points_for VARCHAR, played VARCHAR, tries_against VARCHAR) | SELECT points_for FROM table_12828723_4 WHERE played = "22" AND tries_against = "68" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2122,
4613,
4225,
2773,
834,
591,
41,
2700,
7,
834,
1161,
584,
4280,
28027,
6,
1944,
584,
4280,
28027,
6,
3,
9000,
834,
9,
16720,
7,
17,
584,
4280,
28027,
61,
3,
32102,
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,
1... | [
3,
23143,
14196,
979,
834,
1161,
21680,
953,
834,
2122,
4613,
4225,
2773,
834,
591,
549,
17444,
427,
1944,
3274,
96,
2884,
121,
3430,
3,
9000,
834,
9,
16720,
7,
17,
3274,
96,
3651,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who are the friends of Alice that are doctors? | CREATE TABLE person (
name text,
age number,
city text,
gender text,
job text
)
CREATE TABLE personfriend (
name text,
friend text,
year number
) | SELECT T2.friend FROM person AS T1 JOIN personfriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Alice' AND T1.gender = 'male' AND T1.job = 'doctor' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
568,
41,
564,
1499,
6,
1246,
381,
6,
690,
1499,
6,
7285,
1499,
6,
613,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
568,
15504,
41,
564,
1499,
6,
1565,
1499,
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,
332,
4416,
15504,
21680,
568,
6157,
332,
536,
3,
15355,
3162,
568,
15504,
6157,
332,
357,
9191,
332,
5411,
4350,
3274,
332,
4416,
15504,
549,
17444,
427,
332,
4416,
4350,
3274,
3,
31,
188,
2176,
15,
31,
3430,
332,
5... |
what's the number of games with a Goals Against smaller than 14, and a Wins larger than 1, and a Draws smaller than 2, and a Goals For of 3? | CREATE TABLE table_67172 (
"Games" real,
"Wins" real,
"Draws" real,
"Losses" real,
"Goals For" real,
"Goals Against" real,
"Goal Differential" text
) | SELECT MAX("Games") FROM table_67172 WHERE "Goals Against" < '14' AND "Wins" > '1' AND "Draws" < '2' AND "Goals For" = '3' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3708,
27156,
41,
96,
23055,
7,
121,
490,
6,
96,
18455,
7,
121,
490,
6,
96,
308,
10936,
7,
121,
490,
6,
96,
434,
13526,
7,
121,
490,
6,
96,
6221,
5405,
242,
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,
4800,
4,
599,
121,
23055,
7,
8512,
21680,
953,
834,
3708,
27156,
549,
17444,
427,
96,
6221,
5405,
3,
20749,
121,
3,
2,
3,
31,
2534,
31,
3430,
96,
18455,
7,
121,
2490,
3,
31,
536,
31,
3430,
96,
308,
10936,
7,
1... |
Who was the player in 1981? | CREATE TABLE table_46439 (
"Year" text,
"Player" text,
"Team" text,
"League" text,
"Position" text
) | SELECT "Player" FROM table_46439 WHERE "Year" = '1981' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
4389,
3288,
41,
96,
476,
2741,
121,
1499,
6,
96,
15800,
49,
121,
1499,
6,
96,
18699,
121,
1499,
6,
96,
2796,
9,
5398,
121,
1499,
6,
96,
345,
32,
7,
4749,
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,
0,
0,
0,
0... | [
3,
23143,
14196,
96,
15800,
49,
121,
21680,
953,
834,
591,
4389,
3288,
549,
17444,
427,
96,
476,
2741,
121,
3274,
3,
31,
2294,
4959,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
how many hours has it been since the first time patient 004-86136 stayed on their current hospital visit in ward 236? | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
) | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.unitadmittime)) FROM patient WHERE patient.uniquepid = '004-86136' AND patient.wardid = 236 AND patient.hospitaldischargetime IS NULL ORDER BY patient.unitadmittime LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
23886,
41,
23886,
23,
26,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
2672,
4350,
1499,
6,
23886,
4350,
1499,
6,
23886,
715,
97,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
997,
1429,
41,
13733,
6245,
15382,
599,
31,
1454,
354,
31,
6,
3,
5211,
12224,
6431,
834,
382,
15382,
9960,
61,
3,
18,
3,
13733,
6245,
15382,
599,
31,
1454,
354,
31,
6,
1868,
5,
15129,
20466,
17,
715,
61,
61,
216... |
what tier was this team placed into next after their 2011-2012 season ? | CREATE TABLE table_204_636 (
id number,
"season" text,
"tier" number,
"division" text,
"pos." text,
"notes" text
) | SELECT "tier" FROM table_204_636 WHERE "season" > '2011-12' ORDER BY "season" LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
948,
3420,
41,
3,
23,
26,
381,
6,
96,
9476,
121,
1499,
6,
96,
3276,
121,
381,
6,
96,
26,
23,
6610,
121,
1499,
6,
96,
2748,
535,
1499,
6,
96,
7977,
7,
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,
3276,
121,
21680,
953,
834,
26363,
834,
948,
3420,
549,
17444,
427,
96,
9476,
121,
2490,
3,
31,
13907,
5947,
31,
4674,
11300,
272,
476,
96,
9476,
121,
8729,
12604,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Show the party and the number of drivers in each party. Visualize by pie chart. | CREATE TABLE school (
School_ID int,
Grade text,
School text,
Location text,
Type text
)
CREATE TABLE driver (
Driver_ID int,
Name text,
Party text,
Home_city text,
Age int
)
CREATE TABLE school_bus (
School_ID int,
Driver_ID int,
Years_Working int,
If_full_time bool
) | SELECT Party, COUNT(*) FROM driver GROUP BY Party | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
496,
41,
1121,
834,
4309,
16,
17,
6,
13027,
1499,
6,
1121,
1499,
6,
10450,
1499,
6,
6632,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
2535,
41,
10546,
834,
4309... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3450,
6,
2847,
17161,
599,
1935,
61,
21680,
2535,
350,
4630,
6880,
272,
476,
3450,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what films had their weekend end dates in january ? | CREATE TABLE table_203_180 (
id number,
"#" number,
"weekend end date" text,
"film" text,
"weekend gross (millions)" text,
"notes" text
) | SELECT "film" FROM table_203_180 WHERE "weekend end date" = 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
20829,
41,
3,
23,
26,
381,
6,
96,
4663,
121,
381,
6,
96,
8041,
989,
414,
833,
121,
1499,
6,
96,
9988,
121,
1499,
6,
96,
8041,
989,
8690,
41,
17030,
7,
61,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9988,
121,
21680,
953,
834,
23330,
834,
20829,
549,
17444,
427,
96,
8041,
989,
414,
833,
121,
3274,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
when co2 is 192g/km, what is the power? | CREATE TABLE table_24729_2 (power VARCHAR, co2 VARCHAR) | SELECT power FROM table_24729_2 WHERE co2 = "192g/km" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
4177,
3166,
834,
357,
41,
6740,
584,
4280,
28027,
6,
576,
357,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
116,
576,
357,
19,
3,
19978,
122,
87,
5848,
6,
125,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
579,
21680,
953,
834,
357,
4177,
3166,
834,
357,
549,
17444,
427,
576,
357,
3274,
96,
19978,
122,
87,
5848,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
I want the sum of NGC number for spiral galaxy and right acension of 08h14m40.4s | CREATE TABLE table_55299 (
"NGC number" real,
"Object type" text,
"Constellation" text,
"Right ascension ( J2000 )" text,
"Declination ( J2000 )" text,
"Apparent magnitude" real
) | SELECT SUM("NGC number") FROM table_55299 WHERE "Object type" = 'spiral galaxy' AND "Right ascension ( J2000 )" = '08h14m40.4s' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3769,
357,
3264,
41,
96,
12531,
254,
381,
121,
490,
6,
96,
17057,
686,
121,
1499,
6,
96,
4302,
7,
6714,
257,
121,
1499,
6,
96,
448,
2632,
38,
75,
35,
1938,
41,
446,
135... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12531,
254,
381,
8512,
21680,
953,
834,
3769,
357,
3264,
549,
17444,
427,
96,
17057,
686,
121,
3274,
3,
31,
7,
2388,
138,
24856,
31,
3430,
96,
448,
2632,
38,
75,
35,
1938,
41,
446,
13527,
3,
... |
Tell me the sum of bronze for gold being 27 and silver more than 30 | CREATE TABLE table_name_35 (bronze INTEGER, gold VARCHAR, silver VARCHAR) | SELECT SUM(bronze) FROM table_name_35 WHERE gold = 27 AND silver > 30 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2469,
41,
13711,
776,
3,
21342,
17966,
6,
2045,
584,
4280,
28027,
6,
4294,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
8779,
140,
8,
4505,
13,
13467,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
180,
6122,
599,
13711,
776,
61,
21680,
953,
834,
4350,
834,
2469,
549,
17444,
427,
2045,
3274,
2307,
3430,
4294,
2490,
604,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the event on Wed 26 Aug where rider is Andrew Farrell 400cc Kawasaki? | CREATE TABLE table_23465864_6 (wed_26_aug VARCHAR, rider VARCHAR) | SELECT wed_26_aug FROM table_23465864_6 WHERE rider = "Andrew Farrell 400cc Kawasaki" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2773,
4448,
3449,
4389,
834,
948,
41,
1123,
26,
834,
2688,
834,
402,
122,
584,
4280,
28027,
6,
2564,
52,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
60... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
62,
26,
834,
2688,
834,
402,
122,
21680,
953,
834,
2773,
4448,
3449,
4389,
834,
948,
549,
17444,
427,
2564,
52,
3274,
96,
7175,
60,
210,
1699,
21290,
4837,
75,
75,
2209,
9491,
11259,
121,
1,
-100,
-100,
-100,
-100,
... |
What were the results in the bryant-denny stadium tuscaloosa, al? | CREATE TABLE table_26842217_4 (
result VARCHAR,
site VARCHAR
) | SELECT result FROM table_26842217_4 WHERE site = "Bryant-Denny Stadium • Tuscaloosa, AL" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2688,
4608,
2884,
2517,
834,
591,
41,
741,
584,
4280,
28027,
6,
353,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
130,
8,
772,
16,
8,
6397,
63,
288,
18,
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,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
741,
21680,
953,
834,
2688,
4608,
2884,
2517,
834,
591,
549,
17444,
427,
353,
3274,
96,
279,
651,
288,
18,
308,
35,
29,
63,
12750,
1697,
2740,
7,
658,
26791,
9,
6,
8761,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the total number of successors when the vacator was William North ( F ) | CREATE TABLE table_224839_3 (successor VARCHAR, vacator VARCHAR) | SELECT COUNT(successor) FROM table_224839_3 WHERE vacator = "William North ( F )" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2884,
3707,
3288,
834,
519,
41,
7,
17431,
24901,
584,
4280,
28027,
6,
3,
8938,
1016,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
792,
381,
13,
22261,
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
7,
17431,
24901,
61,
21680,
953,
834,
2884,
3707,
3288,
834,
519,
549,
17444,
427,
3,
8938,
1016,
3274,
96,
518,
1092,
23,
265,
1117,
41,
377,
3,
61,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What was Carlton's score when they were the away team? | CREATE TABLE table_33047 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Away team score" FROM table_33047 WHERE "Away team" = 'carlton' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
17225,
4177,
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,
35,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
188,
1343,
372,
2604,
121,
21680,
953,
834,
17225,
4177,
549,
17444,
427,
96,
188,
1343,
372,
121,
3274,
3,
31,
1720,
7377,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
How many states have a college with more students than average? | CREATE TABLE college (
cname text,
state text,
enr number
)
CREATE TABLE tryout (
pid number,
cname text,
ppos text,
decision text
)
CREATE TABLE player (
pid number,
pname text,
ycard text,
hs number
) | SELECT COUNT(DISTINCT state) FROM college WHERE enr > (SELECT AVG(enr) FROM college) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1900,
41,
3,
75,
4350,
1499,
6,
538,
1499,
6,
3,
35,
52,
381,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
653,
670,
41,
3,
12417,
381,
6,
3,
75,
4350,
1499,
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,
2847,
17161,
599,
15438,
25424,
6227,
538,
61,
21680,
1900,
549,
17444,
427,
3,
35,
52,
2490,
41,
23143,
14196,
71,
17217,
599,
35,
52,
61,
21680,
1900,
61,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
count the number of patients whose year of birth is less than 2083 and drug route is sc? | 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
)
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 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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2083" AND prescriptions.route = "SC" | [
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,
7744,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7744,
7,
5,
8399,
51,
834,
23,
26,
549... |
How many in the cultural and educational panel have a university of Dublin of 3 & A labor panel larger than 11? | CREATE TABLE table_41134 (
"Administrative Panel" real,
"Agricultural Panel" real,
"Cultural and Educational Panel" real,
"Industrial and Commercial Panel" real,
"Labour Panel" real,
"National University of Ireland" real,
"University of Dublin" real,
"Nominated by the Taoiseach" real,
"Total" real
) | SELECT COUNT("Cultural and Educational Panel") FROM table_41134 WHERE "University of Dublin" = '3' AND "Labour Panel" > '11' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4853,
23747,
41,
96,
16313,
343,
52,
1528,
9871,
121,
490,
6,
96,
24354,
9871,
121,
490,
6,
96,
254,
83,
17,
9709,
11,
19173,
9871,
121,
490,
6,
96,
1570,
8655,
17,
12042... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
83,
17,
9709,
11,
19173,
9871,
8512,
21680,
953,
834,
4853,
23747,
549,
17444,
427,
96,
8313,
485,
13,
14112,
121,
3274,
3,
31,
519,
31,
3430,
96,
18506,
1211,
9871,
121,
2490,
3,
31,
2... |
how many of the patients with ruq pain had icd9 code 8852? | 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 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
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "RUQ PAIN" AND procedures.icd9_code = "8852" | [
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,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
what is age and diagnoses long title of subject id 2560? | 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 demographic.age, diagnoses.long_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "2560" | [
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,
14798,
5,
545,
6,
18730,
7,
5,
2961,
834,
21869,
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,
549,
17444,
427,
14798,
5,
7... |
What is the maximum and mininum number of transit passengers for all airports? | CREATE TABLE aircraft (
aircraft_id number,
aircraft text,
description text,
max_gross_weight text,
total_disk_area text,
max_disk_loading text
)
CREATE TABLE pilot (
pilot_id number,
name text,
age number
)
CREATE TABLE airport_aircraft (
id number,
airport_id number,
aircraft_id number
)
CREATE TABLE airport (
airport_id number,
airport_name text,
total_passengers number,
%_change_2007 text,
international_passengers number,
domestic_passengers number,
transit_passengers number,
aircraft_movements number,
freight_metric_tonnes number
)
CREATE TABLE match (
round number,
location text,
country text,
date text,
fastest_qualifying text,
winning_pilot text,
winning_aircraft text
) | SELECT MAX(transit_passengers), MIN(transit_passengers) FROM airport | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
6442,
41,
6442,
834,
23,
26,
381,
6,
6442,
1499,
6,
4210,
1499,
6,
9858,
834,
3844,
7,
7,
834,
9378,
1499,
6,
792,
834,
26,
13690,
834,
498,
1499,
6,
9858,
834,
26,
13690,
834,
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,
4800,
4,
599,
7031,
155,
834,
3968,
4606,
277,
201,
3,
17684,
599,
7031,
155,
834,
3968,
4606,
277,
61,
21680,
3761,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which Driver has a Grid smaller than 17, and Points larger than 0, and a Lapse of 87, and a Time/Retired of 1:48:11.023? | CREATE TABLE table_name_72 (
driver VARCHAR,
time_retired VARCHAR,
laps VARCHAR,
grid VARCHAR,
points VARCHAR
) | SELECT driver FROM table_name_72 WHERE grid < 17 AND points > 0 AND laps = 87 AND time_retired = "1:48:11.023" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5865,
41,
2535,
584,
4280,
28027,
6,
97,
834,
10682,
1271,
584,
4280,
28027,
6,
14941,
7,
584,
4280,
28027,
6,
8634,
584,
4280,
28027,
6,
979,
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,
2535,
21680,
953,
834,
4350,
834,
5865,
549,
17444,
427,
8634,
3,
2,
1003,
3430,
979,
2490,
3,
632,
3430,
14941,
7,
3274,
3,
4225,
3430,
97,
834,
10682,
1271,
3274,
96,
536,
10,
3707,
10,
10032,
632,
2773,
121,
1,... |
Which against has 14 losses? | CREATE TABLE table_name_24 (
against VARCHAR,
losses VARCHAR
) | SELECT against FROM table_name_24 WHERE losses = 14 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2266,
41,
581,
584,
4280,
28027,
6,
8467,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
581,
65,
968,
8467,
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,
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,
581,
21680,
953,
834,
4350,
834,
2266,
549,
17444,
427,
8467,
3274,
968,
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 name of the train listed before bangalore express ? | CREATE TABLE table_204_78 (
id number,
"no." number,
"train no." text,
"origin" text,
"destination" text,
"train name" text
) | SELECT "train name" FROM table_204_78 WHERE id = (SELECT id FROM table_204_78 WHERE "train name" = 'bangalore express') - 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
3940,
41,
3,
23,
26,
381,
6,
96,
29,
32,
535,
381,
6,
96,
9719,
150,
535,
1499,
6,
96,
32,
3380,
77,
121,
1499,
6,
96,
13557,
257,
121,
1499,
6,
96,
9719,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9719,
564,
121,
21680,
953,
834,
26363,
834,
3940,
549,
17444,
427,
3,
23,
26,
3274,
41,
23143,
14196,
3,
23,
26,
21680,
953,
834,
26363,
834,
3940,
549,
17444,
427,
96,
9719,
564,
121,
3274,
3,
31,
3478,
6191... |
What are all the conjugated forms of the verb where the el/ ella/usted verb is piense? | CREATE TABLE table_1977630_2 (
nosotros___nosotras VARCHAR,
él___ella___usted VARCHAR
) | SELECT nosotros___nosotras FROM table_1977630_2 WHERE él___ella___usted = "piense" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
27181,
3959,
1458,
834,
357,
41,
2844,
24497,
7,
834,
834,
834,
4844,
32,
1313,
7,
584,
4280,
28027,
6,
3,
154,
40,
834,
834,
834,
5303,
834,
834,
834,
302,
1054,
584,
42... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2844,
24497,
7,
834,
834,
834,
4844,
32,
1313,
7,
21680,
953,
834,
27181,
3959,
1458,
834,
357,
549,
17444,
427,
3,
154,
40,
834,
834,
834,
5303,
834,
834,
834,
302,
1054,
3274,
96,
102,
8065,
15,
121,
1,
-100,
... |
What Competition had a game on October 31, 1979? | CREATE TABLE table_name_53 (
competition VARCHAR,
date VARCHAR
) | SELECT competition FROM table_name_53 WHERE date = "october 31, 1979" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4867,
41,
2259,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
15571,
141,
3,
9,
467,
30,
1797,
12074,
15393,
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,
2259,
21680,
953,
834,
4350,
834,
4867,
549,
17444,
427,
833,
3274,
96,
32,
75,
235,
1152,
12074,
15393,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
what is the number of patients whose ethnicity is white - russian and drug name is metoprolol? | 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 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 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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "WHITE - RUSSIAN" AND prescriptions.drug = "Metoprolol" | [
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,
7744,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7744,
7,
5,
8399,
51,
834,
23,
26,
549... |
What is Score in The Final, when Opponent in The Final is "John McEnroe", and when Championship is "Los Angeles , U.S."? | CREATE TABLE table_name_98 (score_in_the_final VARCHAR, opponent_in_the_final VARCHAR, championship VARCHAR) | SELECT score_in_the_final FROM table_name_98 WHERE opponent_in_the_final = "john mcenroe" AND championship = "los angeles , u.s." | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3916,
41,
7,
9022,
834,
77,
834,
532,
834,
12406,
584,
4280,
28027,
6,
15264,
834,
77,
834,
532,
834,
12406,
584,
4280,
28027,
6,
10183,
584,
4280,
28027,
61,
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,
1... | [
3,
23143,
14196,
2604,
834,
77,
834,
532,
834,
12406,
21680,
953,
834,
4350,
834,
3916,
549,
17444,
427,
15264,
834,
77,
834,
532,
834,
12406,
3274,
96,
27341,
3,
51,
75,
35,
52,
32,
15,
121,
3430,
10183,
3274,
96,
2298,
11831,
15... |
What is the high amount of points on February 11? | CREATE TABLE table_21513 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT "High points" FROM table_21513 WHERE "Date" = 'February 11' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
1808,
2368,
41,
96,
23055,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
18699,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
21417,
979,
121,
1499,
6,
96,
21417,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
21417,
979,
121,
21680,
953,
834,
357,
1808,
2368,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
31122,
850,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
what is the highest silver when the total is 4 and bronze is less than 1? | CREATE TABLE table_name_54 (
silver INTEGER,
total VARCHAR,
bronze VARCHAR
) | SELECT MAX(silver) FROM table_name_54 WHERE total = "4" AND bronze < 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5062,
41,
4294,
3,
21342,
17966,
6,
792,
584,
4280,
28027,
6,
13467,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
125,
19,
8,
2030,
4294,
116,
8,
792,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4800,
4,
599,
7,
173,
624,
61,
21680,
953,
834,
4350,
834,
5062,
549,
17444,
427,
792,
3274,
96,
20364,
3430,
13467,
3,
2,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What are the different affiliations, and what is the total enrollment of schools founded after 1850 for each enrollment type Visualize by bar chart, and could you list from low to high by the bars? | CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
) | SELECT Affiliation, SUM(Enrollment) FROM university WHERE Founded > 1850 GROUP BY Affiliation ORDER BY Affiliation | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3819,
41,
1121,
834,
4309,
16,
17,
6,
1121,
1499,
6,
10450,
1499,
6,
3,
20100,
490,
6,
71,
89,
8027,
23,
257,
1499,
6,
695,
4046,
297,
490,
6,
7486,
4350,
1499,
6,
14542,
834,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
89,
8027,
23,
257,
6,
180,
6122,
599,
8532,
4046,
297,
61,
21680,
3819,
549,
17444,
427,
3,
20100,
2490,
507,
1752,
350,
4630,
6880,
272,
476,
71,
89,
8027,
23,
257,
4674,
11300,
272,
476,
71,
89,
8027,
23,
... |
What's the season number of the episode titled 'Dungeons and wagons'? | CREATE TABLE table_25769 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (millions)" text
) | SELECT MIN("No. in season") FROM table_25769 WHERE "Title" = 'Dungeons and Wagons' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
3436,
3951,
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,
3,
17684,
599,
121,
4168,
5,
16,
774,
8512,
21680,
953,
834,
357,
3436,
3951,
549,
17444,
427,
96,
382,
155,
109,
121,
3274,
3,
31,
308,
425,
15,
106,
7,
11,
3129,
5307,
7,
31,
1,
-100,
-100,
-100,
-100,
-100,
... |
What were the scores by the individual judges for Karanvir Bohra on August 13? | CREATE TABLE table_1852 (
"Main contestant" text,
"Co-contestant (Yaar vs. Pyaar)" text,
"Date performed" text,
"Scores by each individual judge" text,
"Total score/week" text,
"Position" text,
"Status" text
) | SELECT "Scores by each individual judge" FROM table_1852 WHERE "Main contestant" = 'Karanvir Bohra' AND "Date performed" = 'August 13' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
21594,
357,
41,
96,
21978,
29,
4233,
288,
121,
1499,
6,
96,
3881,
18,
1018,
4377,
288,
41,
476,
9,
291,
3,
208,
7,
5,
12901,
9,
291,
61,
121,
1499,
6,
96,
308,
342,
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,
1... | [
3,
23143,
14196,
96,
134,
9022,
7,
57,
284,
928,
5191,
121,
21680,
953,
834,
21594,
357,
549,
17444,
427,
96,
21978,
29,
4233,
288,
121,
3274,
3,
31,
439,
9,
2002,
5771,
1491,
107,
52,
9,
31,
3430,
96,
308,
342,
3032,
121,
3274,... |
Which name has group 0 in Bl4 area? | CREATE TABLE table_name_51 (
name VARCHAR,
group_s_ VARCHAR,
area VARCHAR
) | SELECT name FROM table_name_51 WHERE group_s_ = 0 AND area = "bl4" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5553,
41,
564,
584,
4280,
28027,
6,
563,
834,
7,
834,
584,
4280,
28027,
6,
616,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
564,
65,
563,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
564,
21680,
953,
834,
4350,
834,
5553,
549,
17444,
427,
563,
834,
7,
834,
3274,
3,
632,
3430,
616,
3274,
96,
115,
40,
20364,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the highest position with less than 17 losses, more than 57 goals, and a goal difference less than 4? | CREATE TABLE table_77572 (
"Position" real,
"Club" text,
"Played" real,
"Points" text,
"Wins" real,
"Draws" real,
"Losses" real,
"Goals for" real,
"Goals against" real,
"Goal Difference" real
) | SELECT MAX("Position") FROM table_77572 WHERE "Losses" < '17' AND "Goals for" > '57' AND "Goal Difference" < '4' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4013,
3436,
357,
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,
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,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
121,
345,
32,
7,
4749,
8512,
21680,
953,
834,
4013,
3436,
357,
549,
17444,
427,
96,
434,
13526,
7,
121,
3,
2,
3,
31,
2517,
31,
3430,
96,
6221,
5405,
21,
121,
2490,
3,
31,
3436,
31,
3430,
96,
6221... |
What date has 1 for the game? | CREATE TABLE table_name_84 (
date VARCHAR,
game VARCHAR
) | SELECT date FROM table_name_84 WHERE game = 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4608,
41,
833,
584,
4280,
28027,
6,
467,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
833,
65,
209,
21,
8,
467,
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,
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,
833,
21680,
953,
834,
4350,
834,
4608,
549,
17444,
427,
467,
3274,
209,
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 total number of byes that are associated with 1 draw, 5 wins, and fewer than 12 losses? | CREATE TABLE table_36426 (
"NTFA Div 1" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
) | SELECT SUM("Byes") FROM table_36426 WHERE "Draws" = '1' AND "Wins" = '5' AND "Losses" < '12' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3420,
591,
2688,
41,
96,
7359,
4795,
3,
21313,
209,
121,
1499,
6,
96,
18455,
7,
121,
490,
6,
96,
279,
10070,
121,
490,
6,
96,
434,
13526,
7,
121,
490,
6,
96,
308,
10936... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
279,
10070,
8512,
21680,
953,
834,
3420,
591,
2688,
549,
17444,
427,
96,
308,
10936,
7,
121,
3274,
3,
31,
536,
31,
3430,
96,
18455,
7,
121,
3274,
3,
31,
755,
31,
3430,
96,
434,
13526,
7,
121... |
Which Extra points 1 point is the lowest one that has a Player of walter shaw? | CREATE TABLE table_36580 (
"Player" text,
"Touchdowns (5 points)" real,
"Extra points 1 point" real,
"Field goals (5 points)" real,
"Total Points" real
) | SELECT MIN("Extra points 1 point") FROM table_36580 WHERE "Player" = 'walter shaw' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
10402,
2079,
41,
96,
15800,
49,
121,
1499,
6,
96,
3696,
2295,
3035,
7,
9209,
979,
61,
121,
490,
6,
96,
5420,
1313,
979,
209,
500,
121,
490,
6,
96,
3183,
8804,
1766,
9209,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5420,
1313,
979,
209,
500,
8512,
21680,
953,
834,
10402,
2079,
549,
17444,
427,
96,
15800,
49,
121,
3274,
3,
31,
210,
8818,
3,
15622,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who was the player that was picked at a number less than 205 from the Michigan State Spartans? | CREATE TABLE table_name_46 (player VARCHAR, pick__number VARCHAR, team_from VARCHAR) | SELECT player FROM table_name_46 WHERE pick__number < 205 AND team_from = "michigan state spartans" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4448,
41,
20846,
584,
4280,
28027,
6,
1432,
834,
834,
5525,
1152,
584,
4280,
28027,
6,
372,
834,
7152,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
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,
1,
1,
1,
1... | [
3,
23143,
14196,
1959,
21680,
953,
834,
4350,
834,
4448,
549,
17444,
427,
1432,
834,
834,
5525,
1152,
3,
2,
3,
23201,
3430,
372,
834,
7152,
3274,
96,
51,
362,
12588,
538,
3,
7,
2274,
3247,
121,
1,
-100,
-100,
-100,
-100,
-100,
-10... |
When did qiang ma publish his MapReduce paper ? | CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename varchar
)
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE venue (
venueid int,
venuename varchar
)
CREATE TABLE dataset (
datasetid int,
datasetname varchar
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE field (
fieldid int
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
) | SELECT DISTINCT paper.year FROM author, keyphrase, paper, paperkeyphrase, writes WHERE author.authorname = 'qiang ma' AND keyphrase.keyphrasename = 'MapReduce' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND writes.authorid = author.authorid AND writes.paperid = paper.paperid | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
11858,
41,
1040,
23,
26,
16,
17,
6,
2291,
23,
26,
16,
17,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
843,
27111,
41,
843,
27111,
23,
26,
16,
17,
6,
843,
27111,
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,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
15438,
25424,
6227,
1040,
5,
1201,
21680,
2291,
6,
843,
27111,
6,
1040,
6,
1040,
4397,
27111,
6,
11858,
549,
17444,
427,
2291,
5,
17415,
4350,
3274,
3,
31,
1824,
23,
1468,
954,
31,
3430,
843,
27111,
5,
4397,
27... |
What is the result for Steve Gonzalez? | CREATE TABLE table_25172 (
"Position" text,
"Name" text,
"Jersey Number" real,
"Age" real,
"Height" text,
"Weight" real,
"College" text,
"Result" text
) | SELECT "Result" FROM table_25172 WHERE "Name" = 'Steve Gonzalez' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
27156,
41,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
23954,
121,
1499,
6,
96,
683,
277,
15,
63,
7720,
121,
490,
6,
96,
188,
397,
121,
490,
6,
96,
3845,
2632,
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,
20119,
121,
21680,
953,
834,
1828,
27156,
549,
17444,
427,
96,
23954,
121,
3274,
3,
31,
14337,
162,
31403,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
How many reasons for change were listed when Edward Hempstead was the successor? | CREATE TABLE table_225095_4 (
reason_for_change VARCHAR,
successor VARCHAR
) | SELECT COUNT(reason_for_change) FROM table_225095_4 WHERE successor = "Edward Hempstead" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
11434,
3301,
834,
591,
41,
1053,
834,
1161,
834,
13073,
584,
4280,
28027,
6,
22261,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
2081,
21,
483,
130,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2847,
17161,
599,
864,
739,
834,
1161,
834,
13073,
61,
21680,
953,
834,
357,
11434,
3301,
834,
591,
549,
17444,
427,
22261,
3274,
96,
427,
26,
2239,
216,
1167,
11931,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the verb for the Proto-Austronesian word *diri? | CREATE TABLE table_40803 (
"Verb" text,
"Proto-Austronesian" text,
"Proto-Malayo-Polynesian" text,
"Proto-Oceanic" text,
"Proto-Polynesian" text
) | SELECT "Verb" FROM table_40803 WHERE "Proto-Austronesian" = '*diri' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2445,
2079,
519,
41,
96,
5000,
115,
121,
1499,
6,
96,
3174,
235,
18,
14934,
6255,
15,
10488,
121,
1499,
6,
96,
3174,
235,
18,
329,
9,
5595,
32,
18,
8931,
63,
29,
15,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5000,
115,
121,
21680,
953,
834,
2445,
2079,
519,
549,
17444,
427,
96,
3174,
235,
18,
14934,
6255,
15,
10488,
121,
3274,
3,
31,
1935,
12594,
23,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Who performed the song recorded at the Cabin in the Woods Studio with a Time of 3:16? | CREATE TABLE table_name_45 (
performer_s_ VARCHAR,
recorded_at VARCHAR,
time VARCHAR
) | SELECT performer_s_ FROM table_name_45 WHERE recorded_at = "the cabin in the woods studio" AND time = "3:16" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2128,
41,
1912,
49,
834,
7,
834,
584,
4280,
28027,
6,
4381,
834,
144,
584,
4280,
28027,
6,
97,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
3032... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1912,
49,
834,
7,
834,
21680,
953,
834,
4350,
834,
2128,
549,
17444,
427,
4381,
834,
144,
3274,
96,
532,
7788,
16,
8,
1679,
7,
3100,
121,
3430,
97,
3274,
96,
519,
10,
2938,
121,
1,
-100,
-100,
-100,
-100,
-100,
... |
What is the Standings of Eintracht Braunschweig? | CREATE TABLE table_name_28 (
standings VARCHAR,
champions VARCHAR
) | SELECT standings FROM table_name_28 WHERE champions = "eintracht braunschweig" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2577,
41,
4125,
7,
584,
4280,
28027,
6,
6336,
7,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
23715,
7,
13,
890,
1313,
3997,
25599,
5472,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4125,
7,
21680,
953,
834,
4350,
834,
2577,
549,
17444,
427,
6336,
7,
3274,
96,
2455,
1313,
3997,
3858,
202,
5472,
15,
23,
122,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
If the time/retired is +1 lap, what is the amount of maximum laps? | CREATE TABLE table_17693171_1 (
laps INTEGER,
time_retired VARCHAR
) | SELECT MAX(laps) FROM table_17693171_1 WHERE time_retired = "+1 lap" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2517,
3951,
3341,
4450,
834,
536,
41,
14941,
7,
3,
21342,
17966,
6,
97,
834,
10682,
1271,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
156,
8,
97,
87,
10682,
127... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
3,
23143,
14196,
4800,
4,
599,
8478,
7,
61,
21680,
953,
834,
2517,
3951,
3341,
4450,
834,
536,
549,
17444,
427,
97,
834,
10682,
1271,
3274,
96,
18446,
14941,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What To par has a Country of united states, and a Score of 67-66-78-77=288? | CREATE TABLE table_name_52 (to_par VARCHAR, country VARCHAR, score VARCHAR) | SELECT to_par FROM table_name_52 WHERE country = "united states" AND score = 67 - 66 - 78 - 77 = 288 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5373,
41,
235,
834,
1893,
584,
4280,
28027,
6,
684,
584,
4280,
28027,
6,
2604,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
304,
260,
65,
3,
9,
6993... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12,
834,
1893,
21680,
953,
834,
4350,
834,
5373,
549,
17444,
427,
684,
3274,
96,
15129,
15,
26,
2315,
121,
3430,
2604,
3274,
3,
3708,
3,
18,
3,
3539,
3,
18,
3,
3940,
3,
18,
3,
4013,
3274,
204,
4060,
1,
-100,
-... |
How many profits is the company that is headquartered in the USA, in the banking industry, and has sales (billion $) less than 98.64 bringing in? | CREATE TABLE table_name_54 (
profits__billion_ INTEGER,
sales__billion_$_ VARCHAR,
headquarters VARCHAR,
industry VARCHAR
) | SELECT SUM(profits__billion_) AS $_ FROM table_name_54 WHERE headquarters = "usa" AND industry = "banking" AND sales__billion_$_ < 98.64 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5062,
41,
9613,
834,
834,
115,
14916,
834,
3,
21342,
17966,
6,
1085,
834,
834,
115,
14916,
834,
3229,
834,
584,
4280,
28027,
6,
13767,
584,
4280,
28027,
6,
681,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6046,
7,
834,
834,
115,
14916,
834,
61,
6157,
1514,
834,
21680,
953,
834,
4350,
834,
5062,
549,
17444,
427,
13767,
3274,
96,
302,
9,
121,
3430,
681,
3274,
96,
4739,
53,
121,
3430,
1085,
834,
834,
1... |
Who picked a player from Weber State? | CREATE TABLE table_20902 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
) | SELECT "CFL Team" FROM table_20902 WHERE "College" = 'Weber State' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1755,
2394,
357,
41,
96,
345,
3142,
1713,
121,
490,
6,
96,
254,
10765,
2271,
121,
1499,
6,
96,
15800,
49,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
9939,
78... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
254,
10765,
2271,
121,
21680,
953,
834,
1755,
2394,
357,
549,
17444,
427,
96,
9939,
7883,
121,
3274,
3,
31,
15805,
49,
1015,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the average rank of Roman Koudelka, who has less than 274.4 points? | CREATE TABLE table_name_41 (rank INTEGER, points VARCHAR, name VARCHAR) | SELECT AVG(rank) FROM table_name_41 WHERE points < 274.4 AND name = "roman koudelka" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4853,
41,
6254,
3,
21342,
17966,
6,
979,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1348,
11003,
13,
3385,
1793,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
71,
17217,
599,
6254,
61,
21680,
953,
834,
4350,
834,
4853,
549,
17444,
427,
979,
3,
2,
2307,
23444,
3430,
564,
3274,
96,
3522,
152,
3,
157,
32,
27052,
1258,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the sum of Bronze when the total is more than 27? | CREATE TABLE table_name_91 (bronze INTEGER, total INTEGER) | SELECT SUM(bronze) FROM table_name_91 WHERE total > 27 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4729,
41,
13711,
776,
3,
21342,
17966,
6,
792,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
4505,
13,
20841,
116,
8,
792,
19,
72,
145,
2307,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
180,
6122,
599,
13711,
776,
61,
21680,
953,
834,
4350,
834,
4729,
549,
17444,
427,
792,
2490,
2307,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who is the president representing the Creuse department? | CREATE TABLE table_76673 (
"Number" text,
"D\u00e9partment (or collectivity)" text,
"Pr\u00e9sident" text,
"Party" text,
"Since" real
) | SELECT "Pr\u00e9sident" FROM table_76673 WHERE "D\u00e9partment (or collectivity)" = 'creuse' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3959,
3708,
519,
41,
96,
567,
5937,
49,
121,
1499,
6,
96,
308,
2,
76,
1206,
15,
1298,
2274,
297,
41,
127,
2868,
10696,
61,
121,
1499,
6,
96,
345,
52,
2,
76,
1206,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
345,
52,
2,
76,
1206,
15,
1298,
7,
4215,
121,
21680,
953,
834,
3959,
3708,
519,
549,
17444,
427,
96,
308,
2,
76,
1206,
15,
1298,
2274,
297,
41,
127,
2868,
10696,
61,
121,
3274,
3,
31,
5045,
1074,
31,
1,
-1... |
Who was the shooter with a score of 686.4? | CREATE TABLE table_name_59 (shooter VARCHAR, score VARCHAR) | SELECT shooter FROM table_name_59 WHERE score = "686.4" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3390,
41,
5630,
32,
449,
584,
4280,
28027,
6,
2604,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
8,
4279,
49,
28,
3,
9,
2604,
13,
3,
3651,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4279,
49,
21680,
953,
834,
4350,
834,
3390,
549,
17444,
427,
2604,
3274,
96,
3651,
27869,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the order of the Tokyo olympic games? | CREATE TABLE table_36405 (
"Order" text,
"Year" real,
"Olympic Games" text,
"Medal" text,
"Weight" text,
"Boxer" text,
"Club" text
) | SELECT "Order" FROM table_36405 WHERE "Olympic Games" = 'tokyo' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3420,
591,
3076,
41,
96,
7395,
588,
121,
1499,
6,
96,
476,
2741,
121,
490,
6,
96,
667,
120,
51,
6174,
5880,
121,
1499,
6,
96,
20123,
138,
121,
1499,
6,
96,
1326,
2632,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7395,
588,
121,
21680,
953,
834,
3420,
591,
3076,
549,
17444,
427,
96,
667,
120,
51,
6174,
5880,
121,
3274,
3,
31,
235,
3781,
32,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is the position when the pick is higher than 32 and the team is atlanta braves? | CREATE TABLE table_name_8 (
position VARCHAR,
pick VARCHAR,
team VARCHAR
) | SELECT position FROM table_name_8 WHERE pick > 32 AND team = "atlanta braves" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
927,
41,
1102,
584,
4280,
28027,
6,
1432,
584,
4280,
28027,
6,
372,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
125,
19,
8,
1102,
116,
8,
1432,
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,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1102,
21680,
953,
834,
4350,
834,
927,
549,
17444,
427,
1432,
2490,
3538,
3430,
372,
3274,
96,
144,
6761,
9,
13414,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the highest top-25 of the tournament with less than 22 events and more than 1 top-10? | CREATE TABLE table_name_11 (
top_25 INTEGER,
events VARCHAR,
top_10 VARCHAR
) | SELECT MAX(top_25) FROM table_name_11 WHERE events < 22 AND top_10 > 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2596,
41,
420,
834,
1828,
3,
21342,
17966,
6,
984,
584,
4280,
28027,
6,
420,
834,
1714,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2030,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
3,
23143,
14196,
4800,
4,
599,
2916,
834,
1828,
61,
21680,
953,
834,
4350,
834,
2596,
549,
17444,
427,
984,
3,
2,
1630,
3430,
420,
834,
1714,
2490,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
How much was the first place prize for the American golf classic located in Ohio? | CREATE TABLE table_37503 (
"Date" text,
"Tournament" text,
"Location" text,
"Winner" text,
"Score" text,
"1st prize ( $ )" text
) | SELECT "1st prize ( $ )" FROM table_37503 WHERE "Location" = 'ohio' AND "Tournament" = 'american golf classic' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
22954,
4928,
41,
96,
308,
342,
121,
1499,
6,
96,
382,
1211,
20205,
17,
121,
1499,
6,
96,
434,
32,
75,
257,
121,
1499,
6,
96,
18455,
687,
121,
1499,
6,
96,
134,
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,
536,
7,
17,
6441,
41,
1514,
3,
61,
121,
21680,
953,
834,
22954,
4928,
549,
17444,
427,
96,
434,
32,
75,
257,
121,
3274,
3,
31,
32,
107,
23,
32,
31,
3430,
96,
382,
1211,
20205,
17,
121,
3274,
3,
31,
23064,
... |
Who was the constructor when Eugenio Castellotti was the pole position and the race had a C tyre? | CREATE TABLE table_name_89 (
constructor VARCHAR,
tyre VARCHAR,
pole_position VARCHAR
) | SELECT constructor FROM table_name_89 WHERE tyre = "c" AND pole_position = "eugenio castellotti" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3914,
41,
6774,
127,
584,
4280,
28027,
6,
3,
17,
63,
60,
584,
4280,
28027,
6,
11148,
834,
4718,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6774,
127,
21680,
953,
834,
4350,
834,
3914,
549,
17444,
427,
3,
17,
63,
60,
3274,
96,
75,
121,
3430,
11148,
834,
4718,
3274,
96,
15,
76,
729,
23,
32,
1990,
6714,
22334,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,... |
When the Venue was Glenferrie Oval, who is the Away team? | CREATE TABLE table_11472 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Away team" FROM table_11472 WHERE "Venue" = 'glenferrie oval' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
18959,
5865,
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,
35,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
188,
1343,
372,
121,
21680,
953,
834,
18959,
5865,
549,
17444,
427,
96,
553,
35,
76,
15,
121,
3274,
3,
31,
3537,
29,
1010,
1753,
17986,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Bernhard Langer maximum total was what? | CREATE TABLE table_name_27 (total INTEGER, player VARCHAR) | SELECT MAX(total) FROM table_name_27 WHERE player = "bernhard langer" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2555,
41,
235,
1947,
3,
21342,
17966,
6,
1959,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
8942,
5651,
7073,
49,
2411,
792,
47,
125,
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,
4800,
4,
599,
235,
1947,
61,
21680,
953,
834,
4350,
834,
2555,
549,
17444,
427,
1959,
3274,
96,
1152,
29,
5651,
6575,
52,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Which name has a pressure of 985hpa (29.09inhg)? | CREATE TABLE table_name_56 (
name VARCHAR,
pressure VARCHAR
) | SELECT name FROM table_name_56 WHERE pressure = "985hpa (29.09inhg)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4834,
41,
564,
584,
4280,
28027,
6,
1666,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
564,
65,
3,
9,
1666,
13,
668,
4433,
107,
102,
9,
41,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
3,
23143,
14196,
564,
21680,
953,
834,
4350,
834,
4834,
549,
17444,
427,
1666,
3274,
96,
3916,
755,
107,
102,
9,
41,
3166,
5,
4198,
77,
107,
122,
61,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which away team plays at Arden Street Oval? | CREATE TABLE table_name_89 (
away_team VARCHAR,
venue VARCHAR
) | SELECT away_team FROM table_name_89 WHERE venue = "arden street oval" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3914,
41,
550,
834,
11650,
584,
4280,
28027,
6,
5669,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
550,
372,
4805,
44,
22635,
35,
1887,
411,
2165,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
550,
834,
11650,
21680,
953,
834,
4350,
834,
3914,
549,
17444,
427,
5669,
3274,
96,
986,
35,
2815,
17986,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Can you tell me the sum of Grid that has the Manufacturer of aprilia, and the sandro cortese? | CREATE TABLE table_name_96 (
grid INTEGER,
manufacturer VARCHAR,
rider VARCHAR
) | SELECT SUM(grid) FROM table_name_96 WHERE manufacturer = "aprilia" AND rider = "sandro cortese" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4314,
41,
8634,
3,
21342,
17966,
6,
4818,
584,
4280,
28027,
6,
2564,
52,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
1072,
25,
817,
140,
8,
4505,
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,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
3496,
26,
61,
21680,
953,
834,
4350,
834,
4314,
549,
17444,
427,
4818,
3274,
96,
9,
102,
52,
13565,
121,
3430,
2564,
52,
3274,
96,
7,
9,
22357,
4301,
1422,
15,
121,
1,
-100,
-100,
-100,
-100,
-100,... |
What date final has 1982 as the year? | CREATE TABLE table_name_59 (
date_final VARCHAR,
year VARCHAR
) | SELECT date_final FROM table_name_59 WHERE year = "1982" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3390,
41,
833,
834,
12406,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
833,
804,
65,
14505,
38,
8,
215,
58,
1,
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,
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,
833,
834,
12406,
21680,
953,
834,
4350,
834,
3390,
549,
17444,
427,
215,
3274,
96,
2294,
4613,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who had the fastest lap in the Dutch TT Grand Prix? | CREATE TABLE table_18303274_1 (
fastest_lap VARCHAR,
grand_prix VARCHAR
) | SELECT fastest_lap FROM table_18303274_1 WHERE grand_prix = "Dutch TT" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2606,
1458,
2668,
4581,
834,
536,
41,
10391,
834,
8478,
584,
4280,
28027,
6,
1907,
834,
2246,
226,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
141,
8,
10391... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
3,
23143,
14196,
10391,
834,
8478,
21680,
953,
834,
2606,
1458,
2668,
4581,
834,
536,
549,
17444,
427,
1907,
834,
2246,
226,
3274,
96,
12998,
17,
524,
3,
9697,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
how many patients are diagnosed with primary disease acidosis and are below 79 years of age? | 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.diagnosis = "ACIDOSIS" AND demographic.age < "79" | [
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,
25930,
4844,
159,
3274,
96,
188,
3597,
9857,
14408,
121,
3430,
14798,
5,
545,
3,
2,
96,
4440,
12... |
Who is GTU Winning Team's #27 Don Lindley's TO Winning Team? | CREATE TABLE table_18903 (
"Rnd" real,
"Circuit" text,
"GTO Winning Team" text,
"GTU Winning Team" text,
"TO Winning Team" text,
"TU Winning Team" text,
"Results" text
) | SELECT "TO Winning Team" FROM table_18903 WHERE "GTU Winning Team" = '#27 Don Lindley' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
25312,
4928,
41,
96,
448,
727,
121,
490,
6,
96,
254,
23,
52,
21560,
121,
1499,
6,
96,
517,
5647,
549,
10503,
2271,
121,
1499,
6,
96,
517,
9968,
549,
10503,
2271,
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,
5647,
549,
10503,
2271,
121,
21680,
953,
834,
25312,
4928,
549,
17444,
427,
96,
517,
9968,
549,
10503,
2271,
121,
3274,
3,
31,
4663,
2555,
1008,
14482,
1306,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of name and manufacturer , and group by attribute headquarter, order in ascending by the Y-axis please. | CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) | SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name ORDER BY T1.Manufacturer | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7554,
41,
3636,
3,
21342,
17966,
6,
5570,
584,
4280,
28027,
599,
25502,
201,
5312,
3396,
254,
26330,
434,
6,
15248,
3,
21342,
17966,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
23954,
6,
332,
5411,
7296,
76,
8717,
450,
49,
21680,
7554,
6157,
332,
536,
3,
15355,
3162,
15248,
7,
6157,
332,
357,
9191,
332,
5411,
7296,
76,
8717,
450,
49,
3274,
332,
4416,
22737,
350,
4630,
6880,
272,... |
Name the total number of bids of the sun belt conference | CREATE TABLE table_16288 (
"Conference" text,
"# of Bids" real,
"Record" text,
"Win %" text,
"Round of 32" real,
"Sweet Sixteen" real,
"Elite Eight" real,
"Final Four" real,
"Championship Game" real
) | SELECT COUNT("# of Bids") FROM table_16288 WHERE "Conference" = 'Sun Belt' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2938,
357,
4060,
41,
96,
4302,
11788,
121,
1499,
6,
96,
4663,
13,
2106,
26,
7,
121,
490,
6,
96,
1649,
7621,
121,
1499,
6,
96,
18455,
3,
1454,
121,
1499,
6,
96,
448,
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,
2847,
17161,
599,
121,
4663,
13,
2106,
26,
7,
8512,
21680,
953,
834,
2938,
357,
4060,
549,
17444,
427,
96,
4302,
11788,
121,
3274,
3,
31,
134,
202,
18845,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Who was in lane 6 with a mark of 2:05.58 SB? | CREATE TABLE table_name_84 (
name VARCHAR,
lane VARCHAR,
mark VARCHAR
) | SELECT name FROM table_name_84 WHERE lane = 6 AND mark = "2:05.58 sb" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4608,
41,
564,
584,
4280,
28027,
6,
3,
8102,
584,
4280,
28027,
6,
3946,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
16,
3,
8102,
431,
28,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
564,
21680,
953,
834,
4350,
834,
4608,
549,
17444,
427,
3,
8102,
3274,
431,
3430,
3946,
3274,
96,
357,
10,
3076,
5,
3449,
3,
7,
115,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
how many patients are procedured with icd9 code 5187? | 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 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
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.icd9_code = "5187" | [
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,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
how many companies have at least 200 billion in revenue for oil and gas ? | CREATE TABLE table_203_83 (
id number,
"ranking" number,
"company" text,
"industry" text,
"revenue (usd billions)" text,
"fy" text,
"capitalization (usd billions)" text,
"employees" number,
"listing" text,
"headquarters" text,
"ceo" text
) | SELECT COUNT("company") FROM table_203_83 WHERE "revenue (usd billions)" > 200 AND "industry" = 'oil and gas' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
4591,
41,
3,
23,
26,
381,
6,
96,
6254,
53,
121,
381,
6,
96,
29179,
121,
1499,
6,
96,
13580,
7,
8224,
121,
1499,
6,
96,
60,
15098,
41,
302,
26,
2108,
7,
61... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
29179,
8512,
21680,
953,
834,
23330,
834,
4591,
549,
17444,
427,
96,
60,
15098,
41,
302,
26,
2108,
7,
61,
121,
2490,
2382,
3430,
96,
13580,
7,
8224,
121,
3274,
3,
31,
32,
173,
11,
1807,
31,
... |
In what venue was the result a draw? | CREATE TABLE table_67799 (
"Date" text,
"Home captain" text,
"Away captain" text,
"Venue" text,
"Result" text
) | SELECT "Venue" FROM table_67799 WHERE "Result" = 'draw' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3708,
940,
3264,
41,
96,
308,
342,
121,
1499,
6,
96,
19040,
14268,
121,
1499,
6,
96,
188,
1343,
14268,
121,
1499,
6,
96,
553,
35,
76,
15,
121,
1499,
6,
96,
20119,
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,
0... | [
3,
23143,
14196,
96,
553,
35,
76,
15,
121,
21680,
953,
834,
3708,
940,
3264,
549,
17444,
427,
96,
20119,
121,
3274,
3,
31,
19489,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the lowest number of laps with a time/retired of +38.426? | CREATE TABLE table_name_62 (
laps INTEGER,
time_retired VARCHAR
) | SELECT MIN(laps) FROM table_name_62 WHERE time_retired = "+38.426" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4056,
41,
14941,
7,
3,
21342,
17966,
6,
97,
834,
10682,
1271,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
7402,
381,
13,
14941,
7,
28,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8478,
7,
61,
21680,
953,
834,
4350,
834,
4056,
549,
17444,
427,
97,
834,
10682,
1271,
3274,
96,
1220,
3747,
5,
591,
2688,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What time was achieved on Saturday 29th August by the rider who recorded 23' 18.82 97.102mph on Tuesday 25th August? | CREATE TABLE table_23465864_4 (
sat_29_aug VARCHAR,
tues_25_aug VARCHAR
) | SELECT sat_29_aug FROM table_23465864_4 WHERE tues_25_aug = "23' 18.82 97.102mph" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2773,
4448,
3449,
4389,
834,
591,
41,
3,
7,
144,
834,
3166,
834,
402,
122,
584,
4280,
28027,
6,
3,
17,
76,
15,
7,
834,
1828,
834,
402,
122,
584,
4280,
28027,
3,
61,
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,
1... | [
3,
23143,
14196,
3,
7,
144,
834,
3166,
834,
402,
122,
21680,
953,
834,
2773,
4448,
3449,
4389,
834,
591,
549,
17444,
427,
3,
17,
76,
15,
7,
834,
1828,
834,
402,
122,
3274,
96,
2773,
31,
12265,
4613,
3,
4327,
5,
14388,
7656,
121,... |
What were the years that the building at 200 sw harrison was considered to be the tallest building? | CREATE TABLE table_name_3 (
years_as_tallest VARCHAR,
street_address VARCHAR
) | SELECT years_as_tallest FROM table_name_3 WHERE street_address = "200 sw harrison" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
519,
41,
203,
834,
9,
7,
834,
17,
1748,
222,
584,
4280,
28027,
6,
2815,
834,
9,
26,
12039,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
130,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
203,
834,
9,
7,
834,
17,
1748,
222,
21680,
953,
834,
4350,
834,
519,
549,
17444,
427,
2815,
834,
9,
26,
12039,
3274,
96,
3632,
3,
7,
210,
3,
3272,
23790,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
How many characters does Maurice Dean Wint play in the movie Cube? | CREATE TABLE table_31091 (
"Name" text,
"Occupation" text,
"Gender" text,
"Prison connection" text,
"Played by" text,
"Status" text
) | SELECT COUNT("Status") FROM table_31091 WHERE "Played by" = 'Maurice Dean Wint' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
19947,
4729,
41,
96,
23954,
121,
1499,
6,
96,
667,
75,
4658,
257,
121,
1499,
6,
96,
517,
3868,
121,
1499,
6,
96,
7855,
739,
2135,
121,
1499,
6,
96,
15800,
15,
26,
57,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
134,
17,
144,
302,
8512,
21680,
953,
834,
19947,
4729,
549,
17444,
427,
96,
15800,
15,
26,
57,
121,
3274,
3,
31,
19059,
867,
12738,
4871,
17,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
On what surface did they play the match in the week of October 21? | CREATE TABLE table_44688 (
"Tournament" text,
"Surface" text,
"Week" text,
"Winner and score" text,
"Finalist" text,
"Semifinalists" text
) | SELECT "Surface" FROM table_44688 WHERE "Week" = 'october 21' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
4448,
4060,
41,
96,
382,
1211,
20205,
17,
121,
1499,
6,
96,
134,
450,
4861,
121,
1499,
6,
96,
518,
10266,
121,
1499,
6,
96,
18455,
687,
11,
2604,
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,
134,
450,
4861,
121,
21680,
953,
834,
591,
4448,
4060,
549,
17444,
427,
96,
518,
10266,
121,
3274,
3,
31,
32,
75,
235,
1152,
1401,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
The Estevan Bruins (WCHL) are affiliated with what NHL team? | CREATE TABLE table_name_51 (nhl_team VARCHAR, college_junior_club_team VARCHAR) | SELECT nhl_team FROM table_name_51 WHERE college_junior_club_team = "estevan bruins (wchl)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5553,
41,
29,
107,
40,
834,
11650,
584,
4280,
28027,
6,
1900,
834,
6959,
23,
127,
834,
13442,
834,
11650,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
37,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
3,
23143,
14196,
3,
29,
107,
40,
834,
11650,
21680,
953,
834,
4350,
834,
5553,
549,
17444,
427,
1900,
834,
6959,
23,
127,
834,
13442,
834,
11650,
3274,
96,
2613,
2132,
3,
115,
23162,
41,
210,
524,
40,
61,
121,
1,
-100,
-100,
-100,... |
How many sacks have 72 as the solo and a TTkl less than 112? | CREATE TABLE table_name_69 (sacks VARCHAR, solo VARCHAR, ttkl VARCHAR) | SELECT COUNT(sacks) FROM table_name_69 WHERE solo = 72 AND ttkl < 112 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3951,
41,
15525,
7,
584,
4280,
28027,
6,
6729,
584,
4280,
28027,
6,
3,
17,
17,
157,
40,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
3,
15525,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2847,
17161,
599,
15525,
7,
61,
21680,
953,
834,
4350,
834,
3951,
549,
17444,
427,
6729,
3274,
9455,
3430,
3,
17,
17,
157,
40,
3,
2,
850,
357,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
what type was joined in 1902 5? | CREATE TABLE table_28513 (
"Institution" text,
"Location" text,
"Founded" real,
"Type" text,
"Enrollment" real,
"Nickname" text,
"Joined" text
) | SELECT "Type" FROM table_28513 WHERE "Joined" = '1902 5' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
4433,
2368,
41,
96,
1570,
17448,
121,
1499,
6,
96,
434,
32,
75,
257,
121,
1499,
6,
96,
20100,
121,
490,
6,
96,
25160,
121,
1499,
6,
96,
8532,
4046,
297,
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,
96,
25160,
121,
21680,
953,
834,
357,
4433,
2368,
549,
17444,
427,
96,
683,
32,
630,
26,
121,
3274,
3,
31,
11776,
357,
305,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What nation has a bronze of 2 with a total less than 5 and rank of 6? | CREATE TABLE table_41455 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT "Nation" FROM table_41455 WHERE "Bronze" = '2' AND "Total" < '5' AND "Rank" = '6' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
2534,
3769,
41,
96,
22557,
121,
1499,
6,
96,
567,
257,
121,
1499,
6,
96,
23576,
121,
490,
6,
96,
134,
173,
624,
121,
490,
6,
96,
22780,
29,
776,
121,
490,
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,
567,
257,
121,
21680,
953,
834,
591,
2534,
3769,
549,
17444,
427,
96,
22780,
29,
776,
121,
3274,
3,
31,
357,
31,
3430,
96,
3696,
1947,
121,
3,
2,
3,
31,
755,
31,
3430,
96,
22557,
121,
3274,
3,
31,
948,
31,... |
when was the first time that patient 006-62367 was diagnosed with a leukocytosis? | CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
) | SELECT diagnosis.diagnosistime FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-62367')) AND diagnosis.diagnosisname = 'leukocytosis' ORDER BY diagnosis.diagnosistime LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
583,
41,
583,
23,
26,
381,
6,
775,
12417,
1499,
6,
1868,
15878,
3734,
21545,
23,
26,
381,
6,
605,
6137,
1499,
6,
605,
23,
26,
381,
6,
1567,
715,
97,
6,
583,
381,
3,
61,
3,
3210... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8209,
5,
25930,
4844,
159,
715,
21680,
8209,
549,
17444,
427,
8209,
5,
10061,
15129,
21545,
23,
26,
3388,
41,
23143,
14196,
1868,
5,
10061,
15129,
21545,
23,
26,
21680,
1868,
549,
17444,
427,
1868,
5,
10061,
15878,
37... |
What is the tournament when 2012 is q2? | CREATE TABLE table_name_64 (tournament VARCHAR) | SELECT tournament FROM table_name_64 WHERE 2012 = "q2" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4389,
41,
17,
1211,
20205,
17,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
5892,
116,
1673,
19,
3,
1824,
357,
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,
5892,
21680,
953,
834,
4350,
834,
4389,
549,
17444,
427,
1673,
3274,
96,
1824,
357,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Find the number of the 'date became customers' of the customers whose ID is between 10 and 20. | CREATE TABLE Products (
product_id INTEGER,
product_details VARCHAR(255)
)
CREATE TABLE Customer_Addresses (
customer_id INTEGER,
address_id INTEGER,
date_address_from DATETIME,
address_type VARCHAR(15),
date_address_to DATETIME
)
CREATE TABLE Customer_Orders (
order_id INTEGER,
customer_id INTEGER,
order_status VARCHAR(15),
order_date DATETIME,
order_details VARCHAR(255)
)
CREATE TABLE Addresses (
address_id INTEGER,
address_content VARCHAR(80),
city VARCHAR(50),
zip_postcode VARCHAR(20),
state_province_county VARCHAR(50),
country VARCHAR(50),
other_address_details VARCHAR(255)
)
CREATE TABLE Customers (
customer_id INTEGER,
payment_method VARCHAR(15),
customer_name VARCHAR(80),
date_became_customer DATETIME,
other_customer_details VARCHAR(255)
)
CREATE TABLE Customer_Contact_Channels (
customer_id INTEGER,
channel_code VARCHAR(15),
active_from_date DATETIME,
active_to_date DATETIME,
contact_number VARCHAR(50)
)
CREATE TABLE Order_Items (
order_id INTEGER,
product_id INTEGER,
order_quantity VARCHAR(15)
) | SELECT date_became_customer, COUNT(date_became_customer) FROM Customers WHERE customer_id BETWEEN 10 AND 20 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7554,
41,
556,
834,
23,
26,
3,
21342,
17966,
6,
556,
834,
221,
5756,
7,
584,
4280,
28027,
599,
25502,
61,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
7327,
834,
20773... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
833,
834,
346,
6527,
15,
834,
25697,
49,
6,
2847,
17161,
599,
5522,
834,
346,
6527,
15,
834,
25697,
49,
61,
21680,
16423,
549,
17444,
427,
884,
834,
23,
26,
272,
7969,
518,
23394,
335,
3430,
460,
1,
-100,
-100,
-1... |
Who is every player with a height of 6-5? | CREATE TABLE table_22824297_1 (player VARCHAR, height VARCHAR) | SELECT player FROM table_22824297_1 WHERE height = "6-5" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2884,
4613,
4165,
4327,
834,
536,
41,
20846,
584,
4280,
28027,
6,
3902,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
19,
334,
1959,
28,
3,
9,
3902,
13,
431,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1959,
21680,
953,
834,
2884,
4613,
4165,
4327,
834,
536,
549,
17444,
427,
3902,
3274,
96,
948,
18,
17395,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Return all the apartment numbers sorted by the room count in ascending order. | CREATE TABLE Apartments (
apt_number VARCHAR,
room_count VARCHAR
) | SELECT apt_number FROM Apartments ORDER BY room_count | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
15970,
7,
41,
3,
6789,
834,
5525,
1152,
584,
4280,
28027,
6,
562,
834,
13362,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
9778,
66,
8,
4579,
2302,
3,
14504,
57,
8,
562,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3,
6789,
834,
5525,
1152,
21680,
15970,
7,
4674,
11300,
272,
476,
562,
834,
13362,
1,
-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 lowest avg/g that has 2-9-0 for the att-cmp-int? | CREATE TABLE table_name_16 (
avg_g INTEGER,
att_cmp_int VARCHAR
) | SELECT MIN(avg_g) FROM table_name_16 WHERE att_cmp_int = "2-9-0" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2938,
41,
3,
9,
208,
122,
834,
122,
3,
21342,
17966,
6,
44,
17,
834,
75,
1167,
834,
77,
17,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
9,
208,
122,
834,
122,
61,
21680,
953,
834,
4350,
834,
2938,
549,
17444,
427,
44,
17,
834,
75,
1167,
834,
77,
17,
3274,
96,
357,
7141,
18,
632,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.