NATURAL_LANG stringlengths 0 446 | SCHEMA stringlengths 27 2.21k | SQL stringlengths 18 453 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|
how long have they been playing ? | CREATE TABLE table_204_42 (
id number,
"season" number,
"level" text,
"division" text,
"section" text,
"position" text,
"movements" text
) | SELECT MAX("season") - MIN("season") FROM table_204_42 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
4165,
41,
3,
23,
26,
381,
6,
96,
9476,
121,
381,
6,
96,
4563,
121,
1499,
6,
96,
26,
23,
6610,
121,
1499,
6,
96,
14309,
121,
1499,
6,
96,
4718,
121,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
121,
9476,
8512,
3,
18,
3,
17684,
599,
121,
9476,
8512,
21680,
953,
834,
26363,
834,
4165,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who wrote the episode that was directed by Milan Cheylov? | CREATE TABLE table_31008 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"U.S. viewers (millions)" text
) | SELECT "Written by" FROM table_31008 WHERE "Directed by" = 'Milan Cheylov' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
19947,
4018,
41,
96,
4168,
5,
16,
939,
121,
490,
6,
96,
4168,
5,
16,
774,
121,
490,
6,
96,
382,
155,
109,
121,
1499,
6,
96,
23620,
15,
26,
57,
121,
1499,
6,
96,
24965... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
24965,
324,
57,
121,
21680,
953,
834,
19947,
4018,
549,
17444,
427,
96,
23620,
15,
26,
57,
121,
3274,
3,
31,
329,
173,
152,
2556,
63,
5850,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Name the opponent with a record of 60-61 | CREATE TABLE table_name_35 (opponent VARCHAR, record VARCHAR) | SELECT opponent FROM table_name_35 WHERE record = "60-61" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2469,
41,
32,
102,
9977,
584,
4280,
28027,
6,
1368,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
15264,
28,
3,
9,
1368,
13,
1640,
18,
4241,
1,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15264,
21680,
953,
834,
4350,
834,
2469,
549,
17444,
427,
1368,
3274,
96,
3328,
18,
4241,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
List the position of players with average number of points scored by players of that position bigger than 20. | CREATE TABLE player (POSITION VARCHAR, name VARCHAR, Points INTEGER) | SELECT POSITION FROM player GROUP BY name HAVING AVG(Points) >= 20 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1959,
41,
16034,
196,
9562,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
6,
4564,
7,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
6792,
8,
1102,
13,
1508,
28,
1348,
381,
13,
97... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
16034,
196,
9562,
21680,
1959,
350,
4630,
6880,
272,
476,
564,
454,
6968,
2365,
71,
17217,
599,
22512,
7,
61,
2490,
2423,
460,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Show the number of delegates in each committee with a bar chart, and could you order y axis in ascending order please? | CREATE TABLE party (
Party_ID int,
Year real,
Party text,
Governor text,
Lieutenant_Governor text,
Comptroller text,
Attorney_General text,
US_Senate text
)
CREATE TABLE election (
Election_ID int,
Counties_Represented text,
District int,
Delegate text,
Party int,
First_Elected real,
Committee text
)
CREATE TABLE county (
County_Id int,
County_name text,
Population real,
Zip_code text
) | SELECT Committee, COUNT(Committee) FROM election GROUP BY Committee ORDER BY COUNT(Committee) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1088,
41,
3450,
834,
4309,
16,
17,
6,
2929,
490,
6,
3450,
1499,
6,
10510,
1499,
6,
30943,
834,
27304,
127,
1499,
6,
4961,
17,
4046,
49,
1499,
6,
10154,
834,
20857,
1499,
6,
837,
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,
3201,
6,
2847,
17161,
599,
10205,
155,
17,
15,
15,
61,
21680,
4356,
350,
4630,
6880,
272,
476,
3201,
4674,
11300,
272,
476,
2847,
17161,
599,
10205,
155,
17,
15,
15,
61,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the frequency of the radio station in Indiana that has a call sign of WGNR? | CREATE TABLE table_name_70 (frequency VARCHAR, state VARCHAR, call_sign VARCHAR) | SELECT frequency FROM table_name_70 WHERE state = "indiana" AND call_sign = "wgnr" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2518,
41,
30989,
584,
4280,
28027,
6,
538,
584,
4280,
28027,
6,
580,
834,
6732,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
7321,
13,
8,
225... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7321,
21680,
953,
834,
4350,
834,
2518,
549,
17444,
427,
538,
3274,
96,
77,
8603,
9,
121,
3430,
580,
834,
6732,
3274,
96,
210,
122,
29,
52,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many silver medals does China have? | CREATE TABLE table_38405 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT COUNT("Silver") FROM table_38405 WHERE "Nation" = 'china' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3747,
591,
3076,
41,
96,
22557,
121,
490,
6,
96,
567,
257,
121,
1499,
6,
96,
23576,
121,
490,
6,
96,
134,
173,
624,
121,
490,
6,
96,
22780,
29,
776,
121,
490,
6,
96,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
134,
173,
624,
8512,
21680,
953,
834,
3747,
591,
3076,
549,
17444,
427,
96,
567,
257,
121,
3274,
3,
31,
5675,
9,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who was the director of the episode written by Russell T Davies and James Moran? | CREATE TABLE table_name_67 (director VARCHAR, writer VARCHAR) | SELECT director FROM table_name_67 WHERE writer = "russell t davies and james moran" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3708,
41,
25982,
584,
4280,
28027,
6,
4346,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
8,
2090,
13,
8,
5640,
1545,
57,
14010,
332,
28571,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2090,
21680,
953,
834,
4350,
834,
3708,
549,
17444,
427,
4346,
3274,
96,
4502,
12019,
3,
17,
836,
5914,
7,
11,
7620,
15,
7,
8030,
152,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Where is the station with a coverage of yucat n quintana roo campeche transmitting from? | CREATE TABLE table_39698 (
"Call sign" text,
"Launched" text,
"Transmitting from" text,
"Coverage" text,
"Languages" text,
"Frequency" text
) | SELECT "Transmitting from" FROM table_39698 WHERE "Coverage" = 'yucatán quintana roo campeche' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
519,
4314,
3916,
41,
96,
254,
1748,
1320,
121,
1499,
6,
96,
3612,
202,
4513,
121,
1499,
6,
96,
18474,
1538,
1222,
45,
121,
1499,
6,
96,
254,
1890,
545,
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,
18474,
1538,
1222,
45,
121,
21680,
953,
834,
519,
4314,
3916,
549,
17444,
427,
96,
254,
1890,
545,
121,
3274,
3,
31,
63,
76,
2138,
12916,
285,
29,
17,
152,
9,
3,
52,
32,
32,
2856,
15,
1033,
31,
1,
-100,
-1... |
What is the week 32 result when week 33 is 31.9%? | CREATE TABLE table_23680576_3 (
week_32 VARCHAR,
week_33 VARCHAR
) | SELECT week_32 FROM table_23680576_3 WHERE week_33 = "31.9%" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2773,
3651,
3076,
3959,
834,
519,
41,
471,
834,
2668,
584,
4280,
28027,
6,
471,
834,
4201,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
471,
3538,
74... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
471,
834,
2668,
21680,
953,
834,
2773,
3651,
3076,
3959,
834,
519,
549,
17444,
427,
471,
834,
4201,
3274,
96,
3341,
5,
7561,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
give me the number of patients whose procedure icd9 code is 3142 and they were born before the year 2197 . | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dob_year < "2197" AND procedures.icd9_code = "3142" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
What was the fastest lap at the Mexican Grand Prix? | CREATE TABLE table_1137718_2 (fastest_lap VARCHAR, grand_prix VARCHAR) | SELECT fastest_lap FROM table_1137718_2 WHERE grand_prix = "Mexican grand_prix" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
20522,
4013,
2606,
834,
357,
41,
11584,
222,
834,
8478,
584,
4280,
28027,
6,
1907,
834,
2246,
226,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
10391,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
10391,
834,
8478,
21680,
953,
834,
20522,
4013,
2606,
834,
357,
549,
17444,
427,
1907,
834,
2246,
226,
3274,
96,
329,
994,
23,
1608,
1907,
834,
2246,
226,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
I want the driver with Laps larger than 16 with a ferrari and grid less than 15 | CREATE TABLE table_name_44 (driver VARCHAR, grid VARCHAR, laps VARCHAR, constructor VARCHAR) | SELECT driver FROM table_name_44 WHERE laps > 16 AND constructor = "ferrari" AND grid < 15 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3628,
41,
13739,
52,
584,
4280,
28027,
6,
8634,
584,
4280,
28027,
6,
14941,
7,
584,
4280,
28027,
6,
6774,
127,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2535,
21680,
953,
834,
4350,
834,
3628,
549,
17444,
427,
14941,
7,
2490,
898,
3430,
6774,
127,
3274,
96,
1010,
52,
1665,
121,
3430,
8634,
3,
2,
627,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
did the eagles play against virginia tech or alabama on september 8 ? | CREATE TABLE table_203_490 (
id number,
"date" text,
"opponent#" text,
"rank#" text,
"site" text,
"result" text,
"attendance" number
) | SELECT "opponent#" FROM table_203_490 WHERE "date" = 'september 8' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
591,
2394,
41,
3,
23,
26,
381,
6,
96,
5522,
121,
1499,
6,
96,
32,
102,
9977,
4663,
121,
1499,
6,
96,
6254,
4663,
121,
1499,
6,
96,
3585,
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,
32,
102,
9977,
4663,
121,
21680,
953,
834,
23330,
834,
591,
2394,
549,
17444,
427,
96,
5522,
121,
3274,
3,
31,
7,
6707,
18247,
505,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who won third place with the runner up being dynamo moscow? | CREATE TABLE table_1167698_1 (
third_place VARCHAR,
runner_up VARCHAR
) | SELECT third_place FROM table_1167698_1 WHERE runner_up = "Dynamo Moscow" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
20159,
3959,
3916,
834,
536,
41,
1025,
834,
4687,
584,
4280,
28027,
6,
3,
10806,
834,
413,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
751,
1025,
286,
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1025,
834,
4687,
21680,
953,
834,
20159,
3959,
3916,
834,
536,
549,
17444,
427,
3,
10806,
834,
413,
3274,
96,
308,
63,
13363,
32,
15363,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many points did the Bridgend Athletic RFC have? | CREATE TABLE table_name_42 (points VARCHAR, club VARCHAR) | SELECT points FROM table_name_42 WHERE club = "bridgend athletic rfc" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4165,
41,
2700,
7,
584,
4280,
28027,
6,
1886,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
979,
410,
8,
6132,
727,
18373,
391,
5390,
43,
58,
1,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
979,
21680,
953,
834,
4350,
834,
4165,
549,
17444,
427,
1886,
3274,
96,
9818,
727,
12217,
3,
52,
89,
75,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
when did patient 012-40970 come into the hospital through the step-down unit (sdu) until 2 years ago for the first time? | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
) | SELECT patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '012-40970' AND patient.hospitaladmitsource = 'step-down unit (sdu)' AND DATETIME(patient.hospitaladmittime) <= DATETIME(CURRENT_TIME(), '-2 year') ORDER BY patient.hospitaladmittime LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7690,
41,
50,
9824,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
7690,
4350,
1499,
6,
50,
1999,
7,
83,
17,
381,
6,
50,
1999,
7,
83,
17,
715,
97,
3,
61,
3,
32102,
32103,
32102,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
1868,
5,
31386,
20466,
17,
715,
21680,
1868,
549,
17444,
427,
1868,
5,
202,
1495,
12417,
3274,
3,
31,
4542,
21432,
4198,
2518,
31,
3430,
1868,
5,
31386,
20466,
17,
7928,
3274,
3,
31,
7910,
18,
3035,
1745,
41,
7,
1... |
Which Points have a Game smaller than 70, and a Score of 4–8? | CREATE TABLE table_name_85 (points INTEGER, game VARCHAR, score VARCHAR) | SELECT MIN(points) FROM table_name_85 WHERE game < 70 AND score = "4–8" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4433,
41,
2700,
7,
3,
21342,
17966,
6,
467,
584,
4280,
28027,
6,
2604,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
4564,
7,
43,
3,
9,
4435,
2755,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
2700,
7,
61,
21680,
953,
834,
4350,
834,
4433,
549,
17444,
427,
467,
3,
2,
2861,
3430,
2604,
3274,
96,
591,
104,
927,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name the total number of Draws when goals for is 58 and losses is 12 when goal differences is less than 21 | CREATE TABLE table_55925 (
"Position" real,
"Club" text,
"Played" real,
"Points" text,
"Wins" real,
"Draws" real,
"Losses" real,
"Goals for" real,
"Goals against" real,
"Goal Difference" real
) | SELECT COUNT("Draws") FROM table_55925 WHERE "Goals for" = '58' AND "Losses" = '12' AND "Goal Difference" < '21' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3769,
28456,
41,
96,
345,
32,
7,
4749,
121,
490,
6,
96,
254,
11158,
121,
1499,
6,
96,
15800,
15,
26,
121,
490,
6,
96,
22512,
7,
121,
1499,
6,
96,
18455,
7,
121,
490,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
308,
10936,
7,
8512,
21680,
953,
834,
3769,
28456,
549,
17444,
427,
96,
6221,
5405,
21,
121,
3274,
3,
31,
3449,
31,
3430,
96,
434,
13526,
7,
121,
3274,
3,
31,
2122,
31,
3430,
96,
6221,
138,
... |
What was the oilers record for the game on November 27 when the Edmonton oilers were playing at home and the Chicago Blackhawks were the visiting team? | CREATE TABLE table_name_85 (record VARCHAR, date VARCHAR, home VARCHAR, visitor VARCHAR) | SELECT record FROM table_name_85 WHERE home = "edmonton oilers" AND visitor = "chicago blackhawks" AND date = "november 27" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4433,
41,
60,
7621,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
6,
234,
584,
4280,
28027,
6,
7019,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
1368,
21680,
953,
834,
4350,
834,
4433,
549,
17444,
427,
234,
3274,
96,
15,
26,
4662,
106,
1043,
277,
121,
3430,
7019,
3274,
96,
1436,
658,
839,
1001,
14400,
7,
121,
3430,
833,
3274,
96,
5326,
18247,
2307,
121,
1,
... |
What date did Ben Gordon (8) have high assists? | CREATE TABLE table_name_20 (
date VARCHAR,
high_assists VARCHAR
) | SELECT date FROM table_name_20 WHERE high_assists = "ben gordon (8)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1755,
41,
833,
584,
4280,
28027,
6,
306,
834,
6500,
7,
17,
7,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
833,
410,
2798,
14626,
3,
28007,
43,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
833,
21680,
953,
834,
4350,
834,
1755,
549,
17444,
427,
306,
834,
6500,
7,
17,
7,
3274,
96,
115,
35,
281,
52,
2029,
3,
28007,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
tell me the minimum age of patients with death status as 0 and discharge location as disc-tran cancer chldrn h. | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
) | SELECT MIN(demographic.age) FROM demographic WHERE demographic.expire_flag = "0" AND demographic.discharge_location = "DISC-TRAN CANCER/CHLDRN H" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
1778,
16587,
5,
545,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
994,
2388,
15,
834,
89,
5430,
3274,
96,
632,
121,
3430,
14798,
5,
26,
159,
7993,
834,
14836,
3274,
96,
15438,
254,
18,
11359,
567,
2... |
which year was there at least three movies ? | CREATE TABLE table_204_323 (
id number,
"year" number,
"film" text,
"function" text,
"notes" text
) | SELECT "year" FROM table_204_323 GROUP BY "year" HAVING COUNT("film") >= 3 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
2668,
519,
41,
3,
23,
26,
381,
6,
96,
1201,
121,
381,
6,
96,
9988,
121,
1499,
6,
96,
23993,
121,
1499,
6,
96,
7977,
7,
121,
1499,
3,
61,
3,
32102,
32103,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
96,
1201,
121,
21680,
953,
834,
26363,
834,
2668,
519,
350,
4630,
6880,
272,
476,
96,
1201,
121,
454,
6968,
2365,
2847,
17161,
599,
121,
9988,
8512,
2490,
2423,
220,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is Tatyana Gubina's Weight? | CREATE TABLE table_name_43 (
weight VARCHAR,
name VARCHAR
) | SELECT weight FROM table_name_43 WHERE name = "tatyana gubina" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4906,
41,
1293,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
9233,
21247,
2846,
4517,
9,
31,
7,
14230,
58,
1,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1293,
21680,
953,
834,
4350,
834,
4906,
549,
17444,
427,
564,
3274,
96,
17,
144,
21247,
3,
1744,
4517,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What kind of Motor has a Apogee of 713 km? | CREATE TABLE table_name_98 (motor VARCHAR, apogee VARCHAR) | SELECT motor FROM table_name_98 WHERE apogee = "713 km" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3916,
41,
18271,
584,
4280,
28027,
6,
3,
9521,
397,
15,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
773,
13,
5083,
65,
3,
9,
5085,
32,
397,
15,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2340,
21680,
953,
834,
4350,
834,
3916,
549,
17444,
427,
3,
9521,
397,
15,
3274,
96,
4450,
519,
2280,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Which Points against has a Lost of 13, and Points for of 671? | CREATE TABLE table_name_9 (
points_against VARCHAR,
lost VARCHAR,
points_for VARCHAR
) | SELECT points_against FROM table_name_9 WHERE lost = "13" AND points_for = "671" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1298,
41,
979,
834,
9,
16720,
7,
17,
584,
4280,
28027,
6,
1513,
584,
4280,
28027,
6,
979,
834,
1161,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
979,
834,
9,
16720,
7,
17,
21680,
953,
834,
4350,
834,
1298,
549,
17444,
427,
1513,
3274,
96,
2368,
121,
3430,
979,
834,
1161,
3274,
96,
3708,
536,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What year was the congressional service elected for a term beginning on January 3, 1989? | CREATE TABLE table_197446_1 (
elected VARCHAR,
term_began VARCHAR
) | SELECT elected FROM table_197446_1 WHERE term_began = "January 3, 1989" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2294,
4581,
4448,
834,
536,
41,
8160,
584,
4280,
28027,
6,
1657,
834,
346,
2565,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
215,
47,
8,
28167,
313,
8160,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8160,
21680,
953,
834,
2294,
4581,
4448,
834,
536,
549,
17444,
427,
1657,
834,
346,
2565,
3274,
96,
30404,
6180,
9975,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Find the name and ID of the product whose total order quantity is the largest. | CREATE TABLE order_items (product_id VARCHAR, order_quantity INTEGER); CREATE TABLE products (product_details VARCHAR, product_id VARCHAR) | SELECT t2.product_details, t2.product_id FROM order_items AS t1 JOIN products AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_id ORDER BY SUM(t1.order_quantity) LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
455,
834,
23,
3524,
7,
41,
15892,
834,
23,
26,
584,
4280,
28027,
6,
455,
834,
13158,
485,
3,
21342,
17966,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
494,
41,
15892,
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,
3,
17,
4416,
15892,
834,
221,
5756,
7,
6,
3,
17,
4416,
15892,
834,
23,
26,
21680,
455,
834,
23,
3524,
7,
6157,
3,
17,
536,
3,
15355,
3162,
494,
6157,
3,
17,
357,
9191,
3,
17,
5411,
15892,
834,
23,
26,
3274,
... |
Which Spanish voice actor does the same character as French voice actor Dennis Boileau? | CREATE TABLE table_name_61 (spanish_voice_actor VARCHAR, french_voice_actor VARCHAR) | SELECT spanish_voice_actor FROM table_name_61 WHERE french_voice_actor = "dennis boileau" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4241,
41,
7,
2837,
1273,
834,
23235,
834,
9,
5317,
584,
4280,
28027,
6,
20609,
834,
23235,
834,
9,
5317,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8438,
1273,
834,
23235,
834,
9,
5317,
21680,
953,
834,
4350,
834,
4241,
549,
17444,
427,
20609,
834,
23235,
834,
9,
5317,
3274,
96,
537,
29,
159,
13374,
1607,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the lowest Date, when Doubles, II Class is 18, and when Total is less than 164? | CREATE TABLE table_40516 (
"Date" real,
"Doubles, I Class" real,
"Doubles, II Class" real,
"Greater Doubles" real,
"Doubles" real,
"Semidoubles" real,
"Total" real
) | SELECT MIN("Date") FROM table_40516 WHERE "Doubles, II Class" = '18' AND "Total" < '164' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
3076,
2938,
41,
96,
308,
342,
121,
490,
6,
96,
4135,
76,
2296,
7,
6,
27,
4501,
121,
490,
6,
96,
4135,
76,
2296,
7,
6,
2466,
4501,
121,
490,
6,
96,
24189,
49,
840... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
121,
308,
342,
8512,
21680,
953,
834,
591,
3076,
2938,
549,
17444,
427,
96,
4135,
76,
2296,
7,
6,
2466,
4501,
121,
3274,
3,
31,
2606,
31,
3430,
96,
3696,
1947,
121,
3,
2,
3,
31,
26987,
31,
1,
-1... |
What was the challenge for episode 28? | CREATE TABLE table_24798489_2 (challenge VARCHAR, episode_number VARCHAR) | SELECT challenge FROM table_24798489_2 WHERE episode_number = 28 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2266,
4440,
4608,
3914,
834,
357,
41,
12654,
40,
35,
397,
584,
4280,
28027,
6,
5640,
834,
5525,
1152,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
1921,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1921,
21680,
953,
834,
2266,
4440,
4608,
3914,
834,
357,
549,
17444,
427,
5640,
834,
5525,
1152,
3274,
2059,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
List all customer status codes and the number of customers having each status code, could you rank bar in descending order? | CREATE TABLE Addresses (
address_id INTEGER,
line_1_number_building VARCHAR(80),
city VARCHAR(50),
zip_postcode VARCHAR(20),
state_province_county VARCHAR(50),
country VARCHAR(50)
)
CREATE TABLE Lessons (
lesson_id INTEGER,
customer_id INTEGER,
lesson_status_code VARCHAR(15),
staff_id INTEGER,
vehicle_id INTEGER,
lesson_date DATETIME,
lesson_time VARCHAR(10),
price DOUBLE
)
CREATE TABLE Staff (
staff_id INTEGER,
staff_address_id INTEGER,
nickname VARCHAR(80),
first_name VARCHAR(80),
middle_name VARCHAR(80),
last_name VARCHAR(80),
date_of_birth DATETIME,
date_joined_staff DATETIME,
date_left_staff DATETIME
)
CREATE TABLE Customers (
customer_id INTEGER,
customer_address_id INTEGER,
customer_status_code VARCHAR(15),
date_became_customer DATETIME,
date_of_birth DATETIME,
first_name VARCHAR(80),
last_name VARCHAR(80),
amount_outstanding DOUBLE,
email_address VARCHAR(250),
phone_number VARCHAR(255),
cell_mobile_phone_number VARCHAR(255)
)
CREATE TABLE Vehicles (
vehicle_id INTEGER,
vehicle_details VARCHAR(255)
)
CREATE TABLE Customer_Payments (
customer_id INTEGER,
datetime_payment DATETIME,
payment_method_code VARCHAR(10),
amount_payment DOUBLE
) | SELECT customer_status_code, COUNT(*) FROM Customers GROUP BY customer_status_code ORDER BY customer_status_code DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
13246,
15,
7,
41,
1115,
834,
23,
26,
3,
21342,
17966,
6,
689,
834,
536,
834,
5525,
1152,
834,
10905,
584,
4280,
28027,
599,
2079,
201,
690,
584,
4280,
28027,
599,
1752,
201,
10658,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
884,
834,
8547,
302,
834,
4978,
6,
2847,
17161,
599,
1935,
61,
21680,
16423,
350,
4630,
6880,
272,
476,
884,
834,
8547,
302,
834,
4978,
4674,
11300,
272,
476,
884,
834,
8547,
302,
834,
4978,
309,
25067,
1,
-100,
-10... |
Find the maximum and minimum settlement amount. | CREATE TABLE settlements (
settlement_id number,
claim_id number,
effective_date time,
settlement_amount number
)
CREATE TABLE available_policies (
policy_id number,
policy_type_code text,
customer_phone text
)
CREATE TABLE customers (
customer_id number,
customer_name text
)
CREATE TABLE services (
service_id number,
service_name text
)
CREATE TABLE customers_policies (
customer_id number,
policy_id number,
date_opened time,
date_closed time
)
CREATE TABLE claims (
claim_id number,
fnol_id number,
effective_date time
)
CREATE TABLE first_notification_of_loss (
fnol_id number,
customer_id number,
policy_id number,
service_id number
) | SELECT MAX(settlement_amount), MIN(settlement_amount) FROM settlements | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7025,
7,
41,
7025,
834,
23,
26,
381,
6,
1988,
834,
23,
26,
381,
6,
1231,
834,
5522,
97,
6,
7025,
834,
9,
11231,
381,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
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,
4800,
4,
599,
2244,
17,
3335,
834,
9,
11231,
201,
3,
17684,
599,
2244,
17,
3335,
834,
9,
11231,
61,
21680,
7025,
7,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What year did the Cosworth v8 engine participate in? | CREATE TABLE table_name_37 (
year INTEGER,
engine VARCHAR
) | SELECT AVG(year) FROM table_name_37 WHERE engine = "cosworth v8" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4118,
41,
215,
3,
21342,
17966,
6,
1948,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
215,
410,
8,
638,
7,
7048,
3,
208,
927,
1948,
3716,
16,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
71,
17217,
599,
1201,
61,
21680,
953,
834,
4350,
834,
4118,
549,
17444,
427,
1948,
3274,
96,
509,
7,
7048,
3,
208,
927,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What's the Sanskrit word for month with Thai name ? | CREATE TABLE table_2243 (
"English name" text,
"Thai name" text,
"Abbr." text,
"Transcription" text,
"Sanskrit word" text,
"Zodiac sign" text
) | SELECT "Sanskrit word" FROM table_2243 WHERE "Thai name" = 'มกราคม' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2884,
4906,
41,
96,
26749,
564,
121,
1499,
6,
96,
8991,
9,
23,
564,
121,
1499,
6,
96,
8952,
115,
52,
535,
1499,
6,
96,
9402,
29,
11830,
121,
1499,
6,
96,
134,
3247,
106... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
134,
3247,
10648,
17,
1448,
121,
21680,
953,
834,
2884,
4906,
549,
17444,
427,
96,
8991,
9,
23,
564,
121,
3274,
3,
31,
2,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
How many orders does Lucas Mancini has? | CREATE TABLE invoices (customer_id VARCHAR); CREATE TABLE customers (id VARCHAR, first_name VARCHAR, last_name VARCHAR) | SELECT COUNT(*) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = "Lucas" AND T1.last_name = "Mancini" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
10921,
7,
41,
25697,
49,
834,
23,
26,
584,
4280,
28027,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
722,
41,
23,
26,
584,
4280,
28027,
6,
166,
834,
4350,
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,
2847,
17161,
599,
1935,
61,
21680,
722,
6157,
332,
536,
3,
15355,
3162,
10921,
7,
6157,
332,
357,
9191,
332,
5411,
23,
26,
3274,
332,
4416,
25697,
49,
834,
23,
26,
549,
17444,
427,
332,
5411,
14672,
834,
4350,
3274,... |
What are all the vicinity (km²) where profits magnificence (2007) is 2nd | CREATE TABLE table_255812_1 (area__km²_ VARCHAR, income_class__2007_ VARCHAR) | SELECT area__km²_ FROM table_255812_1 WHERE income_class__2007_ = "2nd" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
3449,
2122,
834,
536,
41,
498,
834,
834,
5848,
357,
834,
584,
4280,
28027,
6,
2055,
834,
4057,
834,
834,
20615,
834,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
3,
23143,
14196,
616,
834,
834,
5848,
357,
834,
21680,
953,
834,
1828,
3449,
2122,
834,
536,
549,
17444,
427,
2055,
834,
4057,
834,
834,
20615,
834,
3274,
96,
357,
727,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Which of the R. Epp, has Ed Zacharias from Rollen, Jerolt, Golt? | CREATE TABLE table_name_97 (
r_epp VARCHAR,
ed_zacharias VARCHAR
) | SELECT r_epp FROM table_name_97 WHERE ed_zacharias = "rollen, jerolt, golt" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4327,
41,
3,
52,
834,
15,
1572,
584,
4280,
28027,
6,
3,
15,
26,
834,
172,
1836,
6286,
7,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
13,
8,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
52,
834,
15,
1572,
21680,
953,
834,
4350,
834,
4327,
549,
17444,
427,
3,
15,
26,
834,
172,
1836,
6286,
7,
3274,
96,
4046,
35,
6,
528,
3491,
17,
6,
3,
7579,
17,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
How many standards are there, when the launch date was 17.04.2006? | CREATE TABLE table_19246_1 (standard VARCHAR, launch_date__ddmmyyyy_ VARCHAR) | SELECT COUNT(standard) FROM table_19246_1 WHERE launch_date__ddmmyyyy_ = "17.04.2006" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
19978,
4448,
834,
536,
41,
16020,
584,
4280,
28027,
6,
3289,
834,
5522,
834,
834,
26,
26,
635,
63,
63,
63,
63,
834,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16020,
61,
21680,
953,
834,
19978,
4448,
834,
536,
549,
17444,
427,
3289,
834,
5522,
834,
834,
26,
26,
635,
63,
63,
63,
63,
834,
3274,
96,
2517,
5,
14161,
21196,
121,
1,
-100,
-100,
-100,
-100,
-... |
find me the death status and primary language that patient with patient id 3623 prefers. | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT demographic.language, demographic.expire_flag FROM demographic WHERE demographic.subject_id = "3623" | [
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,
14798,
5,
24925,
6,
14798,
5,
994,
2388,
15,
834,
89,
5430,
21680,
14798,
549,
17444,
427,
14798,
5,
7304,
11827,
834,
23,
26,
3274,
96,
3420,
2773,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
How many of the patients diagnosed with other emphysema have an unspecified death status? | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "0" AND diagnoses.long_title = "Other emphysema" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
5... |
If the site is sanford stadium • athens, ga, what is the date? | CREATE TABLE table_26842217_8 (date VARCHAR, site VARCHAR) | SELECT date FROM table_26842217_8 WHERE site = "Sanford Stadium • Athens, GA" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2688,
4608,
2884,
2517,
834,
927,
41,
5522,
584,
4280,
28027,
6,
353,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
156,
8,
353,
19,
3,
7,
152,
2590,
14939,
1697,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
833,
21680,
953,
834,
2688,
4608,
2884,
2517,
834,
927,
549,
17444,
427,
353,
3274,
96,
134,
152,
2590,
12750,
1697,
486,
3225,
7,
6,
10615,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Show each state and the number of addresses in each state Show bar chart, and sort y-axis in desc order. | CREATE TABLE Products (
product_id INTEGER,
product_type_code VARCHAR(15),
product_name VARCHAR(80),
product_price DOUBLE
)
CREATE TABLE Order_Items (
order_item_id INTEGER,
order_id INTEGER,
product_id INTEGER,
order_quantity VARCHAR(80)
)
CREATE TABLE Customer_Orders (
order_id INTEGER,
customer_id INTEGER,
order_date DATETIME,
order_status_code VARCHAR(15)
)
CREATE TABLE Contacts (
contact_id INTEGER,
customer_id INTEGER,
gender VARCHAR(1),
first_name VARCHAR(80),
last_name VARCHAR(50),
contact_phone VARCHAR(80)
)
CREATE TABLE Addresses (
address_id INTEGER,
line_1_number_building VARCHAR(80),
city VARCHAR(50),
zip_postcode VARCHAR(20),
state_province_county VARCHAR(50),
country VARCHAR(50)
)
CREATE TABLE Customers (
customer_id INTEGER,
payment_method_code VARCHAR(15),
customer_number VARCHAR(20),
customer_name VARCHAR(80),
customer_address VARCHAR(255),
customer_phone VARCHAR(80),
customer_email VARCHAR(80)
)
CREATE TABLE Customer_Address_History (
customer_id INTEGER,
address_id INTEGER,
date_from DATETIME,
date_to DATETIME
) | SELECT state_province_county, COUNT(*) FROM Addresses GROUP BY state_province_county ORDER BY COUNT(*) DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7554,
41,
556,
834,
23,
26,
3,
21342,
17966,
6,
556,
834,
6137,
834,
4978,
584,
4280,
28027,
599,
1808,
201,
556,
834,
4350,
584,
4280,
28027,
599,
2079,
201,
556,
834,
102,
4920,
60... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
538,
834,
1409,
2494,
565,
834,
13362,
63,
6,
2847,
17161,
599,
1935,
61,
21680,
13246,
15,
7,
350,
4630,
6880,
272,
476,
538,
834,
1409,
2494,
565,
834,
13362,
63,
4674,
11300,
272,
476,
2847,
17161,
599,
1935,
61,... |
Which position has 30 points and Reiner Stuyvenberg as a passenger? | CREATE TABLE table_49010 (
"Season" text,
"Passenger" text,
"Equipment" text,
"Position" text,
"Points" real,
"Races" real,
"Wins" text,
"Second" text,
"Third" text
) | SELECT "Position" FROM table_49010 WHERE "Points" = '30' AND "Passenger" = 'reiner stuyvenberg' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
2394,
1714,
41,
96,
134,
15,
9,
739,
121,
1499,
6,
96,
20192,
35,
1304,
121,
1499,
6,
96,
427,
23067,
297,
121,
1499,
6,
96,
345,
32,
7,
4749,
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,
345,
32,
7,
4749,
121,
21680,
953,
834,
591,
2394,
1714,
549,
17444,
427,
96,
22512,
7,
121,
3274,
3,
31,
1458,
31,
3430,
96,
20192,
35,
1304,
121,
3274,
3,
31,
60,
4899,
21341,
63,
208,
11063,
31,
1,
-100,
... |
What is the lowest ru? | CREATE TABLE table_10818465_1 (ru INTEGER) | SELECT MIN(ru) FROM table_10818465_1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
16169,
25987,
4122,
834,
536,
41,
52,
76,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
7402,
3,
52,
76,
58,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
52,
76,
61,
21680,
953,
834,
16169,
25987,
4122,
834,
536,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
For those records from the products and each product's manufacturer, give me the comparison about the sum of price over the name , and group by attribute name, and list by the total number in descending. | CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) | SELECT T1.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Price DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7554,
41,
3636,
3,
21342,
17966,
6,
5570,
584,
4280,
28027,
599,
25502,
201,
5312,
3396,
254,
26330,
434,
6,
15248,
3,
21342,
17966,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
332,
5411,
23954,
6,
332,
5411,
345,
4920,
21680,
7554,
6157,
332,
536,
3,
15355,
3162,
15248,
7,
6157,
332,
357,
9191,
332,
5411,
7296,
76,
8717,
450,
49,
3274,
332,
4416,
22737,
350,
4630,
6880,
272,
476,
332,
541... |
What is the speed when the rank is larger than 2, and team is 500cc norton manx? | CREATE TABLE table_65036 (
"Rank" real,
"Rider" text,
"Team" text,
"Speed" text,
"Time" text
) | SELECT "Speed" FROM table_65036 WHERE "Rank" > '2' AND "Team" = '500cc norton manx' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
15348,
3420,
41,
96,
22557,
121,
490,
6,
96,
448,
23,
588,
121,
1499,
6,
96,
18699,
121,
1499,
6,
96,
28328,
121,
1499,
6,
96,
13368,
121,
1499,
3,
61,
3,
32102,
32103,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
28328,
121,
21680,
953,
834,
15348,
3420,
549,
17444,
427,
96,
22557,
121,
2490,
3,
31,
357,
31,
3430,
96,
18699,
121,
3274,
3,
31,
2560,
75,
75,
150,
17330,
388,
226,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100... |
get me the number of newborn admission patients who were hospitalized for more than 17 days. | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "NEWBORN" AND demographic.days_stay > "17" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
9,
26,
5451,
834,
6137,
3274,
96,
4171,
518,
8471,
14151,
121,
3430,
14798,
5,
1135,
7,
834,
215... |
What is the highest earnings for Tom watson who had a ranking larger than 2? | CREATE TABLE table_36910 (
"Rank" real,
"Player" text,
"Country" text,
"Earnings ( $ )" real,
"Wins" real
) | SELECT MAX("Earnings ( $ )") FROM table_36910 WHERE "Player" = 'tom watson' AND "Rank" > '2' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
519,
3951,
1714,
41,
96,
22557,
121,
490,
6,
96,
15800,
49,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
427,
291,
29,
53,
7,
41,
1514,
3,
61,
121,
490,
6,
96,
184... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
121,
427,
291,
29,
53,
7,
41,
1514,
3,
61,
8512,
21680,
953,
834,
519,
3951,
1714,
549,
17444,
427,
96,
15800,
49,
121,
3274,
3,
31,
235,
51,
8036,
17,
739,
31,
3430,
96,
22557,
121,
2490,
3,
31,... |
A bar chart showing the number of last name for all female students Their sex is F, and list by the x-axis in desc please. | CREATE TABLE Allergy_Type (
Allergy VARCHAR(20),
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20)
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
) | SELECT LName, COUNT(LName) FROM Student WHERE Sex = 'F' GROUP BY LName ORDER BY LName DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
432,
49,
122,
63,
834,
25160,
41,
432,
49,
122,
63,
584,
4280,
28027,
599,
1755,
201,
432,
49,
122,
63,
25160,
584,
4280,
28027,
599,
1755,
61,
3,
61,
3,
32102,
32103,
32102,
205,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
301,
23954,
6,
2847,
17161,
599,
434,
23954,
61,
21680,
6341,
549,
17444,
427,
679,
226,
3274,
3,
31,
371,
31,
350,
4630,
6880,
272,
476,
301,
23954,
4674,
11300,
272,
476,
301,
23954,
309,
25067,
1,
-100,
-100,
-10... |
what's the number of households with per capita income being $16,820 | CREATE TABLE table_1350350_2 (number_of_households VARCHAR, per_capita_income VARCHAR) | SELECT number_of_households FROM table_1350350_2 WHERE per_capita_income = "$16,820" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
1752,
16975,
834,
357,
41,
5525,
1152,
834,
858,
834,
1840,
6134,
7,
584,
4280,
28027,
6,
399,
834,
4010,
155,
9,
834,
15759,
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,
0,
0,
0... | [
3,
23143,
14196,
381,
834,
858,
834,
1840,
6134,
7,
21680,
953,
834,
2368,
1752,
16975,
834,
357,
549,
17444,
427,
399,
834,
4010,
155,
9,
834,
15759,
3274,
96,
3229,
2938,
6,
927,
1755,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which school has the Raiders as their mascot? | CREATE TABLE table_11044765_1 (
school VARCHAR,
mascot VARCHAR
) | SELECT school FROM table_11044765_1 WHERE mascot = "Raiders" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
536,
15442,
4177,
4122,
834,
536,
41,
496,
584,
4280,
28027,
6,
3,
2754,
4310,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
496,
65,
8,
13016,
588,
7,
38,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
496,
21680,
953,
834,
536,
15442,
4177,
4122,
834,
536,
549,
17444,
427,
3,
2754,
4310,
3274,
96,
448,
18900,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What place in the United States having a score of 67-75-68=210? | CREATE TABLE table_name_10 (
place VARCHAR,
country VARCHAR,
score VARCHAR
) | SELECT place FROM table_name_10 WHERE country = "united states" AND score = 67 - 75 - 68 = 210 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1714,
41,
286,
584,
4280,
28027,
6,
684,
584,
4280,
28027,
6,
2604,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
286,
16,
8,
907,
1323,
578,
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
286,
21680,
953,
834,
4350,
834,
1714,
549,
17444,
427,
684,
3274,
96,
15129,
15,
26,
2315,
121,
3430,
2604,
3274,
3,
3708,
3,
18,
6374,
3,
18,
3,
3651,
3274,
3,
15239,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the sum of bronzes for teams with more than 0 silver and a total under 1? | CREATE TABLE table_name_22 (
bronze INTEGER,
silver VARCHAR,
total VARCHAR
) | SELECT SUM(bronze) FROM table_name_22 WHERE silver > 0 AND total < 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2884,
41,
13467,
3,
21342,
17966,
6,
4294,
584,
4280,
28027,
6,
792,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
4505,
13,
13467,
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,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
180,
6122,
599,
13711,
776,
61,
21680,
953,
834,
4350,
834,
2884,
549,
17444,
427,
4294,
2490,
3,
632,
3430,
792,
3,
2,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Name the gp for ff being 0 and qbh being 1 | CREATE TABLE table_15128839_22 (gp VARCHAR, ff VARCHAR, qbh VARCHAR) | SELECT gp FROM table_15128839_22 WHERE ff = 0 AND qbh = 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1808,
2122,
4060,
3288,
834,
2884,
41,
122,
102,
584,
4280,
28027,
6,
3,
89,
89,
584,
4280,
28027,
6,
3,
1824,
115,
107,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
3,
23143,
14196,
3,
122,
102,
21680,
953,
834,
1808,
2122,
4060,
3288,
834,
2884,
549,
17444,
427,
3,
89,
89,
3274,
3,
632,
3430,
3,
1824,
115,
107,
3274,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the Tournament when the 2013 is 1r? | CREATE TABLE table_name_54 (tournament VARCHAR) | SELECT tournament FROM table_name_54 WHERE 2013 = "1r" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5062,
41,
17,
1211,
20205,
17,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
20502,
116,
8,
2038,
19,
209,
52,
58,
1,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
5892,
21680,
953,
834,
4350,
834,
5062,
549,
17444,
427,
2038,
3274,
96,
536,
52,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
japan and france each won how many gold medals ? | CREATE TABLE table_203_812 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
) | SELECT "gold" FROM table_203_812 WHERE "nation" = 'japan' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
4959,
357,
41,
3,
23,
26,
381,
6,
96,
6254,
121,
381,
6,
96,
29,
257,
121,
1499,
6,
96,
14910,
121,
381,
6,
96,
7,
173,
624,
121,
381,
6,
96,
13711,
776,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
14910,
121,
21680,
953,
834,
23330,
834,
4959,
357,
549,
17444,
427,
96,
29,
257,
121,
3274,
3,
31,
1191,
2837,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the number of played when points against 645? | CREATE TABLE table_13018116_1 (played VARCHAR, pts_agst VARCHAR) | SELECT COUNT(played) FROM table_13018116_1 WHERE pts_agst = 645 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
21448,
2606,
20159,
834,
536,
41,
4895,
15,
26,
584,
4280,
28027,
6,
3,
102,
17,
7,
834,
9,
122,
7,
17,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
4895,
15,
26,
61,
21680,
953,
834,
21448,
2606,
20159,
834,
536,
549,
17444,
427,
3,
102,
17,
7,
834,
9,
122,
7,
17,
3274,
431,
2128,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is total population of Saint-Agapit (code 33045)? | CREATE TABLE table_name_99 (region INTEGER, name VARCHAR, code VARCHAR) | SELECT SUM(region) FROM table_name_99 WHERE name = "saint-agapit" AND code < 33045 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3264,
41,
18145,
3,
21342,
17966,
6,
564,
584,
4280,
28027,
6,
1081,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
792,
2074,
13,
2788,
18,
188,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
180,
6122,
599,
18145,
61,
21680,
953,
834,
4350,
834,
3264,
549,
17444,
427,
564,
3274,
96,
7,
9,
77,
17,
18,
4711,
5230,
121,
3430,
1081,
3,
2,
3,
17225,
2128,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What's the minimal game number in the season? | CREATE TABLE table_11961582_4 (
game INTEGER
) | SELECT MIN(game) FROM table_11961582_4 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2596,
4314,
1808,
4613,
834,
591,
41,
467,
3,
21342,
17966,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
31,
7,
8,
6211,
467,
381,
16,
8,
774,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
7261,
61,
21680,
953,
834,
2596,
4314,
1808,
4613,
834,
591,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what title was released previous to got ta be the one ? | CREATE TABLE table_204_239 (
id number,
"year" number,
"title" text,
"uk" text,
"us:\nbillboard\nhot 100" text,
"us:\nbillboard\nr&b" text,
"us:\nbillboard\na/c" text,
"australia" text,
"various" text
) | SELECT "title" FROM table_204_239 WHERE id = (SELECT id FROM table_204_239 WHERE "title" = '"gotta be the one"') - 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
357,
3288,
41,
3,
23,
26,
381,
6,
96,
1201,
121,
381,
6,
96,
21869,
121,
1499,
6,
96,
1598,
121,
1499,
6,
96,
302,
10,
2,
29,
3727,
40,
1976,
2,
29,
10718... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
21869,
121,
21680,
953,
834,
26363,
834,
357,
3288,
549,
17444,
427,
3,
23,
26,
3274,
41,
23143,
14196,
3,
23,
26,
21680,
953,
834,
26363,
834,
357,
3288,
549,
17444,
427,
96,
21869,
121,
3274,
3,
31,
121,
267... |
Who is the director of the fimm Biola Tak Berdawai? | CREATE TABLE table_18933 (
"Year (Ceremony)" text,
"Film title used in nomination" text,
"Original title" text,
"Director" text,
"Result" text
) | SELECT "Director" FROM table_18933 WHERE "Original title" = 'Biola tak berdawai' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
25312,
4201,
41,
96,
476,
2741,
41,
254,
49,
15,
21208,
61,
121,
1499,
6,
96,
371,
173,
51,
2233,
261,
16,
13588,
121,
1499,
6,
96,
667,
3380,
10270,
2233,
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,
23620,
127,
121,
21680,
953,
834,
25312,
4201,
549,
17444,
427,
96,
667,
3380,
10270,
2233,
121,
3274,
3,
31,
279,
23578,
3,
17,
1639,
3,
1152,
26,
7396,
23,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is listed for the 2011 that has a 2005 of 4.2%? | CREATE TABLE table_name_8 (
Id VARCHAR
) | SELECT 2011 FROM table_name_8 WHERE 2005 = "4.2%" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
927,
41,
27,
26,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
2616,
21,
8,
2722,
24,
65,
3,
9,
3105,
13,
2853,
5406,
58,
1,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2722,
21680,
953,
834,
4350,
834,
927,
549,
17444,
427,
3105,
3274,
96,
19765,
1454,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
For those employees who did not have any job in the past, visualize a bar chart about the distribution of job_id and the sum of employee_id , and group by attribute job_id, and I want to display x axis in asc order. | CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
) | SELECT JOB_ID, SUM(EMPLOYEE_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY JOB_ID | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
10521,
41,
3396,
19846,
11810,
834,
4309,
7908,
1982,
599,
8525,
632,
201,
3396,
19846,
11810,
834,
567,
17683,
3,
4331,
4059,
599,
1458,
201,
283,
15610,
17966,
834,
4309,
7908,
1982,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
446,
10539,
834,
4309,
6,
180,
6122,
599,
6037,
345,
5017,
476,
5080,
834,
4309,
61,
21680,
1652,
549,
17444,
427,
4486,
262,
5244,
5017,
476,
5080,
834,
4309,
3388,
41,
23143,
14196,
262,
5244,
5017,
476,
5080,
834,
... |
What is the total number of goals for when the drawn is less than 7, less than 21 games have been lost, and there are 1 of 33 points? | CREATE TABLE table_name_33 (goals_for VARCHAR, points_1 VARCHAR, drawn VARCHAR, lost VARCHAR) | SELECT COUNT(goals_for) FROM table_name_33 WHERE drawn < 7 AND lost < 21 AND points_1 = "33" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4201,
41,
839,
5405,
834,
1161,
584,
4280,
28027,
6,
979,
834,
536,
584,
4280,
28027,
6,
6796,
584,
4280,
28027,
6,
1513,
584,
4280,
28027,
61,
3,
32102,
32103,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
839,
5405,
834,
1161,
61,
21680,
953,
834,
4350,
834,
4201,
549,
17444,
427,
6796,
3,
2,
489,
3430,
1513,
3,
2,
1401,
3430,
979,
834,
536,
3274,
96,
4201,
121,
1,
-100,
-100,
-100,
-100,
-100,
-1... |
how many english speaking patients had closure of skin and subcutaneous tissue of other sites? | 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
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.language = "ENGL" AND procedures.short_title = "Skin closure NEC" | [
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,... |
How many podiums had a race higher than 14 in 1996 and a Flap lower than 9? | CREATE TABLE table_46258 (
"Season" text,
"Race" real,
"Podium" real,
"Pole" real,
"FLap" real
) | SELECT COUNT("Podium") FROM table_46258 WHERE "Race" > '14' AND "Season" = '1996' AND "FLap" < '9' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4448,
357,
3449,
41,
96,
134,
15,
9,
739,
121,
1499,
6,
96,
448,
3302,
121,
490,
6,
96,
16665,
2552,
121,
490,
6,
96,
8931,
15,
121,
490,
6,
96,
10765,
9,
102,
121,
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,
2847,
17161,
599,
121,
16665,
2552,
8512,
21680,
953,
834,
4448,
357,
3449,
549,
17444,
427,
96,
448,
3302,
121,
2490,
3,
31,
2534,
31,
3430,
96,
134,
15,
9,
739,
121,
3274,
3,
31,
2294,
4314,
31,
3430,
96,
10765,... |
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, give me the comparison about the sum of manager_id over the job_id , and group by attribute job_id by a bar chart, and list total number from low to high order please. | CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
) | SELECT JOB_ID, SUM(MANAGER_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY SUM(MANAGER_ID) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
10521,
41,
3396,
19846,
11810,
834,
4309,
7908,
1982,
599,
8525,
632,
201,
3396,
19846,
11810,
834,
567,
17683,
3,
4331,
4059,
599,
1458,
201,
283,
15610,
17966,
834,
4309,
7908,
1982,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
446,
10539,
834,
4309,
6,
180,
6122,
599,
9312,
188,
17966,
834,
4309,
61,
21680,
1652,
549,
17444,
427,
180,
4090,
24721,
272,
7969,
518,
23394,
3,
25129,
3430,
586,
2313,
3430,
3,
6657,
329,
16994,
9215,
834,
4051,
... |
Show the station name with at least two trains. | CREATE TABLE station (
name VARCHAR,
station_id VARCHAR
)
CREATE TABLE train_station (
station_id VARCHAR
) | SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id GROUP BY T1.station_id HAVING COUNT(*) >= 2 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2478,
41,
564,
584,
4280,
28027,
6,
2478,
834,
23,
26,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
2412,
834,
6682,
41,
2478,
834,
23,
26,
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,
0,
0... | [
3,
23143,
14196,
332,
4416,
4350,
21680,
2412,
834,
6682,
6157,
332,
536,
3,
15355,
3162,
2478,
6157,
332,
357,
9191,
332,
5411,
6682,
834,
23,
26,
3274,
332,
4416,
6682,
834,
23,
26,
350,
4630,
6880,
272,
476,
332,
5411,
6682,
834,... |
What political party does the person from San Diego belong to? | CREATE TABLE table_name_75 (party VARCHAR, residence VARCHAR) | SELECT party FROM table_name_75 WHERE residence = "san diego" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3072,
41,
8071,
584,
4280,
28027,
6,
6198,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
1827,
1088,
405,
8,
568,
45,
1051,
8851,
13000,
12,
58,
1,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1088,
21680,
953,
834,
4350,
834,
3072,
549,
17444,
427,
6198,
3274,
96,
7,
152,
67,
839,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
The fighting knights has what type of nickname? | CREATE TABLE table_1183842_1 (type VARCHAR, nickname VARCHAR) | SELECT type FROM table_1183842_1 WHERE nickname = "Fighting Knights" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
20056,
3747,
4165,
834,
536,
41,
6137,
584,
4280,
28027,
6,
24649,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
37,
6237,
29816,
7,
65,
125,
686,
13,
24649,
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,
686,
21680,
953,
834,
20056,
3747,
4165,
834,
536,
549,
17444,
427,
24649,
3274,
96,
371,
2632,
53,
11595,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What date did Toumani Diagouraga, who played position MF, start? | CREATE TABLE table_name_81 (date_from VARCHAR, position VARCHAR, name VARCHAR) | SELECT date_from FROM table_name_81 WHERE position = "mf" AND name = "toumani diagouraga" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4959,
41,
5522,
834,
7152,
584,
4280,
28027,
6,
1102,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
833,
410,
304,
440,
2738,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
833,
834,
7152,
21680,
953,
834,
4350,
834,
4959,
549,
17444,
427,
1102,
3274,
96,
51,
89,
121,
3430,
564,
3274,
96,
235,
440,
2738,
3,
25930,
1211,
4711,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Name the city for thailand | CREATE TABLE table_name_97 (
city VARCHAR,
country VARCHAR
) | SELECT city FROM table_name_97 WHERE country = "thailand" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4327,
41,
690,
584,
4280,
28027,
6,
684,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
690,
21,
3,
189,
9,
173,
232,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
690,
21680,
953,
834,
4350,
834,
4327,
549,
17444,
427,
684,
3274,
96,
189,
9,
173,
232,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the sum of Total, when Rank is 8, and when Bronze is less than 1? | CREATE TABLE table_name_95 (total INTEGER, rank VARCHAR, bronze VARCHAR) | SELECT SUM(total) FROM table_name_95 WHERE rank = "8" AND bronze < 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3301,
41,
235,
1947,
3,
21342,
17966,
6,
11003,
584,
4280,
28027,
6,
13467,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
4505,
13,
9273,
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
180,
6122,
599,
235,
1947,
61,
21680,
953,
834,
4350,
834,
3301,
549,
17444,
427,
11003,
3274,
96,
927,
121,
3430,
13467,
3,
2,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Show me a bar chart with the product name and their frequency, sort in ascending by the names. | CREATE TABLE Contacts (
contact_id INTEGER,
customer_id INTEGER,
gender VARCHAR(1),
first_name VARCHAR(80),
last_name VARCHAR(50),
contact_phone VARCHAR(80)
)
CREATE TABLE Customers (
customer_id INTEGER,
payment_method_code VARCHAR(15),
customer_number VARCHAR(20),
customer_name VARCHAR(80),
customer_address VARCHAR(255),
customer_phone VARCHAR(80),
customer_email VARCHAR(80)
)
CREATE TABLE Order_Items (
order_item_id INTEGER,
order_id INTEGER,
product_id INTEGER,
order_quantity VARCHAR(80)
)
CREATE TABLE Customer_Address_History (
customer_id INTEGER,
address_id INTEGER,
date_from DATETIME,
date_to DATETIME
)
CREATE TABLE Addresses (
address_id INTEGER,
line_1_number_building VARCHAR(80),
city VARCHAR(50),
zip_postcode VARCHAR(20),
state_province_county VARCHAR(50),
country VARCHAR(50)
)
CREATE TABLE Products (
product_id INTEGER,
product_type_code VARCHAR(15),
product_name VARCHAR(80),
product_price DOUBLE
)
CREATE TABLE Customer_Orders (
order_id INTEGER,
customer_id INTEGER,
order_date DATETIME,
order_status_code VARCHAR(15)
) | SELECT product_name, COUNT(product_name) FROM Products GROUP BY product_name ORDER BY product_name | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3235,
7,
41,
574,
834,
23,
26,
3,
21342,
17966,
6,
884,
834,
23,
26,
3,
21342,
17966,
6,
7285,
584,
4280,
28027,
14296,
6,
166,
834,
4350,
584,
4280,
28027,
599,
2079,
201,
336,
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,
556,
834,
4350,
6,
2847,
17161,
599,
15892,
834,
4350,
61,
21680,
7554,
350,
4630,
6880,
272,
476,
556,
834,
4350,
4674,
11300,
272,
476,
556,
834,
4350,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What were the wins with more than 145 points, less than 17 races, and Sven Verbrugge as a passenger? | CREATE TABLE table_49012 (
"Season" text,
"Passenger" text,
"Equipment" text,
"Position" text,
"Points" real,
"Races" real,
"Wins" text,
"Second" text,
"Third" text
) | SELECT "Wins" FROM table_49012 WHERE "Points" > '145' AND "Passenger" = 'sven verbrugge' AND "Races" < '17' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
2394,
2122,
41,
96,
134,
15,
9,
739,
121,
1499,
6,
96,
20192,
35,
1304,
121,
1499,
6,
96,
427,
23067,
297,
121,
1499,
6,
96,
345,
32,
7,
4749,
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,
18455,
7,
121,
21680,
953,
834,
591,
2394,
2122,
549,
17444,
427,
96,
22512,
7,
121,
2490,
3,
31,
20987,
31,
3430,
96,
20192,
35,
1304,
121,
3274,
3,
31,
7,
1926,
7375,
13534,
397,
31,
3430,
96,
448,
9,
2319... |
When the team Heathmere of the South West DFL won more than 11 games, what is the maximum byes? | CREATE TABLE table_name_38 (
byes INTEGER,
south_west_dfl VARCHAR,
wins VARCHAR
) | SELECT MAX(byes) FROM table_name_38 WHERE south_west_dfl = "heathmere" AND wins > 11 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3747,
41,
57,
15,
7,
3,
21342,
17966,
6,
3414,
834,
12425,
834,
26,
89,
40,
584,
4280,
28027,
6,
9204,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
969,
15,
7,
61,
21680,
953,
834,
4350,
834,
3747,
549,
17444,
427,
3414,
834,
12425,
834,
26,
89,
40,
3274,
96,
88,
9,
189,
935,
15,
121,
3430,
9204,
2490,
850,
1,
-100,
-100,
-100,
-100,
-100,
-10... |
Show the distinct leader names of colleges associated with members from country "Canada". | CREATE TABLE college (Leader_Name VARCHAR, College_ID VARCHAR); CREATE TABLE member (College_ID VARCHAR, Country VARCHAR) | SELECT DISTINCT T1.Leader_Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID WHERE T2.Country = "Canada" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1900,
41,
2796,
9,
588,
834,
23954,
584,
4280,
28027,
6,
1888,
834,
4309,
584,
4280,
28027,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
1144,
41,
9939,
7883,
834,
4309,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
15438,
25424,
6227,
332,
5411,
2796,
9,
588,
834,
23954,
21680,
1900,
6157,
332,
536,
3,
15355,
3162,
1144,
6157,
332,
357,
9191,
332,
5411,
9939,
7883,
834,
4309,
3274,
332,
4416,
9939,
7883,
834,
4309,
549,
17444... |
Where is every location where Nick is Bru? | CREATE TABLE table_24162 (
"University" text,
"Nick" text,
"University status" real,
"Founded" real,
"Location" text,
"Division" text,
"Specialization" text,
"Website" text
) | SELECT "Location" FROM table_24162 WHERE "Nick" = 'BRU' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2266,
2938,
357,
41,
96,
8313,
485,
121,
1499,
6,
96,
567,
3142,
121,
1499,
6,
96,
8313,
485,
2637,
121,
490,
6,
96,
20100,
121,
490,
6,
96,
434,
32,
75,
257,
121,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
434,
32,
75,
257,
121,
21680,
953,
834,
2266,
2938,
357,
549,
17444,
427,
96,
567,
3142,
121,
3274,
3,
31,
279,
8503,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What are the notes for the time at 3:19.167? | CREATE TABLE table_name_85 (notes VARCHAR, time VARCHAR) | SELECT notes FROM table_name_85 WHERE time = "3:19.167" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4433,
41,
7977,
7,
584,
4280,
28027,
6,
97,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
33,
8,
3358,
21,
8,
97,
44,
29760,
8797,
27650,
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,
3358,
21680,
953,
834,
4350,
834,
4433,
549,
17444,
427,
97,
3274,
96,
519,
10,
2294,
5,
27650,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What city had a series of atcc round 1? | CREATE TABLE table_name_96 (city___state VARCHAR, series VARCHAR) | SELECT city___state FROM table_name_96 WHERE series = "atcc round 1" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4314,
41,
6726,
834,
834,
834,
5540,
584,
4280,
28027,
6,
939,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
690,
141,
3,
9,
939,
13,
44,
75,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
690,
834,
834,
834,
5540,
21680,
953,
834,
4350,
834,
4314,
549,
17444,
427,
939,
3274,
96,
144,
75,
75,
1751,
209,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
How many distinct programs are broadcast at 'Night' time? | CREATE TABLE broadcast_share (
channel_id number,
program_id number,
date text,
share_in_percent number
)
CREATE TABLE program (
program_id number,
name text,
origin text,
launch number,
owner text
)
CREATE TABLE channel (
channel_id number,
name text,
owner text,
share_in_percent number,
rating_in_percent number
)
CREATE TABLE broadcast (
channel_id number,
program_id number,
time_of_day text
) | SELECT COUNT(DISTINCT program_id) FROM broadcast WHERE time_of_day = 'Night' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
6878,
834,
12484,
41,
4245,
834,
23,
26,
381,
6,
478,
834,
23,
26,
381,
6,
833,
1499,
6,
698,
834,
77,
834,
883,
3728,
381,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
478,
834,
23,
26,
61,
21680,
6878,
549,
17444,
427,
97,
834,
858,
834,
1135,
3274,
3,
31,
567,
2632,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Show the top 3 most common colleges of players in match seasons. | CREATE TABLE match_season (College VARCHAR) | SELECT College FROM match_season GROUP BY College ORDER BY COUNT(*) DESC LIMIT 3 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1588,
834,
9476,
41,
9939,
7883,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
3111,
8,
420,
220,
167,
1017,
12936,
13,
1508,
16,
1588,
9385,
5,
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,
1888,
21680,
1588,
834,
9476,
350,
4630,
6880,
272,
476,
1888,
4674,
11300,
272,
476,
2847,
17161,
599,
1935,
61,
309,
25067,
8729,
12604,
220,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the 1989 result for the tournament with 1984 of a, 1985 of a, and 1990 of a? | CREATE TABLE table_name_56 (Id VARCHAR) | SELECT 1989 FROM table_name_56 WHERE 1984 = "a" AND 1985 = "a" AND 1990 = "a" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4834,
41,
196,
26,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
9975,
741,
21,
8,
5892,
28,
13480,
13,
3,
9,
6,
13200,
13,
3,
9,
6,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
9975,
21680,
953,
834,
4350,
834,
4834,
549,
17444,
427,
13480,
3274,
96,
9,
121,
3430,
13200,
3274,
96,
9,
121,
3430,
5541,
3274,
96,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the B score for the person with a total of 16.325 and an A score of more than 7.3? | CREATE TABLE table_63401 (
"Position" real,
"Gymnast" text,
"A Score" real,
"B Score" real,
"Total" real
) | SELECT AVG("B Score") FROM table_63401 WHERE "Total" = '16.325' AND "A Score" > '7.3' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3891,
20016,
41,
96,
345,
32,
7,
4749,
121,
490,
6,
96,
517,
63,
51,
29,
9,
7,
17,
121,
1499,
6,
96,
188,
17763,
121,
490,
6,
96,
279,
17763,
121,
490,
6,
96,
3696,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
279,
17763,
8512,
21680,
953,
834,
3891,
20016,
549,
17444,
427,
96,
3696,
1947,
121,
3274,
3,
31,
536,
27865,
1828,
31,
3430,
96,
188,
17763,
121,
2490,
3,
31,
27914,
31,
1,
-100,
-100,
-100,
... |
Show the hometowns shared by at least two teachers. | CREATE TABLE teacher (Hometown VARCHAR) | SELECT Hometown FROM teacher GROUP BY Hometown HAVING COUNT(*) >= 2 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3145,
41,
19040,
3540,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
3111,
8,
22295,
7,
2471,
57,
44,
709,
192,
3081,
5,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1210,
3540,
21680,
3145,
350,
4630,
6880,
272,
476,
1210,
3540,
454,
6968,
2365,
2847,
17161,
599,
1935,
61,
2490,
2423,
204,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many 4 credits is the hand two pair? | CREATE TABLE table_16510 (
"Hand" text,
"1 credit" real,
"2 credits" real,
"3 credits" real,
"4 credits" real,
"5 credits" text
) | SELECT COUNT("4 credits") FROM table_16510 WHERE "Hand" = 'Two pair' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
22823,
1714,
41,
96,
566,
232,
121,
1499,
6,
96,
536,
998,
121,
490,
6,
96,
357,
11893,
121,
490,
6,
96,
519,
11893,
121,
490,
6,
96,
591,
11893,
121,
490,
6,
96,
755,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
591,
11893,
8512,
21680,
953,
834,
22823,
1714,
549,
17444,
427,
96,
566,
232,
121,
3274,
3,
31,
382,
210,
32,
3116,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
How many different amounts of winnings were there for the year when the team had an average finish of 17.4? | CREATE TABLE table_2182562_2 (winnings VARCHAR, avg_finish VARCHAR) | SELECT COUNT(winnings) FROM table_2182562_2 WHERE avg_finish = "17.4" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
2606,
1828,
4056,
834,
357,
41,
8163,
7,
584,
4280,
28027,
6,
3,
9,
208,
122,
834,
25535,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
315,
6201,
13,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
8163,
7,
61,
21680,
953,
834,
357,
2606,
1828,
4056,
834,
357,
549,
17444,
427,
3,
9,
208,
122,
834,
25535,
3274,
96,
2517,
5,
20364,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What episode number in the series had 2.528 million u.s. viewers? | CREATE TABLE table_3020 (
"Overall" real,
"No. in series" real,
"Title" text,
"Directed by" text,
"Original air date" text,
"U.S. viewers (in millions)" text
) | SELECT "No. in series" FROM table_3020 WHERE "U.S. viewers (in millions)" = '2.528' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1458,
1755,
41,
96,
23847,
1748,
121,
490,
6,
96,
4168,
5,
16,
939,
121,
490,
6,
96,
382,
155,
109,
121,
1499,
6,
96,
23620,
15,
26,
57,
121,
1499,
6,
96,
667,
3380,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
4168,
5,
16,
939,
121,
21680,
953,
834,
1458,
1755,
549,
17444,
427,
96,
1265,
5,
134,
5,
13569,
41,
77,
4040,
61,
121,
3274,
3,
31,
15967,
2577,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
how many players transferred after 2010 ? | CREATE TABLE table_203_440 (
id number,
"rank" number,
"player" text,
"from" text,
"to" text,
"transfer fee\n(\u20ac million)" number,
"year" number
) | SELECT COUNT("player") FROM table_203_440 WHERE "year" > 2010 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
22335,
41,
3,
23,
26,
381,
6,
96,
6254,
121,
381,
6,
96,
20846,
121,
1499,
6,
96,
7152,
121,
1499,
6,
96,
235,
121,
1499,
6,
96,
7031,
1010,
2572,
2,
29,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
20846,
8512,
21680,
953,
834,
23330,
834,
22335,
549,
17444,
427,
96,
1201,
121,
2490,
2735,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Name the position of the player from college of virginia | CREATE TABLE table_name_96 (
position VARCHAR,
college VARCHAR
) | SELECT position FROM table_name_96 WHERE college = "virginia" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4314,
41,
1102,
584,
4280,
28027,
6,
1900,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
1102,
13,
8,
1959,
45,
1900,
13,
24556,
23,
9,
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,
1102,
21680,
953,
834,
4350,
834,
4314,
549,
17444,
427,
1900,
3274,
96,
5771,
122,
77,
23,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
give the number of patients admitted in urgent care for catheter based invasive eletrophysiologic testing. | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "URGENT" AND procedures.long_title = "Catheter based invasive electrophysiologic testing" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
Which Bronze has a Gold smaller than 0? | CREATE TABLE table_name_82 (bronze INTEGER, gold INTEGER) | SELECT AVG(bronze) FROM table_name_82 WHERE gold < 0 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4613,
41,
13711,
776,
3,
21342,
17966,
6,
2045,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
4073,
20841,
65,
3,
9,
2540,
2755,
145,
3,
632,
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,
71,
17217,
599,
13711,
776,
61,
21680,
953,
834,
4350,
834,
4613,
549,
17444,
427,
2045,
3,
2,
3,
632,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What county has a football team in IHSAA class AAAAA and a school macot of the Grizzly Cubs? | CREATE TABLE table_name_25 (
county VARCHAR,
ihsaa_football_class VARCHAR,
mascot VARCHAR
) | SELECT county FROM table_name_25 WHERE ihsaa_football_class = "aaaaa" AND mascot = "grizzly cubs" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1828,
41,
5435,
584,
4280,
28027,
6,
3,
23,
107,
7,
9,
9,
834,
6259,
3184,
834,
4057,
584,
4280,
28027,
6,
3,
2754,
4310,
584,
4280,
28027,
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,
5435,
21680,
953,
834,
4350,
834,
1828,
549,
17444,
427,
3,
23,
107,
7,
9,
9,
834,
6259,
3184,
834,
4057,
3274,
96,
9,
9,
9,
9,
9,
121,
3430,
3,
2754,
4310,
3274,
96,
3496,
5271,
120,
123,
115,
7,
121,
1,
-1... |
Name the surface when the partner is carlos berlocq | CREATE TABLE table_51313 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents" text,
"Score" text
) | SELECT "Surface" FROM table_51313 WHERE "Partner" = 'carlos berlocq' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
755,
2368,
2368,
41,
96,
15767,
287,
15,
121,
1499,
6,
96,
308,
342,
121,
1499,
6,
96,
382,
1211,
20205,
17,
121,
1499,
6,
96,
134,
450,
4861,
121,
1499,
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,
96,
134,
450,
4861,
121,
21680,
953,
834,
755,
2368,
2368,
549,
17444,
427,
96,
13725,
687,
121,
3274,
3,
31,
1720,
2298,
3,
1152,
5133,
1824,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the average first round for Utah Jazz team, with a weight smaller than 229? | CREATE TABLE table_name_29 (first_round INTEGER, weight VARCHAR, team VARCHAR) | SELECT AVG(first_round) FROM table_name_29 WHERE weight < 229 AND team = "utah jazz" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3166,
41,
14672,
834,
7775,
3,
21342,
17966,
6,
1293,
584,
4280,
28027,
6,
372,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1348,
166,
1751,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
71,
17217,
599,
14672,
834,
7775,
61,
21680,
953,
834,
4350,
834,
3166,
549,
17444,
427,
1293,
3,
2,
204,
3166,
3430,
372,
3274,
96,
76,
17,
9,
107,
9948,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Show me the average of weight by sex in a histogram, and show by the Y-axis from low to high. | CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight real
)
CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate real
) | SELECT Sex, AVG(Weight) FROM people GROUP BY Sex ORDER BY AVG(Weight) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
151,
41,
2449,
834,
4309,
16,
17,
6,
679,
226,
1499,
6,
5570,
1499,
6,
7678,
834,
858,
834,
279,
23,
52,
189,
1499,
6,
24231,
490,
6,
14230,
490,
3,
61,
3,
32102,
32103,
32102,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
679,
226,
6,
71,
17217,
599,
1326,
2632,
61,
21680,
151,
350,
4630,
6880,
272,
476,
679,
226,
4674,
11300,
272,
476,
71,
17217,
599,
1326,
2632,
61,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Show all majors and corresponding number of students by a scatter chart. | CREATE TABLE Allergy_Type (
Allergy VARCHAR(20),
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20)
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
) | SELECT Major, COUNT(*) FROM Student GROUP BY Major | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
432,
49,
122,
63,
834,
25160,
41,
432,
49,
122,
63,
584,
4280,
28027,
599,
1755,
201,
432,
49,
122,
63,
25160,
584,
4280,
28027,
599,
1755,
61,
3,
61,
3,
32102,
32103,
32102,
205,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
9236,
6,
2847,
17161,
599,
1935,
61,
21680,
6341,
350,
4630,
6880,
272,
476,
9236,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Where was the method of tko? | CREATE TABLE table_43993 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Location" text
) | SELECT "Location" FROM table_43993 WHERE "Method" = 'tko' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4906,
3264,
519,
41,
96,
1649,
7,
535,
1499,
6,
96,
1649,
7621,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
23351,
107,
32,
26,
121,
1499,
6,
96,
427,
2169,
121... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4906,
3264,
519,
549,
17444,
427,
96,
23351,
107,
32,
26,
121,
3274,
3,
31,
17,
157,
32,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is the number of losses with wins less than 4 and goals against more than 39? | CREATE TABLE table_name_28 (losses VARCHAR, goals_against VARCHAR, wins VARCHAR) | SELECT COUNT(losses) FROM table_name_28 WHERE goals_against > 39 AND wins < 4 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2577,
41,
2298,
2260,
584,
4280,
28027,
6,
1766,
834,
9,
16720,
7,
17,
584,
4280,
28027,
6,
9204,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
125,
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,
2847,
17161,
599,
2298,
2260,
61,
21680,
953,
834,
4350,
834,
2577,
549,
17444,
427,
1766,
834,
9,
16720,
7,
17,
2490,
6352,
3430,
9204,
3,
2,
314,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.