NATURAL_LANG stringlengths 0 446 | SCHEMA stringlengths 27 2.21k | SQL stringlengths 18 453 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|
In years after 1999, what was the location where Anja Huber finished 2nd? | CREATE TABLE table_10758 (
"Year" real,
"Location" text,
"Champion" text,
"Second" text,
"Third" text
) | SELECT "Location" FROM table_10758 WHERE "Year" > '1999' AND "Second" = 'anja huber' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
18057,
3449,
41,
96,
476,
2741,
121,
490,
6,
96,
434,
32,
75,
257,
121,
1499,
6,
96,
254,
1483,
12364,
121,
1499,
6,
96,
134,
15,
1018,
26,
121,
1499,
6,
96,
382,
9288,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
18057,
3449,
549,
17444,
427,
96,
476,
2741,
121,
2490,
3,
31,
2294,
3264,
31,
3430,
96,
134,
15,
1018,
26,
121,
3274,
3,
31,
152,
1191,
7801,
49,
31,
1,
-100,
-100,
... |
What location has a killed of 100.9, and a year later than 1993? | CREATE TABLE table_name_81 (location VARCHAR, year VARCHAR, killed VARCHAR) | SELECT location FROM table_name_81 WHERE year > 1993 AND killed = "100.9" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4959,
41,
14836,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
6,
4792,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
1128,
65,
3,
9,
4792,
13,
335,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1128,
21680,
953,
834,
4350,
834,
4959,
549,
17444,
427,
215,
2490,
8388,
3430,
4792,
3274,
96,
1714,
23758,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the earliest week with a game attended by 60,233? | CREATE TABLE table_name_35 (week INTEGER, attendance VARCHAR) | SELECT MIN(week) FROM table_name_35 WHERE attendance = "60,233" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2469,
41,
8041,
3,
21342,
17966,
6,
11364,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
3,
16454,
471,
28,
3,
9,
467,
5526,
57,
1640,
6,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
8041,
61,
21680,
953,
834,
4350,
834,
2469,
549,
17444,
427,
11364,
3274,
96,
3328,
6,
20879,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
how many hours has it been since patient 015-23047 has been admitted to the hospital? | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
) | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.hospitaladmittime)) FROM patient WHERE patient.uniquepid = '015-23047' AND patient.hospitaldischargetime IS NULL | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
23886,
41,
23886,
23,
26,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
2672,
4350,
1499,
6,
23886,
4350,
1499,
6,
23886,
715,
97,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
997,
1429,
41,
13733,
6245,
15382,
599,
31,
1454,
354,
31,
6,
3,
5211,
12224,
6431,
834,
382,
15382,
9960,
61,
3,
18,
3,
13733,
6245,
15382,
599,
31,
1454,
354,
31,
6,
1868,
5,
31386,
20466,
17,
715,
61,
61,
216... |
What Score has a Home of Montreal Canadiens and a Date of April 22? | CREATE TABLE table_34110 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Record" text
) | SELECT "Score" FROM table_34110 WHERE "Home" = 'montreal canadiens' AND "Date" = 'april 22' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3710,
19277,
41,
96,
308,
342,
121,
1499,
6,
96,
553,
159,
155,
127,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
19040,
121,
1499,
6,
96,
1649,
7621,
121,
1499,
3,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
134,
9022,
121,
21680,
953,
834,
3710,
19277,
549,
17444,
427,
96,
19040,
121,
3274,
3,
31,
4662,
6644,
27114,
7,
31,
3430,
96,
308,
342,
121,
3274,
3,
31,
9,
2246,
40,
1630,
31,
1,
-100,
-100,
-100,
-100,
-... |
What the cores with a release date of February 2011 and a BGA-1023 socket? | CREATE TABLE table_65223 (
"Model number" text,
"sSpec number" text,
"Cores" text,
"Frequency" text,
"Turbo" text,
"L2 cache" text,
"L3 cache" text,
"GPU model" text,
"GPU frequency" text,
"Socket" text,
"I/O bus" text,
"Release date" text,
"Part number(s)" text,
"Release price ( USD )" text
) | SELECT "Cores" FROM table_65223 WHERE "Socket" = 'bga-1023' AND "Release date" = 'february 2011' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4122,
357,
2773,
41,
96,
24663,
381,
121,
1499,
6,
96,
7,
7727,
381,
121,
1499,
6,
96,
254,
14846,
121,
1499,
6,
96,
371,
60,
835,
11298,
121,
1499,
6,
96,
382,
450,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
254,
14846,
121,
21680,
953,
834,
4122,
357,
2773,
549,
17444,
427,
96,
5231,
8849,
17,
121,
3274,
3,
31,
115,
122,
9,
4536,
2773,
31,
3430,
96,
1649,
40,
14608,
833,
121,
3274,
3,
31,
89,
15,
9052,
1208,
27... |
What is 02-03, when 06-07 is 1198? | CREATE TABLE table_40390 (
"School year" text,
"95-96" text,
"99-00" text,
"00-01" text,
"01-02" text,
"02-03" text,
"03-04" text,
"04-05" text,
"05-06" text,
"06-07" text
) | SELECT "02-03" FROM table_40390 WHERE "06-07" = '1198' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2445,
519,
2394,
41,
96,
29364,
215,
121,
1499,
6,
96,
3301,
18,
4314,
121,
1499,
6,
96,
3264,
18,
1206,
121,
1499,
6,
96,
1206,
14772,
121,
1499,
6,
96,
4542,
18,
4305,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4305,
18,
4928,
121,
21680,
953,
834,
2445,
519,
2394,
549,
17444,
427,
96,
5176,
18,
4560,
121,
3274,
3,
31,
2596,
3916,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Name the year for american conference semifinals | CREATE TABLE table_name_96 (
year VARCHAR,
playoffs VARCHAR
) | SELECT year FROM table_name_96 WHERE playoffs = "american conference semifinals" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4314,
41,
215,
584,
4280,
28027,
6,
15289,
7,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
215,
21,
10211,
2542,
27504,
7,
1,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
215,
21680,
953,
834,
4350,
834,
4314,
549,
17444,
427,
15289,
7,
3274,
96,
23064,
29,
2542,
27504,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What college team did Ryan Golden come from? | CREATE TABLE table_2781227_7 (college_junior_club_team VARCHAR, player VARCHAR) | SELECT college_junior_club_team FROM table_2781227_7 WHERE player = "Ryan Golden" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
3940,
2122,
2555,
834,
940,
41,
3297,
7883,
834,
6959,
23,
127,
834,
13442,
834,
11650,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1900,
834,
6959,
23,
127,
834,
13442,
834,
11650,
21680,
953,
834,
357,
3940,
2122,
2555,
834,
940,
549,
17444,
427,
1959,
3274,
96,
448,
63,
152,
7100,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many times is the formula tl 2 ba 2 cuo 6? | CREATE TABLE table_101336_1 (no_of_cu_o_planes_in_unit_cell VARCHAR, formula VARCHAR) | SELECT no_of_cu_o_planes_in_unit_cell FROM table_101336_1 WHERE formula = "Tl 2 Ba 2 CuO 6" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1714,
2368,
3420,
834,
536,
41,
29,
32,
834,
858,
834,
1071,
834,
32,
834,
3767,
15,
7,
834,
77,
834,
15129,
834,
8725,
584,
4280,
28027,
6,
5403,
584,
4280,
28027,
61,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
150,
834,
858,
834,
1071,
834,
32,
834,
3767,
15,
7,
834,
77,
834,
15129,
834,
8725,
21680,
953,
834,
1714,
2368,
3420,
834,
536,
549,
17444,
427,
5403,
3274,
96,
382,
40,
204,
2659,
204,
1839,
667,
431,
121,
1,
... |
how many points did the nuggets win by on april 9 ? | CREATE TABLE table_204_833 (
id number,
"game" number,
"date" text,
"team" text,
"score" text,
"high points" text,
"high rebounds" text,
"high assists" text,
"location\nattendance" text,
"record" text
) | SELECT "score" - "score" FROM table_204_833 WHERE "date" = 'april 9' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
4591,
519,
41,
3,
23,
26,
381,
6,
96,
7261,
121,
381,
6,
96,
5522,
121,
1499,
6,
96,
11650,
121,
1499,
6,
96,
7,
9022,
121,
1499,
6,
96,
6739,
979,
121,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
7,
9022,
121,
3,
18,
96,
7,
9022,
121,
21680,
953,
834,
26363,
834,
4591,
519,
549,
17444,
427,
96,
5522,
121,
3274,
3,
31,
9,
2246,
40,
668,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Draw a bar chart of meter 200 versus the average of id, show from high to low by the Y. | CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text,
meter_300 text,
meter_400 text,
meter_500 text,
meter_600 text,
meter_700 text,
Time text
)
CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
) | SELECT meter_200, AVG(ID) FROM swimmer GROUP BY meter_200 ORDER BY AVG(ID) DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
14939,
41,
4699,
16,
17,
6,
564,
1499,
6,
4000,
9,
6726,
16,
17,
6,
896,
1499,
6,
6993,
1499,
6,
20360,
834,
1201,
16,
17,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
4401,
834,
3632,
6,
71,
17217,
599,
4309,
61,
21680,
27424,
350,
4630,
6880,
272,
476,
3,
4401,
834,
3632,
4674,
11300,
272,
476,
71,
17217,
599,
4309,
61,
309,
25067,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Who is the co-driver for the 6th position and more than 159 laps? | CREATE TABLE table_name_36 (
co_driver VARCHAR,
position VARCHAR,
laps VARCHAR
) | SELECT co_driver FROM table_name_36 WHERE position = "6th" AND laps > 159 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3420,
41,
576,
834,
13739,
52,
584,
4280,
28027,
6,
1102,
584,
4280,
28027,
6,
14941,
7,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
19,
8,
576... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
3,
23143,
14196,
576,
834,
13739,
52,
21680,
953,
834,
4350,
834,
3420,
549,
17444,
427,
1102,
3274,
96,
948,
189,
121,
3430,
14941,
7,
2490,
3,
27904,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What Team had 40 Laps in C1 Class? | CREATE TABLE table_name_46 (team VARCHAR, class VARCHAR, laps VARCHAR) | SELECT team FROM table_name_46 WHERE class = "c1" AND laps = 40 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4448,
41,
11650,
584,
4280,
28027,
6,
853,
584,
4280,
28027,
6,
14941,
7,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
2271,
141,
1283,
325,
102,
7,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
372,
21680,
953,
834,
4350,
834,
4448,
549,
17444,
427,
853,
3274,
96,
75,
536,
121,
3430,
14941,
7,
3274,
1283,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the most amount of points any team had in round 4? | CREATE TABLE table_24784769_1 (
round4 INTEGER
) | SELECT MAX(round4) FROM table_24784769_1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2266,
3940,
4177,
3951,
834,
536,
41,
1751,
591,
3,
21342,
17966,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
167,
866,
13,
979,
136,
372,
141,
16,
1751,
314,
58,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
7775,
7256,
21680,
953,
834,
2266,
3940,
4177,
3951,
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,
... |
What is the total of the jury that is 2nd place and the total is larger than 190? | CREATE TABLE table_name_86 (
jury INTEGER,
place VARCHAR,
total VARCHAR
) | SELECT SUM(jury) FROM table_name_86 WHERE place = "2nd" AND total > 190 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3840,
41,
12730,
3,
21342,
17966,
6,
286,
584,
4280,
28027,
6,
792,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
792,
13,
8,
12730,
24,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
180,
6122,
599,
10609,
63,
61,
21680,
953,
834,
4350,
834,
3840,
549,
17444,
427,
286,
3274,
96,
357,
727,
121,
3430,
792,
2490,
3,
11776,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Which driver had an accident and laps smaller than 53? | CREATE TABLE table_name_82 (driver VARCHAR, laps VARCHAR, time_retired VARCHAR) | SELECT driver FROM table_name_82 WHERE laps < 53 AND time_retired = "accident" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4613,
41,
13739,
52,
584,
4280,
28027,
6,
14941,
7,
584,
4280,
28027,
6,
97,
834,
10682,
1271,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
2535,
141... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2535,
21680,
953,
834,
4350,
834,
4613,
549,
17444,
427,
14941,
7,
3,
2,
12210,
3430,
97,
834,
10682,
1271,
3274,
96,
6004,
4215,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many legs were lost for Trina Gulliver with more than 3 played? | CREATE TABLE table_35074 (
"Player" text,
"Played" real,
"Sets Won" real,
"Sets Lost" real,
"Legs Won" real,
"Legs Lost" real,
"100+" real,
"140+" real,
"180s" real,
"High Checkout" real,
"3-dart Average" real
) | SELECT COUNT("Legs Lost") FROM table_35074 WHERE "Player" = 'trina gulliver' AND "Played" > '3' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
16975,
4581,
41,
96,
15800,
49,
121,
1499,
6,
96,
15800,
15,
26,
121,
490,
6,
96,
17175,
7,
549,
106,
121,
490,
6,
96,
17175,
7,
19576,
121,
490,
6,
96,
2796,
122,
7,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
2796,
122,
7,
19576,
8512,
21680,
953,
834,
16975,
4581,
549,
17444,
427,
96,
15800,
49,
121,
3274,
3,
31,
1788,
29,
9,
3,
6106,
7591,
52,
31,
3430,
96,
15800,
15,
26,
121,
2490,
3,
31,
51... |
what is the release date of the model precision m60? | CREATE TABLE table_11911 (
"Model" text,
"Released" text,
"Form factor" text,
"Chipset" text,
"Memory Type" text,
"Max. Memory" text
) | SELECT "Released" FROM table_11911 WHERE "Model" = 'precision m60' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
19993,
2596,
41,
96,
24663,
121,
1499,
6,
96,
1649,
29107,
121,
1499,
6,
96,
3809,
51,
2945,
121,
1499,
6,
96,
254,
10462,
2244,
121,
1499,
6,
96,
329,
15,
2528,
63,
6632... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
1649,
29107,
121,
21680,
953,
834,
19993,
2596,
549,
17444,
427,
96,
24663,
121,
3274,
3,
31,
2026,
18901,
3,
51,
3328,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Hom many musicians performed in the song "Flash"? | CREATE TABLE performance (bandmate VARCHAR, songid VARCHAR); CREATE TABLE songs (songid VARCHAR, Title VARCHAR); CREATE TABLE band (id VARCHAR) | SELECT COUNT(*) FROM performance AS T1 JOIN band AS T2 ON T1.bandmate = T2.id JOIN songs AS T3 ON T3.songid = T1.songid WHERE T3.Title = "Flash" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
821,
41,
3348,
5058,
584,
4280,
28027,
6,
2324,
23,
26,
584,
4280,
28027,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
3605,
41,
7,
2444,
23,
26,
584,
4280,
28027,
6,
110... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
821,
6157,
332,
536,
3,
15355,
3162,
1928,
6157,
332,
357,
9191,
332,
5411,
3348,
5058,
3274,
332,
4416,
23,
26,
3,
15355,
3162,
3605,
6157,
332,
519,
9191,
332,
5787,
7,
2444,
23,... |
Name the total number for score l 110-112 | CREATE TABLE table_25460 (
"#" real,
"Date" text,
"Team" text,
"Score" text,
"Location Attendance" text,
"High Points" text,
"High Rebounds" text,
"High Assists" text,
"Record" text
) | SELECT COUNT("#") FROM table_25460 WHERE "Score" = 'L 110-112' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
25991,
41,
96,
4663,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
18699,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
434,
32,
75,
257,
22497,
663,
121,
1499,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
4663,
8512,
21680,
953,
834,
1828,
25991,
549,
17444,
427,
96,
134,
9022,
121,
3274,
3,
31,
434,
11190,
9169,
357,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name the 1861 with 1851 of 5291 | CREATE TABLE table_name_97 (
Id VARCHAR
) | SELECT 1861 FROM table_name_97 WHERE 1851 = "5291" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4327,
41,
27,
26,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
507,
4241,
28,
507,
5553,
13,
9065,
4729,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
507,
4241,
21680,
953,
834,
4350,
834,
4327,
549,
17444,
427,
507,
5553,
3274,
96,
5373,
4729,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was Nolan Henke's To par when he placed in t3? | CREATE TABLE table_name_96 (to_par VARCHAR, place VARCHAR, player VARCHAR) | SELECT to_par FROM table_name_96 WHERE place = "t3" AND player = "nolan henke" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4314,
41,
235,
834,
1893,
584,
4280,
28027,
6,
286,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
465,
1618,
216,
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,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
12,
834,
1893,
21680,
953,
834,
4350,
834,
4314,
549,
17444,
427,
286,
3274,
96,
17,
519,
121,
3430,
1959,
3274,
96,
29,
32,
1618,
3,
3225,
1050,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the attendance when North Melbourne was the away team? | CREATE TABLE table_33610 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT AVG("Crowd") FROM table_33610 WHERE "Away team" = 'north melbourne' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4201,
27097,
41,
96,
19040,
372,
121,
1499,
6,
96,
19040,
372,
2604,
121,
1499,
6,
96,
188,
1343,
372,
121,
1499,
6,
96,
188,
1343,
372,
2604,
121,
1499,
6,
96,
553,
35,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
121,
254,
3623,
26,
8512,
21680,
953,
834,
4201,
27097,
549,
17444,
427,
96,
188,
1343,
372,
121,
3274,
3,
31,
29,
127,
189,
3,
2341,
26255,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
provide the number of patients whose admission type is urgent and drug name is heparin (preservative free)? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "URGENT" AND prescriptions.drug = "Heparin (Preservative Free)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7744,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7744,
7,
5,
8399,
51,
834,
23,
26,
549... |
Which Hanyu Pinyin is labeled rural? | CREATE TABLE table_name_68 (
hanyu_pinyin VARCHAR,
name VARCHAR
) | SELECT hanyu_pinyin FROM table_name_68 WHERE name = "rural" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3651,
41,
3,
2618,
63,
76,
834,
3180,
63,
77,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
6627,
63,
76,
8050,
63,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
2618,
63,
76,
834,
3180,
63,
77,
21680,
953,
834,
4350,
834,
3651,
549,
17444,
427,
564,
3274,
96,
52,
9709,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the Date for a week higher than 7 with a record of 9–1? | CREATE TABLE table_name_68 (date VARCHAR, week VARCHAR, record VARCHAR) | SELECT date FROM table_name_68 WHERE week > 7 AND record = "9–1" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3651,
41,
5522,
584,
4280,
28027,
6,
471,
584,
4280,
28027,
6,
1368,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
7678,
21,
3,
9,
471,
1146,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
833,
21680,
953,
834,
4350,
834,
3651,
549,
17444,
427,
471,
2490,
489,
3430,
1368,
3274,
96,
1298,
104,
536,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What team was the opponent when the time was 2:57, and a Score of 7–5? | CREATE TABLE table_name_59 (opponent VARCHAR, time VARCHAR, score VARCHAR) | SELECT opponent FROM table_name_59 WHERE time = "2:57" AND score = "7–5" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3390,
41,
32,
102,
9977,
584,
4280,
28027,
6,
97,
584,
4280,
28027,
6,
2604,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
372,
47,
8,
15264,
116,
8,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
15264,
21680,
953,
834,
4350,
834,
3390,
549,
17444,
427,
97,
3274,
96,
357,
10,
3436,
121,
3430,
2604,
3274,
96,
940,
104,
17395,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
How large was the crowd when they played at princes park? | CREATE TABLE table_name_56 (
crowd INTEGER,
venue VARCHAR
) | SELECT SUM(crowd) FROM table_name_56 WHERE venue = "princes park" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4834,
41,
4374,
3,
21342,
17966,
6,
5669,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
508,
47,
8,
4374,
116,
79,
1944,
44,
22277,
7,
2447,
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... | [
3,
23143,
14196,
180,
6122,
599,
75,
3623,
26,
61,
21680,
953,
834,
4350,
834,
4834,
549,
17444,
427,
5669,
3274,
96,
12298,
2319,
2447,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is bedford's mascot? | CREATE TABLE table_75006 (
"School" text,
"Location" text,
"Mascot" text,
"Enrollment" real,
"IHSAA Class" text,
"IHSAA Football Class" text,
"County" text
) | SELECT "Mascot" FROM table_75006 WHERE "Location" = 'bedford' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
9979,
5176,
41,
96,
29364,
121,
1499,
6,
96,
434,
32,
75,
257,
121,
1499,
6,
96,
329,
9,
7,
4310,
121,
1499,
6,
96,
8532,
4046,
297,
121,
490,
6,
96,
196,
4950,
5498,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
329,
9,
7,
4310,
121,
21680,
953,
834,
9979,
5176,
549,
17444,
427,
96,
434,
32,
75,
257,
121,
3274,
3,
31,
4143,
2590,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
how many winnings does jeff gordon have? | CREATE TABLE table_27781212_1 (
winnings VARCHAR,
driver VARCHAR
) | SELECT winnings FROM table_27781212_1 WHERE driver = "Jeff Gordon" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2555,
3940,
2122,
2122,
834,
536,
41,
3447,
7,
584,
4280,
28027,
6,
2535,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
149,
186,
3447,
7,
405,
528,
89,
89,
281,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3447,
7,
21680,
953,
834,
2555,
3940,
2122,
2122,
834,
536,
549,
17444,
427,
2535,
3274,
96,
7851,
89,
89,
14626,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Give me the number of patients who have hispanic/latino-puerto rican ethnic background and are hospitalized for more than 15 days. | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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 WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND demographic.days_stay > "15" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
15,
189,
2532,
485,
3274,
96,
7094,
21215,
18830,
87,
434,
21580,
7400,
3,
18,
3,
10744,
3316,
5... |
What is the highest Drawn when the lost is 7 and the points are more than 4, and the against is less than 22? | CREATE TABLE table_name_12 (
drawn INTEGER,
against VARCHAR,
lost VARCHAR,
points VARCHAR
) | SELECT MAX(drawn) FROM table_name_12 WHERE lost = 7 AND points > 4 AND against < 22 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2122,
41,
6796,
3,
21342,
17966,
6,
581,
584,
4280,
28027,
6,
1513,
584,
4280,
28027,
6,
979,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
19489,
29,
61,
21680,
953,
834,
4350,
834,
2122,
549,
17444,
427,
1513,
3274,
489,
3430,
979,
2490,
314,
3430,
581,
3,
2,
1630,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Name the college/junior club team for jimmy jones | CREATE TABLE table_2091 (
"Pick #" real,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
) | SELECT "College/junior/club team" FROM table_2091 WHERE "Player" = 'Jimmy Jones' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1755,
4729,
41,
96,
345,
3142,
1713,
121,
490,
6,
96,
15800,
49,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
24732,
485,
121,
1499,
6,
96,
15743,
434,
372,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
9939,
7883,
87,
6959,
23,
127,
87,
13442,
372,
121,
21680,
953,
834,
1755,
4729,
549,
17444,
427,
96,
15800,
49,
121,
3274,
3,
31,
683,
603,
2258,
6193,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Tell me the league for year of 1915/16 | CREATE TABLE table_32042 (
"Year" text,
"Division" text,
"League" text,
"Reg. Season" text,
"Playoffs" text,
"Challenge Cup" text
) | SELECT "League" FROM table_32042 WHERE "Year" = '1915/16' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
15003,
4165,
41,
96,
476,
2741,
121,
1499,
6,
96,
308,
23,
6610,
121,
1499,
6,
96,
2796,
9,
5398,
121,
1499,
6,
96,
17748,
5,
7960,
121,
1499,
6,
96,
15800,
1647,
7,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
2796,
9,
5398,
121,
21680,
953,
834,
15003,
4165,
549,
17444,
427,
96,
476,
2741,
121,
3274,
3,
31,
2294,
1808,
16033,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the surface of the tournament with david nalbandian as the opponent in the final? | CREATE TABLE table_name_53 (surface VARCHAR, opponent_in_final VARCHAR) | SELECT surface FROM table_name_53 WHERE opponent_in_final = "david nalbandian" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4867,
41,
26899,
584,
4280,
28027,
6,
15264,
834,
77,
834,
12406,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1774,
13,
8,
5892,
28,
836,
69... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1774,
21680,
953,
834,
4350,
834,
4867,
549,
17444,
427,
15264,
834,
77,
834,
12406,
3274,
96,
26,
9,
6961,
3,
29,
138,
3478,
8603,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
is the ducati marlboro team above or below the team roberts in the team column ? | CREATE TABLE table_204_162 (
id number,
"team" text,
"constructor" text,
"motorcycle" text,
"tyres" text,
"no" number,
"rider" text,
"rounds" text
) | SELECT (SELECT id FROM table_204_162 WHERE "team" = 'ducati marlboro team') < (SELECT id FROM table_204_162 WHERE "team" = 'team roberts') | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
2938,
357,
41,
3,
23,
26,
381,
6,
96,
11650,
121,
1499,
6,
96,
15982,
5317,
121,
1499,
6,
96,
18271,
10136,
121,
1499,
6,
96,
17,
63,
60,
7,
121,
1499,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
41,
23143,
14196,
3,
23,
26,
21680,
953,
834,
26363,
834,
2938,
357,
549,
17444,
427,
96,
11650,
121,
3274,
3,
31,
1259,
16461,
3157,
40,
14901,
372,
31,
61,
3,
2,
41,
23143,
14196,
3,
23,
26,
21680,
953,
834,
2... |
What is the service charge of the boat howitzers with 456 made? | CREATE TABLE table_35341 (
"Designation" text,
"Bore" text,
"Weight" text,
"Service Charge" text,
"Range (yards)" text,
"Number Made" real
) | SELECT "Service Charge" FROM table_35341 WHERE "Number Made" = '456' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2469,
3710,
536,
41,
96,
19103,
257,
121,
1499,
6,
96,
279,
127,
15,
121,
1499,
6,
96,
1326,
2632,
121,
1499,
6,
96,
15260,
15907,
121,
1499,
6,
96,
448,
3280,
41,
6636,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15260,
15907,
121,
21680,
953,
834,
2469,
3710,
536,
549,
17444,
427,
96,
567,
5937,
49,
6465,
121,
3274,
3,
31,
2128,
948,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Which Date has a Tournament of at&t pebble beach national pro-am, and a Margin of victory of 1 stroke, and a To par of –11? | CREATE TABLE table_name_14 (date VARCHAR, to_par VARCHAR, tournament VARCHAR, margin_of_victory VARCHAR) | SELECT date FROM table_name_14 WHERE tournament = "at&t pebble beach national pro-am" AND margin_of_victory = "1 stroke" AND to_par = "–11" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2534,
41,
5522,
584,
4280,
28027,
6,
12,
834,
1893,
584,
4280,
28027,
6,
5892,
584,
4280,
28027,
6,
6346,
834,
858,
834,
7287,
10972,
584,
4280,
28027,
61,
3,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
833,
21680,
953,
834,
4350,
834,
2534,
549,
17444,
427,
5892,
3274,
96,
144,
184,
17,
158,
7310,
2608,
1157,
813,
18,
265,
121,
3430,
6346,
834,
858,
834,
7287,
10972,
3274,
96,
536,
9529,
121,
3430,
12,
834,
1893,
... |
what circuit is listed below autodromo di pergusa , enna ? | CREATE TABLE table_204_63 (
id number,
"round" number,
"circuit" text,
"date" text,
"pole position" text,
"winning driver" text,
"winning team" text,
"trophy winner" text
) | SELECT "circuit" FROM table_204_63 WHERE id = (SELECT id FROM table_204_63 WHERE "circuit" = 'autodromo di pergusa, enna') + 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
3891,
41,
3,
23,
26,
381,
6,
96,
7775,
121,
381,
6,
96,
15357,
21560,
121,
1499,
6,
96,
5522,
121,
1499,
6,
96,
14332,
1102,
121,
1499,
6,
96,
8163,
2535,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
15357,
21560,
121,
21680,
953,
834,
26363,
834,
3891,
549,
17444,
427,
3,
23,
26,
3274,
41,
23143,
14196,
3,
23,
26,
21680,
953,
834,
26363,
834,
3891,
549,
17444,
427,
96,
15357,
21560,
121,
3274,
3,
31,
8010,
... |
Which Gold has a Rank of 15, and a Total smaller than 2? | CREATE TABLE table_name_99 (gold INTEGER, rank VARCHAR, total VARCHAR) | SELECT AVG(gold) FROM table_name_99 WHERE rank = "15" AND total < 2 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3264,
41,
14910,
3,
21342,
17966,
6,
11003,
584,
4280,
28027,
6,
792,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
2540,
65,
3,
9,
3,
22557,
13,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
71,
17217,
599,
14910,
61,
21680,
953,
834,
4350,
834,
3264,
549,
17444,
427,
11003,
3274,
96,
1808,
121,
3430,
792,
3,
2,
204,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which year opened is located in west mifflin, pennsylvania? | CREATE TABLE table_name_50 (year_opened VARCHAR, location VARCHAR) | SELECT year_opened FROM table_name_50 WHERE location = "west mifflin, pennsylvania" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1752,
41,
1201,
834,
26940,
584,
4280,
28027,
6,
1128,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
215,
2946,
19,
1069,
16,
4653,
3,
51,
5982,
40,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
215,
834,
26940,
21680,
953,
834,
4350,
834,
1752,
549,
17444,
427,
1128,
3274,
96,
12425,
3,
51,
5982,
40,
77,
6,
4550,
29,
7,
63,
40,
16658,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Which team was at Corio Oval on 4 June 1927? | CREATE TABLE table_name_77 (away_team VARCHAR, date VARCHAR, venue VARCHAR) | SELECT away_team FROM table_name_77 WHERE date = "4 june 1927" AND venue = "corio oval" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4013,
41,
8006,
834,
11650,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
6,
5669,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
372,
47,
44,
2487,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
550,
834,
11650,
21680,
953,
834,
4350,
834,
4013,
549,
17444,
427,
833,
3274,
96,
591,
3,
6959,
15,
957,
2555,
121,
3430,
5669,
3274,
96,
5715,
23,
32,
17986,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What year did J. Jones, trearddur bay build a boat with a current status of tbsc? | CREATE TABLE table_name_54 (year_built VARCHAR, current_status VARCHAR, boat_builder VARCHAR) | SELECT year_built FROM table_name_54 WHERE current_status = "tbsc" AND boat_builder = "j. jones, trearddur bay" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5062,
41,
1201,
834,
16152,
584,
4280,
28027,
6,
750,
834,
8547,
302,
584,
4280,
28027,
6,
3432,
834,
16422,
49,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
3210... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
215,
834,
16152,
21680,
953,
834,
4350,
834,
5062,
549,
17444,
427,
750,
834,
8547,
302,
3274,
96,
17,
115,
7,
75,
121,
3430,
3432,
834,
16422,
49,
3274,
96,
354,
5,
3,
1927,
1496,
6,
3,
929,
986,
13629,
10210,
... |
Find the number of booking start date for the apartments that have more than two bedrooms for each year with a bar chart, and list by the Y in desc. | CREATE TABLE Apartment_Buildings (
building_id INTEGER,
building_short_name CHAR(15),
building_full_name VARCHAR(80),
building_description VARCHAR(255),
building_address VARCHAR(255),
building_manager VARCHAR(50),
building_phone VARCHAR(80)
)
CREATE TABLE Apartment_Facilities (
apt_id INTEGER,
facility_code CHAR(15)
)
CREATE TABLE View_Unit_Status (
apt_id INTEGER,
apt_booking_id INTEGER,
status_date DATETIME,
available_yn BIT
)
CREATE TABLE Guests (
guest_id INTEGER,
gender_code CHAR(1),
guest_first_name VARCHAR(80),
guest_last_name VARCHAR(80),
date_of_birth DATETIME
)
CREATE TABLE Apartment_Bookings (
apt_booking_id INTEGER,
apt_id INTEGER,
guest_id INTEGER,
booking_status_code CHAR(15),
booking_start_date DATETIME,
booking_end_date DATETIME
)
CREATE TABLE Apartments (
apt_id INTEGER,
building_id INTEGER,
apt_type_code CHAR(15),
apt_number CHAR(10),
bathroom_count INTEGER,
bedroom_count INTEGER,
room_count CHAR(5)
) | SELECT booking_start_date, COUNT(booking_start_date) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 2 ORDER BY COUNT(booking_start_date) DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
15970,
834,
24752,
53,
7,
41,
740,
834,
23,
26,
3,
21342,
17966,
6,
740,
834,
7,
14184,
834,
4350,
3,
28027,
599,
1808,
201,
740,
834,
1329,
40,
834,
4350,
584,
4280,
28027,
599,
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,
5038,
834,
10208,
834,
5522,
6,
2847,
17161,
599,
2567,
53,
834,
10208,
834,
5522,
61,
21680,
15970,
834,
13355,
53,
7,
6157,
332,
536,
3,
15355,
3162,
15970,
7,
6157,
332,
357,
9191,
332,
5411,
6789,
834,
23,
26,
... |
Which region has the format CD and label MCA? | CREATE TABLE table_name_15 (region VARCHAR, format VARCHAR, label VARCHAR) | SELECT region FROM table_name_15 WHERE format = "cd" AND label = "mca" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1808,
41,
18145,
584,
4280,
28027,
6,
1910,
584,
4280,
28027,
6,
3783,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
1719,
65,
8,
1910,
3190,
11,
3783... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1719,
21680,
953,
834,
4350,
834,
1808,
549,
17444,
427,
1910,
3274,
96,
75,
26,
121,
3430,
3783,
3274,
96,
51,
658,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Find those years for all exhibitions with ticket prices lower than 15, group by year, and count year. | CREATE TABLE exhibition_record (
Exhibition_ID int,
Date text,
Attendance int
)
CREATE TABLE artist (
Artist_ID int,
Name text,
Country text,
Year_Join int,
Age int
)
CREATE TABLE exhibition (
Exhibition_ID int,
Year int,
Theme text,
Artist_ID int,
Ticket_Price real
) | SELECT Year, COUNT(Year) FROM exhibition WHERE Ticket_Price < 15 GROUP BY Year | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4473,
834,
60,
7621,
41,
22371,
834,
4309,
16,
17,
6,
7678,
1499,
6,
22497,
663,
16,
17,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
2377,
41,
9152,
834,
4309,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2929,
6,
2847,
17161,
599,
476,
2741,
61,
21680,
4473,
549,
17444,
427,
3,
15569,
834,
345,
4920,
3,
2,
627,
350,
4630,
6880,
272,
476,
2929,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
provide the number of patients whose ethnicity is asian and age is less than 49? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "ASIAN" AND demographic.age < "49" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
15,
189,
2532,
485,
3274,
96,
3291,
21758,
121,
3430,
14798,
5,
545,
3,
2,
96,
3647,
121,
1,
-... |
what is the number of patients whose insurance is self pay and days of hospital stay is greater than 30? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.insurance = "Self Pay" AND demographic.days_stay > "30" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
29441,
3274,
96,
134,
10386,
5077,
121,
3430,
14798,
5,
1135,
7,
834,
21545,
2490,
96,
1458,
121,
... |
Name the highest Comp which has a Yds/game larger than 0, bostick, and a Rating smaller than 91.77? | CREATE TABLE table_name_19 (comp INTEGER, rating VARCHAR, yds_game VARCHAR, name VARCHAR) | SELECT MAX(comp) FROM table_name_19 WHERE yds_game > 0 AND name = "bostick" AND rating < 91.77 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2294,
41,
7699,
3,
21342,
17966,
6,
5773,
584,
4280,
28027,
6,
3,
63,
26,
7,
834,
7261,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
7699,
61,
21680,
953,
834,
4350,
834,
2294,
549,
17444,
427,
3,
63,
26,
7,
834,
7261,
2490,
3,
632,
3430,
564,
3274,
96,
115,
32,
9656,
121,
3430,
5773,
3,
2,
3,
4729,
5,
4013,
1,
-100,
-100,
-10... |
What game site has w 10-3 as the result? | CREATE TABLE table_name_50 (
game_site VARCHAR,
result VARCHAR
) | SELECT game_site FROM table_name_50 WHERE result = "w 10-3" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1752,
41,
467,
834,
3585,
584,
4280,
28027,
6,
741,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
467,
353,
65,
3,
210,
335,
3486,
38,
8,
741,
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,
467,
834,
3585,
21680,
953,
834,
4350,
834,
1752,
549,
17444,
427,
741,
3274,
96,
210,
335,
3486,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
List the research staff details, and order in ascending order. | CREATE TABLE Research_Staff (
staff_details VARCHAR
) | SELECT staff_details FROM Research_Staff ORDER BY staff_details | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2200,
834,
134,
17,
4127,
41,
871,
834,
221,
5756,
7,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
6792,
8,
585,
871,
1030,
6,
11,
455,
16,
25200,
53,
455,
5,
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,
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,
871,
834,
221,
5756,
7,
21680,
2200,
834,
134,
17,
4127,
4674,
11300,
272,
476,
871,
834,
221,
5756,
7,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the percentage for first time 2011 when the first time in 2009 is 68%? | CREATE TABLE table_79755 (
"Exam" text,
"2006 First Time" text,
"2006 All" text,
"2007 First Time" text,
"2007 All" text,
"2008 First Time" text,
"2008 All" text,
"2009 First Time" text,
"2009 All" text,
"2010 First Time" text,
"2011 First Time" text,
"2012 First Time" text
) | SELECT "2011 First Time" FROM table_79755 WHERE "2009 All" = '68%' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4440,
3072,
755,
41,
96,
5420,
265,
121,
1499,
6,
96,
21196,
1485,
2900,
121,
1499,
6,
96,
21196,
432,
121,
1499,
6,
96,
20615,
1485,
2900,
121,
1499,
6,
96,
20615,
432,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13907,
1485,
2900,
121,
21680,
953,
834,
4440,
3072,
755,
549,
17444,
427,
96,
16660,
432,
121,
3274,
3,
31,
3651,
1454,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
When tim bridgman gregor fisken is the pole position who is the gt3 winner? | CREATE TABLE table_30062172_3 (gt3_winner VARCHAR, pole_position VARCHAR) | SELECT gt3_winner FROM table_30062172_3 WHERE pole_position = "Tim Bridgman Gregor Fisken" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
5426,
4056,
27156,
834,
519,
41,
122,
17,
519,
834,
3757,
687,
584,
4280,
28027,
6,
11148,
834,
4718,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
366,
3,
2998,
3,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
122,
17,
519,
834,
3757,
687,
21680,
953,
834,
5426,
4056,
27156,
834,
519,
549,
17444,
427,
11148,
834,
4718,
3274,
96,
382,
603,
7834,
26,
122,
348,
3,
26705,
3188,
7,
2217,
121,
1,
-100,
-100,
-100,
-100,
-1... |
Which paper from ACL 2015 was cited most ? | CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE venue (
venueid int,
venuename varchar
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE dataset (
datasetid int,
datasetname varchar
)
CREATE TABLE field (
fieldid int
)
CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename varchar
)
CREATE TABLE author (
authorid int,
authorname varchar
) | SELECT DISTINCT cite.citedpaperid, COUNT(cite.citedpaperid) FROM cite, paper, venue WHERE paper.paperid = cite.citedpaperid AND paper.year = 2015 AND venue.venueid = paper.venueid AND venue.venuename = 'ACL' GROUP BY cite.citedpaperid ORDER BY COUNT(cite.citedpaperid) DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
6378,
41,
6378,
23,
26,
16,
17,
6,
6378,
4350,
3,
4331,
4059,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
5669,
41,
5669,
23,
26,
16,
17,
6,
5669,
4350,
3,
4331,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3,
8464,
5,
11675,
19587,
23,
26,
6,
2847,
17161,
599,
8464,
5,
11675,
19587,
23,
26,
61,
21680,
3,
8464,
6,
1040,
6,
5669,
549,
17444,
427,
1040,
5,
19587,
23,
26,
3274,
3,
8464,
5,
11675... |
In what Week resulting in the bottom 3 was Endre Jansen Partner? | CREATE TABLE table_name_97 (
week INTEGER,
result VARCHAR,
partner VARCHAR
) | SELECT MAX(week) FROM table_name_97 WHERE result = "bottom 3" AND partner = "endre jansen" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4327,
41,
471,
3,
21342,
17966,
6,
741,
584,
4280,
28027,
6,
2397,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
86,
125,
6551,
3,
5490,
16,
8,
2007,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
8041,
61,
21680,
953,
834,
4350,
834,
4327,
549,
17444,
427,
741,
3274,
96,
30142,
220,
121,
3430,
2397,
3274,
96,
989,
60,
3,
7066,
7,
35,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Bar chart x axis away team y axis the number of away team, sort by the bars in asc. | CREATE TABLE game (
stadium_id int,
id int,
Season int,
Date text,
Home_team text,
Away_team text,
Score text,
Competition text
)
CREATE TABLE injury_accident (
game_id int,
id int,
Player text,
Injury text,
Number_of_matches text,
Source text
)
CREATE TABLE stadium (
id int,
name text,
Home_Games int,
Average_Attendance real,
Total_Attendance real,
Capacity_Percentage real
) | SELECT Away_team, COUNT(Away_team) FROM game GROUP BY Away_team ORDER BY Away_team | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
467,
41,
14939,
834,
23,
26,
16,
17,
6,
3,
23,
26,
16,
17,
6,
7960,
16,
17,
6,
7678,
1499,
6,
1210,
834,
11650,
1499,
6,
71,
1343,
834,
11650,
1499,
6,
17763,
1499,
6,
15571,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
1343,
834,
11650,
6,
2847,
17161,
599,
188,
1343,
834,
11650,
61,
21680,
467,
350,
4630,
6880,
272,
476,
71,
1343,
834,
11650,
4674,
11300,
272,
476,
71,
1343,
834,
11650,
1,
-100,
-100,
-100,
-100,
-100,
-100,
... |
WHAT TRANSFER FEE HAS A TYPE OF TRANSFER FOR DOS SANTOS? | CREATE TABLE table_name_62 (transfer_fee VARCHAR, type VARCHAR, name VARCHAR) | SELECT transfer_fee FROM table_name_62 WHERE type = "transfer" AND name = "dos santos" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4056,
41,
7031,
1010,
834,
89,
15,
15,
584,
4280,
28027,
6,
686,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
21665,
26585,
20805... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2025,
834,
89,
15,
15,
21680,
953,
834,
4350,
834,
4056,
549,
17444,
427,
686,
3274,
96,
7031,
1010,
121,
3430,
564,
3274,
96,
26,
32,
7,
3,
7,
288,
32,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What was the maximum rank for the vote percentage of 5.6% | CREATE TABLE table_73946 (
"Rank" real,
"Couple" text,
"Judges" real,
"Public" real,
"Total" real,
"Vote percentage" text,
"Result" text
) | SELECT MIN("Rank") FROM table_73946 WHERE "Vote percentage" = '5.6%' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
940,
3288,
4448,
41,
96,
22557,
121,
490,
6,
96,
3881,
413,
109,
121,
1499,
6,
96,
683,
13164,
7,
121,
490,
6,
96,
30931,
121,
490,
6,
96,
3696,
1947,
121,
490,
6,
96,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
121,
22557,
8512,
21680,
953,
834,
940,
3288,
4448,
549,
17444,
427,
96,
553,
32,
17,
15,
5294,
121,
3274,
3,
31,
25134,
1454,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What sport was played on February 25, 2011? | CREATE TABLE table_name_21 (
sport VARCHAR,
date VARCHAR
) | SELECT sport FROM table_name_21 WHERE date = "february 25, 2011" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2658,
41,
2600,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
2600,
47,
1944,
30,
2083,
14105,
2722,
58,
1,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2600,
21680,
953,
834,
4350,
834,
2658,
549,
17444,
427,
833,
3274,
96,
89,
15,
9052,
1208,
14105,
2722,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Who was the visiting team on November 10? | CREATE TABLE table_15571 (
"Date" text,
"Visiting Team" text,
"Final Score" text,
"Host Team" text,
"Stadium" text
) | SELECT "Visiting Team" FROM table_15571 WHERE "Date" = 'november 10' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
20896,
4450,
41,
96,
308,
342,
121,
1499,
6,
96,
30338,
2271,
121,
1499,
6,
96,
371,
10270,
17763,
121,
1499,
6,
96,
566,
3481,
2271,
121,
1499,
6,
96,
134,
17,
9,
12925,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
3,
23143,
14196,
96,
30338,
2271,
121,
21680,
953,
834,
20896,
4450,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
5326,
18247,
335,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the name of the team from cisne fairfield school? | CREATE TABLE table_name_84 (team_name VARCHAR, schools VARCHAR) | SELECT team_name FROM table_name_84 WHERE schools = "cisne fairfield" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4608,
41,
11650,
834,
4350,
584,
4280,
28027,
6,
2061,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
564,
13,
8,
372,
45,
3,
75,
159,
29,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
372,
834,
4350,
21680,
953,
834,
4350,
834,
4608,
549,
17444,
427,
2061,
3274,
96,
75,
159,
29,
15,
2725,
1846,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name the most bits 14-12 for output from accumulator to character bus | CREATE TABLE table_19196 (
"Bit 15" real,
"Bits 14-12" real,
"Bits 11-0" text,
"Mnemonic" text,
"Description" text
) | SELECT MIN("Bits 14-12") FROM table_19196 WHERE "Description" = 'Output from accumulator to character bus' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2294,
26937,
41,
96,
279,
155,
627,
121,
490,
6,
96,
279,
7085,
968,
5947,
121,
490,
6,
96,
279,
7085,
209,
18930,
121,
1499,
6,
96,
329,
9660,
4554,
121,
1499,
6,
96,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
121,
279,
7085,
968,
5947,
8512,
21680,
953,
834,
2294,
26937,
549,
17444,
427,
96,
2962,
11830,
121,
3274,
3,
31,
15767,
2562,
45,
3,
22274,
1016,
12,
1848,
2601,
31,
1,
-100,
-100,
-100,
-100,
-100,... |
give me the number of patients admitted to the hospital before 2167 with the procedure icd9 code 3532. | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2167" AND procedures.icd9_code = "3532" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7690,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
2118,
23,
26,
1499,
6,
5059,
715,
1499,
6,
5692,
1499,
6,
701,
834,
15129,
1499,
6,
3783,
1499,
6,
5798,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
Which Founded has a League of women's flat track derby association, and a Club of omaha rollergirls? | CREATE TABLE table_name_14 (
founded INTEGER,
league VARCHAR,
club VARCHAR
) | SELECT AVG(founded) FROM table_name_14 WHERE league = "women's flat track derby association" AND club = "omaha rollergirls" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2534,
41,
5710,
3,
21342,
17966,
6,
5533,
584,
4280,
28027,
6,
1886,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
3,
20100,
65,
3,
9,
3815,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
23329,
61,
21680,
953,
834,
4350,
834,
2534,
549,
17444,
427,
5533,
3274,
96,
210,
32,
904,
31,
7,
2667,
1463,
74,
969,
6028,
121,
3430,
1886,
3274,
96,
32,
51,
9,
1024,
10866,
18722,
7,
121,
1,
... |
What is Position, when School/Previous Club Team/Country is Kentucky? | CREATE TABLE table_name_67 (
position VARCHAR,
school_previous_club_team_country VARCHAR
) | SELECT position FROM table_name_67 WHERE school_previous_club_team_country = "kentucky" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3708,
41,
1102,
584,
4280,
28027,
6,
496,
834,
2026,
19117,
834,
13442,
834,
11650,
834,
17529,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1102,
21680,
953,
834,
4350,
834,
3708,
549,
17444,
427,
496,
834,
2026,
19117,
834,
13442,
834,
11650,
834,
17529,
3274,
96,
2217,
17,
4636,
63,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the Club that has an Established more than 2000 for soccer plated in kuntz stadium? | CREATE TABLE table_name_90 (
club VARCHAR,
venue VARCHAR,
established VARCHAR,
sport VARCHAR
) | SELECT club FROM table_name_90 WHERE established > 2000 AND sport = "soccer" AND venue = "kuntz stadium" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2394,
41,
1886,
584,
4280,
28027,
6,
5669,
584,
4280,
28027,
6,
2127,
584,
4280,
28027,
6,
2600,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
3,
23143,
14196,
1886,
21680,
953,
834,
4350,
834,
2394,
549,
17444,
427,
2127,
2490,
2766,
3430,
2600,
3274,
96,
7,
13377,
49,
121,
3430,
5669,
3274,
96,
2729,
26897,
14939,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Who won in 1997 with a finish of t48? | CREATE TABLE table_name_47 (
player VARCHAR,
finish VARCHAR,
year_s__won VARCHAR
) | SELECT player FROM table_name_47 WHERE finish = "t48" AND year_s__won = "1997" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4177,
41,
1959,
584,
4280,
28027,
6,
1992,
584,
4280,
28027,
6,
215,
834,
7,
834,
834,
210,
106,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
75... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1959,
21680,
953,
834,
4350,
834,
4177,
549,
17444,
427,
1992,
3274,
96,
17,
3707,
121,
3430,
215,
834,
7,
834,
834,
210,
106,
3274,
96,
2294,
4327,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Show different publishers together with the number of publications they have. | CREATE TABLE publication (
Publisher VARCHAR
) | SELECT Publisher, COUNT(*) FROM publication GROUP BY Publisher | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
5707,
41,
19816,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
3111,
315,
18902,
544,
28,
8,
381,
13,
10142,
79,
43,
5,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
19816,
6,
2847,
17161,
599,
1935,
61,
21680,
5707,
350,
4630,
6880,
272,
476,
19816,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What was the score of the tie with an away team of Stoke City? | CREATE TABLE table_name_50 (score VARCHAR, away_team VARCHAR) | SELECT score FROM table_name_50 WHERE away_team = "stoke city" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1752,
41,
7,
9022,
584,
4280,
28027,
6,
550,
834,
11650,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
2604,
13,
8,
6177,
28,
46,
550,
372,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2604,
21680,
953,
834,
4350,
834,
1752,
549,
17444,
427,
550,
834,
11650,
3274,
96,
7,
235,
1050,
690,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the lowest amount of draws with less than 12 wins and less than 30 played? | CREATE TABLE table_name_27 (
draws INTEGER,
wins VARCHAR,
played VARCHAR
) | SELECT MIN(draws) FROM table_name_27 WHERE wins < 12 AND played < 30 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2555,
41,
14924,
3,
21342,
17966,
6,
9204,
584,
4280,
28027,
6,
1944,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
7402,
866,
13,
14924,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
19489,
7,
61,
21680,
953,
834,
4350,
834,
2555,
549,
17444,
427,
9204,
3,
2,
586,
3430,
1944,
3,
2,
604,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is the average for 2005 when 1995 is more than 3, 1996 is less than 4, and 2011 is more than 5? | CREATE TABLE table_67535 (
"Country" text,
"2012" real,
"2011" real,
"2010" real,
"2009" real,
"2008" real,
"2007" real,
"2006" real,
"2005" real,
"2004" real,
"2003" real,
"2002" real,
"2001" real,
"2000" real,
"1999" real,
"1998" real,
"1997" real,
"1996" real,
"1995" real,
"1994" real,
"1993" real,
"1992" real,
"1991" real,
"1990" real,
"1989" real,
"1988" real
) | SELECT AVG("2005") FROM table_67535 WHERE "1995" > '3' AND "1996" < '4' AND "2011" > '5' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3708,
755,
2469,
41,
96,
10628,
651,
121,
1499,
6,
96,
12172,
121,
490,
6,
96,
13907,
121,
490,
6,
96,
14926,
121,
490,
6,
96,
16660,
121,
490,
6,
96,
16128,
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,
71,
17217,
599,
121,
22594,
8512,
21680,
953,
834,
3708,
755,
2469,
549,
17444,
427,
96,
19479,
17395,
2490,
3,
31,
519,
31,
3430,
96,
2294,
4314,
121,
3,
2,
3,
31,
591,
31,
3430,
96,
13907,
121,
2490,
3,
31,
75... |
What is the score when high points were Andre Miller (31)? | CREATE TABLE table_23286158_11 (score VARCHAR, high_points VARCHAR) | SELECT score FROM table_23286158_11 WHERE high_points = "Andre Miller (31)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23188,
3840,
26556,
834,
2596,
41,
7,
9022,
584,
4280,
28027,
6,
306,
834,
2700,
7,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2604,
116,
306,
979,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2604,
21680,
953,
834,
23188,
3840,
26556,
834,
2596,
549,
17444,
427,
306,
834,
2700,
7,
3274,
96,
7175,
60,
9429,
6918,
6982,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Give me a histogram for what are the types of competition and number of competitions for that type?, rank in desc by the y axis. | CREATE TABLE club_rank (
Rank real,
Club_ID int,
Gold real,
Silver real,
Bronze real,
Total real
)
CREATE TABLE competition_result (
Competition_ID int,
Club_ID_1 int,
Club_ID_2 int,
Score text
)
CREATE TABLE player (
Player_ID int,
name text,
Position text,
Club_ID int,
Apps real,
Tries real,
Goals text,
Points real
)
CREATE TABLE competition (
Competition_ID int,
Year real,
Competition_type text,
Country text
)
CREATE TABLE club (
Club_ID int,
name text,
Region text,
Start_year text
) | SELECT Competition_type, COUNT(*) FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1886,
834,
6254,
41,
3,
22557,
490,
6,
1949,
834,
4309,
16,
17,
6,
2540,
490,
6,
5642,
490,
6,
20841,
490,
6,
9273,
490,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
15571,
834,
6137,
6,
2847,
17161,
599,
1935,
61,
21680,
2259,
350,
4630,
6880,
272,
476,
15571,
834,
6137,
4674,
11300,
272,
476,
2847,
17161,
599,
1935,
61,
309,
25067,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the location with the most cinemas opened in year 2010 or later? | CREATE TABLE cinema (
LOCATION VARCHAR,
openning_year VARCHAR
) | SELECT LOCATION FROM cinema WHERE openning_year >= 2010 GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
10276,
41,
301,
5618,
8015,
584,
4280,
28027,
6,
539,
29,
53,
834,
1201,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1128,
28,
8,
167,
10276,
7,
2946,
16,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
301,
5618,
8015,
21680,
10276,
549,
17444,
427,
539,
29,
53,
834,
1201,
2490,
2423,
2735,
350,
4630,
6880,
272,
476,
301,
5618,
8015,
4674,
11300,
272,
476,
2847,
17161,
599,
1935,
61,
309,
25067,
8729,
12604,
209,
1,... |
In what week was the Result L 35-10? | CREATE TABLE table_name_76 (week INTEGER, result VARCHAR) | SELECT MIN(week) FROM table_name_76 WHERE result = "l 35-10" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3959,
41,
8041,
3,
21342,
17966,
6,
741,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
86,
125,
471,
47,
8,
3,
20119,
301,
3097,
4536,
58,
1,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
8041,
61,
21680,
953,
834,
4350,
834,
3959,
549,
17444,
427,
741,
3274,
96,
40,
3097,
4536,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What venue did mahela jayawardene and thilan samaraweera play at? | CREATE TABLE table_name_42 (
venue VARCHAR,
batting_partners VARCHAR
) | SELECT venue FROM table_name_42 WHERE batting_partners = "mahela jayawardene and thilan samaraweera" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4165,
41,
5669,
584,
4280,
28027,
6,
3,
27759,
834,
12300,
7,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
5669,
410,
954,
88,
521,
2662,
63,
9,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
3,
23143,
14196,
5669,
21680,
953,
834,
4350,
834,
4165,
549,
17444,
427,
3,
27759,
834,
12300,
7,
3274,
96,
51,
9,
88,
521,
2662,
63,
9,
2239,
35,
15,
11,
3,
7436,
1618,
3,
7,
9,
1635,
9,
1123,
1498,
121,
1,
-100,
-100,
-100,... |
Which Gold has a Total larger than 3, a Rank of total, and a Silver larger than 8? | CREATE TABLE table_name_60 (gold INTEGER, silver VARCHAR, rank VARCHAR) | SELECT AVG(gold) FROM table_name_60 WHERE "total" > 3 AND rank = "total" AND silver > 8 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3328,
41,
14910,
3,
21342,
17966,
6,
4294,
584,
4280,
28027,
6,
11003,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
2540,
65,
3,
9,
9273,
2186,
145,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
71,
17217,
599,
14910,
61,
21680,
953,
834,
4350,
834,
3328,
549,
17444,
427,
96,
235,
1947,
121,
2490,
220,
3430,
11003,
3274,
96,
235,
1947,
121,
3430,
4294,
2490,
505,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many times did district of Columbia receive a score for evening gown? | CREATE TABLE table_12094300_1 (evening_gown VARCHAR, state VARCHAR) | SELECT COUNT(evening_gown) FROM table_12094300_1 WHERE state = "District of Columbia" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
15518,
4240,
5426,
834,
536,
41,
6190,
53,
834,
122,
9197,
584,
4280,
28027,
6,
538,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
648,
410,
3939,
13,
8183,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2847,
17161,
599,
6190,
53,
834,
122,
9197,
61,
21680,
953,
834,
15518,
4240,
5426,
834,
536,
549,
17444,
427,
538,
3274,
96,
308,
23,
20066,
13,
8183,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
what is the highest latitude when the township is kingsley and the geo id is higher than 3803942820? | CREATE TABLE table_64239 (
"Township" text,
"County" text,
"Pop. (2010)" real,
"Land ( sqmi )" real,
"Water (sqmi)" real,
"Latitude" real,
"Longitude" real,
"GEO ID" real,
"ANSI code" real
) | SELECT MAX("Latitude") FROM table_64239 WHERE "Township" = 'kingsley' AND "GEO ID" > '3803942820' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4389,
357,
3288,
41,
96,
382,
9197,
2009,
121,
1499,
6,
96,
10628,
63,
121,
1499,
6,
96,
27773,
5,
26118,
121,
490,
6,
96,
434,
232,
41,
11820,
51,
23,
3,
61,
121,
490,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
121,
3612,
6592,
8512,
21680,
953,
834,
4389,
357,
3288,
549,
17444,
427,
96,
382,
9197,
2009,
121,
3274,
3,
31,
1765,
8887,
31,
3430,
96,
5042,
667,
4699,
121,
2490,
3,
31,
22671,
3288,
591,
2577,
1... |
Show the names of schools with a total budget amount greater than 100 or a total endowment greater than 10. | CREATE TABLE budget (
school_id number,
year number,
budgeted number,
total_budget_percent_budgeted number,
invested number,
total_budget_percent_invested number,
budget_invested_percent text
)
CREATE TABLE school (
school_id text,
school_name text,
location text,
mascot text,
enrollment number,
ihsaa_class text,
ihsaa_football_class text,
county text
)
CREATE TABLE endowment (
endowment_id number,
school_id number,
donator_name text,
amount number
) | SELECT T2.school_name FROM budget AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id JOIN endowment AS T3 ON T2.school_id = T3.school_id GROUP BY T2.school_name HAVING SUM(T1.budgeted) > 100 OR SUM(T3.amount) > 10 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1487,
41,
496,
834,
23,
26,
381,
6,
215,
381,
6,
1487,
15,
26,
381,
6,
792,
834,
11073,
2782,
834,
883,
3728,
834,
115,
13164,
1054,
381,
6,
11496,
381,
6,
792,
834,
11073,
2782,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
332,
4416,
6646,
834,
4350,
21680,
1487,
6157,
332,
536,
3,
15355,
3162,
496,
6157,
332,
357,
9191,
332,
5411,
6646,
834,
23,
26,
3274,
332,
4416,
6646,
834,
23,
26,
3,
15355,
3162,
414,
2381,
297,
6157,
332,
519,
... |
what is the name that had 46 floors? | CREATE TABLE table_name_47 (name VARCHAR, floors VARCHAR) | SELECT name FROM table_name_47 WHERE floors = 46 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4177,
41,
4350,
584,
4280,
28027,
6,
8242,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
125,
19,
8,
564,
24,
141,
9668,
8242,
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,
564,
21680,
953,
834,
4350,
834,
4177,
549,
17444,
427,
8242,
3274,
9668,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What are the directions for the guardian whose weapon is khaḍga (sword)? | CREATE TABLE table_100518_1 (direction VARCHAR, weapon VARCHAR) | SELECT direction FROM table_100518_1 WHERE weapon = "Khaḍga (sword)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2915,
755,
2606,
834,
536,
41,
10258,
4985,
584,
4280,
28027,
6,
10931,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
33,
8,
7943,
21,
8,
4879,
23,
152,
3,
2544... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2212,
21680,
953,
834,
2915,
755,
2606,
834,
536,
549,
17444,
427,
10931,
3274,
96,
439,
1024,
2,
122,
9,
41,
7,
6051,
61,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Count the number of patients less than 56 years of age who had an open and other replacement of aortic valve with tissue graft procedure. | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "56" AND procedures.long_title = "Open and other replacement of aortic valve with tissue graft" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
14798,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
564,
1499,
6,
2774,
1947,
834,
8547,
302,
1499,
6,
1246,
1499,
6,
103,
115,
1499,
6,
7285,
1499,
6,
1612,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
What is the elevation for number 39? | CREATE TABLE table_2731431_1 (
elevation__m_ INTEGER,
no VARCHAR
) | SELECT MAX(elevation__m_) FROM table_2731431_1 WHERE no = 39 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2555,
519,
2534,
3341,
834,
536,
41,
16417,
834,
834,
51,
834,
3,
21342,
17966,
6,
150,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
16417,
21,
381,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
15,
10912,
257,
834,
834,
51,
834,
61,
21680,
953,
834,
2555,
519,
2534,
3341,
834,
536,
549,
17444,
427,
150,
3274,
6352,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
who is the opponent when the year is after 1996 and the outcome is winner? | CREATE TABLE table_50586 (
"Outcome" text,
"Year" real,
"Championship" text,
"Surface" text,
"Opponent" text,
"Score" text
) | SELECT "Opponent" FROM table_50586 WHERE "Year" > '1996' AND "Outcome" = 'winner' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1752,
755,
3840,
41,
96,
15767,
287,
15,
121,
1499,
6,
96,
476,
2741,
121,
490,
6,
96,
254,
1483,
12364,
2009,
121,
1499,
6,
96,
134,
450,
4861,
121,
1499,
6,
96,
667,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
667,
102,
9977,
121,
21680,
953,
834,
1752,
755,
3840,
549,
17444,
427,
96,
476,
2741,
121,
2490,
3,
31,
2294,
4314,
31,
3430,
96,
15767,
287,
15,
121,
3274,
3,
31,
3757,
687,
31,
1,
-100,
-100,
-100,
-100,
... |
how many marathons was the result a first place finish ? | CREATE TABLE table_203_270 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"event" text,
"notes" text
) | SELECT COUNT(*) FROM table_203_270 WHERE "position" = 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
17485,
41,
3,
23,
26,
381,
6,
96,
1201,
121,
381,
6,
96,
287,
4995,
4749,
121,
1499,
6,
96,
15098,
121,
1499,
6,
96,
4718,
121,
1499,
6,
96,
15,
2169,
121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
953,
834,
23330,
834,
17485,
549,
17444,
427,
96,
4718,
121,
3274,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Where did Richmond play as the away team? | CREATE TABLE table_name_51 (venue VARCHAR, away_team VARCHAR) | SELECT venue FROM table_name_51 WHERE away_team = "richmond" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5553,
41,
15098,
584,
4280,
28027,
6,
550,
834,
11650,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2840,
410,
17247,
577,
38,
8,
550,
372,
58,
1,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
5669,
21680,
953,
834,
4350,
834,
5553,
549,
17444,
427,
550,
834,
11650,
3274,
96,
3723,
6764,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
provide the number of patients whose admission location is transfer from hosp/extram and diagnoses long title is benign neoplasm of spinal meninges? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE 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
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_location = "TRANSFER FROM HOSP/EXTRAM" AND diagnoses.long_title = "Benign neoplasm of spinal meninges" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
5... |
Which teams had the 1st position and entered 1 race? | CREATE TABLE table_name_42 (team VARCHAR, races VARCHAR, position VARCHAR) | SELECT team FROM table_name_42 WHERE races = "1" AND position = "1st" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4165,
41,
11650,
584,
4280,
28027,
6,
10879,
584,
4280,
28027,
6,
1102,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
2323,
141,
8,
209,
7,
17,
1102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
372,
21680,
953,
834,
4350,
834,
4165,
549,
17444,
427,
10879,
3274,
96,
536,
121,
3430,
1102,
3274,
96,
536,
7,
17,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
When there is a lost of 2 what is the mumber drawn? | CREATE TABLE table_15405904_1 (
drawn INTEGER,
lost VARCHAR
) | SELECT MAX(drawn) FROM table_15405904_1 WHERE lost = 2 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1808,
2445,
3390,
6348,
834,
536,
41,
6796,
3,
21342,
17966,
6,
1513,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
366,
132,
19,
3,
9,
1513,
13,
204,
125,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
19489,
29,
61,
21680,
953,
834,
1808,
2445,
3390,
6348,
834,
536,
549,
17444,
427,
1513,
3274,
204,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What team was the Opponent when the Score was 31-6? | CREATE TABLE table_41715 (
"Date" text,
"Opponent" text,
"Result" text,
"Score" text,
"Record" text,
"attendance" real
) | SELECT "Opponent" FROM table_41715 WHERE "Score" = '31-6' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
2517,
1808,
41,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
20119,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
1649,
7621,
121,
1499,
6,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
667,
102,
9977,
121,
21680,
953,
834,
591,
2517,
1808,
549,
17444,
427,
96,
134,
9022,
121,
3274,
3,
31,
3341,
5783,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
How many in total were elected first in lost renomination? | CREATE TABLE table_1342338_3 (first_elected VARCHAR, result VARCHAR) | SELECT COUNT(first_elected) FROM table_1342338_3 WHERE result = "Lost renomination" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2773,
3747,
834,
519,
41,
14672,
834,
19971,
584,
4280,
28027,
6,
741,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
16,
792,
130,
8160,
166,
16,
1513... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
14672,
834,
19971,
61,
21680,
953,
834,
23747,
2773,
3747,
834,
519,
549,
17444,
427,
741,
3274,
96,
434,
3481,
3,
1536,
32,
14484,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
How many apartment bookings for each year? Draw a bar chart binning booking start date by year interval, I want to order in desc by the Y-axis. | CREATE TABLE Apartment_Buildings (
building_id INTEGER,
building_short_name CHAR(15),
building_full_name VARCHAR(80),
building_description VARCHAR(255),
building_address VARCHAR(255),
building_manager VARCHAR(50),
building_phone VARCHAR(80)
)
CREATE TABLE Guests (
guest_id INTEGER,
gender_code CHAR(1),
guest_first_name VARCHAR(80),
guest_last_name VARCHAR(80),
date_of_birth DATETIME
)
CREATE TABLE Apartment_Facilities (
apt_id INTEGER,
facility_code CHAR(15)
)
CREATE TABLE Apartment_Bookings (
apt_booking_id INTEGER,
apt_id INTEGER,
guest_id INTEGER,
booking_status_code CHAR(15),
booking_start_date DATETIME,
booking_end_date DATETIME
)
CREATE TABLE Apartments (
apt_id INTEGER,
building_id INTEGER,
apt_type_code CHAR(15),
apt_number CHAR(10),
bathroom_count INTEGER,
bedroom_count INTEGER,
room_count CHAR(5)
)
CREATE TABLE View_Unit_Status (
apt_id INTEGER,
apt_booking_id INTEGER,
status_date DATETIME,
available_yn BIT
) | SELECT booking_start_date, COUNT(booking_start_date) FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id ORDER BY COUNT(booking_start_date) DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
15970,
834,
24752,
53,
7,
41,
740,
834,
23,
26,
3,
21342,
17966,
6,
740,
834,
7,
14184,
834,
4350,
3,
28027,
599,
1808,
201,
740,
834,
1329,
40,
834,
4350,
584,
4280,
28027,
599,
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,
5038,
834,
10208,
834,
5522,
6,
2847,
17161,
599,
2567,
53,
834,
10208,
834,
5522,
61,
21680,
15970,
834,
13355,
53,
7,
6157,
332,
536,
3,
15355,
3162,
3,
22360,
6157,
332,
357,
9191,
332,
5411,
15991,
17,
834,
23,
... |
Find the name and rank of the 3 youngest winners across all matches. | CREATE TABLE matches (winner_name VARCHAR, winner_rank VARCHAR, winner_age VARCHAR) | SELECT DISTINCT winner_name, winner_rank FROM matches ORDER BY winner_age LIMIT 3 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
6407,
41,
3757,
687,
834,
4350,
584,
4280,
28027,
6,
4668,
834,
6254,
584,
4280,
28027,
6,
4668,
834,
545,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2588,
8,
564,
11,
11003,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3,
15438,
25424,
6227,
4668,
834,
4350,
6,
4668,
834,
6254,
21680,
6407,
4674,
11300,
272,
476,
4668,
834,
545,
8729,
12604,
220,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
For those records from the products and each product's manufacturer, a bar chart shows the distribution of name and the average of revenue , and group by attribute name, show from low to high by the Y. | 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, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T2.Revenue | [
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,
4416,
1649,
15098,
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,
5... |
which song is the only one that is shorter than where the spirit is ? | CREATE TABLE table_204_932 (
id number,
"#" number,
"title" text,
"time" text,
"lead vocals" text,
"notes" text
) | SELECT "title" FROM table_204_932 WHERE "time" < (SELECT "time" FROM table_204_932 WHERE "title" = 'where the spirit is') | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
4271,
357,
41,
3,
23,
26,
381,
6,
96,
4663,
121,
381,
6,
96,
21869,
121,
1499,
6,
96,
715,
121,
1499,
6,
96,
109,
9,
26,
6721,
7,
121,
1499,
6,
96,
7977,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4271,
357,
549,
17444,
427,
96,
715,
121,
3,
2,
41,
23143,
14196,
96,
715,
121,
21680,
953,
834,
26363,
834,
4271,
357,
549,
17444,
427,
96,
21869,
121,
3274,
3,
31,
83... |
how many people voted for the top 4 parties ? | CREATE TABLE table_203_354 (
id number,
"party" text,
"candidate(s)" text,
"votes" number,
"percentage" number
) | SELECT SUM("votes") FROM table_203_354 WHERE id <= 4 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
2469,
591,
41,
3,
23,
26,
381,
6,
96,
8071,
121,
1499,
6,
96,
1608,
12416,
342,
599,
7,
61,
121,
1499,
6,
96,
1621,
1422,
121,
381,
6,
96,
883,
3728,
545,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
121,
1621,
1422,
8512,
21680,
953,
834,
23330,
834,
2469,
591,
549,
17444,
427,
3,
23,
26,
3,
2,
2423,
314,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Return the name of rooms and the number of reservations made for each of the rooms to draw a bar chart, and rank in descending by the X-axis. | CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adults INTEGER,
Kids INTEGER
)
CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
basePrice INTEGER,
decor TEXT
) | SELECT roomName, COUNT(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room ORDER BY roomName DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
27659,
7,
41,
3636,
3,
21342,
17966,
6,
4181,
3,
3463,
4,
382,
6,
1972,
1570,
3,
3463,
4,
382,
6,
1972,
15767,
3,
3463,
4,
382,
6,
13002,
17833,
6,
2506,
23954,
3,
3463,
4,
382,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
562,
23954,
6,
2847,
17161,
599,
1935,
61,
21680,
27659,
7,
6157,
332,
536,
3,
15355,
3162,
4181,
7,
6157,
332,
357,
9191,
332,
5411,
22778,
51,
3274,
332,
4416,
22778,
51,
196,
26,
350,
4630,
6880,
272,
476,
332,
... |
What Rider had a Speed of 108.347mph and Time of 1:02.40.93? | CREATE TABLE table_name_12 (
rider VARCHAR,
speed VARCHAR,
time VARCHAR
) | SELECT rider FROM table_name_12 WHERE speed = "108.347mph" AND time = "1:02.40.93" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2122,
41,
2564,
52,
584,
4280,
28027,
6,
1634,
584,
4280,
28027,
6,
97,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
25218,
141,
3,
9,
9913,
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,
0,
0,
0,
0... | [
3,
23143,
14196,
2564,
52,
21680,
953,
834,
4350,
834,
2122,
549,
17444,
427,
1634,
3274,
96,
16169,
5,
519,
4177,
7656,
121,
3430,
97,
3274,
96,
536,
10,
12328,
2445,
5,
4271,
121,
1,
-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.