NATURAL_LANG stringlengths 0 446 | SCHEMA stringlengths 27 2.21k | SQL stringlengths 18 453 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|
Which Type has a Release date of november 30, 1997? | CREATE TABLE table_name_88 (
type VARCHAR,
release_date VARCHAR
) | SELECT type FROM table_name_88 WHERE release_date = "november 30, 1997" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4060,
41,
686,
584,
4280,
28027,
6,
1576,
834,
5522,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
6632,
65,
3,
9,
13048,
833,
13,
3,
5326,
18247... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
686,
21680,
953,
834,
4350,
834,
4060,
549,
17444,
427,
1576,
834,
5522,
3274,
96,
5326,
18247,
11558,
6622,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was Olazabal's winning score in the event in which Phillip Price finished 2nd? | CREATE TABLE table_name_90 (
winning_score VARCHAR,
runner_s__up VARCHAR
) | SELECT winning_score FROM table_name_90 WHERE runner_s__up = "phillip price" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2394,
41,
3447,
834,
7,
9022,
584,
4280,
28027,
6,
3,
10806,
834,
7,
834,
834,
413,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
5424,
5246,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3447,
834,
7,
9022,
21680,
953,
834,
4350,
834,
2394,
549,
17444,
427,
3,
10806,
834,
7,
834,
834,
413,
3274,
96,
18118,
7446,
594,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
When was Quantum Research's poll conducted? | CREATE TABLE table_20683381_2 (date_of_opinion_poll VARCHAR, conductor VARCHAR) | SELECT date_of_opinion_poll FROM table_20683381_2 WHERE conductor = "Quantum Research" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1755,
3651,
4201,
4959,
834,
357,
41,
5522,
834,
858,
834,
32,
22441,
834,
3233,
40,
584,
4280,
28027,
6,
3498,
127,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
366,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
834,
858,
834,
32,
22441,
834,
3233,
40,
21680,
953,
834,
1755,
3651,
4201,
4959,
834,
357,
549,
17444,
427,
3498,
127,
3274,
96,
5991,
288,
440,
2200,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the position of the player that came from the school/club team/country of Purdue? | CREATE TABLE table_11734041_11 (
position VARCHAR,
school_club_team_country VARCHAR
) | SELECT position FROM table_11734041_11 WHERE school_club_team_country = "Purdue" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
20275,
21129,
4853,
834,
2596,
41,
1102,
584,
4280,
28027,
6,
496,
834,
13442,
834,
11650,
834,
17529,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
110... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1102,
21680,
953,
834,
20275,
21129,
4853,
834,
2596,
549,
17444,
427,
496,
834,
13442,
834,
11650,
834,
17529,
3274,
96,
345,
450,
1259,
15,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Who is the opponent in the final on a hard surface with a score of 6–3 7–6(5)? | CREATE TABLE table_name_69 (opponent_in_the_final VARCHAR, surface VARCHAR, score VARCHAR) | SELECT opponent_in_the_final FROM table_name_69 WHERE surface = "hard" AND score = "6–3 7–6(5)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3951,
41,
32,
102,
9977,
834,
77,
834,
532,
834,
12406,
584,
4280,
28027,
6,
1774,
584,
4280,
28027,
6,
2604,
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,
1,
1... | [
3,
23143,
14196,
15264,
834,
77,
834,
532,
834,
12406,
21680,
953,
834,
4350,
834,
3951,
549,
17444,
427,
1774,
3274,
96,
5651,
121,
3430,
2604,
3274,
96,
948,
104,
519,
489,
104,
948,
15757,
121,
1,
-100,
-100,
-100,
-100,
-100,
-1... |
Find the number of trains starting from each origin. | CREATE TABLE train (origin VARCHAR) | SELECT origin, COUNT(*) FROM train GROUP BY origin | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2412,
41,
32,
3380,
77,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2588,
8,
381,
13,
14053,
1684,
45,
284,
5233,
5,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
5233,
6,
2847,
17161,
599,
1935,
61,
21680,
2412,
350,
4630,
6880,
272,
476,
5233,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what are the number of times an ipad was used as a platform ? | CREATE TABLE table_203_836 (
id number,
"title" text,
"year" number,
"platforms" text,
"developer" text,
"publisher" text,
"notes" text
) | SELECT COUNT(*) FROM table_203_836 WHERE "platforms" = 'ipad' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
927,
3420,
41,
3,
23,
26,
381,
6,
96,
21869,
121,
1499,
6,
96,
1201,
121,
381,
6,
96,
29100,
7,
121,
1499,
6,
96,
29916,
49,
121,
1499,
6,
96,
29337,
49,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
927,
3420,
549,
17444,
427,
96,
29100,
7,
121,
3274,
3,
31,
23,
5612,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the average of player Matthew Elliott (vic)? | CREATE TABLE table_name_63 (average VARCHAR, player VARCHAR) | SELECT average FROM table_name_63 WHERE player = "matthew elliott (vic)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3891,
41,
28951,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1348,
13,
1959,
9771,
28597,
41,
7287,
61,
58,
1,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1348,
21680,
953,
834,
4350,
834,
3891,
549,
17444,
427,
1959,
3274,
96,
3357,
532,
210,
3,
7999,
32,
17,
17,
41,
7287,
61,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Average total for jim furyk? | CREATE TABLE table_name_33 (total INTEGER, player VARCHAR) | SELECT AVG(total) FROM table_name_33 WHERE player = "jim furyk" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4201,
41,
235,
1947,
3,
21342,
17966,
6,
1959,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
23836,
792,
21,
3,
354,
603,
4223,
63,
157,
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,
71,
17217,
599,
235,
1947,
61,
21680,
953,
834,
4350,
834,
4201,
549,
17444,
427,
1959,
3274,
96,
354,
603,
4223,
63,
157,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What day did Alex Best exit? | CREATE TABLE table_33852 (
"Celebrity" text,
"Famous for" text,
"Entered" text,
"Exited" text,
"Finished" text
) | SELECT "Exited" FROM table_33852 WHERE "Celebrity" = 'alex best' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4201,
4433,
357,
41,
96,
254,
400,
2160,
17,
63,
121,
1499,
6,
96,
371,
265,
1162,
21,
121,
1499,
6,
96,
16924,
3737,
121,
1499,
6,
96,
5420,
23,
1054,
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,
0... | [
3,
23143,
14196,
96,
5420,
23,
1054,
121,
21680,
953,
834,
4201,
4433,
357,
549,
17444,
427,
96,
254,
400,
2160,
17,
63,
121,
3274,
3,
31,
138,
994,
200,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
get the number of patients who suffered from pneumonia primary disease and were never hospitalized. | 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 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
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "PNEUMONIA" AND demographic.days_stay > "0" | [
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,
15420,
12062,
5365,
26077,
121,
3430,
14798,
5,
1135,
7,
834,
21545,
2... |
Which series number has the production code 7.07? | CREATE TABLE table_2226817_8 (
no_in_series VARCHAR,
production_code VARCHAR
) | SELECT COUNT(no_in_series) FROM table_2226817_8 WHERE production_code = "7.07" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26144,
3651,
2517,
834,
927,
41,
150,
834,
77,
834,
10833,
7,
584,
4280,
28027,
6,
999,
834,
4978,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
939,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
29,
32,
834,
77,
834,
10833,
7,
61,
21680,
953,
834,
26144,
3651,
2517,
834,
927,
549,
17444,
427,
999,
834,
4978,
3274,
96,
26346,
940,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the average pick # from the Quebec Major Junior Hockey League player Samuel Carrier? | CREATE TABLE table_name_11 (pick__number INTEGER, league_from VARCHAR, player VARCHAR) | SELECT AVG(pick__number) FROM table_name_11 WHERE league_from = "quebec major junior hockey league" AND player = "samuel carrier" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2596,
41,
17967,
834,
834,
5525,
1152,
3,
21342,
17966,
6,
5533,
834,
7152,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
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,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
71,
17217,
599,
17967,
834,
834,
5525,
1152,
61,
21680,
953,
834,
4350,
834,
2596,
549,
17444,
427,
5533,
834,
7152,
3274,
96,
835,
346,
75,
779,
9212,
16528,
5533,
121,
3430,
1959,
3274,
96,
7,
265,
76,
15,
40,
9... |
Which class City of license of ferrum, virginia? | CREATE TABLE table_name_83 (class VARCHAR, city_of_license VARCHAR) | SELECT class FROM table_name_83 WHERE city_of_license = "ferrum, virginia" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4591,
41,
4057,
584,
4280,
28027,
6,
690,
834,
858,
834,
28062,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
853,
896,
13,
3344,
13,
25007,
440,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
853,
21680,
953,
834,
4350,
834,
4591,
549,
17444,
427,
690,
834,
858,
834,
28062,
3274,
96,
1010,
2781,
6,
24556,
23,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the sum of rank for the athlete kerron stewart, and a time smaller than 11.05? | CREATE TABLE table_name_10 (
rank INTEGER,
athlete VARCHAR,
time VARCHAR
) | SELECT SUM(rank) FROM table_name_10 WHERE athlete = "kerron stewart" AND time < 11.05 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1714,
41,
11003,
3,
21342,
17966,
6,
17893,
584,
4280,
28027,
6,
97,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
4505,
13,
11003,
21,
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,
0,
0,
0... | [
3,
23143,
14196,
180,
6122,
599,
6254,
61,
21680,
953,
834,
4350,
834,
1714,
549,
17444,
427,
17893,
3274,
96,
2304,
52,
106,
21786,
1408,
121,
3430,
97,
3,
2,
7806,
3076,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the to par when the after is 33? | CREATE TABLE table_30544 (
"#" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Winnings ($)" real,
"After" real,
"Before" real
) | SELECT "To par" FROM table_30544 WHERE "After" = '33' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26724,
3628,
41,
96,
4663,
121,
1499,
6,
96,
15800,
49,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
3696,
260,
121,
1499,
6,
96,
518,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3696,
260,
121,
21680,
953,
834,
26724,
3628,
549,
17444,
427,
96,
23901,
121,
3274,
3,
31,
4201,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
how many athletes are from russia ? | CREATE TABLE table_204_155 (
id number,
"rank" number,
"heat" number,
"athlete" text,
"nationality" text,
"time" number,
"notes" text
) | SELECT COUNT("athlete") FROM table_204_155 WHERE "nationality" = 'russia' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
20896,
41,
3,
23,
26,
381,
6,
96,
6254,
121,
381,
6,
96,
88,
144,
121,
381,
6,
96,
26170,
15,
121,
1499,
6,
96,
16557,
485,
121,
1499,
6,
96,
715,
121,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
26170,
15,
8512,
21680,
953,
834,
26363,
834,
20896,
549,
17444,
427,
96,
16557,
485,
121,
3274,
3,
31,
26165,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
what are the five most common lab tests given to patients 40s? | CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE 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 allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE 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 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
) | SELECT t1.labname FROM (SELECT lab.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 40 AND 49) GROUP BY lab.labname) AS t1 WHERE t1.c1 <= 5 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
11963,
670,
2562,
41,
11963,
670,
2562,
23,
26,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
2358,
8292,
1499,
6,
2358,
40,
10333,
1499,
6,
2358,
7480,
35,
76,
17552,
381,
6,
11963,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
17,
5411,
9339,
4350,
21680,
41,
23143,
14196,
7690,
5,
9339,
4350,
6,
3,
22284,
4132,
834,
16375,
439,
9960,
3,
23288,
41,
2990,
11300,
272,
476,
2847,
17161,
599,
1935,
61,
309,
25067,
61,
6157,
3,
75,
536,
2... |
any relevant abnormality that would interfere with the efficacy or the safety assessments during study treatment administration. | CREATE TABLE table_train_150 (
"id" int,
"gender" string,
"pregnancy_or_lactation" bool,
"hiv_infection" bool,
"hepatic_disease" bool,
"liver_disease" bool,
"abnormality" bool,
"triglyceride_tg" float,
"NOUSE" float
) | SELECT * FROM table_train_150 WHERE abnormality = 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
9719,
834,
12278,
41,
96,
23,
26,
121,
16,
17,
6,
96,
122,
3868,
121,
6108,
6,
96,
2026,
11260,
11298,
834,
127,
834,
9700,
6821,
121,
3,
12840,
40,
6,
96,
107,
23,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
1429,
21680,
953,
834,
9719,
834,
12278,
549,
17444,
427,
17947,
485,
3274,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Who is the away team that played home team of Perth Wildcats? | CREATE TABLE table_name_12 (
away_team VARCHAR,
home_team VARCHAR
) | SELECT away_team FROM table_name_12 WHERE home_team = "perth wildcats" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2122,
41,
550,
834,
11650,
584,
4280,
28027,
6,
234,
834,
11650,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
19,
8,
550,
372,
24,
1944,
234,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
550,
834,
11650,
21680,
953,
834,
4350,
834,
2122,
549,
17444,
427,
234,
834,
11650,
3274,
96,
883,
189,
3645,
2138,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
provide the number of patients whose diagnoses icd9 code is 69514 and lab test category is blood gas? | 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 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 INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "69514" AND lab."CATEGORY" = "Blood Gas" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
14798,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
564,
1499,
6,
2774,
1947,
834,
8547,
302,
1499,
6,
1246,
1499,
6,
103,
115,
1499,
6,
7285,
1499,
6,
1612,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
3... |
Can you tell me total number of Silver that has the Republic of latvian ssr, and the Total larger than 6? | CREATE TABLE table_name_12 (
silver VARCHAR,
republic VARCHAR,
total VARCHAR
) | SELECT COUNT(silver) FROM table_name_12 WHERE republic = "latvian ssr" AND total > 6 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2122,
41,
4294,
584,
4280,
28027,
6,
20237,
584,
4280,
28027,
6,
792,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
1072,
25,
817,
140,
792,
381,
13,
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,
2847,
17161,
599,
7,
173,
624,
61,
21680,
953,
834,
4350,
834,
2122,
549,
17444,
427,
20237,
3274,
96,
40,
144,
5907,
29,
3,
7,
7,
52,
121,
3430,
792,
2490,
431,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who was the opponent at the game at Madison Square Garden? | CREATE TABLE table_63166 (
"Game" text,
"Date" text,
"Opponent" text,
"Score" text,
"Location/Attendance" text,
"Record" text
) | SELECT "Opponent" FROM table_63166 WHERE "Location/Attendance" = 'madison square garden' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3891,
26811,
41,
96,
23055,
121,
1499,
6,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
434,
32,
75,
257,
87,
188,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
667,
102,
9977,
121,
21680,
953,
834,
3891,
26811,
549,
17444,
427,
96,
434,
32,
75,
257,
87,
188,
17,
324,
26,
663,
121,
3274,
3,
31,
11374,
23,
739,
2812,
2004,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Show the number of documents created in each day and bin document date by year interval and group by document type description with a group line chart, list in desc by the x axis. | CREATE TABLE Documents_with_Expenses (
Document_ID INTEGER,
Budget_Type_Code CHAR(15),
Document_Details VARCHAR(255)
)
CREATE TABLE Ref_Budget_Codes (
Budget_Type_Code CHAR(15),
Budget_Type_Description VARCHAR(255)
)
CREATE TABLE Accounts (
Account_ID INTEGER,
Statement_ID INTEGER,
Account_Details VARCHAR(255)
)
CREATE TABLE Statements (
Statement_ID INTEGER,
Statement_Details VARCHAR(255)
)
CREATE TABLE Documents (
Document_ID INTEGER,
Document_Type_Code CHAR(15),
Project_ID INTEGER,
Document_Date DATETIME,
Document_Name VARCHAR(255),
Document_Description VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Projects (
Project_ID INTEGER,
Project_Details VARCHAR(255)
)
CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_Type_Name VARCHAR(255),
Document_Type_Description VARCHAR(255)
) | SELECT Document_Date, COUNT(Document_Date) FROM Ref_Document_Types AS T1 JOIN Documents AS T2 ON T1.Document_Type_Code = T2.Document_Type_Code GROUP BY Document_Type_Description ORDER BY Document_Date DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
11167,
7,
834,
4065,
834,
12882,
5167,
7,
41,
11167,
834,
4309,
3,
21342,
17966,
6,
12532,
834,
25160,
834,
22737,
3,
28027,
599,
1808,
201,
11167,
834,
2962,
5756,
7,
584,
4280,
28027... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
11167,
834,
308,
342,
6,
2847,
17161,
599,
4135,
1071,
297,
834,
308,
342,
61,
21680,
419,
89,
834,
4135,
1071,
297,
834,
25160,
7,
6157,
332,
536,
3,
15355,
3162,
11167,
7,
6157,
332,
357,
9191,
332,
5411,
4135,
... |
How much Body Width/mm has a Part Number of tsop40/44, and a Body Length/mm smaller than 18.42? | CREATE TABLE table_name_66 (body_width_mm INTEGER, part_number VARCHAR, body_length_mm VARCHAR) | SELECT SUM(body_width_mm) FROM table_name_66 WHERE part_number = "tsop40/44" AND body_length_mm < 18.42 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3539,
41,
6965,
834,
12018,
189,
834,
635,
3,
21342,
17966,
6,
294,
834,
5525,
1152,
584,
4280,
28027,
6,
643,
834,
19457,
834,
635,
584,
4280,
28027,
61,
3,
321... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
6965,
834,
12018,
189,
834,
635,
61,
21680,
953,
834,
4350,
834,
3539,
549,
17444,
427,
294,
834,
5525,
1152,
3274,
96,
17,
7,
32,
102,
2445,
13572,
20364,
3430,
643,
834,
19457,
834,
635,
3,
2,
12... |
What is the year with a kurtis kraft 500a chassis? | CREATE TABLE table_name_86 (
year INTEGER,
chassis VARCHAR
) | SELECT SUM(year) FROM table_name_86 WHERE chassis = "kurtis kraft 500a" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3840,
41,
215,
3,
21342,
17966,
6,
22836,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
215,
28,
3,
9,
3,
10923,
17,
159,
3,
11326,
2899,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
180,
6122,
599,
1201,
61,
21680,
953,
834,
4350,
834,
3840,
549,
17444,
427,
22836,
3274,
96,
10923,
17,
159,
3,
11326,
2899,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the home for league 3rd liga, and an away of 4-0? | CREATE TABLE table_name_11 (home VARCHAR, league VARCHAR, away VARCHAR) | SELECT home FROM table_name_11 WHERE league = "3rd liga" AND away = "4-0" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2596,
41,
5515,
584,
4280,
28027,
6,
5533,
584,
4280,
28027,
6,
550,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
234,
21,
5533,
220,
52,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
234,
21680,
953,
834,
4350,
834,
2596,
549,
17444,
427,
5533,
3274,
96,
519,
52,
26,
3,
17140,
121,
3430,
550,
3274,
96,
26814,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Where did the team finish in the season when the playoff result was divisional finals. | CREATE TABLE table_980 (
"Year" real,
"Team Name" text,
"Division" text,
"League" text,
"Regular Season" text,
"Playoffs" text,
"Open Cup" text
) | SELECT "Regular Season" FROM table_980 WHERE "Playoffs" = 'Divisional Finals' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3916,
632,
41,
96,
476,
2741,
121,
490,
6,
96,
18699,
5570,
121,
1499,
6,
96,
308,
23,
6610,
121,
1499,
6,
96,
2796,
9,
5398,
121,
1499,
6,
96,
17748,
4885,
7960,
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,
17748,
4885,
7960,
121,
21680,
953,
834,
3916,
632,
549,
17444,
427,
96,
15800,
1647,
7,
121,
3274,
3,
31,
21313,
159,
6318,
6514,
7,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What player was place of t1 in To Par and had a score of 70-73-69=212? | CREATE TABLE table_name_81 (to_par VARCHAR, place VARCHAR, score VARCHAR) | SELECT to_par FROM table_name_81 WHERE place = "t1" AND score = 70 - 73 - 69 = 212 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4959,
41,
235,
834,
1893,
584,
4280,
28027,
6,
286,
584,
4280,
28027,
6,
2604,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
1959,
47,
286,
13,
3,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
3,
23143,
14196,
12,
834,
1893,
21680,
953,
834,
4350,
834,
4959,
549,
17444,
427,
286,
3274,
96,
17,
536,
121,
3430,
2604,
3274,
2861,
3,
18,
3,
4552,
3,
18,
3,
3951,
3274,
3,
24837,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the average crowd for the home team of North Melbourne? | CREATE TABLE table_54975 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT AVG("Crowd") FROM table_54975 WHERE "Home team" = 'north melbourne' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
755,
3647,
3072,
41,
96,
19040,
372,
121,
1499,
6,
96,
19040,
372,
2604,
121,
1499,
6,
96,
188,
1343,
372,
121,
1499,
6,
96,
188,
1343,
372,
2604,
121,
1499,
6,
96,
553,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
121,
254,
3623,
26,
8512,
21680,
953,
834,
755,
3647,
3072,
549,
17444,
427,
96,
19040,
372,
121,
3274,
3,
31,
29,
127,
189,
3,
2341,
26255,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the average medal total when the rank is less than 5 and less than 7 bronze medals were won? | CREATE TABLE table_name_64 (
total INTEGER,
rank VARCHAR,
bronze VARCHAR
) | SELECT AVG(total) FROM table_name_64 WHERE rank < 5 AND bronze < 7 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4389,
41,
792,
3,
21342,
17966,
6,
11003,
584,
4280,
28027,
6,
13467,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1348,
9365,
792,
116,
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,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
71,
17217,
599,
235,
1947,
61,
21680,
953,
834,
4350,
834,
4389,
549,
17444,
427,
11003,
3,
2,
305,
3430,
13467,
3,
2,
489,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the home team that played Hull City? | CREATE TABLE table_10374 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
) | SELECT "Home team" FROM table_10374 WHERE "Away team" = 'hull city' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
17864,
4581,
41,
96,
382,
23,
15,
150,
121,
1499,
6,
96,
19040,
372,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
188,
1343,
372,
121,
1499,
6,
96,
308,
342,
121,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
19040,
372,
121,
21680,
953,
834,
17864,
4581,
549,
17444,
427,
96,
188,
1343,
372,
121,
3274,
3,
31,
22699,
690,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the area of Waterford? | CREATE TABLE table_name_25 (
area__km²_ VARCHAR,
principal_town_city VARCHAR
) | SELECT area__km²_ FROM table_name_25 WHERE principal_town_city = "waterford" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1828,
41,
616,
834,
834,
5848,
357,
834,
584,
4280,
28027,
6,
3218,
834,
3540,
834,
6726,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
616... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
616,
834,
834,
5848,
357,
834,
21680,
953,
834,
4350,
834,
1828,
549,
17444,
427,
3218,
834,
3540,
834,
6726,
3274,
96,
3552,
2590,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
How many Years have an Iron Man Award of kyal horsley? | CREATE TABLE table_44906 (
"Year" real,
"Coach" text,
"Captain" text,
"Club Champion" text,
"Leading goalkicker" text,
"Player's Player" text,
"Iron Man Award" text,
"Community Award" text,
"Most Professional" text,
"Most Improved" text,
"NEAFL Player of the Year" text
) | SELECT COUNT("Year") FROM table_44906 WHERE "Iron Man Award" = 'kyal horsley' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3628,
2394,
948,
41,
96,
476,
2741,
121,
490,
6,
96,
3881,
1836,
121,
1499,
6,
96,
19566,
17,
9,
77,
121,
1499,
6,
96,
254,
11158,
16127,
121,
1499,
6,
96,
2796,
9,
26,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
476,
2741,
8512,
21680,
953,
834,
3628,
2394,
948,
549,
17444,
427,
96,
196,
52,
106,
1140,
3677,
121,
3274,
3,
31,
3781,
138,
3,
107,
127,
8887,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What was Jeff Sluman's To par when his total was smaller than 284? | CREATE TABLE table_name_61 (
to_par VARCHAR,
total VARCHAR,
player VARCHAR
) | SELECT to_par FROM table_name_61 WHERE total < 284 AND player = "jeff sluman" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4241,
41,
12,
834,
1893,
584,
4280,
28027,
6,
792,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8507,
180,
5171,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12,
834,
1893,
21680,
953,
834,
4350,
834,
4241,
549,
17444,
427,
792,
3,
2,
204,
4608,
3430,
1959,
3274,
96,
1924,
89,
89,
3,
7,
5171,
152,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
what is the reported age when the reported birth date is 22 december 1878? | CREATE TABLE table_44410 (
"Region" text,
"Name" text,
"Reported birth date" text,
"Reported death date" text,
"Reported age" text
) | SELECT "Reported age" FROM table_44410 WHERE "Reported birth date" = '22 december 1878' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3628,
24175,
41,
96,
17748,
23,
106,
121,
1499,
6,
96,
23954,
121,
1499,
6,
96,
1649,
16262,
3879,
833,
121,
1499,
6,
96,
1649,
16262,
1687,
833,
121,
1499,
6,
96,
1649,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
1649,
16262,
1246,
121,
21680,
953,
834,
3628,
24175,
549,
17444,
427,
96,
1649,
16262,
3879,
833,
121,
3274,
3,
31,
2884,
20,
75,
18247,
507,
3940,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
what is days of hospital stay of subject id 3343? | 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
)
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
) | SELECT demographic.days_stay FROM demographic WHERE demographic.subject_id = "3343" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
14798,
5,
1135,
7,
834,
21545,
21680,
14798,
549,
17444,
427,
14798,
5,
7304,
11827,
834,
23,
26,
3274,
96,
4201,
4906,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the name of the episode originally aired on September 29, 1999? | CREATE TABLE table_18646432_4 (title VARCHAR, original_air_date VARCHAR) | SELECT title FROM table_18646432_4 WHERE original_air_date = "September 29, 1999" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2606,
4389,
4389,
2668,
834,
591,
41,
21869,
584,
4280,
28027,
6,
926,
834,
2256,
834,
5522,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
564,
13,
8,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2233,
21680,
953,
834,
2606,
4389,
4389,
2668,
834,
591,
549,
17444,
427,
926,
834,
2256,
834,
5522,
3274,
96,
27652,
14405,
5247,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
tell me the number of female patients who have uncontrolled diabetes with hyperosmolarity, type ii or unspecified type diagnoses. | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "F" AND diagnoses.long_title = "Diabetes with hyperosmolarity, type II or unspecified type, uncontrolled" | [
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 College of the Halfback Player? | CREATE TABLE table_name_57 (
college VARCHAR,
position VARCHAR
) | SELECT college FROM table_name_57 WHERE position = "halfback" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3436,
41,
1900,
584,
4280,
28027,
6,
1102,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1888,
13,
8,
15014,
1549,
12387,
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,
1900,
21680,
953,
834,
4350,
834,
3436,
549,
17444,
427,
1102,
3274,
96,
17114,
1549,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the average pick of the kansas city chiefs? | CREATE TABLE table_name_12 (
pick INTEGER,
team VARCHAR
) | SELECT AVG(pick) FROM table_name_12 WHERE team = "kansas city chiefs" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2122,
41,
1432,
3,
21342,
17966,
6,
372,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1348,
1432,
13,
8,
3,
3304,
7,
9,
7,
690,
5752,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
71,
17217,
599,
17967,
61,
21680,
953,
834,
4350,
834,
2122,
549,
17444,
427,
372,
3274,
96,
3304,
7,
9,
7,
690,
5752,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
how long did it take elin backman to finish the race ? | CREATE TABLE table_204_401 (
id number,
"rank" number,
"lane" number,
"name" text,
"nationality" text,
"react" number,
"time" number,
"notes" text
) | SELECT "time" FROM table_204_401 WHERE "name" = 'elin backman' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
20016,
41,
3,
23,
26,
381,
6,
96,
6254,
121,
381,
6,
96,
8102,
121,
381,
6,
96,
4350,
121,
1499,
6,
96,
16557,
485,
121,
1499,
6,
96,
60,
2708,
121,
381,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
715,
121,
21680,
953,
834,
26363,
834,
20016,
549,
17444,
427,
96,
4350,
121,
3274,
3,
31,
15,
40,
77,
223,
348,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
List the number of winery of the wines whose price is bigger than 100 in a bar chart, rank from low to high by the names please. | CREATE TABLE appellations (
No INTEGER,
Appelation TEXT,
County TEXT,
State TEXT,
Area TEXT,
isAVA TEXT
)
CREATE TABLE grapes (
ID INTEGER,
Grape TEXT,
Color TEXT
)
CREATE TABLE wine (
No INTEGER,
Grape TEXT,
Winery TEXT,
Appelation TEXT,
State TEXT,
Name TEXT,
Year INTEGER,
Price INTEGER,
Score INTEGER,
Cases INTEGER,
Drink TEXT
) | SELECT Winery, COUNT(Winery) FROM wine WHERE Price > 100 GROUP BY Winery ORDER BY Winery | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
8319,
6105,
7,
41,
465,
3,
21342,
17966,
6,
3,
27794,
257,
3,
3463,
4,
382,
6,
1334,
3,
3463,
4,
382,
6,
1015,
3,
3463,
4,
382,
6,
5690,
3,
3463,
4,
382,
6,
19,
6968,
188,
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,
9426,
651,
6,
2847,
17161,
599,
18455,
4203,
61,
21680,
2013,
549,
17444,
427,
5312,
2490,
910,
350,
4630,
6880,
272,
476,
9426,
651,
4674,
11300,
272,
476,
9426,
651,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Bar chart x axis away team y axis the number of away team | CREATE TABLE injury_accident (
game_id int,
id int,
Player text,
Injury text,
Number_of_matches text,
Source text
)
CREATE TABLE stadium (
id int,
name text,
Home_Games int,
Average_Attendance real,
Total_Attendance real,
Capacity_Percentage real
)
CREATE TABLE game (
stadium_id int,
id int,
Season int,
Date text,
Home_team text,
Away_team text,
Score text,
Competition text
) | SELECT Away_team, COUNT(Away_team) FROM game GROUP BY Away_team | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2871,
834,
6004,
4215,
41,
467,
834,
23,
26,
16,
17,
6,
3,
23,
26,
16,
17,
6,
12387,
1499,
6,
28905,
1499,
6,
7720,
834,
858,
834,
19515,
15,
7,
1499,
6,
9149,
1499,
3,
61,
3,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
1343,
834,
11650,
6,
2847,
17161,
599,
188,
1343,
834,
11650,
61,
21680,
467,
350,
4630,
6880,
272,
476,
71,
1343,
834,
11650,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
how many patients whose gender is m and drug code is fluc100? | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.gender = "M" AND prescriptions.formulary_drug_cd = "FLUC100" | [
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,
7744,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7744,
7,
5,
8399,
51,
834,
23,
26,
549... |
Who was the developer of Resident Evil 4? | CREATE TABLE table_64753 (
"Year" real,
"Game" text,
"Genre" text,
"Platform(s)" text,
"Developer(s)" text
) | SELECT "Developer(s)" FROM table_64753 WHERE "Game" = 'resident evil 4' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4389,
3072,
519,
41,
96,
476,
2741,
121,
490,
6,
96,
23055,
121,
1499,
6,
96,
13714,
60,
121,
1499,
6,
96,
10146,
2032,
599,
7,
61,
121,
1499,
6,
96,
2962,
162,
8745,
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,
96,
2962,
162,
8745,
49,
599,
7,
61,
121,
21680,
953,
834,
4389,
3072,
519,
549,
17444,
427,
96,
23055,
121,
3274,
3,
31,
15704,
8293,
314,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many different results are there for the battles? | CREATE TABLE battle (RESULT VARCHAR) | SELECT COUNT(DISTINCT RESULT) FROM battle | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3392,
41,
12200,
4254,
382,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
315,
772,
33,
132,
21,
8,
3392,
7,
58,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
4083,
4138,
9012,
61,
21680,
3392,
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,
... |
Which school has the mascot of the Colonials? | CREATE TABLE table_20775 (
"Institution" text,
"Location" text,
"Founded" real,
"Affiliation" text,
"Enrollment" real,
"Team Nickname" text,
"Primary conference" text,
"Home Rink" text
) | SELECT "Institution" FROM table_20775 WHERE "Team Nickname" = 'Colonials' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26426,
3072,
41,
96,
1570,
17448,
121,
1499,
6,
96,
434,
32,
75,
257,
121,
1499,
6,
96,
20100,
121,
490,
6,
96,
188,
89,
8027,
23,
257,
121,
1499,
6,
96,
8532,
4046,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
26426,
3072,
549,
17444,
427,
96,
18699,
7486,
4350,
121,
3274,
3,
31,
9939,
32,
7419,
7,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
How many different classes are there? | CREATE TABLE CLASS (class_code VARCHAR) | SELECT COUNT(DISTINCT class_code) FROM CLASS | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3,
31598,
41,
4057,
834,
4978,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
315,
2287,
33,
132,
58,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
853,
834,
4978,
61,
21680,
3,
31598,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is Record, when Home is "New York Rangers", and when Date is "April 17"? | CREATE TABLE table_name_4 (record VARCHAR, home VARCHAR, date VARCHAR) | SELECT record FROM table_name_4 WHERE home = "new york rangers" AND date = "april 17" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
591,
41,
60,
7621,
584,
4280,
28027,
6,
234,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
11392,
6,
116,
1210,
19,
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,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1368,
21680,
953,
834,
4350,
834,
591,
549,
17444,
427,
234,
3274,
96,
5534,
25453,
620,
52,
7,
121,
3430,
833,
3274,
96,
9,
2246,
40,
1003,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who did he fight in Rumble of the Kings 6? | CREATE TABLE table_name_87 (opponent VARCHAR, event VARCHAR) | SELECT opponent FROM table_name_87 WHERE event = "rumble of the kings 6" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4225,
41,
32,
102,
9977,
584,
4280,
28027,
6,
605,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
410,
3,
88,
2870,
16,
391,
13514,
13,
8,
13913,
431... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15264,
21680,
953,
834,
4350,
834,
4225,
549,
17444,
427,
605,
3274,
96,
52,
13514,
13,
8,
3,
1765,
7,
431,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
alt < 60; ast < 60 | CREATE TABLE table_train_167 (
"id" int,
"alt" float,
"body_weight" float,
"ast" float,
"hematocrit_hct" float,
"thyroid_stimulating_hormone_stsh" int,
"body_mass_index_bmi" float,
"fasting_glucose" int,
"NOUSE" float
) | SELECT * FROM table_train_167 WHERE alt < 60 OR ast < 60 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
9719,
834,
27650,
41,
96,
23,
26,
121,
16,
17,
6,
96,
2920,
121,
3,
12660,
6,
96,
6965,
834,
9378,
121,
3,
12660,
6,
96,
9,
7,
17,
121,
3,
12660,
6,
96,
6015,
9,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
1429,
21680,
953,
834,
9719,
834,
27650,
549,
17444,
427,
4445,
3,
2,
1640,
4674,
38,
17,
3,
2,
1640,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Count the number of patients who had procedure icd9 code 9920 and a drug route of iv bolus. | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
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 procedures ON demographic.hadm_id = procedures.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE procedures.icd9_code = "9920" AND prescriptions.route = "IV BOLUS" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
3388,
18206... |
Which country is Howard Clark from? | CREATE TABLE table_62459 (
"Place" text,
"Player" text,
"Country" text,
"Score" real,
"To par" text
) | SELECT "Country" FROM table_62459 WHERE "Player" = 'howard clark' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
948,
2266,
3390,
41,
96,
345,
11706,
121,
1499,
6,
96,
15800,
49,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
134,
9022,
121,
490,
6,
96,
3696,
260,
121,
1499,
3,
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,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
96,
10628,
651,
121,
21680,
953,
834,
948,
2266,
3390,
549,
17444,
427,
96,
15800,
49,
121,
3274,
3,
31,
4067,
986,
6860,
157,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Name the average fall 07 for fall 07 more than 219 | CREATE TABLE table_name_34 (
fall_07 INTEGER,
fall_06 INTEGER
) | SELECT AVG(fall_07) FROM table_name_34 WHERE fall_06 > 219 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3710,
41,
1590,
834,
4560,
3,
21342,
17966,
6,
1590,
834,
5176,
3,
21342,
17966,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
1348,
1590,
10668,
21,
1590,
10668,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
71,
17217,
599,
2857,
834,
4560,
61,
21680,
953,
834,
4350,
834,
3710,
549,
17444,
427,
1590,
834,
5176,
2490,
204,
2294,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What are ids and total number of hours played for each game? | CREATE TABLE plays_games (
stuid number,
gameid number,
hours_played number
)
CREATE TABLE sportsinfo (
stuid number,
sportname text,
hoursperweek number,
gamesplayed number,
onscholarship text
)
CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
)
CREATE TABLE video_games (
gameid number,
gname text,
gtype text
) | SELECT gameid, SUM(hours_played) FROM plays_games GROUP BY gameid | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4805,
834,
7261,
7,
41,
21341,
23,
26,
381,
6,
467,
23,
26,
381,
6,
716,
834,
4895,
15,
26,
381,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
2100,
9583,
41,
21341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
467,
23,
26,
6,
180,
6122,
599,
5842,
7,
834,
4895,
15,
26,
61,
21680,
4805,
834,
7261,
7,
350,
4630,
6880,
272,
476,
467,
23,
26,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What position does the player with jersey number 22 play? | CREATE TABLE table_name_65 (
position VARCHAR,
jersey_number_s_ VARCHAR
) | SELECT position FROM table_name_65 WHERE jersey_number_s_ = "22" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4122,
41,
1102,
584,
4280,
28027,
6,
13426,
834,
5525,
1152,
834,
7,
834,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
1102,
405,
8,
1959,
28,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1102,
21680,
953,
834,
4350,
834,
4122,
549,
17444,
427,
13426,
834,
5525,
1152,
834,
7,
834,
3274,
96,
2884,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Who directed the episode written by patrick meighan? | CREATE TABLE table_24898 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (millions)" text
) | SELECT "Directed by" FROM table_24898 WHERE "Written by" = 'Patrick Meighan' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
3707,
3916,
41,
96,
4168,
5,
16,
939,
121,
490,
6,
96,
4168,
5,
16,
774,
121,
490,
6,
96,
382,
155,
109,
121,
1499,
6,
96,
23620,
15,
26,
57,
121,
1499,
6,
96,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
23620,
15,
26,
57,
121,
21680,
953,
834,
357,
3707,
3916,
549,
17444,
427,
96,
24965,
324,
57,
121,
3274,
3,
31,
20742,
2406,
1212,
23,
22637,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
When Bubbles of no, and a Category of miscellaneous, and a Type of propertychange, what was the Cancelable? | CREATE TABLE table_37677 (
"Category" text,
"Type" text,
"Attribute" text,
"Bubbles" text,
"Cancelable" text
) | SELECT "Cancelable" FROM table_37677 WHERE "Bubbles" = 'no' AND "Category" = 'miscellaneous' AND "Type" = 'propertychange' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
519,
3959,
4013,
41,
96,
18610,
6066,
651,
121,
1499,
6,
96,
25160,
121,
1499,
6,
96,
188,
17,
5135,
17,
15,
121,
1499,
6,
96,
7793,
7310,
7,
121,
1499,
6,
96,
254,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
254,
663,
40,
179,
121,
21680,
953,
834,
519,
3959,
4013,
549,
17444,
427,
96,
7793,
7310,
7,
121,
3274,
3,
31,
29,
32,
31,
3430,
96,
18610,
6066,
651,
121,
3274,
3,
31,
51,
159,
7125,
8102,
1162,
31,
3430,
... |
What is the score in the 6 atlas stones event of the player who got 2 (6 in 30.89s) in the 3 dead lift event? | CREATE TABLE table_26748 (
"Position" text,
"Name" text,
"Nationality" text,
"Event 1 Medley" text,
"Event 2 Truck Pull" text,
"Event 3 Dead Lift" text,
"Event 4 Fingals Fingers" text,
"Event 5 Keg Toss" text,
"Event 6 Atlas Stones" text
) | SELECT COUNT("Event 6 Atlas Stones") FROM table_26748 WHERE "Event 3 Dead Lift" = '2 (6 in 30.89s)' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
3708,
3707,
41,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
23954,
121,
1499,
6,
96,
24732,
485,
121,
1499,
6,
96,
427,
2169,
209,
8067,
1306,
121,
1499,
6,
96,
427,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
427,
2169,
431,
21635,
5614,
7,
8512,
21680,
953,
834,
357,
3708,
3707,
549,
17444,
427,
96,
427,
2169,
220,
9651,
19495,
121,
3274,
3,
31,
357,
11372,
16,
604,
5,
3914,
7,
61,
31,
1,
-100,
... |
What was the score of the final in which Melanie South played with partner Katie O'Brien? | CREATE TABLE table_name_27 (score VARCHAR, partner VARCHAR) | SELECT score FROM table_name_27 WHERE partner = "katie o'brien" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2555,
41,
7,
9022,
584,
4280,
28027,
6,
2397,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
2604,
13,
8,
804,
16,
84,
31297,
1013,
1944,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2604,
21680,
953,
834,
4350,
834,
2555,
549,
17444,
427,
2397,
3274,
96,
8682,
23,
15,
3,
32,
31,
2160,
35,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What was the B segmint for Netlix S03E01? | CREATE TABLE table_name_54 (segment_b VARCHAR, netflix VARCHAR) | SELECT segment_b FROM table_name_54 WHERE netflix = "s03e01" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5062,
41,
7,
15,
122,
297,
834,
115,
584,
4280,
28027,
6,
3134,
89,
17591,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
272,
142,
122,
1109,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5508,
834,
115,
21680,
953,
834,
4350,
834,
5062,
549,
17444,
427,
3134,
89,
17591,
3274,
96,
7,
4928,
15,
4542,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What club team did JArrod Maidens play for? | CREATE TABLE table_17204 (
"Round" real,
"Overall" text,
"Player" text,
"Position" text,
"Nationality" text,
"Club team" text
) | SELECT "Club team" FROM table_17204 WHERE "Player" = 'Jarrod Maidens' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2517,
26363,
41,
96,
448,
32,
1106,
121,
490,
6,
96,
23847,
1748,
121,
1499,
6,
96,
15800,
49,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
24732,
485,
121,
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,
96,
254,
11158,
372,
121,
21680,
953,
834,
2517,
26363,
549,
17444,
427,
96,
15800,
49,
121,
3274,
3,
31,
683,
19996,
26,
2636,
537,
7,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which chassis is from 1974 and was an entrant of Goldie Hexagon racing? | CREATE TABLE table_name_35 (chassis VARCHAR, year VARCHAR, entrant VARCHAR) | SELECT chassis FROM table_name_35 WHERE year = 1974 AND entrant = "goldie hexagon racing" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2469,
41,
524,
6500,
7,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
6,
3,
295,
3569,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
22836,
19,
45,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
3,
23143,
14196,
22836,
21680,
953,
834,
4350,
834,
2469,
549,
17444,
427,
215,
3274,
17184,
3430,
3,
295,
3569,
3274,
96,
7579,
2498,
30060,
8191,
121,
1,
-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, draw a bar chart about the distribution of hire_date and the amount of hire_date bin hire_date by time. | 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 regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_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 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 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)
) | SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1440,
41,
2847,
17161,
11824,
834,
4309,
3,
4331,
4059,
16426,
6,
2847,
17161,
11824,
834,
567,
17683,
3,
4331,
4059,
599,
2445,
201,
4083,
517,
9215,
834,
4309,
7908,
1982,
599,
1714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2847,
17161,
599,
566,
14132,
834,
308,
6048,
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... |
what is the number of patients whose primary disease is mesenteric ischemia and procedure short title is clo endosc bx bile duct? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "MESENTERIC ISCHEMIA" AND procedures.short_title = "Clo endosc bx bile duct" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
Who was the opponent in week 6? | CREATE TABLE table_48039 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"TV Time" text,
"Attendance" text
) | SELECT "Opponent" FROM table_48039 WHERE "Week" = '6' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
20579,
3288,
41,
96,
518,
10266,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
20119,
121,
1499,
6,
96,
4562,
2900,
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,
667,
102,
9977,
121,
21680,
953,
834,
20579,
3288,
549,
17444,
427,
96,
518,
10266,
121,
3274,
3,
31,
948,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the total height in meters for the building that has a less than 380.6 feet height? | CREATE TABLE table_name_22 (height__m_ INTEGER, height__ft_ INTEGER) | SELECT SUM(height__m_) FROM table_name_22 WHERE height__ft_ < 380.6 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2884,
41,
88,
2632,
834,
834,
51,
834,
3,
21342,
17966,
6,
3902,
834,
834,
89,
17,
834,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
792,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
180,
6122,
599,
88,
2632,
834,
834,
51,
834,
61,
21680,
953,
834,
4350,
834,
2884,
549,
17444,
427,
3902,
834,
834,
89,
17,
834,
3,
2,
6654,
22787,
1,
-100,
-100,
-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, a bar chart shows the distribution of phone_number and commission_pct , list in asc by the Y-axis please. | CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_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 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 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 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 regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
) | SELECT PHONE_NUMBER, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY COMMISSION_PCT | [
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,
3,
8023,
7894,
834,
567,
6122,
12920,
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,... |
Show me about the distribution of All_Home and the average of Team_ID , and group by attribute All_Home in a bar chart, and sort by the y-axis in desc. | 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, AVG(Team_ID) FROM basketball_match GROUP BY All_Home ORDER BY AVG(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,
71,
17217,
599,
18699,
834,
4309,
61,
21680,
8498,
834,
19515,
350,
4630,
6880,
272,
476,
432,
834,
19040,
4674,
11300,
272,
476,
71,
17217,
599,
18699,
834,
4309,
61,
309,
25067,
1,
-100,
-100,
... |
fasting blood glucose < 126 and / or hgba1c < 6.4 | CREATE TABLE table_train_114 (
"id" int,
"gender" string,
"systolic_blood_pressure_sbp" int,
"hgba1c" float,
"fasting_blood_glucose_fbg" float,
"cortical_stroke" bool,
"diastolic_blood_pressure_dbp" int,
"hypertension" bool,
"age" float,
"NOUSE" float
) | SELECT * FROM table_train_114 WHERE fasting_blood_glucose_fbg < 126 OR hgba1c < 6.4 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
9719,
834,
18959,
41,
96,
23,
26,
121,
16,
17,
6,
96,
122,
3868,
121,
6108,
6,
96,
7,
63,
7,
235,
2176,
834,
27798,
834,
26866,
834,
7,
115,
102,
121,
16,
17,
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,
1429,
21680,
953,
834,
9719,
834,
18959,
549,
17444,
427,
1006,
53,
834,
27798,
834,
13492,
509,
7,
15,
834,
89,
115,
122,
3,
2,
3,
21976,
4674,
3,
107,
122,
115,
9,
536,
75,
3,
2,
3,
27869,
1,
-100,
-100,
-10... |
What is the number range for the T 3 class? | CREATE TABLE table_12833 (
"Class" text,
"Number range" text,
"Quantity" real,
"Year(s) Built" text,
"Type" text
) | SELECT "Number range" FROM table_12833 WHERE "Class" = 't 3' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2122,
4591,
519,
41,
96,
21486,
121,
1499,
6,
96,
567,
5937,
49,
620,
121,
1499,
6,
96,
5991,
288,
485,
121,
490,
6,
96,
476,
2741,
599,
7,
61,
14862,
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,
567,
5937,
49,
620,
121,
21680,
953,
834,
2122,
4591,
519,
549,
17444,
427,
96,
21486,
121,
3274,
3,
31,
17,
220,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
karl farmer played the same position as jay chesley . what position was it ? | CREATE TABLE table_204_70 (
id number,
"pick #" number,
"nfl team" text,
"player" text,
"position" text,
"college" text
) | SELECT "position" FROM table_204_70 WHERE "player" = 'karl farmer' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
2518,
41,
3,
23,
26,
381,
6,
96,
17967,
1713,
121,
381,
6,
96,
29,
89,
40,
372,
121,
1499,
6,
96,
20846,
121,
1499,
6,
96,
4718,
121,
1499,
6,
96,
3297,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
4718,
121,
21680,
953,
834,
26363,
834,
2518,
549,
17444,
427,
96,
20846,
121,
3274,
3,
31,
4031,
40,
17766,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Find the login name of the course author that teaches the course with name "advanced database". | CREATE TABLE Courses (author_id VARCHAR, course_name VARCHAR); CREATE TABLE Course_Authors_and_Tutors (login_name VARCHAR, author_id VARCHAR) | SELECT T1.login_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = "advanced database" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
8670,
7,
41,
17415,
834,
23,
26,
584,
4280,
28027,
6,
503,
834,
4350,
584,
4280,
28027,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
8670,
834,
23602,
127,
7,
834,
232,
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,
2152,
77,
834,
4350,
21680,
8670,
834,
23602,
127,
7,
834,
232,
834,
28676,
7,
6157,
332,
536,
3,
15355,
3162,
8670,
7,
6157,
332,
357,
9191,
332,
5411,
17415,
834,
23,
26,
3274,
332,
4416,
17415,
834,
... |
After the year 2011, who was the youngest nominee? | CREATE TABLE table_name_24 (
record_set VARCHAR,
year VARCHAR,
superlative VARCHAR
) | SELECT record_set FROM table_name_24 WHERE year > 2011 AND superlative = "youngest nominee" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2266,
41,
1368,
834,
2244,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
6,
1355,
40,
1528,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
621,
8,
215,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1368,
834,
2244,
21680,
953,
834,
4350,
834,
2266,
549,
17444,
427,
215,
2490,
2722,
3430,
1355,
40,
1528,
3274,
96,
4188,
1725,
222,
21077,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the date for Europe? | CREATE TABLE table_name_32 (
date VARCHAR,
region VARCHAR
) | SELECT date FROM table_name_32 WHERE region = "europe" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2668,
41,
833,
584,
4280,
28027,
6,
1719,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
833,
21,
1740,
58,
1,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
833,
21680,
953,
834,
4350,
834,
2668,
549,
17444,
427,
1719,
3274,
96,
28188,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which Chart has a Peak Position of 1? | CREATE TABLE table_name_68 (
chart VARCHAR,
peak_position VARCHAR
) | SELECT chart FROM table_name_68 WHERE peak_position = 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3651,
41,
5059,
584,
4280,
28027,
6,
6734,
834,
4718,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
15054,
65,
3,
9,
18996,
14258,
13,
209,
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,
5059,
21680,
953,
834,
4350,
834,
3651,
549,
17444,
427,
6734,
834,
4718,
3274,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
when did patient 007-3999 leave the hospital the first time since 2 years ago? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime 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 allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime 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 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
) | SELECT patient.hospitaldischargetime FROM patient WHERE patient.uniquepid = '007-3999' AND DATETIME(patient.hospitaldischargetime) >= DATETIME(CURRENT_TIME(), '-2 year') ORDER BY patient.hospitaldischargetime LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
8209,
41,
8209,
23,
26,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
8209,
4350,
1499,
6,
8209,
715,
97,
6,
3,
447,
26,
1298,
4978,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1868,
5,
31386,
26,
159,
7993,
715,
21680,
1868,
549,
17444,
427,
1868,
5,
202,
1495,
12417,
3274,
3,
31,
1206,
940,
3486,
19446,
31,
3430,
309,
6048,
382,
15382,
599,
10061,
5,
31386,
26,
159,
7993,
715,
61,
2490,
... |
Which place has points larger than 1, a bmw machine, and a time of 1:18.47.6? | CREATE TABLE table_name_44 (
place INTEGER,
time VARCHAR,
points VARCHAR,
machine VARCHAR
) | SELECT MIN(place) FROM table_name_44 WHERE points > 1 AND machine = "bmw" AND time = "1:18.47.6" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3628,
41,
286,
3,
21342,
17966,
6,
97,
584,
4280,
28027,
6,
979,
584,
4280,
28027,
6,
1437,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
286,
65... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4687,
61,
21680,
953,
834,
4350,
834,
3628,
549,
17444,
427,
979,
2490,
209,
3430,
1437,
3274,
96,
29471,
121,
3430,
97,
3274,
96,
536,
10,
2606,
5,
4177,
5,
948,
121,
1,
-100,
-100,
-100,
-100,
-10... |
Who was pick number 34? | CREATE TABLE table_29836557_2 (player VARCHAR, pick__number VARCHAR) | SELECT player FROM table_29836557_2 WHERE pick__number = 34 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
3916,
10402,
3436,
834,
357,
41,
20846,
584,
4280,
28027,
6,
1432,
834,
834,
5525,
1152,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
1432,
381,
6154,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1959,
21680,
953,
834,
357,
3916,
10402,
3436,
834,
357,
549,
17444,
427,
1432,
834,
834,
5525,
1152,
3274,
6154,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which college has the player Rushel Shell? | CREATE TABLE table_11677691_5 (
college VARCHAR,
player VARCHAR
) | SELECT college FROM table_11677691_5 WHERE player = "Rushel Shell" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2596,
3708,
3959,
4729,
834,
755,
41,
1900,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
1900,
65,
8,
1959,
20710,
15,
40,
16040,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1900,
21680,
953,
834,
2596,
3708,
3959,
4729,
834,
755,
549,
17444,
427,
1959,
3274,
96,
17137,
7,
88,
40,
16040,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the cyrillic name for Budisava? | CREATE TABLE table_2562572_9 (cyrillic_name_other_names VARCHAR, settlement VARCHAR) | SELECT cyrillic_name_other_names FROM table_2562572_9 WHERE settlement = "Budisava" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
19337,
1828,
5865,
834,
1298,
41,
75,
63,
52,
173,
2176,
834,
4350,
834,
9269,
834,
4350,
7,
584,
4280,
28027,
6,
7025,
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,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
75,
63,
52,
173,
2176,
834,
4350,
834,
9269,
834,
4350,
7,
21680,
953,
834,
19337,
1828,
5865,
834,
1298,
549,
17444,
427,
7025,
3274,
96,
279,
5291,
7,
8644,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the difficulty of the athens circuit? | CREATE TABLE table_24463470_1 (difficulty VARCHAR, circuit VARCHAR) | SELECT difficulty FROM table_24463470_1 WHERE circuit = "Athens" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2266,
4448,
3710,
2518,
834,
536,
41,
26,
5982,
7034,
17,
63,
584,
4280,
28027,
6,
4558,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
8565,
13,
8,
44,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
8565,
21680,
953,
834,
2266,
4448,
3710,
2518,
834,
536,
549,
17444,
427,
4558,
3274,
96,
188,
189,
35,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Why did the change happened in Massachusetts (2)? | CREATE TABLE table_1883 (
"State (class)" text,
"Vacator" text,
"Reason for change" text,
"Successor" text,
"Date of successors formal installation" text
) | SELECT "Reason for change" FROM table_1883 WHERE "State (class)" = 'Massachusetts (2)' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2606,
4591,
41,
96,
134,
4748,
41,
4057,
61,
121,
1499,
6,
96,
25203,
1016,
121,
1499,
6,
96,
1649,
9,
739,
21,
483,
121,
1499,
6,
96,
134,
17431,
24901,
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,
1649,
9,
739,
21,
483,
121,
21680,
953,
834,
2606,
4591,
549,
17444,
427,
96,
134,
4748,
41,
4057,
61,
121,
3274,
3,
31,
27189,
1836,
1074,
17,
17,
7,
6499,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
what is primary disease and lab test name of subject id 2560? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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 demographic.diagnosis, lab.label FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.subject_id = "2560" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
14798,
5,
25930,
4844,
159,
6,
7690,
5,
40,
10333,
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,
427,
14798,
5,
7304,
118... |
Who was the visitor when ward recorded the decision with a record of 22–21–4? | CREATE TABLE table_name_4 (visitor VARCHAR, decision VARCHAR, record VARCHAR) | SELECT visitor FROM table_name_4 WHERE decision = "ward" AND record = "22–21–4" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
591,
41,
3466,
155,
127,
584,
4280,
28027,
6,
1357,
584,
4280,
28027,
6,
1368,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
8,
7019,
116,
3,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7019,
21680,
953,
834,
4350,
834,
591,
549,
17444,
427,
1357,
3274,
96,
2239,
121,
3430,
1368,
3274,
96,
2884,
104,
2658,
104,
20364,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the Home team of Tie no 2? | CREATE TABLE table_name_20 (home_team VARCHAR, tie_no VARCHAR) | SELECT home_team FROM table_name_20 WHERE tie_no = "2" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1755,
41,
5515,
834,
11650,
584,
4280,
28027,
6,
6177,
834,
29,
32,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1210,
372,
13,
2262,
15,
150... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
234,
834,
11650,
21680,
953,
834,
4350,
834,
1755,
549,
17444,
427,
6177,
834,
29,
32,
3274,
96,
357,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What are all the City/Neighborhoods whose extension is East Link and proposed parking lot status is yes and whose proposed station is Overlake transit Center? | CREATE TABLE table_25299 (
"Station" text,
"Extension" text,
"City/Neighborhood" text,
"Projected opening" text,
"Park and ride?" text,
"Funded by ST2 ?" text
) | SELECT "City/Neighborhood" FROM table_25299 WHERE "Extension" = 'East Link' AND "Park and ride?" = 'Yes' AND "Station" = 'Overlake Transit Center' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
357,
3264,
41,
96,
134,
6821,
121,
1499,
6,
96,
5420,
13177,
121,
1499,
6,
96,
254,
485,
87,
567,
15,
9031,
6693,
4500,
121,
1499,
6,
96,
3174,
354,
7633,
2101,
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,
254,
485,
87,
567,
15,
9031,
6693,
4500,
121,
21680,
953,
834,
1828,
357,
3264,
549,
17444,
427,
96,
5420,
13177,
121,
3274,
3,
31,
25235,
7505,
31,
3430,
96,
26163,
11,
2564,
4609,
3274,
3,
31,
19739,
31,
343... |
For averages of 1.58 and matches under 38, what is the average number of goals? | CREATE TABLE table_name_79 (goals INTEGER, average VARCHAR, matches VARCHAR) | SELECT AVG(goals) FROM table_name_79 WHERE average = 1.58 AND matches < 38 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4440,
41,
839,
5405,
3,
21342,
17966,
6,
1348,
584,
4280,
28027,
6,
6407,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
242,
1348,
7,
13,
1300,
3449,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
71,
17217,
599,
839,
5405,
61,
21680,
953,
834,
4350,
834,
4440,
549,
17444,
427,
1348,
3274,
1300,
3449,
3430,
6407,
3,
2,
6654,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the Money ($) amount for Lloyd Mangrum? | CREATE TABLE table_name_19 (money___$__ VARCHAR, player VARCHAR) | SELECT money___$__ FROM table_name_19 WHERE player = "lloyd mangrum" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2294,
41,
28442,
834,
834,
834,
3229,
834,
834,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
8833,
8785,
61,
866,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
540,
834,
834,
834,
3229,
834,
834,
21680,
953,
834,
4350,
834,
2294,
549,
17444,
427,
1959,
3274,
96,
195,
32,
63,
26,
388,
122,
2781,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
give me the number of patients whose diagnoses short title is obstructive sleep apnea and drug route is pr? | 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 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
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Obstructive sleep apnea" AND prescriptions.route = "PR" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
3... |
Find how many school locations have the word 'NY'. | CREATE TABLE university (LOCATION VARCHAR) | SELECT COUNT(*) FROM university WHERE LOCATION LIKE "%NY%" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3819,
41,
5017,
254,
8015,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2588,
149,
186,
496,
3248,
43,
8,
1448,
3,
31,
12056,
31,
5,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2847,
17161,
599,
1935,
61,
21680,
3819,
549,
17444,
427,
301,
5618,
8015,
8729,
9914,
96,
1454,
12056,
1454,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the COSPAR ID of Ariel 4, which was launched with a Scout carrier rocket? | CREATE TABLE table_name_69 (
cospar_id VARCHAR,
carrier_rocket VARCHAR,
satellite VARCHAR
) | SELECT cospar_id FROM table_name_69 WHERE carrier_rocket = "scout" AND satellite = "ariel 4" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3951,
41,
576,
7,
1893,
834,
23,
26,
584,
4280,
28027,
6,
9568,
834,
6133,
15,
17,
584,
4280,
28027,
6,
7605,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
576,
7,
1893,
834,
23,
26,
21680,
953,
834,
4350,
834,
3951,
549,
17444,
427,
9568,
834,
6133,
15,
17,
3274,
96,
7,
3422,
17,
121,
3430,
7605,
3274,
96,
9,
14018,
3,
20364,
1,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is the name of the last locomotive to be located at the bressingham steam museum ? | CREATE TABLE table_204_30 (
id number,
"year built" text,
"works number" number,
"wheel arr." text,
"gauge" text,
"original owner" text,
"name" text,
"current location" text,
"notes" text
) | SELECT "name" FROM table_204_30 WHERE "current location" = 'bressingham steam museum' ORDER BY "year built" DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
1458,
41,
3,
23,
26,
381,
6,
96,
1201,
1192,
121,
1499,
6,
96,
13631,
381,
121,
381,
6,
96,
14074,
1584,
52,
535,
1499,
6,
96,
20038,
397,
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,
4350,
121,
21680,
953,
834,
26363,
834,
1458,
549,
17444,
427,
96,
14907,
1128,
121,
3274,
3,
31,
1999,
7,
7,
14799,
7222,
7071,
31,
4674,
11300,
272,
476,
96,
1201,
1192,
121,
309,
25067,
8729,
12604,
209,
1,
... |
what make did kurt busch drive ? | CREATE TABLE table_203_529 (
id number,
"fin" number,
"st" number,
"driver" text,
"car #" number,
"make" text,
"points" number,
"bonus" number,
"laps" number,
"winnings" text
) | SELECT "make" FROM table_203_529 WHERE "driver" = 'kurt busch' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
755,
3166,
41,
3,
23,
26,
381,
6,
96,
89,
77,
121,
381,
6,
96,
7,
17,
121,
381,
6,
96,
13739,
52,
121,
1499,
6,
96,
1720,
1713,
121,
381,
6,
96,
19509,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
19509,
121,
21680,
953,
834,
23330,
834,
755,
3166,
549,
17444,
427,
96,
13739,
52,
121,
3274,
3,
31,
10923,
17,
2601,
524,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
what were the three most frequent lab tests until 3 years ago? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE 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
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
) | SELECT t1.labname FROM (SELECT lab.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM lab WHERE DATETIME(lab.labresulttime) <= DATETIME(CURRENT_TIME(), '-3 year') GROUP BY lab.labname) AS t1 WHERE t1.c1 <= 3 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2179,
9339,
41,
2179,
521,
9824,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
1543,
3585,
1499,
6,
9329,
1499,
6,
1543,
4914,
29,
715,
97,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
17,
5411,
9339,
4350,
21680,
41,
23143,
14196,
7690,
5,
9339,
4350,
6,
3,
22284,
4132,
834,
16375,
439,
9960,
3,
23288,
41,
2990,
11300,
272,
476,
2847,
17161,
599,
1935,
61,
309,
25067,
61,
6157,
3,
75,
536,
2... |
Which Score has a Record of 5-4? | CREATE TABLE table_name_36 (score VARCHAR, record VARCHAR) | SELECT score FROM table_name_36 WHERE record = "5-4" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3420,
41,
7,
9022,
584,
4280,
28027,
6,
1368,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
17763,
65,
3,
9,
11392,
13,
305,
4278,
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,
2604,
21680,
953,
834,
4350,
834,
3420,
549,
17444,
427,
1368,
3274,
96,
755,
18,
20364,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the average gpa of the students enrolled in the course with code ACCT-211? | CREATE TABLE CLASS (
class_code VARCHAR,
crs_code VARCHAR
)
CREATE TABLE student (
stu_gpa INTEGER,
stu_num VARCHAR
)
CREATE TABLE enroll (
stu_num VARCHAR,
class_code VARCHAR
) | SELECT AVG(T2.stu_gpa) FROM enroll AS T1 JOIN student AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T1.class_code = T3.class_code WHERE T3.crs_code = 'ACCT-211' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3,
31598,
41,
853,
834,
4978,
584,
4280,
28027,
6,
5764,
7,
834,
4978,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
1236,
41,
21341,
834,
122,
102,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
382,
4416,
7,
17,
76,
834,
122,
102,
9,
61,
21680,
17990,
6157,
332,
536,
3,
15355,
3162,
1236,
6157,
332,
357,
9191,
332,
5411,
7,
17,
76,
834,
5525,
3274,
332,
4416,
7,
17,
76,
834,
5525,
3,
... |
what's the lost with club being colwyn bay rfc | CREATE TABLE table_19113 (
"Club" text,
"Played" text,
"Won" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text,
"Losing bonus" text,
"Points" text
) | SELECT "Lost" FROM table_19113 WHERE "Club" = 'Colwyn Bay RFC' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2294,
20522,
41,
96,
254,
11158,
121,
1499,
6,
96,
15800,
15,
26,
121,
1499,
6,
96,
518,
106,
121,
1499,
6,
96,
308,
10936,
29,
121,
1499,
6,
96,
434,
3481,
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,
3481,
121,
21680,
953,
834,
2294,
20522,
549,
17444,
427,
96,
254,
11158,
121,
3274,
3,
31,
9939,
25269,
2474,
391,
5390,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Give me a scatter chart to show the least rating star of the movie and the star rating of the movie, group the title. | CREATE TABLE Reviewer (
rID int,
name text
)
CREATE TABLE Movie (
mID int,
title text,
year int,
director text
)
CREATE TABLE Rating (
rID int,
mID int,
stars int,
ratingDate date
) | SELECT stars, MIN(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY title | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4543,
49,
41,
3,
52,
4309,
16,
17,
6,
564,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
10743,
41,
3,
51,
4309,
16,
17,
6,
2233,
1499,
6,
215,
16,
17,
6,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4811,
6,
3,
17684,
599,
382,
5411,
3624,
7,
61,
21680,
21662,
6157,
332,
536,
3,
15355,
3162,
10743,
6157,
332,
357,
9191,
332,
5411,
51,
4309,
3274,
332,
4416,
51,
4309,
350,
4630,
6880,
272,
476,
2233,
1,
-100,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.