NATURAL_LANG stringlengths 0 446 | SCHEMA stringlengths 27 2.21k | SQL stringlengths 18 453 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|
find the number of widow patients who had insertion of 2 vascular stents. | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE 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
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "WIDOWED" AND procedures.short_title = "Insert 2 vascular stents" | [
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,... |
Which Venue has an Away team of south melbourne? | CREATE TABLE table_name_89 (
venue VARCHAR,
away_team VARCHAR
) | SELECT venue FROM table_name_89 WHERE away_team = "south melbourne" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3914,
41,
5669,
584,
4280,
28027,
6,
550,
834,
11650,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
29940,
65,
46,
71,
1343,
372,
13,
3414,
3,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5669,
21680,
953,
834,
4350,
834,
3914,
549,
17444,
427,
550,
834,
11650,
3274,
96,
7,
670,
107,
3,
2341,
26255,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the Score of T2 Place Player Dow Finsterwald? | CREATE TABLE table_name_12 (score VARCHAR, place VARCHAR, player VARCHAR) | SELECT score FROM table_name_12 WHERE place = "t2" AND player = "dow finsterwald" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2122,
41,
7,
9022,
584,
4280,
28027,
6,
286,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
17763,
13,
332,
357,
339... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2604,
21680,
953,
834,
4350,
834,
2122,
549,
17444,
427,
286,
3274,
96,
17,
357,
121,
3430,
1959,
3274,
96,
15198,
2202,
1370,
11611,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What regulations have carlos arzani as the winning driver? | CREATE TABLE table_name_13 (
regulations VARCHAR,
winning_drivers VARCHAR
) | SELECT regulations FROM table_name_13 WHERE winning_drivers = "carlos arzani" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2368,
41,
4750,
584,
4280,
28027,
6,
3447,
834,
13739,
52,
7,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
4750,
43,
443,
2298,
1584,
10241,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4750,
21680,
953,
834,
4350,
834,
2368,
549,
17444,
427,
3447,
834,
13739,
52,
7,
3274,
96,
1720,
2298,
1584,
10241,
23,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
List all dates of succession in the state class Missouri (3). | CREATE TABLE table_2417330_3 (
date_of_successors_formal_installation VARCHAR,
state__class_ VARCHAR
) | SELECT date_of_successors_formal_installation FROM table_2417330_3 WHERE state__class_ = "Missouri (3)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2266,
2517,
17225,
834,
519,
41,
833,
834,
858,
834,
7,
17431,
24901,
7,
834,
2032,
138,
834,
14790,
584,
4280,
28027,
6,
538,
834,
834,
4057,
834,
584,
4280,
28027,
3,
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,
0,
0,
0... | [
3,
23143,
14196,
833,
834,
858,
834,
7,
17431,
24901,
7,
834,
2032,
138,
834,
14790,
21680,
953,
834,
2266,
2517,
17225,
834,
519,
549,
17444,
427,
538,
834,
834,
4057,
834,
3274,
96,
329,
159,
7,
32,
459,
10153,
121,
1,
-100,
-10... |
Which urban sub-area has a population of 16,140? | CREATE TABLE table_name_58 (
urban_sub_area VARCHAR,
population VARCHAR
) | SELECT urban_sub_area FROM table_name_58 WHERE population = "16,140" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3449,
41,
4150,
834,
7304,
834,
498,
584,
4280,
28027,
6,
2074,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
4150,
769,
18,
498,
65,
3,
9,
2074,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4150,
834,
7304,
834,
498,
21680,
953,
834,
4350,
834,
3449,
549,
17444,
427,
2074,
3274,
96,
2938,
6,
22012,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Which year has 112 laps? | CREATE TABLE table_56671 (
"Year" text,
"Start" text,
"Qual" text,
"Rank" text,
"Finish" text,
"Laps" real
) | SELECT "Year" FROM table_56671 WHERE "Laps" = '112' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4834,
3708,
536,
41,
96,
476,
2741,
121,
1499,
6,
96,
7681,
17,
121,
1499,
6,
96,
5991,
138,
121,
1499,
6,
96,
22557,
121,
1499,
6,
96,
371,
77,
1273,
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,
476,
2741,
121,
21680,
953,
834,
4834,
3708,
536,
549,
17444,
427,
96,
3612,
102,
7,
121,
3274,
3,
31,
2596,
357,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the primary disease and procedure of the patient id 12220? | 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 demographic.diagnosis, procedures.long_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "12220" | [
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,
25930,
4844,
159,
6,
4293,
5,
2961,
834,
21869,
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,
427,
14798,
5,
73... |
mention the time of admission and disgnosis short title of the patient robert clayton? | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT demographic.admittime, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Robert Clayton" | [
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,
14798,
5,
20466,
17,
715,
6,
18730,
7,
5,
7,
14184,
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,
4... |
Which channel has Joel Meyers as the Play by play commentator? | CREATE TABLE table_name_71 (channel VARCHAR, play_by_play VARCHAR) | SELECT channel FROM table_name_71 WHERE play_by_play = "joel meyers" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4450,
41,
19778,
584,
4280,
28027,
6,
577,
834,
969,
834,
4895,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
4245,
65,
22943,
19191,
7,
38,
8,
2911,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4245,
21680,
953,
834,
4350,
834,
4450,
549,
17444,
427,
577,
834,
969,
834,
4895,
3274,
96,
1927,
15,
40,
140,
63,
277,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the lowest number of Gold, when the number of Bronze is less than 36, when the Rank is 2, and when Silver is less than 37? | CREATE TABLE table_name_97 (
gold INTEGER,
silver VARCHAR,
bronze VARCHAR,
rank VARCHAR
) | SELECT MIN(gold) FROM table_name_97 WHERE bronze < 36 AND rank = "2" AND silver < 37 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4327,
41,
2045,
3,
21342,
17966,
6,
4294,
584,
4280,
28027,
6,
13467,
584,
4280,
28027,
6,
11003,
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,
14910,
61,
21680,
953,
834,
4350,
834,
4327,
549,
17444,
427,
13467,
3,
2,
4475,
3430,
11003,
3274,
96,
357,
121,
3430,
4294,
3,
2,
6862,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What was the population of a county in 1960 that had a population of 467,052 in 2000 and 78,812 in 2040? | CREATE TABLE table_74648 (
"Rank" text,
"County" text,
"Population (1960)" real,
"Population (2000)" real,
"Population (2040)" real
) | SELECT AVG("Population (1960)") FROM table_74648 WHERE "Population (2000)" > '467,052' AND "Population (2040)" = '78,812' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
940,
4448,
3707,
41,
96,
22557,
121,
1499,
6,
96,
10628,
63,
121,
1499,
6,
96,
27773,
7830,
2863,
3328,
61,
121,
490,
6,
96,
27773,
7830,
3,
31804,
121,
490,
6,
96,
27773... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
121,
27773,
7830,
2863,
3328,
61,
8512,
21680,
953,
834,
940,
4448,
3707,
549,
17444,
427,
96,
27773,
7830,
3,
31804,
121,
2490,
3,
31,
591,
3708,
6,
3076,
357,
31,
3430,
96,
27773,
7830,
17543,
2445... |
Which players were born in 1983 and play as forward position? | CREATE TABLE table_26245 (
"No" real,
"Player" text,
"Height (m)" text,
"Height (f)" text,
"Position" text,
"Year born" real,
"Current Club" text
) | SELECT "Player" FROM table_26245 WHERE "Year born" = '1983' AND "Position" = 'Forward' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2688,
357,
2128,
41,
96,
4168,
121,
490,
6,
96,
15800,
49,
121,
1499,
6,
96,
3845,
2632,
41,
51,
61,
121,
1499,
6,
96,
3845,
2632,
41,
89,
61,
121,
1499,
6,
96,
345,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
15800,
49,
121,
21680,
953,
834,
2688,
357,
2128,
549,
17444,
427,
96,
476,
2741,
2170,
121,
3274,
3,
31,
2294,
4591,
31,
3430,
96,
345,
32,
7,
4749,
121,
3274,
3,
31,
3809,
2239,
31,
1,
-100,
-100,
-100,
-1... |
Which date has a Race Title of dhl turkish grand prix? | CREATE TABLE table_name_40 (
date VARCHAR,
race_title VARCHAR
) | SELECT date FROM table_name_40 WHERE race_title = "dhl turkish grand prix" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2445,
41,
833,
584,
4280,
28027,
6,
1964,
834,
21869,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
833,
65,
3,
9,
10949,
11029,
13,
3,
26,
107,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
833,
21680,
953,
834,
4350,
834,
2445,
549,
17444,
427,
1964,
834,
21869,
3274,
96,
26,
107,
40,
3,
2905,
157,
1273,
1907,
3407,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
List all dates where South Florida was a visiting team. | CREATE TABLE table_26842217_6 (
date VARCHAR,
visiting_team VARCHAR
) | SELECT date FROM table_26842217_6 WHERE visiting_team = "South Florida" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2688,
4608,
2884,
2517,
834,
948,
41,
833,
584,
4280,
28027,
6,
3644,
834,
11650,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
6792,
66,
5128,
213,
1013,
2599,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
833,
21680,
953,
834,
2688,
4608,
2884,
2517,
834,
948,
549,
17444,
427,
3644,
834,
11650,
3274,
96,
22081,
2599,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Are there integrated secondary schools in Uri? | CREATE TABLE table_22253 (
"Canton" text,
"Years of Kindergarten" real,
"Years of Kindergarten provided" text,
"Years of Kindergarten legally required" text,
"Length of Primary School" real,
"Length of mandatory Secondary School" real,
"Separate Secondary Schools?" text,
"Cooperative Secondary Schools?" text,
"Integrated Secondary Schools?" text
) | SELECT "Integrated Secondary Schools?" FROM table_22253 WHERE "Canton" = 'Uri' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26144,
4867,
41,
96,
254,
9,
6992,
121,
1499,
6,
96,
476,
2741,
7,
13,
24758,
121,
490,
6,
96,
476,
2741,
7,
13,
24758,
937,
121,
1499,
6,
96,
476,
2741,
7,
13,
24758,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
22259,
24420,
13255,
4609,
21680,
953,
834,
26144,
4867,
549,
17444,
427,
96,
254,
9,
6992,
121,
3274,
3,
31,
1265,
52,
23,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What are the different cities where students live? | CREATE TABLE students (
student_id number,
student_details text
)
CREATE TABLE people (
person_id number,
first_name text,
middle_name text,
last_name text,
cell_mobile_number text,
email_address text,
login_name text,
password text
)
CREATE TABLE people_addresses (
person_address_id number,
person_id number,
address_id number,
date_from time,
date_to time
)
CREATE TABLE student_course_registrations (
student_id number,
course_id number,
registration_date time
)
CREATE TABLE courses (
course_id text,
course_name text,
course_description text,
other_details text
)
CREATE TABLE student_course_attendance (
student_id number,
course_id number,
date_of_attendance time
)
CREATE TABLE addresses (
address_id number,
line_1 text,
line_2 text,
city text,
zip_postcode text,
state_province_county text,
country text
)
CREATE TABLE candidates (
candidate_id number,
candidate_details text
)
CREATE TABLE candidate_assessments (
candidate_id number,
qualification text,
assessment_date time,
asessment_outcome_code text
) | SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id JOIN students AS T3 ON T2.person_id = T3.student_id | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
481,
41,
1236,
834,
23,
26,
381,
6,
1236,
834,
221,
5756,
7,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
151,
41,
568,
834,
23,
26,
381,
6,
166,
834,
4350,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
332,
5411,
6726,
21680,
7181,
6157,
332,
536,
3,
15355,
3162,
151,
834,
9,
26,
12039,
15,
7,
6157,
332,
357,
9191,
332,
5411,
9,
26,
12039,
834,
23,
26,
3274,
332,
4416,
9,
26,
12039,
834,
... |
How many episodes have a weekly rank tba and are broadcast at 8:00 p.m.? | CREATE TABLE table_20534 (
"#" real,
"Air Date" text,
"Timeslot" text,
"Rating" text,
"Share" real,
"18-49" text,
"Viewers" text,
"Weekly Rank" text
) | SELECT COUNT("#") FROM table_20534 WHERE "Weekly Rank" = 'TBA' AND "Timeslot" = '8:00 P.M.' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23201,
3710,
41,
96,
4663,
121,
490,
6,
96,
20162,
7678,
121,
1499,
6,
96,
13368,
7,
3171,
121,
1499,
6,
96,
448,
1014,
121,
1499,
6,
96,
24501,
121,
490,
6,
96,
2606,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8512,
21680,
953,
834,
23201,
3710,
549,
17444,
427,
96,
518,
10266,
120,
3,
22557,
121,
3274,
3,
31,
9041,
188,
31,
3430,
96,
13368,
7,
3171,
121,
3274,
3,
31,
15692,
276,
5,
329,
5,
... |
What was the world rank by THE-WUR in 2013 of the university whose world rank by QS in 2013 was 113th? | CREATE TABLE table_29539 (
"Members" text,
"Country" text,
"Year Established" real,
"World Rank by THE-WUR , 2013" text,
"World Rank by ARWU , 2013" text,
"World Rank by QS , 2013" text
) | SELECT "World Rank by THE-WUR , 2013" FROM table_29539 WHERE "World Rank by QS , 2013" = '113th' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
3301,
3288,
41,
96,
329,
18247,
7,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
476,
2741,
25275,
121,
490,
6,
96,
17954,
3,
22557,
57,
1853,
18,
518,
5905,
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,
17954,
3,
22557,
57,
1853,
18,
518,
5905,
3,
6,
2038,
121,
21680,
953,
834,
357,
3301,
3288,
549,
17444,
427,
96,
17954,
3,
22557,
57,
1593,
134,
3,
6,
2038,
121,
3274,
3,
31,
20522,
189,
31,
1,
-100,
-100,
... |
What was the to winnning team when the tu winning team was #16 2002? | CREATE TABLE table_13657883_2 (to_winning_team VARCHAR, tu_winning_team VARCHAR) | SELECT to_winning_team FROM table_13657883_2 WHERE tu_winning_team = "#16 2002" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
536,
10402,
3940,
4591,
834,
357,
41,
235,
834,
8163,
834,
11650,
584,
4280,
28027,
6,
3,
17,
76,
834,
8163,
834,
11650,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
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,
0,
0... | [
3,
23143,
14196,
12,
834,
8163,
834,
11650,
21680,
953,
834,
536,
10402,
3940,
4591,
834,
357,
549,
17444,
427,
3,
17,
76,
834,
8163,
834,
11650,
3274,
96,
4663,
2938,
4407,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
For those employees who do not work in departments with managers that have ids between 100 and 200, give me the comparison about commission_pct over the last_name , list by the X-axis in desc. | CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
) | SELECT LAST_NAME, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY LAST_NAME DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1652,
41,
262,
5244,
5017,
476,
5080,
834,
4309,
7908,
1982,
599,
11071,
632,
201,
30085,
834,
567,
17683,
3,
4331,
4059,
599,
1755,
201,
301,
12510,
834,
567,
17683,
3,
4331,
4059,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
301,
12510,
834,
567,
17683,
6,
3,
6657,
329,
16994,
9215,
834,
4051,
382,
21680,
1652,
549,
17444,
427,
4486,
3396,
19846,
11810,
834,
4309,
3388,
41,
23143,
14196,
3396,
19846,
11810,
834,
4309,
21680,
10521,
549,
174... |
Who is the incumbent in the Alabama 6 voting district? | CREATE TABLE table_18467 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | SELECT "Incumbent" FROM table_18467 WHERE "District" = 'Alabama 6' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
25987,
3708,
41,
96,
308,
23,
20066,
121,
1499,
6,
96,
1570,
75,
5937,
295,
121,
1499,
6,
96,
13725,
63,
121,
1499,
6,
96,
25171,
8160,
121,
490,
6,
96,
20119,
121,
1499,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
1570,
75,
5937,
295,
121,
21680,
953,
834,
25987,
3708,
549,
17444,
427,
96,
308,
23,
20066,
121,
3274,
3,
31,
188,
9339,
265,
9,
431,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Which ordinary value has a Russian value of ? | CREATE TABLE table_name_64 (
ordinary_value VARCHAR,
russian VARCHAR
) | SELECT ordinary_value FROM table_name_64 WHERE russian = "унция" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4389,
41,
9495,
834,
12097,
584,
4280,
28027,
6,
3,
26165,
29,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
9495,
701,
65,
3,
9,
4263,
701,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
9495,
834,
12097,
21680,
953,
834,
4350,
834,
4389,
549,
17444,
427,
3,
26165,
29,
3274,
96,
3700,
7184,
2,
2795,
2,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What's the black with 24 moves in the dortmund tournament? | CREATE TABLE table_name_56 (
black VARCHAR,
moves VARCHAR,
tournament VARCHAR
) | SELECT black FROM table_name_56 WHERE moves = 24 AND tournament = "dortmund" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4834,
41,
1001,
584,
4280,
28027,
6,
6914,
584,
4280,
28027,
6,
5892,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
31,
7,
8,
1001,
28,
997,
6914,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
21680,
953,
834,
4350,
834,
4834,
549,
17444,
427,
6914,
3274,
997,
3430,
5892,
3274,
96,
26,
127,
17,
51,
1106,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
When was the last game that had a time of 2:46 and attendance of more than 57,533? | CREATE TABLE table_name_27 (game INTEGER, time VARCHAR, attendance VARCHAR) | SELECT MAX(game) FROM table_name_27 WHERE time = "2:46" AND attendance > 57 OFFSET 533 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2555,
41,
7261,
3,
21342,
17966,
6,
97,
584,
4280,
28027,
6,
11364,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
366,
47,
8,
336,
467,
24,
141,
3,
9,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
7261,
61,
21680,
953,
834,
4350,
834,
2555,
549,
17444,
427,
97,
3274,
96,
357,
10,
4448,
121,
3430,
11364,
2490,
3,
3436,
3,
15316,
20788,
305,
4201,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What was the largest ethnic group in in the settlement with the cyrillic name банатски карловац? | CREATE TABLE table_2562572_44 (largest_ethnic_group__2002_ VARCHAR, cyrillic_name_other_names VARCHAR) | SELECT largest_ethnic_group__2002_ FROM table_2562572_44 WHERE cyrillic_name_other_names = "Банатски Карловац" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
19337,
1828,
5865,
834,
3628,
41,
15599,
7,
17,
834,
15,
189,
2532,
834,
10739,
834,
834,
24898,
834,
584,
4280,
28027,
6,
3,
75,
63,
52,
173,
2176,
834,
4350,
834,
9269,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2015,
834,
15,
189,
2532,
834,
10739,
834,
834,
24898,
834,
21680,
953,
834,
19337,
1828,
5865,
834,
3628,
549,
17444,
427,
3,
75,
63,
52,
173,
2176,
834,
4350,
834,
9269,
834,
4350,
7,
3274,
96,
2,
25873,
22581,
... |
What is the yield in NTS Area U2R when the purpose is weapons development? | CREATE TABLE table_name_69 (
yield VARCHAR,
purpose VARCHAR,
location VARCHAR
) | SELECT yield FROM table_name_69 WHERE purpose = "weapons development" AND location = "nts area u2r" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3951,
41,
6339,
584,
4280,
28027,
6,
1730,
584,
4280,
28027,
6,
1128,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
6339,
16,
445,
4578,
56... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6339,
21680,
953,
834,
4350,
834,
3951,
549,
17444,
427,
1730,
3274,
96,
1123,
9,
5041,
7,
606,
121,
3430,
1128,
3274,
96,
29,
17,
7,
616,
3,
76,
357,
52,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
has patient 027-203413 undergone a surgical resection for cancer treatment? | 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 intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
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 allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
) | SELECT COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-203413')) AND treatment.treatmentname = 'surgical resection for cancer' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1868,
41,
775,
12417,
1499,
6,
1868,
15878,
3734,
21545,
23,
26,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
7285,
1499,
6,
1246,
1499,
6,
11655,
485,
1499,
6,
2833,
23,
26,
381,
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,
1935,
61,
2490,
3,
632,
21680,
1058,
549,
17444,
427,
1058,
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,... |
What team had 10 Labs and the Driver was Alex Yoong? | CREATE TABLE table_name_24 (team VARCHAR, laps VARCHAR, driver VARCHAR) | SELECT team FROM table_name_24 WHERE laps = 10 AND driver = "alex yoong" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2266,
41,
11650,
584,
4280,
28027,
6,
14941,
7,
584,
4280,
28027,
6,
2535,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
372,
141,
335,
8100,
7,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
372,
21680,
953,
834,
4350,
834,
2266,
549,
17444,
427,
14941,
7,
3274,
335,
3430,
2535,
3274,
96,
138,
994,
3,
63,
32,
2444,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is Player, when Country is "United States", and when Total is "154"? | CREATE TABLE table_name_48 (player VARCHAR, country VARCHAR, total VARCHAR) | SELECT player FROM table_name_48 WHERE country = "united states" AND total = "154" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3707,
41,
20846,
584,
4280,
28027,
6,
684,
584,
4280,
28027,
6,
792,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
12387,
6,
116,
6993,
19,
96,
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1959,
21680,
953,
834,
4350,
834,
3707,
549,
17444,
427,
684,
3274,
96,
15129,
15,
26,
2315,
121,
3430,
792,
3274,
96,
27308,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
When Nashville was the visiting team what was the lowest Attendance shown? | CREATE TABLE table_name_34 (attendance INTEGER, visitor VARCHAR) | SELECT MIN(attendance) FROM table_name_34 WHERE visitor = "nashville" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3710,
41,
15116,
663,
3,
21342,
17966,
6,
7019,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
366,
17659,
47,
8,
3644,
372,
125,
47,
8,
7402,
22497,
663,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3,
17684,
599,
15116,
663,
61,
21680,
953,
834,
4350,
834,
3710,
549,
17444,
427,
7019,
3274,
96,
29,
3198,
1420,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Show the stars of each director by a bar chart, and could you order stars in asc order? | CREATE TABLE Rating (
rID int,
mID int,
stars int,
ratingDate date
)
CREATE TABLE Movie (
mID int,
title text,
year int,
director text
)
CREATE TABLE Reviewer (
rID int,
name text
) | SELECT director, stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID ORDER BY stars | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
21662,
41,
3,
52,
4309,
16,
17,
6,
3,
51,
4309,
16,
17,
6,
4811,
16,
17,
6,
5773,
308,
342,
833,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
10743,
41,
3,
51,
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,
2090,
6,
4811,
21680,
21662,
6157,
332,
536,
3,
15355,
3162,
10743,
6157,
332,
357,
9191,
332,
5411,
51,
4309,
3274,
332,
4416,
51,
4309,
4674,
11300,
272,
476,
4811,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
which bridge has their location in summit , delaware ? | CREATE TABLE table_201_14 (
id number,
"crossing" text,
"carries" text,
"location" text,
"coordinates" text
) | SELECT "crossing" FROM table_201_14 WHERE "location" = 'summit, delaware' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
22772,
834,
2534,
41,
3,
23,
26,
381,
6,
96,
11465,
53,
121,
1499,
6,
96,
11078,
121,
1499,
6,
96,
14836,
121,
1499,
6,
96,
509,
21122,
7,
121,
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,
0... | [
3,
23143,
14196,
96,
11465,
53,
121,
21680,
953,
834,
22772,
834,
2534,
549,
17444,
427,
96,
14836,
121,
3274,
3,
31,
4078,
1538,
6,
20,
4207,
355,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Show the title and publication dates of books. | CREATE TABLE book (
book_id number,
title text,
issues number,
writer text
)
CREATE TABLE publication (
publication_id number,
book_id number,
publisher text,
publication_date text,
price number
) | SELECT T1.title, T2.publication_date FROM book AS T1 JOIN publication AS T2 ON T1.book_id = T2.book_id | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
484,
41,
484,
834,
23,
26,
381,
6,
2233,
1499,
6,
807,
381,
6,
4346,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
5707,
41,
5707,
834,
23,
26,
381,
6,
484,
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,
332,
5411,
21869,
6,
332,
4416,
15727,
257,
834,
5522,
21680,
484,
6157,
332,
536,
3,
15355,
3162,
5707,
6157,
332,
357,
9191,
332,
5411,
2567,
834,
23,
26,
3274,
332,
4416,
2567,
834,
23,
26,
1,
-100,
-100,
-100,
... |
What was the peak date of Kelis's song? | CREATE TABLE table_name_1 (
peak_date VARCHAR,
main_artist VARCHAR
) | SELECT peak_date FROM table_name_1 WHERE main_artist = "kelis" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
536,
41,
6734,
834,
5522,
584,
4280,
28027,
6,
711,
834,
1408,
343,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
6734,
833,
13,
13329,
159... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6734,
834,
5522,
21680,
953,
834,
4350,
834,
536,
549,
17444,
427,
711,
834,
1408,
343,
3274,
96,
5768,
159,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Which venue had 5000 m notes in 2009 with a 1st position? | CREATE TABLE table_name_2 (venue VARCHAR, position VARCHAR, notes VARCHAR, year VARCHAR) | SELECT venue FROM table_name_2 WHERE notes = "5000 m" AND year = 2009 AND position = "1st" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
357,
41,
15098,
584,
4280,
28027,
6,
1102,
584,
4280,
28027,
6,
3358,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
5669,
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,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
5669,
21680,
953,
834,
4350,
834,
357,
549,
17444,
427,
3358,
3274,
96,
12814,
3,
51,
121,
3430,
215,
3274,
2464,
3430,
1102,
3274,
96,
536,
7,
17,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What date has parlophone as the label, and lp as a format? | CREATE TABLE table_name_17 (date VARCHAR, label VARCHAR, format VARCHAR) | SELECT date FROM table_name_17 WHERE label = "parlophone" AND format = "lp" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2517,
41,
5522,
584,
4280,
28027,
6,
3783,
584,
4280,
28027,
6,
1910,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
833,
65,
260,
40,
32,
6399,
38,
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,
833,
21680,
953,
834,
4350,
834,
2517,
549,
17444,
427,
3783,
3274,
96,
1893,
40,
32,
6399,
121,
3430,
1910,
3274,
96,
40,
102,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
what is the winning score when the tournament is safeco classic? | CREATE TABLE table_name_73 (winning_score VARCHAR, tournament VARCHAR) | SELECT winning_score FROM table_name_73 WHERE tournament = "safeco classic" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4552,
41,
8163,
834,
7,
9022,
584,
4280,
28027,
6,
5892,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
125,
19,
8,
3447,
2604,
116,
8,
5892,
19,
1346,
509... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3447,
834,
7,
9022,
21680,
953,
834,
4350,
834,
4552,
549,
17444,
427,
5892,
3274,
96,
15233,
509,
2431,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the location of #1? | CREATE TABLE table_19943 (
"#" real,
"Season" real,
"Bowl game" text,
"Result" text,
"Opponent" text,
"Stadium" text,
"Location" text,
"Attendance" text
) | SELECT "Location" FROM table_19943 WHERE "#" = '1' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
19479,
4906,
41,
96,
4663,
121,
490,
6,
96,
134,
15,
9,
739,
121,
490,
6,
96,
279,
2381,
40,
467,
121,
1499,
6,
96,
20119,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
434,
32,
75,
257,
121,
21680,
953,
834,
19479,
4906,
549,
17444,
427,
96,
4663,
121,
3274,
3,
31,
536,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
who is the owner of fm 94.5? | CREATE TABLE table_13528 (
"Frequency" text,
"Call sign" text,
"Branding" text,
"Format" text,
"Owner" text,
"Language/Rebroadcast" text
) | SELECT "Owner" FROM table_13528 WHERE "Frequency" = 'fm 94.5' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
536,
2469,
2577,
41,
96,
371,
60,
835,
11298,
121,
1499,
6,
96,
254,
1748,
1320,
121,
1499,
6,
96,
18304,
727,
53,
121,
1499,
6,
96,
3809,
3357,
121,
1499,
6,
96,
667,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
667,
210,
687,
121,
21680,
953,
834,
536,
2469,
2577,
549,
17444,
427,
96,
371,
60,
835,
11298,
121,
3274,
3,
31,
89,
51,
668,
12451,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What country has a total larger than 293, and a to par less than 17? | CREATE TABLE table_name_79 (country VARCHAR, total VARCHAR, to_par VARCHAR) | SELECT country FROM table_name_79 WHERE total > 293 AND to_par < 17 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4440,
41,
17529,
584,
4280,
28027,
6,
792,
584,
4280,
28027,
6,
12,
834,
1893,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
684,
65,
3,
9,
792,
2186... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
684,
21680,
953,
834,
4350,
834,
4440,
549,
17444,
427,
792,
2490,
204,
4271,
3430,
12,
834,
1893,
3,
2,
1003,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
provide the number of patients whose religion is jewish and diagnoses short title is dmii wo cmp nt st uncntr? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.religion = "JEWISH" AND diagnoses.short_title = "DMII wo cmp nt st uncntr" | [
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 is the location of the match against Martinis Knyzelis? | CREATE TABLE table_54179 (
"Date" text,
"Result" text,
"Opponent" text,
"Location" text,
"Method" text
) | SELECT "Location" FROM table_54179 WHERE "Opponent" = 'martinis knyzelis' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
5062,
26593,
41,
96,
308,
342,
121,
1499,
6,
96,
20119,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
434,
32,
75,
257,
121,
1499,
6,
96,
23351,
107,
32,
26,
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,
434,
32,
75,
257,
121,
21680,
953,
834,
5062,
26593,
549,
17444,
427,
96,
667,
102,
9977,
121,
3274,
3,
31,
1635,
17,
77,
159,
3,
157,
29,
63,
4650,
159,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
when was the last battle ? | CREATE TABLE table_204_353 (
id number,
"no." number,
"date/time" text,
"aircraft" text,
"foe" text,
"result" text,
"location" text,
"notes" text
) | SELECT "date/time" FROM table_204_353 ORDER BY id DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
2469,
519,
41,
3,
23,
26,
381,
6,
96,
29,
32,
535,
381,
6,
96,
5522,
87,
715,
121,
1499,
6,
96,
2256,
6696,
121,
1499,
6,
96,
89,
32,
15,
121,
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,
96,
5522,
87,
715,
121,
21680,
953,
834,
26363,
834,
2469,
519,
4674,
11300,
272,
476,
3,
23,
26,
309,
25067,
8729,
12604,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
how many first elected with incumbent being charles edward bennett | CREATE TABLE table_1342013_9 (first_elected VARCHAR, incumbent VARCHAR) | SELECT COUNT(first_elected) FROM table_1342013_9 WHERE incumbent = "Charles Edward Bennett" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
11138,
834,
1298,
41,
14672,
834,
19971,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
149,
186,
166,
8160,
28,
28406,
271,
3,
4059,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2847,
17161,
599,
14672,
834,
19971,
61,
21680,
953,
834,
23747,
11138,
834,
1298,
549,
17444,
427,
28406,
3274,
96,
18947,
965,
8200,
23464,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the smallest withdrawn value with a GNRI greater than 172, name of Croagh Patrick and was rebuilt before 1939? | CREATE TABLE table_78000 (
"Class" text,
"GNRI No." real,
"Name" text,
"BP serial No." real,
"Rebuilt" real,
"1958" text,
"Withdrawn" real
) | SELECT MIN("Withdrawn") FROM table_78000 WHERE "GNRI No." > '172' AND "Name" = 'croagh patrick' AND "Rebuilt" < '1939' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3940,
2313,
41,
96,
21486,
121,
1499,
6,
96,
13738,
5593,
465,
535,
490,
6,
96,
23954,
121,
1499,
6,
96,
11165,
10501,
465,
535,
490,
6,
96,
1649,
16152,
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,
3,
17684,
599,
121,
15013,
19489,
29,
8512,
21680,
953,
834,
3940,
2313,
549,
17444,
427,
96,
13738,
5593,
465,
535,
2490,
3,
31,
27156,
31,
3430,
96,
23954,
121,
3274,
3,
31,
2771,
18583,
6234,
5206,
31,
3430,
96,
... |
How many people are women's singles in the season of 2000/01? | CREATE TABLE table_30407 (
"Season" text,
"Host" text,
"Mens Singles" text,
"Womens Singles" text,
"Mens Doubles" text,
"Womens Doubles" text
) | SELECT COUNT("Womens Singles") FROM table_30407 WHERE "Season" = '2000/01' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23702,
4560,
41,
96,
134,
15,
9,
739,
121,
1499,
6,
96,
566,
3481,
121,
1499,
6,
96,
329,
35,
7,
7871,
7,
121,
1499,
6,
96,
518,
32,
904,
7,
7871,
7,
121,
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,
121,
518,
32,
904,
7,
7871,
7,
8512,
21680,
953,
834,
23702,
4560,
549,
17444,
427,
96,
134,
15,
9,
739,
121,
3274,
3,
31,
13527,
87,
4542,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is the record when the method is submission (armbar) and the round is less than 3? | CREATE TABLE table_name_8 (record VARCHAR, method VARCHAR, round VARCHAR) | SELECT record FROM table_name_8 WHERE method = "submission (armbar)" AND round < 3 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
927,
41,
60,
7621,
584,
4280,
28027,
6,
1573,
584,
4280,
28027,
6,
1751,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
125,
19,
8,
1368,
116,
8,
1573,
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,
1368,
21680,
953,
834,
4350,
834,
927,
549,
17444,
427,
1573,
3274,
96,
7304,
5451,
41,
6768,
1047,
61,
121,
3430,
1751,
3,
2,
220,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What country did Raymond Floyd play for? | CREATE TABLE table_name_9 (country VARCHAR, player VARCHAR) | SELECT country FROM table_name_9 WHERE player = "raymond floyd" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1298,
41,
17529,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
684,
410,
22405,
29767,
577,
21,
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,
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,
684,
21680,
953,
834,
4350,
834,
1298,
549,
17444,
427,
1959,
3274,
96,
2866,
6764,
8882,
63,
26,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the Unanimous of the Minnesota Southern California School? | CREATE TABLE table_name_93 (unanimous VARCHAR, school VARCHAR) | SELECT unanimous FROM table_name_93 WHERE school = "minnesota southern california" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4271,
41,
202,
13607,
1162,
584,
4280,
28027,
6,
496,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
597,
13607,
1162,
13,
8,
9745,
5193,
1826,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
25141,
21680,
953,
834,
4350,
834,
4271,
549,
17444,
427,
496,
3274,
96,
1109,
1496,
32,
17,
9,
7518,
3,
15534,
1161,
29,
23,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
how many patients whose admission year is less than 2158 and lab test name is thyroxine (t4)? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2158" AND lab.label = "Thyroxine (T4)" | [
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 ordered has algerine (2nd of name) as the name? | CREATE TABLE table_name_73 (ordered VARCHAR, name VARCHAR) | SELECT ordered FROM table_name_73 WHERE name = "algerine (2nd of name)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4552,
41,
9397,
15,
26,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
5563,
65,
491,
1304,
630,
4743,
727,
13,
564,
61,
38,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
3,
23143,
14196,
5563,
21680,
953,
834,
4350,
834,
4552,
549,
17444,
427,
564,
3274,
96,
138,
1304,
630,
4743,
727,
13,
564,
61,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which Incumbent has a District of California 5? | CREATE TABLE table_74883 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text
) | SELECT "Incumbent" FROM table_74883 WHERE "District" = 'california 5' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4581,
4060,
519,
41,
96,
308,
23,
20066,
121,
1499,
6,
96,
1570,
75,
5937,
295,
121,
1499,
6,
96,
13725,
63,
121,
1499,
6,
96,
25171,
8160,
121,
490,
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,
1... | [
3,
23143,
14196,
96,
1570,
75,
5937,
295,
121,
21680,
953,
834,
4581,
4060,
519,
549,
17444,
427,
96,
308,
23,
20066,
121,
3274,
3,
31,
15534,
1161,
29,
23,
9,
305,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Which tournament has a 1R value in 2007 and 2009? | CREATE TABLE table_name_91 (tournament VARCHAR) | SELECT tournament FROM table_name_91 WHERE 2007 = "1r" AND 2009 = "1r" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4729,
41,
17,
1211,
20205,
17,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
5892,
65,
3,
9,
209,
448,
701,
16,
4101,
11,
2464,
58,
1,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4729,
549,
17444,
427,
4101,
3274,
96,
536,
52,
121,
3430,
2464,
3274,
96,
536,
52,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What are the names of the tourist attractions that can be accessed by bus? | CREATE TABLE TOURIST_ATTRACTIONS (Name VARCHAR, How_to_Get_There VARCHAR) | SELECT Name FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = "bus" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
332,
9131,
13582,
834,
24642,
448,
30518,
134,
41,
23954,
584,
4280,
28027,
6,
571,
834,
235,
834,
20361,
834,
7238,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
33,
8,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5570,
21680,
332,
9131,
13582,
834,
24642,
448,
30518,
134,
549,
17444,
427,
571,
834,
235,
834,
20361,
834,
7238,
3274,
96,
3465,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many University founded in 1863? | CREATE TABLE table_19210115_1 (
enrollment VARCHAR,
founded VARCHAR
) | SELECT COUNT(enrollment) FROM table_19210115_1 WHERE founded = 1863 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2294,
15239,
15660,
834,
536,
41,
17938,
584,
4280,
28027,
6,
5710,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
636,
5710,
16,
507,
3891,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
35,
4046,
297,
61,
21680,
953,
834,
2294,
15239,
15660,
834,
536,
549,
17444,
427,
5710,
3274,
507,
3891,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
how much money did patient 008-26792 have to spend for his hospital stay until 2104? | CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime 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 treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
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
) | SELECT SUM(cost.cost) FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '008-26792') AND STRFTIME('%y', cost.chargetime) <= '2104' | [
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,
180,
6122,
599,
11290,
5,
11290,
61,
21680,
583,
549,
17444,
427,
583,
5,
10061,
15878,
3734,
21545,
23,
26,
3388,
41,
23143,
14196,
1868,
5,
10061,
15878,
3734,
21545,
23,
26,
21680,
1868,
549,
17444,
427,
1868,
5,
... |
What was the minor version released on April 16, 2008? | CREATE TABLE table_24257833_4 (minor_version VARCHAR, release_date VARCHAR) | SELECT minor_version FROM table_24257833_4 WHERE release_date = "April 16, 2008" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2266,
1828,
3940,
4201,
834,
591,
41,
1109,
127,
834,
8674,
584,
4280,
28027,
6,
1576,
834,
5522,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
4012,
988,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4012,
834,
8674,
21680,
953,
834,
2266,
1828,
3940,
4201,
834,
591,
549,
17444,
427,
1576,
834,
5522,
3274,
96,
23323,
11940,
2628,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which Third has a Lead of zanda bik e? | CREATE TABLE table_name_78 (
third VARCHAR,
lead VARCHAR
) | SELECT third FROM table_name_78 WHERE lead = "zanda bikše" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3940,
41,
1025,
584,
4280,
28027,
6,
991,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
9879,
65,
3,
9,
12208,
13,
3,
172,
232,
9,
2647,
157,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1025,
21680,
953,
834,
4350,
834,
3940,
549,
17444,
427,
991,
3274,
96,
172,
232,
9,
2647,
157,
2,
15,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What were the laps of driver Jean-Christophe Boullion? | CREATE TABLE table_56518 (
"Driver" text,
"Constructor" text,
"Laps" text,
"Time/Retired" text,
"Grid" text
) | SELECT "Laps" FROM table_56518 WHERE "Driver" = 'jean-christophe boullion' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
755,
4122,
2606,
41,
96,
20982,
52,
121,
1499,
6,
96,
4302,
7593,
127,
121,
1499,
6,
96,
3612,
102,
7,
121,
1499,
6,
96,
13368,
87,
1649,
11809,
26,
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,
1... | [
3,
23143,
14196,
96,
3612,
102,
7,
121,
21680,
953,
834,
755,
4122,
2606,
549,
17444,
427,
96,
20982,
52,
121,
3274,
3,
31,
26459,
18,
15294,
10775,
15,
3005,
83,
7325,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What position did the draft pick going to saskatchewan play? | CREATE TABLE table_28059992_5 (
position VARCHAR,
cfl_team VARCHAR
) | SELECT position FROM table_28059992_5 WHERE cfl_team = "Saskatchewan" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2577,
3076,
19446,
357,
834,
755,
41,
1102,
584,
4280,
28027,
6,
3,
75,
89,
40,
834,
11650,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
1102,
410,
8,
6488,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1102,
21680,
953,
834,
2577,
3076,
19446,
357,
834,
755,
549,
17444,
427,
3,
75,
89,
40,
834,
11650,
3274,
96,
134,
9,
7,
8682,
1033,
3877,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
give me the number of patients less than 79 years of age who were admitted before 2172. | 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 WHERE demographic.age < "79" AND demographic.admityear < "2172" | [
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,
549,
17444,
427,
14798,
5,
545,
3,
2,
96,
4440,
121,
3430,
14798,
5,
20466,
17,
1201,
3,
2,
96,
2658,
5865,
121,
1,
-100,... |
how many patients whose primary disease is ruq pain? | 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
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "RUQ PAIN" | [
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,
549,
17444,
427,
14798,
5,
25930,
4844,
159,
3274,
96,
8503,
2247,
276,
13570,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the highest production code? | CREATE TABLE table_26448179_4 (production_code INTEGER) | SELECT MAX(production_code) FROM table_26448179_4 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26755,
3707,
26593,
834,
591,
41,
20762,
834,
4978,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2030,
999,
1081,
58,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
20762,
834,
4978,
61,
21680,
953,
834,
26755,
3707,
26593,
834,
591,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what was the total wins for this team ? | CREATE TABLE table_204_658 (
id number,
"week" number,
"date" text,
"kickoff" text,
"opponent" text,
"results\nfinal score" text,
"results\nteam record" text,
"game site" text,
"attendance" number
) | SELECT COUNT(*) FROM table_204_658 WHERE "results\nfinal score" = 'w' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
948,
3449,
41,
3,
23,
26,
381,
6,
96,
8041,
121,
381,
6,
96,
5522,
121,
1499,
6,
96,
157,
3142,
1647,
121,
1499,
6,
96,
32,
102,
9977,
121,
1499,
6,
96,
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,
1935,
61,
21680,
953,
834,
26363,
834,
948,
3449,
549,
17444,
427,
96,
60,
7,
83,
17,
7,
2,
29,
12406,
2604,
121,
3274,
3,
31,
210,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
provide the number of patients whose ethnicity is black/haitian and diagnoses long title is personal history of antineoplastic chemotherapy? | 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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "BLACK/HAITIAN" AND diagnoses.long_title = "Personal history of antineoplastic chemotherapy" | [
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 is the height of the player from Las Vegas, NV? | CREATE TABLE table_75914 (
"Name" text,
"Height" text,
"Position" text,
"Year" text,
"Home Town" text
) | SELECT "Height" FROM table_75914 WHERE "Home Town" = 'las vegas, nv' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
940,
3390,
2534,
41,
96,
23954,
121,
1499,
6,
96,
3845,
2632,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
476,
2741,
121,
1499,
6,
96,
19040,
4463,
121,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
3845,
2632,
121,
21680,
953,
834,
940,
3390,
2534,
549,
17444,
427,
96,
19040,
4463,
121,
3274,
3,
31,
521,
7,
3,
162,
5556,
6,
3,
29,
208,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Radio Station/Production Company that has a Role of interviewee & monologues is what radio station? | CREATE TABLE table_name_73 (radio_station_production_company VARCHAR, role VARCHAR) | SELECT radio_station_production_company FROM table_name_73 WHERE role = "interviewee & monologues" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4552,
41,
5883,
32,
834,
6682,
834,
20762,
834,
29179,
584,
4280,
28027,
6,
1075,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5061,
5939,
87,
3174,
8291,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2252,
834,
6682,
834,
20762,
834,
29179,
21680,
953,
834,
4350,
834,
4552,
549,
17444,
427,
1075,
3274,
96,
3870,
4576,
15,
15,
3,
184,
7414,
10384,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the pick with Dean Sears and round larger than 6? | CREATE TABLE table_name_61 (
pick INTEGER,
round VARCHAR,
player VARCHAR
) | SELECT MIN(pick) FROM table_name_61 WHERE round > 6 AND player = "dean sears" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4241,
41,
1432,
3,
21342,
17966,
6,
1751,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1432,
28,
12738,
3319,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
17967,
61,
21680,
953,
834,
4350,
834,
4241,
549,
17444,
427,
1751,
2490,
431,
3430,
1959,
3274,
96,
221,
152,
142,
291,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
how many patients age less than 67 years and their lab test fluid is joit fluid? | 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
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "67" AND lab.fluid = "Joint Fluid" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7690,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
2118,
23,
26,
1499,
6,
5059,
715,
1499,
6,
5692,
1499,
6,
701,
834,
15129,
1499,
6,
3783,
1499,
6,
5798,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7690,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7690,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
Who were the former local authority for the civil parish, Ennerdale and Kinniside in the copeland district, with less than 1,280 in population? | CREATE TABLE table_39467 (
"Name" text,
"Status" text,
"Population" real,
"District" text,
"Former local authority" text
) | SELECT "Former local authority" FROM table_39467 WHERE "Status" = 'civil parish' AND "District" = 'copeland' AND "Population" < '1,280' AND "Name" = 'ennerdale and kinniside' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3288,
591,
3708,
41,
96,
23954,
121,
1499,
6,
96,
134,
17,
144,
302,
121,
1499,
6,
96,
27773,
7830,
121,
490,
6,
96,
308,
23,
20066,
121,
1499,
6,
96,
3809,
935,
415,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
3809,
935,
415,
5015,
121,
21680,
953,
834,
3288,
591,
3708,
549,
17444,
427,
96,
134,
17,
144,
302,
121,
3274,
3,
31,
27981,
173,
14961,
31,
3430,
96,
308,
23,
20066,
121,
3274,
3,
31,
509,
4343,
232,
31,
3... |
Draw a bar chart about the distribution of All_Home and Team_ID , and group by attribute ACC_Road, and order by the total number in descending. | 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 All_Home, Team_ID FROM basketball_match GROUP BY ACC_Road, All_Home ORDER BY Team_ID DESC | [
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,
432,
834,
19040,
6,
2271,
834,
4309,
21680,
8498,
834,
19515,
350,
4630,
6880,
272,
476,
3,
14775,
834,
448,
32,
9,
26,
6,
432,
834,
19040,
4674,
11300,
272,
476,
2271,
834,
4309,
309,
25067,
1,
-100,
-100,
-100,
... |
Which country is Dyer from? | CREATE TABLE table_name_14 (country VARCHAR, name VARCHAR) | SELECT country FROM table_name_14 WHERE name = "dyer" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2534,
41,
17529,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
684,
19,
12991,
49,
45,
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,
684,
21680,
953,
834,
4350,
834,
2534,
549,
17444,
427,
564,
3274,
96,
26,
7975,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the title of the TV series in 2012? | CREATE TABLE table_name_70 (title VARCHAR, year VARCHAR) | SELECT title FROM table_name_70 WHERE year = "2012" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2518,
41,
21869,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2233,
13,
8,
1424,
939,
16,
1673,
58,
1,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2233,
21680,
953,
834,
4350,
834,
2518,
549,
17444,
427,
215,
3274,
96,
12172,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
For those employees who did not have any job in the past, return a bar chart about the distribution of hire_date and the average of manager_id bin hire_date by weekday. | CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
) | SELECT HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
10521,
41,
3396,
19846,
11810,
834,
4309,
7908,
1982,
599,
8525,
632,
201,
3396,
19846,
11810,
834,
567,
17683,
3,
4331,
4059,
599,
1458,
201,
283,
15610,
17966,
834,
4309,
7908,
1982,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
454,
14132,
834,
308,
6048,
6,
71,
17217,
599,
9312,
188,
17966,
834,
4309,
61,
21680,
1652,
549,
17444,
427,
4486,
262,
5244,
5017,
476,
5080,
834,
4309,
3388,
41,
23143,
14196,
262,
5244,
5017,
476,
5080,
834,
4309,... |
Who is the sitting Representative In the New York 10 polling area race? | CREATE TABLE table_1342256_32 (incumbent VARCHAR, district VARCHAR) | SELECT incumbent FROM table_1342256_32 WHERE district = "New York 10" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
19337,
834,
2668,
41,
77,
75,
5937,
295,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
19,
8,
3823,
13517,
86,
8,
368,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
28406,
21680,
953,
834,
2368,
4165,
19337,
834,
2668,
549,
17444,
427,
3939,
3274,
96,
6861,
1060,
335,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Which models can perform flops(@ 200mhz) is 3.2 | CREATE TABLE table_19312 (
"Model" text,
"Year" text,
"Die Size (mm 2 ) [1]" text,
"Config core [2]" text,
"MTriangles/s [1]" real,
"MPixel/s [1]" real,
"Bus width ( bit )" text,
"DirectX" text,
"OpenGL" text,
"OpenGL ES" text,
"GFLOPS(@ 200MHz)" text,
"Frequency" real
) | SELECT "Model" FROM table_19312 WHERE "GFLOPS(@ 200MHz)" = '3.2' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2294,
519,
2122,
41,
96,
24663,
121,
1499,
6,
96,
476,
2741,
121,
1499,
6,
96,
8639,
8941,
41,
635,
204,
3,
61,
784,
536,
908,
121,
1499,
6,
96,
4302,
15994,
2583,
784,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
24663,
121,
21680,
953,
834,
2294,
519,
2122,
549,
17444,
427,
96,
15643,
5017,
4176,
599,
1741,
2382,
20210,
61,
121,
3274,
3,
31,
19162,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the 1st participle of the verb whose 4th participle is haitans? | CREATE TABLE table_1745843_5 (part_1 VARCHAR, part_4 VARCHAR) | SELECT part_1 FROM table_1745843_5 WHERE part_4 = "haitans" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
27693,
3449,
4906,
834,
755,
41,
2274,
834,
536,
584,
4280,
28027,
6,
294,
834,
591,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
209,
7,
17,
294,
1294,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
294,
834,
536,
21680,
953,
834,
27693,
3449,
4906,
834,
755,
549,
17444,
427,
294,
834,
591,
3274,
96,
1024,
155,
3247,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What American Southwest Conference school was founded in 1883? | CREATE TABLE table_33060 (
"Institution" text,
"Location" text,
"Men\u2019s Nickname" text,
"Women\u2019s Nickname" text,
"Founded" real,
"Type" text,
"Enrollment" real,
"Joined" text,
"Left" text,
"Current Conference" text,
"Classification" text
) | SELECT "Institution" FROM table_33060 WHERE "Founded" > '1883' AND "Current Conference" = 'american southwest' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
17225,
3328,
41,
96,
1570,
17448,
121,
1499,
6,
96,
434,
32,
75,
257,
121,
1499,
6,
96,
329,
35,
2,
76,
8584,
7,
7486,
4350,
121,
1499,
6,
96,
518,
32,
904,
2,
76,
85... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1570,
17448,
121,
21680,
953,
834,
17225,
3328,
549,
17444,
427,
96,
20100,
121,
2490,
3,
31,
2606,
4591,
31,
3430,
96,
254,
450,
5320,
4379,
121,
3274,
3,
31,
23064,
29,
25044,
31,
1,
-100,
-100,
-100,
-100,
... |
What is the location when the high rebounds was from A. Horford (13)? | CREATE TABLE table_11961582_10 (location_attendance VARCHAR, high_rebounds VARCHAR) | SELECT location_attendance FROM table_11961582_10 WHERE high_rebounds = "A. Horford (13)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2596,
4314,
1808,
4613,
834,
1714,
41,
14836,
834,
15116,
663,
584,
4280,
28027,
6,
306,
834,
23768,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1128,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1128,
834,
15116,
663,
21680,
953,
834,
2596,
4314,
1808,
4613,
834,
1714,
549,
17444,
427,
306,
834,
23768,
3274,
96,
188,
5,
6766,
2590,
4077,
5268,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
For those employees who do not work in departments with managers that have ids between 100 and 200, a bar chart shows the distribution of first_name and employee_id , and list Y in descending order. | CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
) | SELECT FIRST_NAME, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY EMPLOYEE_ID DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
6266,
41,
4083,
517,
9215,
834,
4309,
7908,
1982,
599,
11116,
632,
201,
4083,
517,
9215,
834,
567,
17683,
3,
4331,
4059,
599,
1828,
61,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
30085,
834,
567,
17683,
6,
262,
5244,
5017,
476,
5080,
834,
4309,
21680,
1652,
549,
17444,
427,
4486,
3396,
19846,
11810,
834,
4309,
3388,
41,
23143,
14196,
3396,
19846,
11810,
834,
4309,
21680,
10521,
549,
17444,
427,
... |
Which Gold has a Rank smaller than 5, and a Bronze of 20? | CREATE TABLE table_79716 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT AVG("Gold") FROM table_79716 WHERE "Rank" < '5' AND "Bronze" = '20' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
940,
4327,
2938,
41,
96,
22557,
121,
490,
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,
71,
17217,
599,
121,
23576,
8512,
21680,
953,
834,
940,
4327,
2938,
549,
17444,
427,
96,
22557,
121,
3,
2,
3,
31,
755,
31,
3430,
96,
22780,
29,
776,
121,
3274,
3,
31,
1755,
31,
1,
-100,
-100,
-100,
-100,
-100,
-... |
What is the sum of Wins with a result of 0, and the away wins of 1, and the losses are less than 5? | CREATE TABLE table_41008 (
"Year" text,
"Matches" real,
"Wins" real,
"Losses" real,
"No Result" real,
"Success Rate" text,
"Away Wins" real,
"Away Losses" real
) | SELECT SUM("Wins") FROM table_41008 WHERE "No Result" = '0' AND "Away Wins" = '1' AND "Losses" < '5' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
24175,
4018,
41,
96,
476,
2741,
121,
1499,
6,
96,
329,
144,
2951,
121,
490,
6,
96,
18455,
7,
121,
490,
6,
96,
434,
13526,
7,
121,
490,
6,
96,
4168,
3,
20119,
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,
180,
6122,
599,
121,
18455,
7,
8512,
21680,
953,
834,
24175,
4018,
549,
17444,
427,
96,
4168,
3,
20119,
121,
3274,
3,
31,
632,
31,
3430,
96,
188,
1343,
4871,
7,
121,
3274,
3,
31,
536,
31,
3430,
96,
434,
13526,
7... |
what was the date of the last time glen seton won ? | CREATE TABLE table_203_271 (
id number,
"date" text,
"series" text,
"circuit" text,
"city / state" text,
"winner" text,
"team" text,
"car" text,
"report" text
) | SELECT "date" FROM table_203_271 WHERE "winner" = 'glenn seton' ORDER BY id DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
2555,
536,
41,
3,
23,
26,
381,
6,
96,
5522,
121,
1499,
6,
96,
10833,
7,
121,
1499,
6,
96,
15357,
21560,
121,
1499,
6,
96,
6726,
3,
87,
538,
121,
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,
96,
5522,
121,
21680,
953,
834,
23330,
834,
2555,
536,
549,
17444,
427,
96,
3757,
687,
121,
3274,
3,
31,
3537,
29,
29,
356,
106,
31,
4674,
11300,
272,
476,
3,
23,
26,
309,
25067,
8729,
12604,
209,
1,
-100,
-100,
... |
the number of patients in ward 874 since 5 years ago? | 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 treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime 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 intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
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 diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
) | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.wardid = 874 AND DATETIME(patient.unitadmittime) >= DATETIME(CURRENT_TIME(), '-5 year') | [
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,
2847,
17161,
599,
15438,
25424,
6227,
1868,
5,
202,
1495,
12417,
61,
21680,
1868,
549,
17444,
427,
1868,
5,
2239,
23,
26,
3274,
505,
4581,
3430,
309,
6048,
382,
15382,
599,
10061,
5,
15129,
20466,
17,
715,
61,
2490,
... |
Which province had a liberal party member on December 31, 2006? | CREATE TABLE table_33497 (
"Date" text,
"Name" text,
"Party" text,
"Province" text,
"Details" text
) | SELECT "Province" FROM table_33497 WHERE "Party" = 'liberal' AND "Date" = 'december 31, 2006' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
519,
3710,
4327,
41,
96,
308,
342,
121,
1499,
6,
96,
23954,
121,
1499,
6,
96,
13725,
63,
121,
1499,
6,
96,
3174,
2494,
565,
121,
1499,
6,
96,
2962,
5756,
7,
121,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
3174,
2494,
565,
121,
21680,
953,
834,
519,
3710,
4327,
549,
17444,
427,
96,
13725,
63,
121,
3274,
3,
31,
10661,
138,
31,
3430,
96,
308,
342,
121,
3274,
3,
31,
221,
75,
18247,
12074,
3581,
31,
1,
-100,
-100,
... |
Display the first and last name, and salary for those employees whose first name is ending with the letter m. | CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, salary VARCHAR) | SELECT first_name, last_name, salary FROM employees WHERE first_name LIKE '%m' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1652,
41,
14672,
834,
4350,
584,
4280,
28027,
6,
336,
834,
4350,
584,
4280,
28027,
6,
9090,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
11677,
8,
166,
11,
336,
564,
6,
11,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
166,
834,
4350,
6,
336,
834,
4350,
6,
9090,
21680,
1652,
549,
17444,
427,
166,
834,
4350,
8729,
9914,
3,
31,
1454,
51,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Which Round was Player Adam Cracknell Picked after 231 in a Draft year after 1988? | CREATE TABLE table_55237 (
"Draft" real,
"Round" text,
"Pick" real,
"Player" text,
"Nationality" text
) | SELECT "Round" FROM table_55237 WHERE "Pick" > '231' AND "Draft" > '1988' AND "Player" = 'adam cracknell' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3769,
357,
4118,
41,
96,
308,
10913,
121,
490,
6,
96,
448,
32,
1106,
121,
1499,
6,
96,
345,
3142,
121,
490,
6,
96,
15800,
49,
121,
1499,
6,
96,
24732,
485,
121,
1499,
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,
448,
32,
1106,
121,
21680,
953,
834,
3769,
357,
4118,
549,
17444,
427,
96,
345,
3142,
121,
2490,
3,
31,
357,
3341,
31,
3430,
96,
308,
10913,
121,
2490,
3,
31,
2294,
4060,
31,
3430,
96,
15800,
49,
121,
3274,
... |
Which FAT32 has yes v1.0/v1.1 for NTFS? | CREATE TABLE table_name_31 (
fat32 VARCHAR,
ntfs VARCHAR
) | SELECT fat32 FROM table_name_31 WHERE ntfs = "yes v1.0/v1.1" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3341,
41,
2886,
2668,
584,
4280,
28027,
6,
3,
29,
17,
89,
7,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
377,
5767,
2668,
65,
4273,
3,
208,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2886,
2668,
21680,
953,
834,
4350,
834,
3341,
549,
17444,
427,
3,
29,
17,
89,
7,
3274,
96,
10070,
3,
208,
12734,
87,
208,
11039,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the home team score when south melbourne was the home team? | CREATE TABLE table_name_49 (home_team VARCHAR) | SELECT home_team AS score FROM table_name_49 WHERE home_team = "south melbourne" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3647,
41,
5515,
834,
11650,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
234,
372,
2604,
116,
3414,
3,
2341,
26255,
47,
8,
234,
372,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
234,
834,
11650,
6157,
2604,
21680,
953,
834,
4350,
834,
3647,
549,
17444,
427,
234,
834,
11650,
3274,
96,
7,
670,
107,
3,
2341,
26255,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What candidates were featured in the 1974 election? | CREATE TABLE table_1341640_14 (
candidates VARCHAR,
first_elected VARCHAR
) | SELECT candidates FROM table_1341640_14 WHERE first_elected = 1974 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2938,
2445,
834,
2534,
41,
4341,
584,
4280,
28027,
6,
166,
834,
19971,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
4341,
130,
4510,
16,
8,
17184,
4356... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4341,
21680,
953,
834,
23747,
2938,
2445,
834,
2534,
549,
17444,
427,
166,
834,
19971,
3274,
17184,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the birth date for Mervyn Dillon? | CREATE TABLE table_name_11 (date_of_birth VARCHAR, player VARCHAR) | SELECT date_of_birth FROM table_name_11 WHERE player = "mervyn dillon" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2596,
41,
5522,
834,
858,
834,
20663,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
3879,
833,
21,
4039,
208,
63,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
833,
834,
858,
834,
20663,
21680,
953,
834,
4350,
834,
2596,
549,
17444,
427,
1959,
3274,
96,
935,
208,
63,
29,
3,
26,
8901,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Tell me the number of patients admitted before the year 2151 who underwent a suture of laceration of bladder procedure. | 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 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
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2151" AND procedures.short_title = "Suture bladder lacerat" | [
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 was the highest rank of an area with a population density larger than 5.7 and a 2006 2011 percentage growth of 5.7%? | CREATE TABLE table_name_45 (
rank INTEGER,
population_density___km_2__ VARCHAR,
_percentage_growth__2006_11_ VARCHAR
) | SELECT MAX(rank) FROM table_name_45 WHERE population_density___km_2__ > 5.7 AND _percentage_growth__2006_11_ = "5.7%" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2128,
41,
11003,
3,
21342,
17966,
6,
2074,
834,
537,
7,
485,
834,
834,
834,
5848,
834,
357,
834,
834,
584,
4280,
28027,
6,
3,
834,
883,
3728,
545,
834,
24690,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6254,
61,
21680,
953,
834,
4350,
834,
2128,
549,
17444,
427,
2074,
834,
537,
7,
485,
834,
834,
834,
5848,
834,
357,
834,
834,
2490,
3,
27220,
3430,
3,
834,
883,
3728,
545,
834,
24690,
834,
834,
21196... |
what is the country when the score is 71-65-69=205? | CREATE TABLE table_name_47 (
country VARCHAR,
score VARCHAR
) | SELECT country FROM table_name_47 WHERE score = 71 - 65 - 69 = 205 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4177,
41,
684,
584,
4280,
28027,
6,
2604,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
125,
19,
8,
684,
116,
8,
2604,
19,
3,
4450,
18,
4122,
18,
395... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
684,
21680,
953,
834,
4350,
834,
4177,
549,
17444,
427,
2604,
3274,
3,
4450,
3,
18,
7123,
3,
18,
3,
3951,
3274,
3,
23201,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Show the average price of the rooms in different decor using a pie chart. | CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adults INTEGER,
Kids INTEGER
)
CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
basePrice INTEGER,
decor TEXT
) | SELECT decor, AVG(basePrice) FROM Rooms GROUP BY decor | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
27659,
7,
41,
3636,
3,
21342,
17966,
6,
4181,
3,
3463,
4,
382,
6,
1972,
1570,
3,
3463,
4,
382,
6,
1972,
15767,
3,
3463,
4,
382,
6,
13002,
17833,
6,
2506,
23954,
3,
3463,
4,
382,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4469,
6,
71,
17217,
599,
10925,
345,
4920,
61,
21680,
4181,
7,
350,
4630,
6880,
272,
476,
4469,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
what is procedure icd9 code and procedure short title of subject name michelle skidmore? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT procedures.icd9_code, procedures.short_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Michelle Skidmore" | [
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,
4293,
5,
447,
26,
1298,
834,
4978,
6,
4293,
5,
7,
14184,
834,
21869,
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,
427,
... |
what year was the first compilation album released ? | CREATE TABLE table_204_471 (
id number,
"year" number,
"title" text,
"peak chart positions\nger" number,
"label" text,
"artist" text
) | SELECT MIN("year") FROM table_204_471 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
4177,
536,
41,
3,
23,
26,
381,
6,
96,
1201,
121,
381,
6,
96,
21869,
121,
1499,
6,
96,
14661,
5059,
4655,
2,
9369,
121,
381,
6,
96,
40,
10333,
121,
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,
3,
17684,
599,
121,
1201,
8512,
21680,
953,
834,
26363,
834,
4177,
536,
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 average Money ( $ ), when Country is "United States", and when To par is "+3"? | CREATE TABLE table_name_14 (money___ INTEGER, country VARCHAR, to_par VARCHAR) | SELECT AVG(money___) AS $__ FROM table_name_14 WHERE country = "united states" AND to_par = "+3" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2534,
41,
28442,
834,
834,
834,
3,
21342,
17966,
6,
684,
584,
4280,
28027,
6,
12,
834,
1893,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
134... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
28442,
834,
834,
834,
61,
6157,
1514,
834,
834,
21680,
953,
834,
4350,
834,
2534,
549,
17444,
427,
684,
3274,
96,
15129,
15,
26,
2315,
121,
3430,
12,
834,
1893,
3274,
96,
1220,
519,
121,
1,
-100,
-... |
how many different passenger baseplates for vehicle registration have been used in vermont ? | CREATE TABLE table_203_498 (
id number,
"first issued" text,
"design" text,
"slogan" text,
"serial format" text,
"serials issued" text,
"notes" text
) | SELECT COUNT(*) FROM table_203_498 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
591,
3916,
41,
3,
23,
26,
381,
6,
96,
14672,
4683,
121,
1499,
6,
96,
9124,
121,
1499,
6,
96,
7,
2152,
152,
121,
1499,
6,
96,
7,
15,
12042,
1910,
121,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
953,
834,
23330,
834,
591,
3916,
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,
-100... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.