NATURAL_LANG stringlengths 0 446 | SCHEMA stringlengths 27 2.21k | SQL stringlengths 18 453 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|
How many power stations are connected to grid at Heysham 2 | CREATE TABLE table_19258 (
"AGR Power Station" text,
"Net MWe" real,
"Construction started" real,
"Connected to grid" real,
"Commercial operation" real,
"Accounting closure date" real
) | SELECT COUNT("Connected to grid") FROM table_19258 WHERE "AGR Power Station" = 'Heysham 2' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
19978,
3449,
41,
96,
26646,
2621,
5939,
121,
1499,
6,
96,
9688,
283,
1326,
121,
490,
6,
96,
4302,
7,
26853,
708,
121,
490,
6,
96,
25772,
15,
26,
12,
8634,
121,
490,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
25772,
15,
26,
12,
8634,
8512,
21680,
953,
834,
19978,
3449,
549,
17444,
427,
96,
26646,
2621,
5939,
121,
3274,
3,
31,
3845,
63,
7,
1483,
204,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who was the rookie who played when Matt Vinc was defensive and Pat Maddalena was offensive? | CREATE TABLE table_55529 (
"Month" text,
"Week" real,
"Overall" text,
"Offensive" text,
"Defensive" text,
"Transition" text,
"Rookie" text
) | SELECT "Rookie" FROM table_55529 WHERE "Defensive" = 'matt vinc' AND "Offensive" = 'pat maddalena' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
28803,
3166,
41,
96,
9168,
189,
121,
1499,
6,
96,
518,
10266,
121,
490,
6,
96,
23847,
1748,
121,
1499,
6,
96,
21265,
35,
7,
757,
121,
1499,
6,
96,
2962,
23039,
15,
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,
448,
21132,
121,
21680,
953,
834,
28803,
3166,
549,
17444,
427,
96,
2962,
23039,
15,
121,
3274,
3,
31,
3357,
17,
4671,
75,
31,
3430,
96,
21265,
35,
7,
757,
121,
3274,
3,
31,
4665,
11454,
5437,
29,
9,
31,
1,
... |
List the name of artworks whose type is not 'Program Talent Show'. | CREATE TABLE artwork (
Name VARCHAR,
TYPE VARCHAR
) | SELECT Name FROM artwork WHERE TYPE <> "Program Talent Show" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7924,
41,
5570,
584,
4280,
28027,
6,
3,
12016,
5668,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
6792,
8,
564,
13,
7924,
7,
3,
2544,
686,
19,
59,
3,
31,
3174,
5096,
176... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
5570,
21680,
7924,
549,
17444,
427,
3,
12016,
5668,
3,
2,
3155,
96,
3174,
5096,
17660,
3111,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
what is the number of patients whose insurance is self pay and diagnoses icd9 code is v1529? | 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 prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.insurance = "Self Pay" AND diagnoses.icd9_code = "V1529" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
14798,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
564,
1499,
6,
2774,
1947,
834,
8547,
302,
1499,
6,
1246,
1499,
6,
103,
115,
1499,
6,
7285,
1499,
6,
1612,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
5... |
what is drug route of drug name potassium chl 40 meq / 1000 ml d5 1/2 ns? | 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 prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT prescriptions.route FROM prescriptions WHERE prescriptions.drug = "Potassium Chl 40 mEq / 1000 mL D5 1/2 NS" | [
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,
7744,
7,
5,
20300,
21680,
7744,
7,
549,
17444,
427,
7744,
7,
5,
26,
13534,
3274,
96,
345,
32,
17,
6500,
440,
4004,
40,
1283,
3,
51,
427,
1824,
3,
87,
5580,
3,
51,
434,
309,
755,
7739,
3,
7369,
121,
1,
-100,
... |
What's the number of the 1.0.12 release version? | CREATE TABLE table_28540539_2 (version VARCHAR, release VARCHAR) | SELECT COUNT(version) FROM table_28540539_2 WHERE release = "1.0.12" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2577,
5062,
3076,
3288,
834,
357,
41,
8674,
584,
4280,
28027,
6,
1576,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
31,
7,
8,
381,
13,
8,
3,
12734,
5,
2122,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2847,
17161,
599,
8674,
61,
21680,
953,
834,
2577,
5062,
3076,
3288,
834,
357,
549,
17444,
427,
1576,
3274,
96,
12734,
5,
2122,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Who was the away team for tie number 9? | CREATE TABLE table_name_6 (away_team VARCHAR, tie_no VARCHAR) | SELECT away_team FROM table_name_6 WHERE tie_no = "9" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
948,
41,
8006,
834,
11650,
584,
4280,
28027,
6,
6177,
834,
29,
32,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
8,
550,
372,
21,
6177,
381,
668... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
550,
834,
11650,
21680,
953,
834,
4350,
834,
948,
549,
17444,
427,
6177,
834,
29,
32,
3274,
96,
1298,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What males speak Polish? | CREATE TABLE table_name_22 (males VARCHAR, language VARCHAR) | SELECT males FROM table_name_22 WHERE language = "polish" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2884,
41,
13513,
7,
584,
4280,
28027,
6,
1612,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
5069,
7,
2516,
16073,
58,
1,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
5069,
7,
21680,
953,
834,
4350,
834,
2884,
549,
17444,
427,
1612,
3274,
96,
15621,
107,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
which whitworth size is the only one with 5 threads per inch ? | CREATE TABLE table_204_828 (
id number,
"whitworth size (in)" number,
"core diameter (in)" number,
"threads per inch" number,
"pitch (in)" number,
"tapping drill size" text
) | SELECT "whitworth size (in)" FROM table_204_828 WHERE "threads per inch" = 5 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
927,
2577,
41,
3,
23,
26,
381,
6,
96,
12124,
17,
7048,
812,
41,
77,
61,
121,
381,
6,
96,
9022,
9260,
41,
77,
61,
121,
381,
6,
96,
189,
5236,
7,
399,
5913,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12124,
17,
7048,
812,
41,
77,
61,
121,
21680,
953,
834,
26363,
834,
927,
2577,
549,
17444,
427,
96,
189,
5236,
7,
399,
5913,
121,
3274,
305,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the team of Essendon's score in the game where they were the home team? | CREATE TABLE table_name_92 (
home_team VARCHAR
) | SELECT home_team AS score FROM table_name_92 WHERE home_team = "essendon" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4508,
41,
234,
834,
11650,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
372,
13,
11722,
2029,
31,
7,
2604,
16,
8,
467,
213,
79,
130,
8,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
234,
834,
11650,
6157,
2604,
21680,
953,
834,
4350,
834,
4508,
549,
17444,
427,
234,
834,
11650,
3274,
96,
8185,
2029,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who had the high points at the United Center 20,389? | CREATE TABLE table_8149 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT "High points" FROM table_8149 WHERE "Location Attendance" = 'united center 20,389' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4959,
3647,
41,
96,
23055,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
18699,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
21417,
979,
121,
1499,
6,
96,
21417,
3,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
21417,
979,
121,
21680,
953,
834,
4959,
3647,
549,
17444,
427,
96,
434,
32,
75,
257,
22497,
663,
121,
3274,
3,
31,
15129,
15,
26,
1530,
16047,
519,
3914,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who is the h.h. principal with Jim Haught as h.s. principal, Charlie Taylor as maplemere principal, and Rich Auerbach as w.r. principal? | CREATE TABLE table_name_55 (hh_principal VARCHAR, wr_principal VARCHAR, hs_principal VARCHAR, maplemere_principal VARCHAR) | SELECT hh_principal FROM table_name_55 WHERE hs_principal = "jim haught" AND maplemere_principal = "charlie taylor" AND wr_principal = "rich auerbach" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3769,
41,
107,
107,
834,
12298,
3389,
138,
584,
4280,
28027,
6,
3,
210,
52,
834,
12298,
3389,
138,
584,
4280,
28027,
6,
3,
107,
7,
834,
12298,
3389,
138,
584,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
107,
107,
834,
12298,
3389,
138,
21680,
953,
834,
4350,
834,
3769,
549,
17444,
427,
3,
107,
7,
834,
12298,
3389,
138,
3274,
96,
354,
603,
3,
107,
9313,
121,
3430,
22007,
935,
15,
834,
12298,
3389,
138,
3274,
96... |
What are the averages for games with 212 wickets taken? | CREATE TABLE table_2482547_5 (
average VARCHAR,
wickets_taken VARCHAR
) | SELECT average FROM table_2482547_5 WHERE wickets_taken = 212 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
3707,
1828,
4177,
834,
755,
41,
1348,
584,
4280,
28027,
6,
29719,
7,
834,
4914,
29,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
33,
8,
1348,
7,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1348,
21680,
953,
834,
357,
3707,
1828,
4177,
834,
755,
549,
17444,
427,
29719,
7,
834,
4914,
29,
3274,
3,
24837,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Which country has a density (per km ) of 6,814? | CREATE TABLE table_name_32 (
country VARCHAR,
density__per_km²_ VARCHAR
) | SELECT country FROM table_name_32 WHERE density__per_km²_ = "6,814" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2668,
41,
684,
584,
4280,
28027,
6,
11048,
834,
834,
883,
834,
5848,
357,
834,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
684,
65,
3,
9,
11048... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
684,
21680,
953,
834,
4350,
834,
2668,
549,
17444,
427,
11048,
834,
834,
883,
834,
5848,
357,
834,
3274,
96,
11071,
4959,
20364,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What country has a medical school established in 1969 with both an IMED and avicenna? | CREATE TABLE table_name_15 (country_territory VARCHAR, imed_avicenna_listed VARCHAR, established VARCHAR) | SELECT country_territory FROM table_name_15 WHERE imed_avicenna_listed = "both" AND established = 1969 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1808,
41,
17529,
834,
17,
21301,
10972,
584,
4280,
28027,
6,
3,
23,
2726,
834,
9,
7287,
35,
29,
9,
834,
19279,
584,
4280,
28027,
6,
2127,
584,
4280,
28027,
61,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
684,
834,
17,
21301,
10972,
21680,
953,
834,
4350,
834,
1808,
549,
17444,
427,
3,
23,
2726,
834,
9,
7287,
35,
29,
9,
834,
19279,
3274,
96,
17158,
121,
3430,
2127,
3274,
17185,
1,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who directed the film with the original title of ? | CREATE TABLE table_22265716_1 (
director VARCHAR,
original_title VARCHAR
) | SELECT director FROM table_22265716_1 WHERE original_title = "Три летња дана" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2884,
2688,
3436,
2938,
834,
536,
41,
2090,
584,
4280,
28027,
6,
926,
834,
21869,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
6640,
8,
814,
28,
8,
926,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2090,
21680,
953,
834,
2884,
2688,
3436,
2938,
834,
536,
549,
17444,
427,
926,
834,
21869,
3274,
96,
2,
14709,
3,
6588,
15042,
2,
2533,
3,
20000,
8194,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Who was the candidate in the Virginia 3 district election? | CREATE TABLE table_18237 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | SELECT "Candidates" FROM table_18237 WHERE "District" = 'Virginia 3' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2606,
357,
4118,
41,
96,
308,
23,
20066,
121,
1499,
6,
96,
1570,
75,
5937,
295,
121,
1499,
6,
96,
13725,
63,
121,
1499,
6,
96,
25171,
8160,
121,
490,
6,
96,
20119,
121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
14050,
12416,
6203,
121,
21680,
953,
834,
2606,
357,
4118,
549,
17444,
427,
96,
308,
23,
20066,
121,
3274,
3,
31,
21031,
122,
77,
23,
9,
220,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
At which restaurant did the students spend the least amount of time? List restaurant and the time students spent on in total. | CREATE TABLE Visits_Restaurant (Id VARCHAR); CREATE TABLE Restaurant (Id VARCHAR) | SELECT Restaurant.ResName, SUM(Visits_Restaurant.Spent) FROM Visits_Restaurant JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID GROUP BY Restaurant.ResID ORDER BY SUM(Visits_Restaurant.Spent) LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4957,
7,
834,
448,
222,
402,
3569,
41,
196,
26,
584,
4280,
28027,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
6233,
41,
196,
26,
584,
4280,
28027,
61,
3,
32102,
32103,
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,
6233,
5,
1649,
7,
23954,
6,
180,
6122,
599,
553,
159,
7085,
834,
448,
222,
402,
3569,
5,
134,
102,
295,
61,
21680,
4957,
7,
834,
448,
222,
402,
3569,
3,
15355,
3162,
6233,
9191,
4957,
7,
834,
448,
222,
402,
3569... |
Give the total money requested by entrepreneurs who are taller than 1.85. | CREATE TABLE entrepreneur (
entrepreneur_id number,
people_id number,
company text,
money_requested number,
investor text
)
CREATE TABLE people (
people_id number,
name text,
height number,
weight number,
date_of_birth text
) | SELECT SUM(T1.money_requested) FROM entrepreneur AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T2.height > 1.85 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3,
12290,
41,
3,
12290,
834,
23,
26,
381,
6,
151,
834,
23,
26,
381,
6,
349,
1499,
6,
540,
834,
60,
835,
6265,
381,
6,
12024,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
382,
5411,
28442,
834,
60,
835,
6265,
61,
21680,
3,
12290,
6157,
332,
536,
3,
15355,
3162,
151,
6157,
332,
357,
9191,
332,
5411,
16588,
834,
23,
26,
3274,
332,
4416,
16588,
834,
23,
26,
549,
17444,
... |
How many numbers were recorded under matches with Arthur Morris? | CREATE TABLE table_16570286_2 (
matches VARCHAR,
player VARCHAR
) | SELECT COUNT(matches) FROM table_16570286_2 WHERE player = "Arthur Morris" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
22823,
2518,
357,
3840,
834,
357,
41,
6407,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
2302,
130,
4381,
365,
6407,
28,
13962... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
19515,
15,
7,
61,
21680,
953,
834,
22823,
2518,
357,
3840,
834,
357,
549,
17444,
427,
1959,
3274,
96,
7754,
10666,
12193,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Which opponent has an attendance of 40,560? | CREATE TABLE table_70634 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" text,
"Record" text
) | SELECT "Opponent" FROM table_70634 WHERE "Attendance" = '40,560' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2518,
3891,
591,
41,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
434,
32,
7,
7,
121,
1499,
6,
96,
188,
17,
324,
26,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
667,
102,
9977,
121,
21680,
953,
834,
2518,
3891,
591,
549,
17444,
427,
96,
188,
17,
324,
26,
663,
121,
3274,
3,
31,
2445,
6,
755,
3328,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
If the number of barangays is 19, what is the population density? | CREATE TABLE table_232458_1 (pop_density__per_km²_ VARCHAR, no_of_barangays VARCHAR) | SELECT pop_density__per_km²_ FROM table_232458_1 WHERE no_of_barangays = 19 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2773,
2266,
3449,
834,
536,
41,
9791,
834,
537,
7,
485,
834,
834,
883,
834,
5848,
357,
834,
584,
4280,
28027,
6,
150,
834,
858,
834,
1047,
1468,
9,
63,
7,
584,
4280,
2802... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2783,
834,
537,
7,
485,
834,
834,
883,
834,
5848,
357,
834,
21680,
953,
834,
2773,
2266,
3449,
834,
536,
549,
17444,
427,
150,
834,
858,
834,
1047,
1468,
9,
63,
7,
3274,
957,
1,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the largest average for the episode with 1.97 million Hong Kong viewers? | CREATE TABLE table_24856090_1 (
average INTEGER,
hk_viewers VARCHAR
) | SELECT MAX(average) FROM table_24856090_1 WHERE hk_viewers = "1.97 million" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2266,
4433,
3328,
2394,
834,
536,
41,
1348,
3,
21342,
17966,
6,
3,
107,
157,
834,
4576,
277,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2015,
1348,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4800,
4,
599,
28951,
61,
21680,
953,
834,
2266,
4433,
3328,
2394,
834,
536,
549,
17444,
427,
3,
107,
157,
834,
4576,
277,
3274,
96,
5411,
4327,
770,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Name the men doubles for caroline persyn smids | CREATE TABLE table_14903355_2 (men_doubles VARCHAR, womens_doubles VARCHAR) | SELECT men_doubles FROM table_14903355_2 WHERE womens_doubles = "Caroline Persyn Smids" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2534,
2394,
4201,
3769,
834,
357,
41,
904,
834,
25761,
7,
584,
4280,
28027,
6,
887,
7,
834,
25761,
7,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
1076,
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,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1076,
834,
25761,
7,
21680,
953,
834,
2534,
2394,
4201,
3769,
834,
357,
549,
17444,
427,
887,
7,
834,
25761,
7,
3274,
96,
6936,
32,
747,
1915,
7,
63,
29,
180,
6983,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is listed as the highest Participants that also have a Rank of 5, and Silver that's smaller than 0? | CREATE TABLE table_75260 (
"Rank" real,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real,
"Participants" real
) | SELECT MAX("Participants") FROM table_75260 WHERE "Rank" = '5' AND "Silver" < '0' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3072,
18365,
41,
96,
22557,
121,
490,
6,
96,
23576,
121,
490,
6,
96,
134,
173,
624,
121,
490,
6,
96,
22780,
29,
776,
121,
490,
6,
96,
3696,
1947,
121,
490,
6,
96,
13725... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
121,
13725,
23,
3389,
2366,
8512,
21680,
953,
834,
3072,
18365,
549,
17444,
427,
96,
22557,
121,
3274,
3,
31,
755,
31,
3430,
96,
134,
173,
624,
121,
3,
2,
3,
31,
632,
31,
1,
-100,
-100,
-100,
-100,... |
Can you tell me the sun of Population that has the Country/Region of hong kong, and the Rank smaller than 2? | CREATE TABLE table_71142 (
"Rank" real,
"Country/Region" text,
"Population" real,
"Area (km 2 )" real,
"Density (Pop. per km 2 )" real
) | SELECT SUM("Population") FROM table_71142 WHERE "Country/Region" = 'hong kong' AND "Rank" < '2' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4450,
24978,
41,
96,
22557,
121,
490,
6,
96,
10628,
651,
87,
17748,
23,
106,
121,
1499,
6,
96,
27773,
7830,
121,
490,
6,
96,
188,
864,
41,
5848,
204,
3,
61,
121,
490,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
121,
27773,
7830,
8512,
21680,
953,
834,
4450,
24978,
549,
17444,
427,
96,
10628,
651,
87,
17748,
23,
106,
121,
3274,
3,
31,
23001,
10447,
122,
31,
3430,
96,
22557,
121,
3,
2,
3,
31,
357,
31,
1,
... |
Which team had 15 draws? | CREATE TABLE table_38791 (
"Season" text,
"Team" text,
"Wins" text,
"Losses" text,
"Draws" text
) | SELECT "Team" FROM table_38791 WHERE "Draws" = '15' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3747,
4440,
536,
41,
96,
134,
15,
9,
739,
121,
1499,
6,
96,
18699,
121,
1499,
6,
96,
18455,
7,
121,
1499,
6,
96,
434,
13526,
7,
121,
1499,
6,
96,
308,
10936,
7,
121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
3,
23143,
14196,
96,
18699,
121,
21680,
953,
834,
3747,
4440,
536,
549,
17444,
427,
96,
308,
10936,
7,
121,
3274,
3,
31,
1808,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Count the number of patients whose primary disease is pneumonia human immunodeficiency virus but not tuberculosis and procedure short title is aortocor bypas-2 cor art. | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "PNEUMONIA;HUMAN IMMUNODEFIENCY VIRUS;RULE OUT TUBERCULOSIS" AND procedures.short_title = "Aortocor bypas-2 cor art" | [
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,... |
Which is the earliest founded day school to have entered the competition after 1958? | CREATE TABLE table_50953 (
"School" text,
"Location" text,
"Enrolment" real,
"Founded" real,
"Denomination" text,
"Boys/Girls" text,
"Day/Boarding" text,
"Year Entered Competition" real
) | SELECT MIN("Founded") FROM table_50953 WHERE "Day/Boarding" = 'day' AND "Year Entered Competition" > '1958' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1752,
3301,
519,
41,
96,
29364,
121,
1499,
6,
96,
434,
32,
75,
257,
121,
1499,
6,
96,
8532,
3491,
297,
121,
490,
6,
96,
20100,
121,
490,
6,
96,
308,
35,
32,
14484,
121,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
121,
20100,
8512,
21680,
953,
834,
1752,
3301,
519,
549,
17444,
427,
96,
16803,
87,
279,
32,
986,
53,
121,
3274,
3,
31,
1135,
31,
3430,
96,
476,
2741,
695,
11196,
15571,
121,
2490,
3,
31,
2294,
3449... |
List the name of albums that are released by aritist whose name has 'Led | CREATE TABLE artists (
id VARCHAR,
name VARCHAR
)
CREATE TABLE albums (
title VARCHAR,
artist_id VARCHAR
) | SELECT T2.title FROM artists AS T1 JOIN albums AS T2 ON T1.id = T2.artist_id WHERE T1.name LIKE '%Led%' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3153,
41,
3,
23,
26,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
14234,
41,
2233,
584,
4280,
28027,
6,
2377,
834,
23,
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,
332,
4416,
21869,
21680,
3153,
6157,
332,
536,
3,
15355,
3162,
14234,
6157,
332,
357,
9191,
332,
5411,
23,
26,
3274,
332,
4416,
1408,
343,
834,
23,
26,
549,
17444,
427,
332,
5411,
4350,
8729,
9914,
3,
31,
1454,
2796... |
what driver has a team of officine alfieri maserati and belongs to the class of non-championship f2 and has a position of 2, as well as a date of 9/1952? | CREATE TABLE table_name_51 (
driver VARCHAR,
date VARCHAR,
position VARCHAR,
team VARCHAR,
class VARCHAR
) | SELECT driver FROM table_name_51 WHERE team = "officine alfieri maserati" AND class = "non-championship f2" AND position = 2 AND date = "9/1952" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5553,
41,
2535,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
6,
1102,
584,
4280,
28027,
6,
372,
584,
4280,
28027,
6,
853,
584,
4280,
28027,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2535,
21680,
953,
834,
4350,
834,
5553,
549,
17444,
427,
372,
3274,
96,
1647,
23,
14760,
491,
89,
9626,
3,
2754,
15,
6850,
121,
3430,
853,
3274,
96,
29,
106,
18,
17788,
12364,
2009,
3,
89,
357,
121,
3430,
1102,
32... |
what is the title of the episode with production code "2arg09"? | CREATE TABLE table_27332038_1 (title VARCHAR, production_code VARCHAR) | SELECT title FROM table_27332038_1 WHERE production_code = "2ARG09" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2555,
4201,
1755,
3747,
834,
536,
41,
21869,
584,
4280,
28027,
6,
999,
834,
4978,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
125,
19,
8,
2233,
13,
8,
5640,
28,
99... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2233,
21680,
953,
834,
2555,
4201,
1755,
3747,
834,
536,
549,
17444,
427,
999,
834,
4978,
3274,
96,
357,
4280,
517,
4198,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What facility opening in 1954? | CREATE TABLE table_25346763_1 (
facility VARCHAR,
year_opened VARCHAR
) | SELECT facility FROM table_25346763_1 WHERE year_opened = "1954" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
3710,
3708,
3891,
834,
536,
41,
3064,
584,
4280,
28027,
6,
215,
834,
26940,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
3064,
2101,
16,
24970,
58,
1,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3064,
21680,
953,
834,
1828,
3710,
3708,
3891,
834,
536,
549,
17444,
427,
215,
834,
26940,
3274,
96,
22464,
20364,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
How many fatalities were there in the crash described as ditched 300 m short of runway? | CREATE TABLE table_229917_2 (fatalities VARCHAR, brief_description VARCHAR) | SELECT fatalities FROM table_229917_2 WHERE brief_description = "Ditched 300 m short of runway" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2884,
3264,
2517,
834,
357,
41,
6589,
138,
2197,
584,
4280,
28027,
6,
4456,
834,
221,
11830,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
12699,
2197,
130,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
12699,
2197,
21680,
953,
834,
2884,
3264,
2517,
834,
357,
549,
17444,
427,
4456,
834,
221,
11830,
3274,
96,
308,
155,
4513,
3147,
3,
51,
710,
13,
22750,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which Clock Speed has a FSB Speed of 400 mhz, and a Model Number of c7-m 794? | CREATE TABLE table_48329 (
"Model Number" text,
"Clock Speed" text,
"L2 Cache" text,
"FSB Speed" text,
"Clock Multiplier" text,
"Voltage Range" text,
"Socket" text,
"Release Date" text
) | SELECT "Clock Speed" FROM table_48329 WHERE "FSB Speed" = '400 mhz' AND "Model Number" = 'c7-m 794' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3707,
519,
3166,
41,
96,
24663,
7720,
121,
1499,
6,
96,
254,
4029,
9913,
121,
1499,
6,
96,
434,
357,
205,
4933,
121,
1499,
6,
96,
7674,
279,
9913,
121,
1499,
6,
96,
254,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4029,
9913,
121,
21680,
953,
834,
3707,
519,
3166,
549,
17444,
427,
96,
7674,
279,
9913,
121,
3274,
3,
31,
5548,
3,
51,
107,
172,
31,
3430,
96,
24663,
7720,
121,
3274,
3,
31,
75,
940,
18,
51,
489,
4240,... |
How many shows did team David consist of vernon kay and dara briain | CREATE TABLE table_23575917_8 (
episode VARCHAR,
davids_team VARCHAR
) | SELECT COUNT(episode) FROM table_23575917_8 WHERE davids_team = "Vernon Kay and Dara Ó Briain" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2773,
3436,
3390,
2517,
834,
927,
41,
5640,
584,
4280,
28027,
6,
836,
6961,
7,
834,
11650,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
1267,
410,
372,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2847,
17161,
599,
15,
102,
159,
32,
221,
61,
21680,
953,
834,
2773,
3436,
3390,
2517,
834,
927,
549,
17444,
427,
836,
6961,
7,
834,
11650,
3274,
96,
5000,
29,
106,
14168,
11,
1920,
9,
3,
2,
7834,
9,
77,
121,
1,
... |
What is the highest year that Europe won, when the USA's Captain was Kathy Whitworth? | CREATE TABLE table_42427 (
"Year" real,
"Venue" text,
"Winning team" text,
"Score" text,
"USA Captain" text,
"Europe Captain" text
) | SELECT MAX("Year") FROM table_42427 WHERE "Winning team" = 'europe' AND "USA Captain" = 'kathy whitworth' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
2266,
2555,
41,
96,
476,
2741,
121,
490,
6,
96,
553,
35,
76,
15,
121,
1499,
6,
96,
518,
10503,
372,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
17663,
12202,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
121,
476,
2741,
8512,
21680,
953,
834,
591,
2266,
2555,
549,
17444,
427,
96,
518,
10503,
372,
121,
3274,
3,
31,
28188,
31,
3430,
96,
17663,
12202,
121,
3274,
3,
31,
1258,
189,
63,
3,
12124,
17,
7048,... |
What is Nation, when Model is M1895 & M1897 Carbine? | CREATE TABLE table_name_76 (
nation VARCHAR,
model VARCHAR
) | SELECT nation FROM table_name_76 WHERE model = "m1895 & m1897 carbine" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3959,
41,
2982,
584,
4280,
28027,
6,
825,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
11046,
6,
116,
5154,
19,
283,
2606,
3301,
3,
184,
283,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2982,
21680,
953,
834,
4350,
834,
3959,
549,
17444,
427,
825,
3274,
96,
51,
2606,
3301,
3,
184,
3,
51,
2606,
4327,
443,
12712,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What catalogue is the song It's Now or Never? | CREATE TABLE table_name_86 (
catalogue VARCHAR,
song_title VARCHAR
) | SELECT catalogue FROM table_name_86 WHERE song_title = "it's now or never" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3840,
41,
14978,
584,
4280,
28027,
6,
2324,
834,
21869,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
14978,
19,
8,
2324,
94,
31,
7,
852,
42,
8400... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14978,
21680,
953,
834,
4350,
834,
3840,
549,
17444,
427,
2324,
834,
21869,
3274,
96,
155,
31,
7,
230,
42,
470,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the sum of forms with greater than 17 pages and a total of $1,801,154? | CREATE TABLE table_name_70 (form INTEGER, pages VARCHAR, total_assets VARCHAR) | SELECT SUM(form) FROM table_name_70 WHERE pages > 17 AND total_assets = "$1,801,154" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2518,
41,
2032,
3,
21342,
17966,
6,
1688,
584,
4280,
28027,
6,
792,
834,
3974,
17,
7,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
4505,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
3,
23143,
14196,
180,
6122,
599,
2032,
61,
21680,
953,
834,
4350,
834,
2518,
549,
17444,
427,
1688,
2490,
1003,
3430,
792,
834,
3974,
17,
7,
3274,
96,
3229,
4347,
2079,
4347,
27308,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the position of the player who played for the Rockets during 1981? | CREATE TABLE table_56262 (
"Player" text,
"No.(s)" real,
"Height in Ft." text,
"Position" text,
"Years for Rockets" text,
"School/Club Team/Country" text
) | SELECT "Position" FROM table_56262 WHERE "Years for Rockets" = '1981' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4834,
2688,
357,
41,
96,
15800,
49,
121,
1499,
6,
96,
4168,
5,
599,
7,
61,
121,
490,
6,
96,
3845,
2632,
16,
377,
17,
535,
1499,
6,
96,
345,
32,
7,
4749,
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,
345,
32,
7,
4749,
121,
21680,
953,
834,
4834,
2688,
357,
549,
17444,
427,
96,
476,
2741,
7,
21,
22176,
7,
121,
3274,
3,
31,
2294,
4959,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
A bar chart for showing the number of the dates of transactions if the share count is bigger than 100 or the amount is bigger than 1000, and sort in asc by the Y please. | CREATE TABLE Lots (
lot_id INTEGER,
investor_id INTEGER,
lot_details VARCHAR(255)
)
CREATE TABLE Sales (
sales_transaction_id INTEGER,
sales_details VARCHAR(255)
)
CREATE TABLE Purchases (
purchase_transaction_id INTEGER,
purchase_details VARCHAR(255)
)
CREATE TABLE Investors (
investor_id INTEGER,
Investor_details VARCHAR(255)
)
CREATE TABLE Ref_Transaction_Types (
transaction_type_code VARCHAR(10),
transaction_type_description VARCHAR(80)
)
CREATE TABLE Transactions_Lots (
transaction_id INTEGER,
lot_id INTEGER
)
CREATE TABLE Transactions (
transaction_id INTEGER,
investor_id INTEGER,
transaction_type_code VARCHAR(10),
date_of_transaction DATETIME,
amount_of_transaction DECIMAL(19,4),
share_count VARCHAR(40),
other_details VARCHAR(255)
) | SELECT date_of_transaction, COUNT(date_of_transaction) FROM Transactions WHERE share_count > 100 OR amount_of_transaction > 1000 ORDER BY COUNT(date_of_transaction) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
14868,
41,
418,
834,
23,
26,
3,
21342,
17966,
6,
12024,
834,
23,
26,
3,
21342,
17966,
6,
418,
834,
221,
5756,
7,
584,
4280,
28027,
599,
25502,
61,
3,
61,
3,
32102,
32103,
32102,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
833,
834,
858,
834,
7031,
4787,
6,
2847,
17161,
599,
5522,
834,
858,
834,
7031,
4787,
61,
21680,
21469,
7,
549,
17444,
427,
698,
834,
13362,
2490,
910,
4674,
866,
834,
858,
834,
7031,
4787,
2490,
5580,
4674,
11300,
... |
What award did they win before 2005? | CREATE TABLE table_name_62 (award VARCHAR, year INTEGER) | SELECT award FROM table_name_62 WHERE year < 2005 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4056,
41,
9,
2239,
584,
4280,
28027,
6,
215,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
363,
2760,
410,
79,
1369,
274,
3105,
58,
1,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2760,
21680,
953,
834,
4350,
834,
4056,
549,
17444,
427,
215,
3,
2,
3105,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Show the party and the number of drivers in each party Plot them as bar chart, show bar in descending order. | CREATE TABLE school (
School_ID int,
Grade text,
School text,
Location text,
Type text
)
CREATE TABLE school_bus (
School_ID int,
Driver_ID int,
Years_Working int,
If_full_time bool
)
CREATE TABLE driver (
Driver_ID int,
Name text,
Party text,
Home_city text,
Age int
) | SELECT Party, COUNT(*) FROM driver GROUP BY Party ORDER BY Party DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
496,
41,
1121,
834,
4309,
16,
17,
6,
13027,
1499,
6,
1121,
1499,
6,
10450,
1499,
6,
6632,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
496,
834,
3465,
41,
1121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3450,
6,
2847,
17161,
599,
1935,
61,
21680,
2535,
350,
4630,
6880,
272,
476,
3450,
4674,
11300,
272,
476,
3450,
309,
25067,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Give me the comparison about ACC_Percent over the ACC_Regular_Season , and rank in asc by the bar. | 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 ACC_Regular_Season, ACC_Percent FROM basketball_match ORDER BY ACC_Regular_Season | [
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,
3,
14775,
834,
17748,
4885,
834,
134,
15,
9,
739,
6,
3,
14775,
834,
12988,
3728,
21680,
8498,
834,
19515,
4674,
11300,
272,
476,
3,
14775,
834,
17748,
4885,
834,
134,
15,
9,
739,
1,
-100,
-100,
-100,
-100,
-100,
-... |
what was the first marathon juma ikangaa won ? | CREATE TABLE table_203_370 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"event" text,
"notes" text
) | SELECT "competition" FROM table_203_370 WHERE "position" = 1 ORDER BY "year" LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
22520,
41,
3,
23,
26,
381,
6,
96,
1201,
121,
381,
6,
96,
287,
4995,
4749,
121,
1499,
6,
96,
15098,
121,
1499,
6,
96,
4718,
121,
1499,
6,
96,
15,
2169,
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,
287,
4995,
4749,
121,
21680,
953,
834,
23330,
834,
22520,
549,
17444,
427,
96,
4718,
121,
3274,
209,
4674,
11300,
272,
476,
96,
1201,
121,
8729,
12604,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the location where Denny Hulme was the driver? | CREATE TABLE table_name_54 (
location VARCHAR,
driver VARCHAR
) | SELECT location FROM table_name_54 WHERE driver = "denny hulme" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5062,
41,
1128,
584,
4280,
28027,
6,
2535,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1128,
213,
7272,
63,
454,
83,
526,
47,
8,
2535,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1128,
21680,
953,
834,
4350,
834,
5062,
549,
17444,
427,
2535,
3274,
96,
537,
29,
63,
3,
107,
83,
526,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Who was the player for Japan when the to par was smaller than 7? | CREATE TABLE table_name_57 (player VARCHAR, to_par VARCHAR, country VARCHAR) | SELECT player FROM table_name_57 WHERE to_par < 7 AND country = "japan" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3436,
41,
20846,
584,
4280,
28027,
6,
12,
834,
1893,
584,
4280,
28027,
6,
684,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
8,
1959,
21,
3411,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1959,
21680,
953,
834,
4350,
834,
3436,
549,
17444,
427,
12,
834,
1893,
3,
2,
489,
3430,
684,
3274,
96,
1191,
2837,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Find the names of all directors whose movies are rated by Sarah Martinez. | CREATE TABLE Reviewer (rID VARCHAR, name VARCHAR); CREATE TABLE Movie (director VARCHAR, mID VARCHAR); CREATE TABLE Rating (mID VARCHAR, rID VARCHAR) | SELECT DISTINCT T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T3.name = 'Sarah Martinez' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4543,
49,
41,
52,
4309,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
10743,
41,
25982,
584,
4280,
28027,
6,
3,
51,
4309,
584,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
15438,
25424,
6227,
332,
4416,
25982,
21680,
21662,
6157,
332,
536,
3,
15355,
3162,
10743,
6157,
332,
357,
9191,
332,
5411,
51,
4309,
3274,
332,
4416,
51,
4309,
3,
15355,
3162,
4543,
49,
6157,
332,
519,
9191,
332,
... |
which was the last team played ? | CREATE TABLE table_203_672 (
id number,
"week" number,
"date" text,
"opponent" text,
"result" text,
"venue" text,
"attendance" number
) | SELECT "opponent" FROM table_203_672 ORDER BY "date" DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
3708,
357,
41,
3,
23,
26,
381,
6,
96,
8041,
121,
381,
6,
96,
5522,
121,
1499,
6,
96,
32,
102,
9977,
121,
1499,
6,
96,
60,
7,
83,
17,
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,
32,
102,
9977,
121,
21680,
953,
834,
23330,
834,
3708,
357,
4674,
11300,
272,
476,
96,
5522,
121,
309,
25067,
8729,
12604,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
give me the number of patients whose diagnosis short title is obstructive sleep apnea and drug route is pr. | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN 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,
7690,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
2118,
23,
26,
1499,
6,
5059,
715,
1499,
6,
5692,
1499,
6,
701,
834,
15129,
1499,
6,
3783,
1499,
6,
5798,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
3... |
What was the Score of the match with USL Dunkerque (d2) as Team 2? | CREATE TABLE table_name_87 (
score VARCHAR,
team_2 VARCHAR
) | SELECT score FROM table_name_87 WHERE team_2 = "usl dunkerque (d2)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4225,
41,
2604,
584,
4280,
28027,
6,
372,
834,
357,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
17763,
13,
8,
1588,
28,
837,
434,
6393,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2604,
21680,
953,
834,
4350,
834,
4225,
549,
17444,
427,
372,
834,
357,
3274,
96,
302,
40,
146,
29,
2304,
835,
41,
26,
7318,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What are years that Obinna Ekezie played for the Grizzlies? | CREATE TABLE table_8518 (
"Player" text,
"Nationality" text,
"Position" text,
"Years for Grizzlies" text,
"School/Club Team" text
) | SELECT "Years for Grizzlies" FROM table_8518 WHERE "Player" = 'obinna ekezie' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4433,
2606,
41,
96,
15800,
49,
121,
1499,
6,
96,
24732,
485,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
476,
2741,
7,
21,
3,
13313,
5271,
4664,
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,
476,
2741,
7,
21,
3,
13313,
5271,
4664,
121,
21680,
953,
834,
4433,
2606,
549,
17444,
427,
96,
15800,
49,
121,
3274,
3,
31,
32,
4517,
29,
9,
3,
15,
1050,
5600,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Who is the player with a t8 place? | CREATE TABLE table_name_53 (player VARCHAR, place VARCHAR) | SELECT player FROM table_name_53 WHERE place = "t8" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4867,
41,
20846,
584,
4280,
28027,
6,
286,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
19,
8,
1959,
28,
3,
9,
3,
17,
927,
286,
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,
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,
1959,
21680,
953,
834,
4350,
834,
4867,
549,
17444,
427,
286,
3274,
96,
17,
927,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What season had bachelor Byron Velvick? | CREATE TABLE table_9121 (
"Season" real,
"Premiered" text,
"Bachelor" text,
"Winner" text,
"Runner(s)-Up" text,
"Proposal" text
) | SELECT MIN("Season") FROM table_9121 WHERE "Bachelor" = 'byron velvick' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4729,
2658,
41,
96,
134,
15,
9,
739,
121,
490,
6,
96,
10572,
2720,
1271,
121,
1499,
6,
96,
279,
4933,
322,
121,
1499,
6,
96,
18455,
687,
121,
1499,
6,
96,
23572,
599,
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,
3,
17684,
599,
121,
134,
15,
9,
739,
8512,
21680,
953,
834,
4729,
2658,
549,
17444,
427,
96,
279,
4933,
322,
121,
3274,
3,
31,
969,
52,
106,
3,
4911,
208,
3142,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the largest number of households with median family income of $52,106 with less than 21,403 in population? | CREATE TABLE table_name_88 (
number_of_households INTEGER,
median_family_income VARCHAR,
population VARCHAR
) | SELECT MAX(number_of_households) FROM table_name_88 WHERE median_family_income = "$52,106" AND population < 21 OFFSET 403 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4060,
41,
381,
834,
858,
834,
1840,
6134,
7,
3,
21342,
17966,
6,
15572,
834,
15474,
834,
15759,
584,
4280,
28027,
6,
2074,
584,
4280,
28027,
3,
61,
3,
32102,
321... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
5525,
1152,
834,
858,
834,
1840,
6134,
7,
61,
21680,
953,
834,
4350,
834,
4060,
549,
17444,
427,
15572,
834,
15474,
834,
15759,
3274,
96,
3229,
5373,
6,
16431,
121,
3430,
2074,
3,
2,
1401,
3,
15316,
... |
how many times was the high rebounds by Mcdyess (9) and the high assists was by Billups (10)? | CREATE TABLE table_11960944_4 (
high_points VARCHAR,
high_rebounds VARCHAR,
high_assists VARCHAR
) | SELECT COUNT(high_points) FROM table_11960944_4 WHERE high_rebounds = "McDyess (9)" AND high_assists = "Billups (10)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2596,
4314,
4198,
3628,
834,
591,
41,
306,
834,
2700,
7,
584,
4280,
28027,
6,
306,
834,
23768,
584,
4280,
28027,
6,
306,
834,
6500,
7,
17,
7,
584,
4280,
28027,
3,
61,
3,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
6739,
834,
2700,
7,
61,
21680,
953,
834,
2596,
4314,
4198,
3628,
834,
591,
549,
17444,
427,
306,
834,
23768,
3274,
96,
329,
75,
308,
10070,
7,
41,
11728,
121,
3430,
306,
834,
6500,
7,
17,
7,
3274... |
Name the eps for net profit being 39.2 | CREATE TABLE table_18304259_1 (earnings_per_share__p_ VARCHAR, net_profit__£m_ VARCHAR) | SELECT earnings_per_share__p_ FROM table_18304259_1 WHERE net_profit__£m_ = "39.2" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2606,
1458,
4165,
3390,
834,
536,
41,
2741,
29,
53,
7,
834,
883,
834,
12484,
834,
834,
102,
834,
584,
4280,
28027,
6,
3134,
834,
6046,
834,
834,
19853,
51,
834,
584,
4280,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
8783,
834,
883,
834,
12484,
834,
834,
102,
834,
21680,
953,
834,
2606,
1458,
4165,
3390,
834,
536,
549,
17444,
427,
3134,
834,
6046,
834,
834,
19853,
51,
834,
3274,
96,
3288,
5,
357,
121,
1,
-100,
-100,
-100,
-100,
... |
WHAT IS THE ELEVATION OF THE UNAKA MOUNTAINS, IN ROAN HIGH BLUFF PEAK, AND ISOLATION LARGER THAN 1.54? | CREATE TABLE table_name_77 (
elevation__ft_ INTEGER,
isolation VARCHAR,
range VARCHAR,
peak_name VARCHAR
) | SELECT AVG(elevation__ft_) FROM table_name_77 WHERE range = "unaka mountains" AND peak_name = "roan high bluff" AND isolation > 1.54 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4013,
41,
16417,
834,
834,
89,
17,
834,
3,
21342,
17966,
6,
15997,
584,
4280,
28027,
6,
620,
584,
4280,
28027,
6,
6734,
834,
4350,
584,
4280,
28027,
3,
61,
3,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
15,
10912,
257,
834,
834,
89,
17,
834,
61,
21680,
953,
834,
4350,
834,
4013,
549,
17444,
427,
620,
3274,
96,
202,
5667,
8022,
121,
3430,
6734,
834,
4350,
3274,
96,
52,
32,
152,
306,
3,
115,
40,
2... |
What was the Attendance on December 21, 1986 before Week 16? | CREATE TABLE table_name_91 (attendance INTEGER, date VARCHAR, week VARCHAR) | SELECT SUM(attendance) FROM table_name_91 WHERE date = "december 21, 1986" AND week < 16 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4729,
41,
15116,
663,
3,
21342,
17966,
6,
833,
584,
4280,
28027,
6,
471,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
22497,
663,
30,
1882,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
180,
6122,
599,
15116,
663,
61,
21680,
953,
834,
4350,
834,
4729,
549,
17444,
427,
833,
3274,
96,
221,
75,
18247,
12026,
12698,
121,
3430,
471,
3,
2,
898,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Return the claim start date for the claims whose claimed amount is no more than the averag, and count them by a bar chart, and list by the y-axis in ascending. | CREATE TABLE Settlements (
Settlement_ID INTEGER,
Claim_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settled INTEGER,
Customer_Policy_ID INTEGER
)
CREATE TABLE Payments (
Payment_ID INTEGER,
Settlement_ID INTEGER,
Payment_Method_Code VARCHAR(255),
Date_Payment_Made DATE,
Amount_Payment INTEGER
)
CREATE TABLE Customers (
Customer_ID INTEGER,
Customer_Details VARCHAR(255)
)
CREATE TABLE Customer_Policies (
Policy_ID INTEGER,
Customer_ID INTEGER,
Policy_Type_Code CHAR(15),
Start_Date DATE,
End_Date DATE
)
CREATE TABLE Claims (
Claim_ID INTEGER,
Policy_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settled INTEGER
) | SELECT Date_Claim_Made, COUNT(Date_Claim_Made) FROM Claims WHERE Amount_Settled <= (SELECT AVG(Amount_Settled) FROM Claims) ORDER BY COUNT(Date_Claim_Made) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
31044,
7,
41,
31044,
834,
4309,
3,
21342,
17966,
6,
7781,
603,
834,
4309,
3,
21342,
17966,
6,
7678,
834,
254,
521,
603,
834,
329,
9,
221,
309,
6048,
6,
7678,
834,
254,
521,
603,
83... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
7678,
834,
254,
521,
603,
834,
329,
9,
221,
6,
2847,
17161,
599,
308,
342,
834,
254,
521,
603,
834,
329,
9,
221,
61,
21680,
4779,
8345,
549,
17444,
427,
71,
11231,
834,
17175,
17,
1361,
3,
2,
2423,
41,
23143,
14... |
What is the lowest crowd size at MCG? | CREATE TABLE table_33771 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT MIN("Crowd") FROM table_33771 WHERE "Venue" = 'mcg' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4201,
4013,
536,
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,
3,
17684,
599,
121,
254,
3623,
26,
8512,
21680,
953,
834,
4201,
4013,
536,
549,
17444,
427,
96,
553,
35,
76,
15,
121,
3274,
3,
31,
51,
75,
122,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the gender with a age range of 3-11 at the st adrian roman catholic primary school? | CREATE TABLE table_28523_2 (gender VARCHAR, age_range VARCHAR, school VARCHAR) | SELECT gender FROM table_28523_2 WHERE age_range = "3-11" AND school = "St Adrian Roman Catholic Primary school" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
4433,
2773,
834,
357,
41,
122,
3868,
584,
4280,
28027,
6,
1246,
834,
5517,
584,
4280,
28027,
6,
496,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
7285,
21680,
953,
834,
357,
4433,
2773,
834,
357,
549,
17444,
427,
1246,
834,
5517,
3274,
96,
519,
9169,
121,
3430,
496,
3274,
96,
134,
17,
12399,
3385,
6502,
14542,
496,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Show all customer ids and the number of accounts for each customer. Show the correlation. | CREATE TABLE Customers (
customer_id INTEGER,
customer_first_name VARCHAR(20),
customer_last_name VARCHAR(20),
customer_address VARCHAR(255),
customer_phone VARCHAR(255),
customer_email VARCHAR(255),
other_customer_details VARCHAR(255)
)
CREATE TABLE Customers_Cards (
card_id INTEGER,
customer_id INTEGER,
card_type_code VARCHAR(15),
card_number VARCHAR(80),
date_valid_from DATETIME,
date_valid_to DATETIME,
other_card_details VARCHAR(255)
)
CREATE TABLE Financial_Transactions (
transaction_id INTEGER,
previous_transaction_id INTEGER,
account_id INTEGER,
card_id INTEGER,
transaction_type VARCHAR(15),
transaction_date DATETIME,
transaction_amount DOUBLE,
transaction_comment VARCHAR(255),
other_transaction_details VARCHAR(255)
)
CREATE TABLE Accounts (
account_id INTEGER,
customer_id INTEGER,
account_name VARCHAR(50),
other_account_details VARCHAR(255)
) | SELECT customer_id, COUNT(*) FROM Accounts GROUP BY customer_id | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
16423,
41,
884,
834,
23,
26,
3,
21342,
17966,
6,
884,
834,
14672,
834,
4350,
584,
4280,
28027,
599,
1755,
201,
884,
834,
5064,
834,
4350,
584,
4280,
28027,
599,
1755,
201,
884,
834,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
884,
834,
23,
26,
6,
2847,
17161,
599,
1935,
61,
21680,
6288,
7,
350,
4630,
6880,
272,
476,
884,
834,
23,
26,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what type of organization is sigma phi omega? | CREATE TABLE table_27627 (
"Letters" text,
"Organization" text,
"Nickname" text,
"Founding Date" text,
"Founding University" text,
"Type" text
) | SELECT "Type" FROM table_27627 WHERE "Organization" = 'Sigma Phi Omega' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
3959,
2555,
41,
96,
434,
15583,
7,
121,
1499,
6,
96,
14878,
257,
121,
1499,
6,
96,
567,
3142,
4350,
121,
1499,
6,
96,
371,
32,
1106,
53,
7678,
121,
1499,
6,
96,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
25160,
121,
21680,
953,
834,
357,
3959,
2555,
549,
17444,
427,
96,
14878,
257,
121,
3274,
3,
31,
134,
23528,
3657,
23,
20336,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name the most female life expectancy for djibouti | CREATE TABLE table_2701625_1 (female_life_expectancy INTEGER, country VARCHAR) | SELECT MAX(female_life_expectancy) FROM table_2701625_1 WHERE country = "Djibouti" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
17485,
2938,
1828,
834,
536,
41,
89,
15,
13513,
834,
4597,
834,
994,
855,
75,
17,
6833,
3,
21342,
17966,
6,
684,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4800,
4,
599,
89,
15,
13513,
834,
4597,
834,
994,
855,
75,
17,
6833,
61,
21680,
953,
834,
17485,
2938,
1828,
834,
536,
549,
17444,
427,
684,
3274,
96,
308,
354,
23,
4076,
17,
23,
121,
1,
-100,
-100,
-100,
-100,
... |
Which Matches is on 24 march 1963 with a Rank larger than 44? | CREATE TABLE table_name_6 (matches_as_champion INTEGER, title_last_held VARCHAR, rank VARCHAR) | SELECT MAX(matches_as_champion) FROM table_name_6 WHERE title_last_held = "24 march 1963" AND rank > 44 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
948,
41,
19515,
15,
7,
834,
9,
7,
834,
17788,
12364,
3,
21342,
17966,
6,
2233,
834,
5064,
834,
14796,
584,
4280,
28027,
6,
11003,
584,
4280,
28027,
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,
4800,
4,
599,
19515,
15,
7,
834,
9,
7,
834,
17788,
12364,
61,
21680,
953,
834,
4350,
834,
948,
549,
17444,
427,
2233,
834,
5064,
834,
14796,
3274,
96,
2266,
10556,
20613,
121,
3430,
11003,
2490,
8537,
1,
-100,
-100,... |
What was the result of the game played in Venue H? | CREATE TABLE table_name_27 (
result VARCHAR,
venue VARCHAR
) | SELECT result FROM table_name_27 WHERE venue = "h" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2555,
41,
741,
584,
4280,
28027,
6,
5669,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
741,
13,
8,
467,
1944,
16,
29940,
454,
58,
1,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
741,
21680,
953,
834,
4350,
834,
2555,
549,
17444,
427,
5669,
3274,
96,
107,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
how many of the schools had at least 500 students enrolled in the 2010-2011 and 2011-2012 season ? | CREATE TABLE table_204_624 (
id number,
"school" text,
"team name" text,
"town" text,
"county" text,
"enrollment (2010-11 & 2011-12)" number,
"primary mshsaa class*" number,
"football class" number
) | SELECT COUNT("team name") FROM table_204_624 WHERE "enrollment (2010-11 & 2011-12)" >= 500 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
948,
2266,
41,
3,
23,
26,
381,
6,
96,
6646,
121,
1499,
6,
96,
11650,
564,
121,
1499,
6,
96,
3540,
121,
1499,
6,
96,
13362,
63,
121,
1499,
6,
96,
35,
4046,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11650,
564,
8512,
21680,
953,
834,
26363,
834,
948,
2266,
549,
17444,
427,
96,
35,
4046,
297,
41,
14926,
9169,
3,
184,
2722,
5947,
61,
121,
2490,
2423,
2899,
1,
-100,
-100,
-100,
-100,
-100,
-... |
What Social AO has an External CO of simonas savickas, and an Internal CO of pieter kuijsten? | CREATE TABLE table_name_83 (social_ao VARCHAR, external_co VARCHAR, internal_co VARCHAR) | SELECT social_ao FROM table_name_83 WHERE external_co = "simonas savickas" AND internal_co = "pieter kuijsten" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4591,
41,
15745,
834,
9,
32,
584,
4280,
28027,
6,
3866,
834,
509,
584,
4280,
28027,
6,
3224,
834,
509,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
569,
834,
9,
32,
21680,
953,
834,
4350,
834,
4591,
549,
17444,
427,
3866,
834,
509,
3274,
96,
28348,
29,
9,
7,
3,
7,
2960,
2406,
9,
7,
121,
3430,
3224,
834,
509,
3274,
96,
8082,
449,
3,
2729,
23,
354,
1913,
12... |
Show ids, first names, last names, and phones for all customers. | CREATE TABLE Customers (
customer_id VARCHAR,
customer_first_name VARCHAR,
customer_last_name VARCHAR,
customer_phone VARCHAR
) | SELECT customer_id, customer_first_name, customer_last_name, customer_phone FROM Customers | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
16423,
41,
884,
834,
23,
26,
584,
4280,
28027,
6,
884,
834,
14672,
834,
4350,
584,
4280,
28027,
6,
884,
834,
5064,
834,
4350,
584,
4280,
28027,
6,
884,
834,
6399,
584,
4280,
28027,
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,
884,
834,
23,
26,
6,
884,
834,
14672,
834,
4350,
6,
884,
834,
5064,
834,
4350,
6,
884,
834,
6399,
21680,
16423,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is Elizabeth Yarnold's nation? | CREATE TABLE table_name_70 (
nation VARCHAR,
athlete_s_ VARCHAR
) | SELECT nation FROM table_name_70 WHERE athlete_s_ = "elizabeth yarnold" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2518,
41,
2982,
584,
4280,
28027,
6,
17893,
834,
7,
834,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
9066,
4701,
52,
29,
1490,
31,
7,
2982,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2982,
21680,
953,
834,
4350,
834,
2518,
549,
17444,
427,
17893,
834,
7,
834,
3274,
96,
15,
13287,
9,
346,
189,
14313,
1490,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many teachers does the student named CHRISSY NABOZNY have? | CREATE TABLE teachers (
lastname text,
firstname text,
classroom number
)
CREATE TABLE list (
lastname text,
firstname text,
grade number,
classroom number
) | SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T1.firstname = "CHRISSY" AND T1.lastname = "NABOZNY" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3081,
41,
336,
4350,
1499,
6,
166,
4350,
1499,
6,
4858,
381,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
570,
41,
336,
4350,
1499,
6,
166,
4350,
1499,
6,
2769,
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,
2847,
17161,
599,
1935,
61,
21680,
570,
6157,
332,
536,
3,
15355,
3162,
3081,
6157,
332,
357,
9191,
332,
5411,
4057,
3082,
3274,
332,
4416,
4057,
3082,
549,
17444,
427,
332,
5411,
14672,
4350,
3274,
96,
8360,
13431,
1... |
What is the time/retired for grid 3? | CREATE TABLE table_32882 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | SELECT "Time/Retired" FROM table_32882 WHERE "Grid" = '3' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
28070,
4613,
41,
96,
20982,
52,
121,
1499,
6,
96,
4302,
7593,
127,
121,
1499,
6,
96,
3612,
102,
7,
121,
490,
6,
96,
13368,
87,
1649,
11809,
26,
121,
1499,
6,
96,
13313,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13368,
87,
1649,
11809,
26,
121,
21680,
953,
834,
28070,
4613,
549,
17444,
427,
96,
13313,
26,
121,
3274,
3,
31,
519,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the geographical region for hometown Imbert? | CREATE TABLE table_name_1 (geographical_regions VARCHAR, hometown VARCHAR) | SELECT geographical_regions FROM table_name_1 WHERE hometown = "imbert" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
536,
41,
397,
32,
16982,
834,
18145,
7,
584,
4280,
28027,
6,
22295,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
20187,
1719,
21,
22295,
1318,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
20187,
834,
18145,
7,
21680,
953,
834,
4350,
834,
536,
549,
17444,
427,
22295,
3274,
96,
603,
7041,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What year has the time of 55:29:20? | CREATE TABLE table_name_16 (year VARCHAR, time VARCHAR) | SELECT COUNT(year) FROM table_name_16 WHERE time = "55:29:20" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2938,
41,
1201,
584,
4280,
28027,
6,
97,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
215,
65,
8,
97,
13,
6897,
10,
3166,
10,
1755,
58,
1,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
1201,
61,
21680,
953,
834,
4350,
834,
2938,
549,
17444,
427,
97,
3274,
96,
3769,
10,
3166,
10,
1755,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Plot the average of age by grouped by home city as a bar graph, and sort total number from low to high order. | CREATE TABLE driver (
Driver_ID int,
Name text,
Party text,
Home_city text,
Age int
)
CREATE TABLE school (
School_ID int,
Grade text,
School text,
Location text,
Type text
)
CREATE TABLE school_bus (
School_ID int,
Driver_ID int,
Years_Working int,
If_full_time bool
) | SELECT Home_city, AVG(Age) FROM driver GROUP BY Home_city ORDER BY AVG(Age) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2535,
41,
10546,
834,
4309,
16,
17,
6,
5570,
1499,
6,
3450,
1499,
6,
1210,
834,
6726,
1499,
6,
7526,
16,
17,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
496,
41,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
1210,
834,
6726,
6,
71,
17217,
599,
188,
397,
61,
21680,
2535,
350,
4630,
6880,
272,
476,
1210,
834,
6726,
4674,
11300,
272,
476,
71,
17217,
599,
188,
397,
61,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
provide the number of patients whose procedure icd9 code is 4523 and drug type is additive? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE 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 INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE procedures.icd9_code = "4523" AND prescriptions.drug_type = "ADDITIVE" | [
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,
3388,
18206... |
List the teams of the players with the top 5 largest ages. | CREATE TABLE player (
player_id number,
player text,
team text,
age number,
position text,
school_id number
)
CREATE TABLE school (
school_id number,
school text,
location text,
enrollment number,
founded number,
denomination text,
boys_or_girls text,
day_or_boarding text,
year_entered_competition number,
school_colors text
)
CREATE TABLE school_details (
school_id number,
nickname text,
colors text,
league text,
class text,
division text
)
CREATE TABLE school_performance (
school_id number,
school_year text,
class_a text,
class_aa text
) | SELECT team FROM player ORDER BY age DESC LIMIT 5 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1959,
41,
1959,
834,
23,
26,
381,
6,
1959,
1499,
6,
372,
1499,
6,
1246,
381,
6,
1102,
1499,
6,
496,
834,
23,
26,
381,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
372,
21680,
1959,
4674,
11300,
272,
476,
1246,
309,
25067,
8729,
12604,
305,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Which team plays against Footscray as the home team? | CREATE TABLE table_name_2 (home_team VARCHAR, away_team VARCHAR) | SELECT home_team FROM table_name_2 WHERE away_team = "footscray" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
357,
41,
5515,
834,
11650,
584,
4280,
28027,
6,
550,
834,
11650,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
372,
4805,
581,
15213,
7,
2935,
63,
38,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
234,
834,
11650,
21680,
953,
834,
4350,
834,
357,
549,
17444,
427,
550,
834,
11650,
3274,
96,
6259,
7,
2935,
63,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the dominant religion in during 2002? | CREATE TABLE table_2562572_9 (
dominant_religion__2002_ VARCHAR,
cyrillic_name_other_names VARCHAR
) | SELECT dominant_religion__2002_ FROM table_2562572_9 WHERE cyrillic_name_other_names = "Степановићево" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
19337,
1828,
5865,
834,
1298,
41,
12613,
834,
60,
2825,
23,
106,
834,
834,
24898,
834,
584,
4280,
28027,
6,
3,
75,
63,
52,
173,
2176,
834,
4350,
834,
9269,
834,
4350,
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,
0... | [
3,
23143,
14196,
12613,
834,
60,
2825,
23,
106,
834,
834,
24898,
834,
21680,
953,
834,
19337,
1828,
5865,
834,
1298,
549,
17444,
427,
3,
75,
63,
52,
173,
2176,
834,
4350,
834,
9269,
834,
4350,
7,
3274,
96,
2,
14982,
2,
2533,
31545... |
Which country has a Year(s) won in 1964? | CREATE TABLE table_name_37 (country VARCHAR, year_s__won VARCHAR) | SELECT country FROM table_name_37 WHERE year_s__won = "1964" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4118,
41,
17529,
584,
4280,
28027,
6,
215,
834,
7,
834,
834,
210,
106,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
684,
65,
3,
9,
2929,
599,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
684,
21680,
953,
834,
4350,
834,
4118,
549,
17444,
427,
215,
834,
7,
834,
834,
210,
106,
3274,
96,
26937,
20364,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
In what city is the July temperature 23/9°c (73/48°f)? | CREATE TABLE table_name_49 (city VARCHAR, july VARCHAR) | SELECT city FROM table_name_49 WHERE july = "23/9°c (73/48°f)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3647,
41,
6726,
584,
4280,
28027,
6,
3,
2047,
120,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
86,
125,
690,
19,
8,
1718,
2912,
1902,
87,
1298,
1956,
75... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
690,
21680,
953,
834,
4350,
834,
3647,
549,
17444,
427,
3,
2047,
120,
3274,
96,
2773,
87,
1298,
1956,
75,
13649,
15020,
3707,
1956,
89,
61,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
how many patients whose admission type is urgent and diagnoses long title is hyperpotassemia? | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "URGENT" AND diagnoses.long_title = "Hyperpotassemia" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7690,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
2118,
23,
26,
1499,
6,
5059,
715,
1499,
6,
5692,
1499,
6,
701,
834,
15129,
1499,
6,
3783,
1499,
6,
5798,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
5... |
At what Location was the Runner-up TBD? | CREATE TABLE table_34713 (
"Year" text,
"National Champion" text,
"Runner-Up" text,
"Location" text,
"Host" text
) | SELECT "Location" FROM table_34713 WHERE "Runner-Up" = 'tbd' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
519,
4177,
2368,
41,
96,
476,
2741,
121,
1499,
6,
96,
24732,
16127,
121,
1499,
6,
96,
23572,
18,
11161,
121,
1499,
6,
96,
434,
32,
75,
257,
121,
1499,
6,
96,
566,
3481,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
434,
32,
75,
257,
121,
21680,
953,
834,
519,
4177,
2368,
549,
17444,
427,
96,
23572,
18,
11161,
121,
3274,
3,
31,
17,
115,
26,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
How many deposits had a Non-Interest Income of 0.9500000000000001 and number of branch/offices less than 17? | CREATE TABLE table_39601 (
"Bank" text,
"Asset" real,
"Loans" real,
"NPL Net" text,
"Deposits" real,
"Net Interest Income" real,
"Non-Interest Income" real,
"Net Profit" real,
"No. of Employees" text,
"No. of Branches/Offices" real,
"No. of ATMs" text
) | SELECT COUNT("Deposits") FROM table_39601 WHERE "Non-Interest Income" = '0.9500000000000001' AND "No. of Branches/Offices" < '17' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3288,
3328,
536,
41,
96,
21347,
121,
1499,
6,
96,
188,
7,
2244,
121,
490,
6,
96,
434,
32,
3247,
121,
490,
6,
96,
567,
5329,
6540,
121,
1499,
6,
96,
2962,
19882,
17,
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,
2847,
17161,
599,
121,
2962,
19882,
17,
7,
8512,
21680,
953,
834,
3288,
3328,
536,
549,
17444,
427,
96,
567,
106,
18,
17555,
222,
20110,
121,
3274,
3,
31,
23758,
12814,
19568,
19568,
17465,
31,
3430,
96,
4168,
5,
13... |
What is the largest number of top division titles with a 2012 position of 10th? | CREATE TABLE table_name_13 (top_division_titles INTEGER, position_in_2012 VARCHAR) | SELECT MAX(top_division_titles) FROM table_name_13 WHERE position_in_2012 = "10th" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2368,
41,
2916,
834,
26,
23,
6610,
834,
21869,
7,
3,
21342,
17966,
6,
1102,
834,
77,
834,
12172,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
2916,
834,
26,
23,
6610,
834,
21869,
7,
61,
21680,
953,
834,
4350,
834,
2368,
549,
17444,
427,
1102,
834,
77,
834,
12172,
3274,
96,
1714,
189,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Where is the director Dariush Mehrjui from? | CREATE TABLE table_80038 (
"Country" text,
"Film title used in nomination" text,
"Language" text,
"Original name" text,
"Director" text
) | SELECT "Country" FROM table_80038 WHERE "Director" = 'dariush mehrjui' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
6192,
3747,
41,
96,
10628,
651,
121,
1499,
6,
96,
371,
173,
51,
2233,
261,
16,
13588,
121,
1499,
6,
96,
434,
1468,
76,
545,
121,
1499,
6,
96,
667,
3380,
10270,
564,
121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
10628,
651,
121,
21680,
953,
834,
6192,
3747,
549,
17444,
427,
96,
23620,
127,
121,
3274,
3,
31,
26,
1665,
8489,
1091,
2047,
23,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What company was the constructor when Nick Heidfeld was the driver/ | CREATE TABLE table_name_50 (
constructor VARCHAR,
driver VARCHAR
) | SELECT constructor FROM table_name_50 WHERE driver = "nick heidfeld" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1752,
41,
6774,
127,
584,
4280,
28027,
6,
2535,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
349,
47,
8,
6774,
127,
116,
7486,
216,
23,
26,
5003,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6774,
127,
21680,
953,
834,
4350,
834,
1752,
549,
17444,
427,
2535,
3274,
96,
11191,
3,
88,
23,
26,
5003,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is the built when s.r. number is less than 2033, lb&sc number is less than 18, notes is i2 and withdrawal is cannot handle non-empty timestamp argument! 1935? | CREATE TABLE table_8295 (
"LB&SC Number" real,
"Built" text,
"S.R. Number" real,
"Withdrawal" text,
"Notes" text
) | SELECT "Built" FROM table_8295 WHERE "S.R. Number" < '2033' AND "LB&SC Number" < '18' AND "Notes" = 'i2' AND "Withdrawal" = 'cannot handle non-empty timestamp argument! 1935' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4613,
3301,
41,
96,
16976,
184,
4112,
7720,
121,
490,
6,
96,
7793,
173,
17,
121,
1499,
6,
96,
134,
5,
448,
5,
7720,
121,
490,
6,
96,
15013,
19489,
138,
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,
7793,
173,
17,
121,
21680,
953,
834,
4613,
3301,
549,
17444,
427,
96,
134,
5,
448,
5,
7720,
121,
3,
2,
3,
31,
1755,
4201,
31,
3430,
96,
16976,
184,
4112,
7720,
121,
3,
2,
3,
31,
2606,
31,
3430,
96,
10358,
... |
Which Extra points 1 point is the lowest one that has a Player of walter shaw? | CREATE TABLE table_name_95 (extra_points_1_point INTEGER, player VARCHAR) | SELECT MIN(extra_points_1_point) FROM table_name_95 WHERE player = "walter shaw" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3301,
41,
25666,
834,
2700,
7,
834,
536,
834,
2700,
3,
21342,
17966,
6,
1959,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
8505,
979,
209,
500,
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,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
25666,
834,
2700,
7,
834,
536,
834,
2700,
61,
21680,
953,
834,
4350,
834,
3301,
549,
17444,
427,
1959,
3274,
96,
210,
8818,
3,
15622,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
how many patients whose insurance is private and diagnoses icd9 code is 7140? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.insurance = "Private" AND diagnoses.icd9_code = "7140" | [
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... |
how mant different day names in old English were coined from the Latin day name "dies iovis"? | CREATE TABLE table_2624098_1 (old_english_day_name VARCHAR, glossed_from_latin_day_name VARCHAR) | SELECT COUNT(old_english_day_name) FROM table_2624098_1 WHERE glossed_from_latin_day_name = "Dies Iovis" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2688,
11944,
3916,
834,
536,
41,
1490,
834,
4606,
40,
1273,
834,
1135,
834,
4350,
584,
4280,
28027,
6,
20666,
15,
26,
834,
7152,
834,
14098,
834,
1135,
834,
4350,
584,
4280,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
1490,
834,
4606,
40,
1273,
834,
1135,
834,
4350,
61,
21680,
953,
834,
2688,
11944,
3916,
834,
536,
549,
17444,
427,
20666,
15,
26,
834,
7152,
834,
14098,
834,
1135,
834,
4350,
3274,
96,
8639,
7,
27... |
In Los Banos, California, when the ERP W is than 10, what is the average Frequency MHz? | CREATE TABLE table_69638 (
"Call sign" text,
"Frequency MHz" real,
"City of license" text,
"ERP W" real,
"Class" text,
"FCC info" text
) | SELECT AVG("Frequency MHz") FROM table_69638 WHERE "City of license" = 'los banos, california' AND "ERP W" < '10' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3951,
948,
3747,
41,
96,
254,
1748,
1320,
121,
1499,
6,
96,
371,
60,
835,
11298,
3,
20210,
121,
490,
6,
96,
254,
485,
13,
3344,
121,
1499,
6,
96,
3316,
345,
549,
121,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
121,
371,
60,
835,
11298,
3,
20210,
8512,
21680,
953,
834,
3951,
948,
3747,
549,
17444,
427,
96,
254,
485,
13,
3344,
121,
3274,
3,
31,
2298,
4514,
32,
7,
6,
3,
15534,
1161,
29,
23,
9,
31,
3430,
... |
Where is the headquarters of the place whose abbreviation is hy? | CREATE TABLE table_20559 (
"Code" text,
"District" text,
"Headquarters" text,
"Population (2011)" real,
"Area (km\u00b2)" real,
"Density (/km\u00b2)" real,
"Official website" text
) | SELECT "Headquarters" FROM table_20559 WHERE "Code" = 'HY' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23201,
3390,
41,
96,
22737,
121,
1499,
6,
96,
308,
23,
20066,
121,
1499,
6,
96,
3845,
9,
26,
19973,
7,
121,
1499,
6,
96,
27773,
7830,
25163,
121,
490,
6,
96,
188,
864,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
3845,
9,
26,
19973,
7,
121,
21680,
953,
834,
23201,
3390,
549,
17444,
427,
96,
22737,
121,
3274,
3,
31,
15761,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the to par when the total is larger than 288? | CREATE TABLE table_name_97 (
to_par VARCHAR,
total INTEGER
) | SELECT to_par FROM table_name_97 WHERE total > 288 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4327,
41,
12,
834,
1893,
584,
4280,
28027,
6,
792,
3,
21342,
17966,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
12,
260,
116,
8,
792,
19,
2186,
145,
204,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12,
834,
1893,
21680,
953,
834,
4350,
834,
4327,
549,
17444,
427,
792,
2490,
204,
4060,
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 original air date of the episode 'Another Happy Day'? | CREATE TABLE table_2570269_3 (
original_air_date__uk_ VARCHAR,
episode_title VARCHAR
) | SELECT original_air_date__uk_ FROM table_2570269_3 WHERE episode_title = "Another Happy Day" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
2518,
357,
3951,
834,
519,
41,
926,
834,
2256,
834,
5522,
834,
834,
1598,
834,
584,
4280,
28027,
6,
5640,
834,
21869,
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,
0,
0... | [
3,
23143,
14196,
926,
834,
2256,
834,
5522,
834,
834,
1598,
834,
21680,
953,
834,
1828,
2518,
357,
3951,
834,
519,
549,
17444,
427,
5640,
834,
21869,
3274,
96,
188,
29,
9269,
5574,
1430,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Who won the race circuit of sachsenring? | CREATE TABLE table_name_47 (
race_winner VARCHAR,
circuit VARCHAR
) | SELECT race_winner FROM table_name_47 WHERE circuit = "sachsenring" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4177,
41,
1964,
834,
3757,
687,
584,
4280,
28027,
6,
4558,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
751,
8,
1964,
4558,
13,
3,
7,
1836,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1964,
834,
3757,
687,
21680,
953,
834,
4350,
834,
4177,
549,
17444,
427,
4558,
3274,
96,
7,
1836,
7,
35,
1007,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What's the lowest Code that's got a Most Spoke Language of Xhosa, a Place of Addo Elephant National Park, and an Area (KM 2) that's smaller than 1.08? | CREATE TABLE table_name_92 (code INTEGER, area__km_2__ VARCHAR, most_spoken_language VARCHAR, place VARCHAR) | SELECT MIN(code) FROM table_name_92 WHERE most_spoken_language = "xhosa" AND place = "addo elephant national park" AND area__km_2__ < 1.08 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4508,
41,
4978,
3,
21342,
17966,
6,
616,
834,
834,
5848,
834,
357,
834,
834,
584,
4280,
28027,
6,
167,
834,
7990,
2217,
834,
24925,
584,
4280,
28027,
6,
286,
584... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4978,
61,
21680,
953,
834,
4350,
834,
4508,
549,
17444,
427,
167,
834,
7990,
2217,
834,
24925,
3274,
96,
226,
11982,
9,
121,
3430,
286,
3274,
96,
13039,
32,
17926,
1157,
2447,
121,
3430,
616,
834,
834... |
give me the number of patients whose days of hospital stay is greater than 2 and procedure icd9 code is 8949? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "2" AND procedures.icd9_code = "8949" | [
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,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.