NATURAL_LANG stringlengths 0 446 | SCHEMA stringlengths 27 2.21k | SQL stringlengths 18 453 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|
which month aired the most episodes according to this chart ? | CREATE TABLE table_203_306 (
id number,
"no." number,
"title" text,
"directed by" text,
"written by" text,
"original air date" text
) | SELECT "original air date" FROM table_203_306 GROUP BY "original air date" ORDER BY COUNT(*) DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
1458,
948,
41,
3,
23,
26,
381,
6,
96,
29,
32,
535,
381,
6,
96,
21869,
121,
1499,
6,
96,
22955,
57,
121,
1499,
6,
96,
14973,
57,
121,
1499,
6,
96,
21878,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
21878,
799,
833,
121,
21680,
953,
834,
23330,
834,
1458,
948,
350,
4630,
6880,
272,
476,
96,
21878,
799,
833,
121,
4674,
11300,
272,
476,
2847,
17161,
599,
1935,
61,
309,
25067,
8729,
12604,
209,
1,
-100,
-100,
... |
What is the name of the person who was in the Original Broadway Cast that was Original West End Cast of sheila hancock? | CREATE TABLE table_15524 (
"Character" text,
"Original West End Cast" text,
"Original Broadway Cast" text,
"First UK Tour Cast" text,
"First US Tour Cast" text
) | SELECT "Original Broadway Cast" FROM table_15524 WHERE "Original West End Cast" = 'sheila hancock' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
20896,
2266,
41,
96,
18947,
2708,
49,
121,
1499,
6,
96,
667,
3380,
10270,
1244,
3720,
11583,
121,
1499,
6,
96,
667,
3380,
10270,
17963,
11583,
121,
1499,
6,
96,
25171,
1270,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3380,
10270,
17963,
11583,
121,
21680,
953,
834,
20896,
2266,
549,
17444,
427,
96,
667,
3380,
10270,
1244,
3720,
11583,
121,
3274,
3,
31,
7,
88,
173,
9,
3,
2618,
12105,
31,
1,
-100,
-100,
-100,
-100,
-100,
... |
What is the general classification of the stage 3 with Daniele Bennati as the points classification and Morris Possoni as the young rider classification. | CREATE TABLE table_name_21 (
general_classification VARCHAR,
stage VARCHAR,
points_classification VARCHAR,
young_rider_classification VARCHAR
) | SELECT general_classification FROM table_name_21 WHERE points_classification = "daniele bennati" AND young_rider_classification = "morris possoni" AND stage = "3" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2658,
41,
879,
834,
4057,
2420,
584,
4280,
28027,
6,
1726,
584,
4280,
28027,
6,
979,
834,
4057,
2420,
584,
4280,
28027,
6,
1021,
834,
4055,
49,
834,
4057,
2420,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
879,
834,
4057,
2420,
21680,
953,
834,
4350,
834,
2658,
549,
17444,
427,
979,
834,
4057,
2420,
3274,
96,
26,
2738,
400,
36,
29,
18530,
121,
3430,
1021,
834,
4055,
49,
834,
4057,
2420,
3274,
96,
2528,
52,
159,
3,
2... |
Who has a religion of United Methodist and a prior background of a Congressional Aide? | CREATE TABLE table_20098199_2 (
representative VARCHAR,
religion VARCHAR,
prior_background VARCHAR
) | SELECT representative FROM table_20098199_2 WHERE religion = "United Methodist" AND prior_background = "Congressional aide" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
16660,
4959,
3264,
834,
357,
41,
6978,
584,
4280,
28027,
6,
5562,
584,
4280,
28027,
6,
1884,
834,
1549,
9232,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
65... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
3,
23143,
14196,
6978,
21680,
953,
834,
16660,
4959,
3264,
834,
357,
549,
17444,
427,
5562,
3274,
96,
5110,
23,
1054,
24884,
121,
3430,
1884,
834,
1549,
9232,
3274,
96,
27998,
3,
5385,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
With a club that has 400 Points against, what are the points? | CREATE TABLE table_name_50 (points_for VARCHAR, points_against VARCHAR) | SELECT points_for FROM table_name_50 WHERE points_against = "400" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1752,
41,
2700,
7,
834,
1161,
584,
4280,
28027,
6,
979,
834,
9,
16720,
7,
17,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
438,
3,
9,
1886,
24,
65,
483... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
979,
834,
1161,
21680,
953,
834,
4350,
834,
1752,
549,
17444,
427,
979,
834,
9,
16720,
7,
17,
3274,
96,
5548,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the total number of Date, when Partner is "Carl-Uwe Steeb"? | CREATE TABLE table_name_67 (date VARCHAR, partner VARCHAR) | SELECT COUNT(date) FROM table_name_67 WHERE partner = "carl-uwe steeb" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3708,
41,
5522,
584,
4280,
28027,
6,
2397,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
792,
381,
13,
7678,
6,
116,
5793,
19,
96,
6936,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
5522,
61,
21680,
953,
834,
4350,
834,
3708,
549,
17444,
427,
2397,
3274,
96,
1720,
40,
18,
76,
1123,
3,
849,
15,
115,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Name the average gold medals when the bronze medals was less than 1, silver medals being 0 and total medals more than 1 | CREATE TABLE table_name_82 (
gold_medals INTEGER,
total_medals VARCHAR,
bronze_medals VARCHAR,
silver_medals VARCHAR
) | SELECT AVG(gold_medals) FROM table_name_82 WHERE bronze_medals < 1 AND silver_medals = 0 AND total_medals > 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4613,
41,
2045,
834,
2726,
5405,
3,
21342,
17966,
6,
792,
834,
2726,
5405,
584,
4280,
28027,
6,
13467,
834,
2726,
5405,
584,
4280,
28027,
6,
4294,
834,
2726,
5405,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14910,
834,
2726,
5405,
61,
21680,
953,
834,
4350,
834,
4613,
549,
17444,
427,
13467,
834,
2726,
5405,
3,
2,
209,
3430,
4294,
834,
2726,
5405,
3274,
3,
632,
3430,
792,
834,
2726,
5405,
2490,
209,
1,
... |
What year has a Top 25 of 0, and a Earnings ($) larger than 0? | CREATE TABLE table_name_26 (year VARCHAR, top_25 VARCHAR, earnings__$_ VARCHAR) | SELECT year FROM table_name_26 WHERE top_25 = 0 AND earnings__$_ > 0 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2688,
41,
1201,
584,
4280,
28027,
6,
420,
834,
1828,
584,
4280,
28027,
6,
8783,
834,
834,
3229,
834,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
215,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
215,
21680,
953,
834,
4350,
834,
2688,
549,
17444,
427,
420,
834,
1828,
3274,
3,
632,
3430,
8783,
834,
834,
3229,
834,
2490,
3,
632,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Name the Year which has a Label of atco records and a Type of album? Question 2 | CREATE TABLE table_76706 (
"Year" real,
"Artist" text,
"Title" text,
"Label" text,
"Type" text
) | SELECT "Year" FROM table_76706 WHERE "Label" = 'atco records' AND "Type" = 'album' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3959,
2518,
948,
41,
96,
476,
2741,
121,
490,
6,
96,
7754,
343,
121,
1499,
6,
96,
382,
155,
109,
121,
1499,
6,
96,
434,
10333,
121,
1499,
6,
96,
25160,
121,
1499,
3,
61... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
476,
2741,
121,
21680,
953,
834,
3959,
2518,
948,
549,
17444,
427,
96,
434,
10333,
121,
3274,
3,
31,
144,
509,
3187,
31,
3430,
96,
25160,
121,
3274,
3,
31,
23703,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the frequency for the 10kw station with DXEZ as its callsign? | CREATE TABLE table_name_25 (
frequency VARCHAR,
power__kw_ VARCHAR,
callsign VARCHAR
) | SELECT frequency FROM table_name_25 WHERE power__kw_ = "10kw" AND callsign = "dxez" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1828,
41,
7321,
584,
4280,
28027,
6,
579,
834,
834,
157,
210,
834,
584,
4280,
28027,
6,
580,
6732,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
3,
23143,
14196,
7321,
21680,
953,
834,
4350,
834,
1828,
549,
17444,
427,
579,
834,
834,
157,
210,
834,
3274,
96,
1714,
157,
210,
121,
3430,
580,
6732,
3274,
96,
26,
226,
457,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name the D 44 when it has a D 46 of d 31 | CREATE TABLE table_78248 (
"D 48" text,
"D 47" text,
"D 46" text,
"D 45" text,
"D 44" text,
"D 43" text,
"D 42" text,
"D 41" text
) | SELECT "D 44" FROM table_78248 WHERE "D 46" = 'd 31' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3940,
357,
3707,
41,
96,
308,
4678,
121,
1499,
6,
96,
308,
10635,
121,
1499,
6,
96,
308,
9668,
121,
1499,
6,
96,
308,
3479,
121,
1499,
6,
96,
308,
8537,
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,
308,
8537,
121,
21680,
953,
834,
3940,
357,
3707,
549,
17444,
427,
96,
308,
9668,
121,
3274,
3,
31,
26,
2664,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
when did patient 031-4423 receive a microbiology test first time? | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
) | SELECT microlab.culturetakentime FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-4423')) ORDER BY microlab.culturetakentime LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7690,
41,
50,
9824,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
7690,
4350,
1499,
6,
50,
1999,
7,
83,
17,
381,
6,
50,
1999,
7,
83,
17,
715,
97,
3,
61,
3,
32102,
32103,
32102,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2179,
9339,
5,
10547,
4914,
29,
715,
21680,
2179,
9339,
549,
17444,
427,
2179,
9339,
5,
10061,
15129,
21545,
23,
26,
3388,
41,
23143,
14196,
1868,
5,
10061,
15129,
21545,
23,
26,
21680,
1868,
549,
17444,
427,
1868,
5,... |
What is Notes, when App(L/C/E) is 13 (7/2/4)? | CREATE TABLE table_name_89 (notes VARCHAR, app_l_c_e_ VARCHAR) | SELECT notes FROM table_name_89 WHERE app_l_c_e_ = "13 (7/2/4)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3914,
41,
7977,
7,
584,
4280,
28027,
6,
1120,
834,
40,
834,
75,
834,
15,
834,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
2507,
7,
6,
116,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3358,
21680,
953,
834,
4350,
834,
3914,
549,
17444,
427,
1120,
834,
40,
834,
75,
834,
15,
834,
3274,
96,
2368,
13649,
13311,
87,
7256,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which Home has an Away of hispano? | CREATE TABLE table_name_62 (
home VARCHAR,
away VARCHAR
) | SELECT home FROM table_name_62 WHERE away = "hispano" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4056,
41,
234,
584,
4280,
28027,
6,
550,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
1210,
65,
46,
71,
1343,
13,
112,
2837,
32,
58,
1,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
234,
21680,
953,
834,
4350,
834,
4056,
549,
17444,
427,
550,
3274,
96,
10193,
2837,
32,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
How many were first elected when the incumbent was Morgan M. Moulder? | CREATE TABLE table_1342198_25 (
first_elected VARCHAR,
incumbent VARCHAR
) | SELECT COUNT(first_elected) FROM table_1342198_25 WHERE incumbent = "Morgan M. Moulder" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
24151,
834,
1828,
41,
166,
834,
19971,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
130,
166,
8160,
116,
8,
28406... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14672,
834,
19971,
61,
21680,
953,
834,
2368,
4165,
24151,
834,
1828,
549,
17444,
427,
28406,
3274,
96,
329,
11127,
283,
5,
1290,
83,
588,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the original air date of episode 3-02? | CREATE TABLE table_28024 (
"Episode #" text,
"Original Air Date (UK)" text,
"Episode Title" text,
"Director" text,
"Writer" text,
"Cast" text
) | SELECT "Original Air Date (UK)" FROM table_28024 WHERE "Episode #" = '3-02' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
17518,
2266,
41,
96,
427,
102,
159,
32,
221,
1713,
121,
1499,
6,
96,
667,
3380,
10270,
1761,
7678,
41,
15787,
61,
121,
1499,
6,
96,
427,
102,
159,
32,
221,
11029,
121,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
667,
3380,
10270,
1761,
7678,
41,
15787,
61,
121,
21680,
953,
834,
17518,
2266,
549,
17444,
427,
96,
427,
102,
159,
32,
221,
1713,
121,
3274,
3,
31,
22773,
357,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
provide the number of patients whose diagnoses long title is insomnia, unspecified and drug type is additive? | 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
)
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Insomnia, unspecified" AND prescriptions.drug_type = "ADDITIVE" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
3... |
When was the first cap associated with 39 caps and under 33 goals? | CREATE TABLE table_38042 (
"Name" text,
"Goals" real,
"Caps" real,
"First cap" text,
"Latest cap" text
) | SELECT "First cap" FROM table_38042 WHERE "Goals" < '33' AND "Caps" = '39' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
22671,
4165,
41,
96,
23954,
121,
1499,
6,
96,
6221,
5405,
121,
490,
6,
96,
19566,
7,
121,
490,
6,
96,
25171,
2468,
121,
1499,
6,
96,
3612,
4377,
2468,
121,
1499,
3,
61,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
25171,
2468,
121,
21680,
953,
834,
22671,
4165,
549,
17444,
427,
96,
6221,
5405,
121,
3,
2,
3,
31,
4201,
31,
3430,
96,
19566,
7,
121,
3274,
3,
31,
3288,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is Set 4, when Set 1 is 19-25, and when Set 2 is 23-25? | CREATE TABLE table_name_33 (
set_4 VARCHAR,
set_1 VARCHAR,
set_2 VARCHAR
) | SELECT set_4 FROM table_name_33 WHERE set_1 = "19-25" AND set_2 = "23-25" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4201,
41,
356,
834,
591,
584,
4280,
28027,
6,
356,
834,
536,
584,
4280,
28027,
6,
356,
834,
357,
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,
0,
0,
0... | [
3,
23143,
14196,
356,
834,
591,
21680,
953,
834,
4350,
834,
4201,
549,
17444,
427,
356,
834,
536,
3274,
96,
2294,
14855,
121,
3430,
356,
834,
357,
3274,
96,
2773,
14855,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Return a bar chart about the distribution of meter_600 and meter_100 . | 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 stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
) | SELECT meter_600, meter_100 FROM swimmer | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
27424,
41,
4699,
16,
17,
6,
564,
1499,
6,
868,
485,
1499,
6,
3,
4401,
834,
2915,
490,
6,
3,
4401,
834,
3632,
1499,
6,
3,
4401,
834,
5426,
1499,
6,
3,
4401,
834,
5548,
1499,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
4401,
834,
6007,
6,
3,
4401,
834,
2915,
21680,
27424,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Who ran under the Socialist Labor ticket when Robert M. Morgenthau ran for the Democratic ticket? | CREATE TABLE table_name_28 (socialist_labor_ticket VARCHAR, democratic_ticket VARCHAR) | SELECT socialist_labor_ticket FROM table_name_28 WHERE democratic_ticket = "robert m. morgenthau" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2577,
41,
15745,
343,
834,
9456,
834,
26639,
584,
4280,
28027,
6,
15053,
834,
26639,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
4037,
365,
8,
2730,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
23737,
834,
9456,
834,
26639,
21680,
953,
834,
4350,
834,
2577,
549,
17444,
427,
15053,
834,
26639,
3274,
96,
5840,
49,
17,
3,
51,
5,
8030,
729,
189,
402,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of first_name and department_id , show by the FIRST_NAME from low to high please. | CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
) | SELECT FIRST_NAME, DEPARTMENT_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY FIRST_NAME | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1652,
41,
262,
5244,
5017,
476,
5080,
834,
4309,
7908,
1982,
599,
11071,
632,
201,
30085,
834,
567,
17683,
3,
4331,
4059,
599,
1755,
201,
301,
12510,
834,
567,
17683,
3,
4331,
4059,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
30085,
834,
567,
17683,
6,
3396,
19846,
11810,
834,
4309,
21680,
1652,
549,
17444,
427,
4486,
3396,
19846,
11810,
834,
4309,
3388,
41,
23143,
14196,
3396,
19846,
11810,
834,
4309,
21680,
10521,
549,
17444,
427,
283,
15610... |
When aspect computing is the yacht what is the sail number? | CREATE TABLE table_1858574_2 (
sail_number VARCHAR,
yacht VARCHAR
) | SELECT sail_number FROM table_1858574_2 WHERE yacht = "Aspect Computing" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
21594,
4433,
4581,
834,
357,
41,
14725,
834,
5525,
1152,
584,
4280,
28027,
6,
18082,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
366,
2663,
10937,
19,
8,
18082,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14725,
834,
5525,
1152,
21680,
953,
834,
21594,
4433,
4581,
834,
357,
549,
17444,
427,
18082,
3274,
96,
188,
5628,
25274,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the operating voltage of part number amql64dam22gg? | CREATE TABLE table_27277284_27 (
voltage VARCHAR,
order_part_number VARCHAR
) | SELECT voltage FROM table_27277284_27 WHERE order_part_number = "AMQL64DAM22GG" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2555,
2555,
5865,
4608,
834,
2555,
41,
10594,
584,
4280,
28027,
6,
455,
834,
2274,
834,
5525,
1152,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2699,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10594,
21680,
953,
834,
2555,
2555,
5865,
4608,
834,
2555,
549,
17444,
427,
455,
834,
2274,
834,
5525,
1152,
3274,
96,
4815,
2247,
434,
4389,
4296,
329,
2884,
21320,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Name the high points for the date of november 24 | CREATE TABLE table_17323529_5 (high_points VARCHAR, date VARCHAR) | SELECT high_points FROM table_17323529_5 WHERE date = "November 24" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2517,
2668,
2469,
3166,
834,
755,
41,
6739,
834,
2700,
7,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
306,
979,
21,
8,
833,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
306,
834,
2700,
7,
21680,
953,
834,
2517,
2668,
2469,
3166,
834,
755,
549,
17444,
427,
833,
3274,
96,
28635,
997,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Name the period for michel prost | CREATE TABLE table_26957 (
"Name" text,
"Position" text,
"Period" text,
"Appearances\u00b9" real,
"Goals\u00b9" real,
"Nationality\u00b2" text
) | SELECT "Period" FROM table_26957 WHERE "Name" = 'Michel Prost' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
3951,
3436,
41,
96,
23954,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
12988,
23,
32,
26,
121,
1499,
6,
96,
9648,
2741,
663,
7,
2,
76,
1206,
115,
1298,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12988,
23,
32,
26,
121,
21680,
953,
834,
357,
3951,
3436,
549,
17444,
427,
96,
23954,
121,
3274,
3,
31,
30123,
749,
7,
17,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Who was the home team for the game played at Corio Oval? | CREATE TABLE table_name_20 (home_team VARCHAR, venue VARCHAR) | SELECT home_team FROM table_name_20 WHERE venue = "corio oval" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1755,
41,
5515,
834,
11650,
584,
4280,
28027,
6,
5669,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
8,
234,
372,
21,
8,
467,
1944,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
234,
834,
11650,
21680,
953,
834,
4350,
834,
1755,
549,
17444,
427,
5669,
3274,
96,
5715,
23,
32,
17986,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What are the invoice dates for customers with the first name Astrid and the last name Gruber? | CREATE TABLE playlist (
playlistid number,
name text
)
CREATE TABLE track (
trackid number,
name text,
albumid number,
mediatypeid number,
genreid number,
composer text,
milliseconds number,
bytes number,
unitprice number
)
CREATE TABLE customer (
customerid number,
firstname text,
lastname text,
company text,
address text,
city text,
state text,
country text,
postalcode text,
phone text,
fax text,
email text,
supportrepid number
)
CREATE TABLE album (
albumid number,
title text,
artistid number
)
CREATE TABLE invoice (
invoiceid number,
customerid number,
invoicedate time,
billingaddress text,
billingcity text,
billingstate text,
billingcountry text,
billingpostalcode text,
total number
)
CREATE TABLE employee (
employeeid number,
lastname text,
firstname text,
title text,
reportsto number,
birthdate time,
hiredate time,
address text,
city text,
state text,
country text,
postalcode text,
phone text,
fax text,
email text
)
CREATE TABLE playlisttrack (
playlistid number,
trackid number
)
CREATE TABLE invoiceline (
invoicelineid number,
invoiceid number,
trackid number,
unitprice number,
quantity number
)
CREATE TABLE artist (
artistid number,
name text
)
CREATE TABLE genre (
genreid number,
name text
)
CREATE TABLE mediatype (
mediatypeid number,
name text
) | SELECT T2.invoicedate FROM customer AS T1 JOIN invoice AS T2 ON T1.customerid = T2.customerid WHERE T1.firstname = "Astrid" AND lastname = "Gruber" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
23424,
41,
23424,
23,
26,
381,
6,
564,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
1463,
41,
1463,
23,
26,
381,
6,
564,
1499,
6,
2306,
23,
26,
381,
6,
783,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
77,
23235,
5522,
21680,
884,
6157,
332,
536,
3,
15355,
3162,
10921,
6157,
332,
357,
9191,
332,
5411,
25697,
15,
4055,
3274,
332,
4416,
25697,
15,
4055,
549,
17444,
427,
332,
5411,
14672,
4350,
3274,
96,
188... |
How many gold medals on average were earned by Italy when they held the rank of 4? | CREATE TABLE table_name_5 (
gold INTEGER,
nation VARCHAR,
rank VARCHAR
) | SELECT AVG(gold) FROM table_name_5 WHERE nation = "italy" AND rank > 4 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
755,
41,
2045,
3,
21342,
17966,
6,
2982,
584,
4280,
28027,
6,
11003,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
2045,
9365,
7,
30,
1348,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
71,
17217,
599,
14910,
61,
21680,
953,
834,
4350,
834,
755,
549,
17444,
427,
2982,
3274,
96,
9538,
63,
121,
3430,
11003,
2490,
314,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the municipality that has an area of exactly 199.35 sq. km? | CREATE TABLE table_255885_1 (municipality VARCHAR, area__km²_ VARCHAR) | SELECT municipality FROM table_255885_1 WHERE area__km²_ = "199.35" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
3449,
4433,
834,
536,
41,
11760,
3389,
10355,
584,
4280,
28027,
6,
616,
834,
834,
5848,
357,
834,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
27597... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
27597,
21680,
953,
834,
1828,
3449,
4433,
834,
536,
549,
17444,
427,
616,
834,
834,
5848,
357,
834,
3274,
96,
19479,
5,
2469,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
When Bunky Henry placed t8, what was his To par? | CREATE TABLE table_77321 (
"Place" text,
"Player" text,
"Country" text,
"Score" real,
"To par" text
) | SELECT "To par" FROM table_77321 WHERE "Place" = 't8' AND "Player" = 'bunky henry' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4013,
519,
2658,
41,
96,
345,
11706,
121,
1499,
6,
96,
15800,
49,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
134,
9022,
121,
490,
6,
96,
3696,
260,
121,
1499,
3,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
3696,
260,
121,
21680,
953,
834,
4013,
519,
2658,
549,
17444,
427,
96,
345,
11706,
121,
3274,
3,
31,
17,
927,
31,
3430,
96,
15800,
49,
121,
3274,
3,
31,
9617,
3781,
3,
3225,
651,
31,
1,
-100,
-100,
-100,
-10... |
On what Date is there a race on the Circuit of brands hatch? | CREATE TABLE table_name_77 (date VARCHAR, circuit VARCHAR) | SELECT date FROM table_name_77 WHERE circuit = "brands hatch" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4013,
41,
5522,
584,
4280,
28027,
6,
4558,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
461,
125,
7678,
19,
132,
3,
9,
1964,
30,
8,
17007,
13,
3635,
2061... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
833,
21680,
953,
834,
4350,
834,
4013,
549,
17444,
427,
4558,
3274,
96,
12164,
7,
20618,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many stadiums are there with a capacity of 7500? | CREATE TABLE table_155 (
"Team" text,
"Stadium" text,
"Capacity" real,
"Lowest" real,
"Highest" real,
"Average" real
) | SELECT COUNT("Stadium") FROM table_155 WHERE "Capacity" = '7500' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
20896,
41,
96,
18699,
121,
1499,
6,
96,
134,
17,
9,
12925,
121,
1499,
6,
96,
19566,
9,
6726,
121,
490,
6,
96,
434,
32,
12425,
121,
490,
6,
96,
21417,
222,
121,
490,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
134,
17,
9,
12925,
8512,
21680,
953,
834,
20896,
549,
17444,
427,
96,
19566,
9,
6726,
121,
3274,
3,
31,
940,
2560,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the high silver total for nations with 3 golds and under 5 bronzes? | CREATE TABLE table_name_61 (
silver INTEGER,
gold VARCHAR,
bronze VARCHAR
) | SELECT MAX(silver) FROM table_name_61 WHERE gold = 3 AND bronze < 5 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4241,
41,
4294,
3,
21342,
17966,
6,
2045,
584,
4280,
28027,
6,
13467,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
306,
4294,
792,
21,
935... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4800,
4,
599,
7,
173,
624,
61,
21680,
953,
834,
4350,
834,
4241,
549,
17444,
427,
2045,
3274,
220,
3430,
13467,
3,
2,
305,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Which state contains the University of Iowa in the mideast region? | CREATE TABLE table_name_67 (
state VARCHAR,
region VARCHAR,
host VARCHAR
) | SELECT state FROM table_name_67 WHERE region = "mideast" AND host = "university of iowa" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3708,
41,
538,
584,
4280,
28027,
6,
1719,
584,
4280,
28027,
6,
2290,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
538,
2579,
8,
636,
13,
12034,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
538,
21680,
953,
834,
4350,
834,
3708,
549,
17444,
427,
1719,
3274,
96,
6983,
11535,
121,
3430,
2290,
3274,
96,
7846,
485,
13,
3,
23,
2381,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
what is the icao when the country is norway? | CREATE TABLE table_48136 (
"City" text,
"Country" text,
"IATA" text,
"ICAO" text,
"Airport" text
) | SELECT "ICAO" FROM table_48136 WHERE "Country" = 'norway' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3707,
23459,
41,
96,
254,
485,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
196,
19282,
121,
1499,
6,
96,
15038,
667,
121,
1499,
6,
96,
20162,
1493,
121,
1499,
3,
61,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
3,
23143,
14196,
96,
15038,
667,
121,
21680,
953,
834,
3707,
23459,
549,
17444,
427,
96,
10628,
651,
121,
3274,
3,
31,
29,
127,
1343,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
what is the total amount of free throws by ralf woods ? | CREATE TABLE table_204_344 (
id number,
"player" text,
"games played" number,
"field goals" number,
"free throws" number,
"points" number
) | SELECT "free throws" FROM table_204_344 WHERE "player" = 'ralf woods' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
519,
3628,
41,
3,
23,
26,
381,
6,
96,
20846,
121,
1499,
6,
96,
7261,
7,
1944,
121,
381,
6,
96,
1846,
1766,
121,
381,
6,
96,
2113,
3793,
7,
121,
381,
6,
96... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
2113,
3793,
7,
121,
21680,
953,
834,
26363,
834,
519,
3628,
549,
17444,
427,
96,
20846,
121,
3274,
3,
31,
4900,
89,
1679,
7,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Show all ministers and parties they belong to in descending order of the time they took office. | CREATE TABLE party (minister VARCHAR, party_name VARCHAR, took_office VARCHAR) | SELECT minister, party_name FROM party ORDER BY took_office DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1088,
41,
17791,
584,
4280,
28027,
6,
1088,
834,
4350,
584,
4280,
28027,
6,
808,
834,
19632,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
3111,
66,
6323,
7,
11,
2251,
79,
13000... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6323,
6,
1088,
834,
4350,
21680,
1088,
4674,
11300,
272,
476,
808,
834,
19632,
309,
25067,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
how many patients were given the drug ferrous gluconate? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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 prescriptions.drug = "Ferrous Gluconate" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7744,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7744,
7,
5,
8399,
51,
834,
23,
26,
549... |
WHAT HOMETOWN DOES HE PLAY AS THE CATCHER FOR? | CREATE TABLE table_11677100_11 (hometown VARCHAR, position VARCHAR) | SELECT hometown FROM table_11677100_11 WHERE position = "Catcher" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
20159,
4013,
2915,
834,
2596,
41,
5515,
3540,
584,
4280,
28027,
6,
1102,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
21665,
26496,
5647,
21170,
30050,
134,
3,
6021,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
22295,
21680,
953,
834,
20159,
4013,
2915,
834,
2596,
549,
17444,
427,
1102,
3274,
96,
18610,
1703,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
in electorate of 83850 what is the minimum s split vote | CREATE TABLE table_15082102_3 (s_spoilt_vote INTEGER, electorate VARCHAR) | SELECT MIN(s_spoilt_vote) FROM table_15082102_3 WHERE electorate = 83850 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
12278,
4613,
14388,
834,
519,
41,
7,
834,
7990,
173,
17,
834,
1621,
17,
15,
3,
21342,
17966,
6,
11924,
127,
342,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
16,
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,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
7,
834,
7990,
173,
17,
834,
1621,
17,
15,
61,
21680,
953,
834,
12278,
4613,
14388,
834,
519,
549,
17444,
427,
11924,
127,
342,
3274,
3,
4591,
17246,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many customers are there? | CREATE TABLE customer (
cust_id text,
cust_name text,
acc_type text,
acc_bal number,
no_of_loans number,
credit_score number,
branch_id number,
state text
)
CREATE TABLE bank (
branch_id number,
bname text,
no_of_customers number,
city text,
state text
)
CREATE TABLE loan (
loan_id text,
loan_type text,
cust_id text,
branch_id text,
amount number
) | SELECT SUM(no_of_customers) FROM bank | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
884,
41,
123,
7,
17,
834,
23,
26,
1499,
6,
123,
7,
17,
834,
4350,
1499,
6,
3,
6004,
834,
6137,
1499,
6,
3,
6004,
834,
3849,
381,
6,
150,
834,
858,
834,
40,
32,
3247,
381,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
29,
32,
834,
858,
834,
25697,
277,
61,
21680,
2137,
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,
-1... |
Which 2005 has a 1999 of 0 0? | CREATE TABLE table_36102 (
"Tournament" text,
"1998" text,
"1999" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"Career SR" text,
"Career Win-Loss" text
) | SELECT "2005" FROM table_36102 WHERE "1999" = '0–0' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3420,
14388,
41,
96,
382,
1211,
20205,
17,
121,
1499,
6,
96,
2294,
3916,
121,
1499,
6,
96,
2294,
3264,
121,
1499,
6,
96,
23658,
121,
1499,
6,
96,
24898,
121,
1499,
6,
96,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
22594,
121,
21680,
953,
834,
3420,
14388,
549,
17444,
427,
96,
2294,
3264,
121,
3274,
3,
31,
632,
104,
632,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What NFL Team has the player Danny Triplett with the position linebacker? | CREATE TABLE table_2508633_11 (
nfl_team VARCHAR,
position VARCHAR,
player VARCHAR
) | SELECT nfl_team FROM table_2508633_11 WHERE position = "Linebacker" AND player = "Danny Triplett" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
11434,
3840,
4201,
834,
2596,
41,
3,
29,
89,
40,
834,
11650,
584,
4280,
28027,
6,
1102,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
3,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
29,
89,
40,
834,
11650,
21680,
953,
834,
11434,
3840,
4201,
834,
2596,
549,
17444,
427,
1102,
3274,
96,
21022,
1549,
49,
121,
3430,
1959,
3274,
96,
308,
15159,
22709,
17,
17,
121,
1,
-100,
-100,
-100,
-100,
-100,... |
How many people tuned in to the finale on May 16, 2007? | CREATE TABLE table_name_27 (viewers__in_millions_ VARCHAR, finale VARCHAR) | SELECT COUNT(viewers__in_millions_) FROM table_name_27 WHERE finale = "may 16, 2007" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2555,
41,
4576,
277,
834,
834,
77,
834,
17030,
7,
834,
584,
4280,
28027,
6,
13604,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
151,
14007,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
4576,
277,
834,
834,
77,
834,
17030,
7,
834,
61,
21680,
953,
834,
4350,
834,
2555,
549,
17444,
427,
13604,
3274,
96,
13726,
11940,
4101,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the total number of spectators on week 4? | CREATE TABLE table_44622 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) | SELECT COUNT("Attendance") FROM table_44622 WHERE "Week" = '4' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3628,
4056,
357,
41,
96,
518,
10266,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
20119,
121,
1499,
6,
96,
188,
17,
324,
26,
663,
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,
121,
188,
17,
324,
26,
663,
8512,
21680,
953,
834,
3628,
4056,
357,
549,
17444,
427,
96,
518,
10266,
121,
3274,
3,
31,
591,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Show me a bar chart for what are the apartment number and the room count of each apartment?, and I want to sort in asc by the y axis please. | 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 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 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 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 Guests (
guest_id INTEGER,
gender_code CHAR(1),
guest_first_name VARCHAR(80),
guest_last_name VARCHAR(80),
date_of_birth DATETIME
) | SELECT apt_number, room_count FROM Apartments ORDER BY room_count | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
15970,
834,
371,
9,
13067,
3010,
41,
3,
6789,
834,
23,
26,
3,
21342,
17966,
6,
3064,
834,
4978,
3,
28027,
599,
1808,
61,
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,
3,
6789,
834,
5525,
1152,
6,
562,
834,
13362,
21680,
15970,
7,
4674,
11300,
272,
476,
562,
834,
13362,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Which competition had a final position/round of 2? | CREATE TABLE table_name_68 (competition VARCHAR, final_position___round VARCHAR) | SELECT competition FROM table_name_68 WHERE final_position___round = "2" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3651,
41,
287,
4995,
4749,
584,
4280,
28027,
6,
804,
834,
4718,
834,
834,
834,
7775,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
2259,
141,
3,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2259,
21680,
953,
834,
4350,
834,
3651,
549,
17444,
427,
804,
834,
4718,
834,
834,
834,
7775,
3274,
96,
357,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What country is Paul Stankowski from? | CREATE TABLE table_name_21 (
country VARCHAR,
player VARCHAR
) | SELECT country FROM table_name_21 WHERE player = "paul stankowski" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2658,
41,
684,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
684,
19,
1838,
11469,
27077,
45,
58,
1,
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,
684,
21680,
953,
834,
4350,
834,
2658,
549,
17444,
427,
1959,
3274,
96,
102,
9,
83,
3,
5627,
27077,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name the number of location attendance for l 141 143 (ot) | CREATE TABLE table_21289 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT COUNT("Location Attendance") FROM table_21289 WHERE "Score" = 'L 141–143 (OT)' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
24837,
3914,
41,
96,
23055,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
18699,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
21417,
979,
121,
1499,
6,
96,
21417,
3,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
434,
32,
75,
257,
22497,
663,
8512,
21680,
953,
834,
24837,
3914,
549,
17444,
427,
96,
134,
9022,
121,
3274,
3,
31,
434,
3,
26059,
104,
25133,
41,
6951,
61,
31,
1,
-100,
-100,
-100,
-100,
-1... |
what's the percentage of votes with election date being 1981 | CREATE TABLE table_18966 (
"Election date" real,
"Party leader" text,
"Number of votes received" real,
"Percentage of votes" text,
"Number of deputies" real
) | SELECT "Percentage of votes" FROM table_18966 WHERE "Election date" = '1981' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
25312,
3539,
41,
96,
427,
12252,
833,
121,
490,
6,
96,
13725,
63,
2488,
121,
1499,
6,
96,
567,
5937,
49,
13,
11839,
1204,
121,
490,
6,
96,
12988,
3728,
545,
13,
11839,
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,
12988,
3728,
545,
13,
11839,
121,
21680,
953,
834,
25312,
3539,
549,
17444,
427,
96,
427,
12252,
833,
121,
3274,
3,
31,
2294,
4959,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the highest total that has andrea sinko as the name, with an all around greater than 9.65? | CREATE TABLE table_name_98 (
total INTEGER,
name VARCHAR,
all_around VARCHAR
) | SELECT MAX(total) FROM table_name_98 WHERE name = "andrea sinko" AND all_around > 9.65 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3916,
41,
792,
3,
21342,
17966,
6,
564,
584,
4280,
28027,
6,
66,
834,
15590,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2030,
792,
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,
1,
1,
1,
1,
1,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
235,
1947,
61,
21680,
953,
834,
4350,
834,
3916,
549,
17444,
427,
564,
3274,
96,
232,
864,
5067,
32,
121,
3430,
66,
834,
15590,
2490,
5835,
4122,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Who is the entrant with a cooper t43 chassis before 1958? | CREATE TABLE table_name_47 (
entrant VARCHAR,
year VARCHAR,
chassis VARCHAR
) | SELECT entrant FROM table_name_47 WHERE year < 1958 AND chassis = "cooper t43" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4177,
41,
3,
295,
3569,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
6,
22836,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
19,
8,
3,
295,
3569,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3,
295,
3569,
21680,
953,
834,
4350,
834,
4177,
549,
17444,
427,
215,
3,
2,
22306,
3430,
22836,
3274,
96,
25911,
49,
3,
17,
4906,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the Score of the Chicago Black Hawks Home game with the Visiting Vancouver Canucks on November 17? | CREATE TABLE table_name_30 (
score VARCHAR,
date VARCHAR,
home VARCHAR,
visitor VARCHAR
) | SELECT score FROM table_name_30 WHERE home = "chicago black hawks" AND visitor = "vancouver canucks" AND date = "november 17" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1458,
41,
2604,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
6,
234,
584,
4280,
28027,
6,
7019,
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,
2604,
21680,
953,
834,
4350,
834,
1458,
549,
17444,
427,
234,
3274,
96,
1436,
658,
839,
1001,
3,
14400,
7,
121,
3430,
7019,
3274,
96,
2132,
3422,
624,
54,
4636,
7,
121,
3430,
833,
3274,
96,
5326,
18247,
1003,
121,
... |
Which Location has Floors smaller than 27, and a Building of 150 elgin? | CREATE TABLE table_name_71 (
location VARCHAR,
floors VARCHAR,
building VARCHAR
) | SELECT location FROM table_name_71 WHERE floors < 27 AND building = "150 elgin" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4450,
41,
1128,
584,
4280,
28027,
6,
8242,
584,
4280,
28027,
6,
740,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
10450,
65,
12324,
7,
2755,
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1128,
21680,
953,
834,
4350,
834,
4450,
549,
17444,
427,
8242,
3,
2,
2307,
3430,
740,
3274,
96,
12278,
3,
15,
40,
122,
77,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
let me know the type of admission and procedure icd9 code of patient with patient id 16438. | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT demographic.admission_type, procedures.icd9_code FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "16438" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
14798,
5,
9,
26,
5451,
834,
6137,
6,
4293,
5,
447,
26,
1298,
834,
4978,
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,
4... |
The rider mike di meglio had a total of how many grids? | CREATE TABLE table_14976 (
"Rider" text,
"Manufacturer" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | SELECT COUNT("Grid") FROM table_14976 WHERE "Rider" = 'mike di meglio' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
24816,
3959,
41,
96,
448,
23,
588,
121,
1499,
6,
96,
7296,
76,
8717,
450,
49,
121,
1499,
6,
96,
3612,
102,
7,
121,
490,
6,
96,
13368,
87,
1649,
11809,
26,
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,
13313,
26,
8512,
21680,
953,
834,
24816,
3959,
549,
17444,
427,
96,
448,
23,
588,
121,
3274,
3,
31,
20068,
15,
1227,
140,
4707,
32,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
WHTA IS THE SNATCH WITH A TOTAL OF LARGER THAN 318 KG AND BODY WEIGHT OF 84.15? | CREATE TABLE table_name_19 (snatch INTEGER, total__kg_ VARCHAR, bodyweight VARCHAR) | SELECT AVG(snatch) FROM table_name_19 WHERE total__kg_ > 318 AND bodyweight = 84.15 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2294,
41,
7,
29,
14547,
3,
21342,
17966,
6,
792,
834,
834,
8711,
834,
584,
4280,
28027,
6,
643,
9378,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
3,
153... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7,
29,
14547,
61,
21680,
953,
834,
4350,
834,
2294,
549,
17444,
427,
792,
834,
834,
8711,
834,
2490,
220,
2606,
3430,
643,
9378,
3274,
3,
4608,
5,
1808,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which Away team has a Score of 0 3? | CREATE TABLE table_name_4 (
away_team VARCHAR,
score VARCHAR
) | SELECT away_team FROM table_name_4 WHERE score = "0–3" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
591,
41,
550,
834,
11650,
584,
4280,
28027,
6,
2604,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
71,
1343,
372,
65,
3,
9,
17763,
13,
3,
632,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
550,
834,
11650,
21680,
953,
834,
4350,
834,
591,
549,
17444,
427,
2604,
3274,
96,
632,
104,
519,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Find the locations where have both tracks with more than 90000 seats and tracks with less than 70000 seats. | CREATE TABLE track (LOCATION VARCHAR, seating INTEGER) | SELECT LOCATION FROM track WHERE seating > 90000 INTERSECT SELECT LOCATION FROM track WHERE seating < 70000 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1463,
41,
5017,
254,
8015,
584,
4280,
28027,
6,
10259,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
2588,
8,
3248,
213,
43,
321,
6542,
28,
72,
145,
2777,
2313,
6116,
11,
6542,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
301,
5618,
8015,
21680,
1463,
549,
17444,
427,
10259,
2490,
2777,
2313,
3,
21342,
5249,
14196,
3,
23143,
14196,
301,
5618,
8015,
21680,
1463,
549,
17444,
427,
10259,
3,
2,
2861,
2313,
1,
-100,
-100,
-100,
-100,
-100,
... |
what is the total amount of times the judiciary committee appears for delegates in the republican party ? | CREATE TABLE table_203_247 (
id number,
"district" text,
"counties represented" text,
"delegate" text,
"party" text,
"first elected" number,
"committee" text
) | SELECT COUNT(*) FROM table_203_247 WHERE "committee" = 'judiciary' AND "party" = 'republican' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
357,
4177,
41,
3,
23,
26,
381,
6,
96,
26,
23,
20066,
121,
1499,
6,
96,
13362,
725,
7283,
121,
1499,
6,
96,
221,
8791,
121,
1499,
6,
96,
8071,
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,
1935,
61,
21680,
953,
834,
23330,
834,
357,
4177,
549,
17444,
427,
96,
287,
1538,
17,
15,
15,
121,
3274,
3,
31,
14312,
1294,
1208,
31,
3430,
96,
8071,
121,
3274,
3,
31,
60,
15727,
152,
31,
1,
-... |
Name the result for total attendance-regular season | CREATE TABLE table_24339 (
"Type of Record" text,
"Attendance" real,
"Date/Year" text,
"Stadium" text,
"Result/Games" text
) | SELECT "Result/Games" FROM table_24339 WHERE "Type of Record" = 'Total Attendance-Regular season' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
27730,
3288,
41,
96,
25160,
13,
11392,
121,
1499,
6,
96,
188,
17,
324,
26,
663,
121,
490,
6,
96,
308,
342,
87,
476,
2741,
121,
1499,
6,
96,
134,
17,
9,
12925,
121,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
20119,
87,
23055,
7,
121,
21680,
953,
834,
27730,
3288,
549,
17444,
427,
96,
25160,
13,
11392,
121,
3274,
3,
31,
3696,
1947,
22497,
663,
18,
17748,
4885,
774,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
I want the IATA for ICAO of zgkl | CREATE TABLE table_52406 (
"City" text,
"Country" text,
"Region" text,
"IATA" text,
"ICAO" text,
"Airport" text
) | SELECT "IATA" FROM table_52406 WHERE "ICAO" = 'zgkl' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
755,
2266,
5176,
41,
96,
254,
485,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
17748,
23,
106,
121,
1499,
6,
96,
196,
19282,
121,
1499,
6,
96,
15038,
667,
121,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
196,
19282,
121,
21680,
953,
834,
755,
2266,
5176,
549,
17444,
427,
96,
15038,
667,
121,
3274,
3,
31,
172,
122,
157,
40,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the team for season 1911-12? | CREATE TABLE table_10556257_1 (team VARCHAR, season VARCHAR) | SELECT team FROM table_10556257_1 WHERE season = "1911-12" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
12869,
4834,
357,
3436,
834,
536,
41,
11650,
584,
4280,
28027,
6,
774,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
372,
21,
774,
28623,
5947,
58,
1,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
372,
21680,
953,
834,
12869,
4834,
357,
3436,
834,
536,
549,
17444,
427,
774,
3274,
96,
2294,
2596,
5947,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, show me about the distribution of hire_date and the amount of hire_date bin hire_date by time in a bar chart, show by the y axis in desc. | CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
) | SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY COUNT(HIRE_DATE) DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1440,
41,
2847,
17161,
11824,
834,
4309,
3,
4331,
4059,
16426,
6,
2847,
17161,
11824,
834,
567,
17683,
3,
4331,
4059,
599,
2445,
201,
4083,
517,
9215,
834,
4309,
7908,
1982,
599,
1714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
454,
14132,
834,
308,
6048,
6,
2847,
17161,
599,
566,
14132,
834,
308,
6048,
61,
21680,
1652,
549,
17444,
427,
180,
4090,
24721,
272,
7969,
518,
23394,
3,
25129,
3430,
586,
2313,
3430,
3,
6657,
329,
16994,
9215,
834,
... |
With an Area km 2 of less than 130.68, what is McAdam's Population? | CREATE TABLE table_name_54 (population INTEGER, area_km_2 VARCHAR, official_name VARCHAR) | SELECT SUM(population) FROM table_name_54 WHERE area_km_2 < 130.68 AND official_name = "mcadam" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5062,
41,
9791,
7830,
3,
21342,
17966,
6,
616,
834,
5848,
834,
357,
584,
4280,
28027,
6,
2314,
834,
4350,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
438,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
180,
6122,
599,
9791,
7830,
61,
21680,
953,
834,
4350,
834,
5062,
549,
17444,
427,
616,
834,
5848,
834,
357,
3,
2,
12778,
5,
3651,
3430,
2314,
834,
4350,
3274,
96,
51,
17436,
51,
121,
1,
-100,
-100,
-100,
-100,
-1... |
Who is the 2008 head coach of UCLA? | CREATE TABLE table_name_7 (
team VARCHAR
) | SELECT 2008 AS _head_coach FROM table_name_7 WHERE team = "ucla" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
940,
41,
372,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
19,
8,
2628,
819,
3763,
13,
28685,
58,
1,
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,
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... | [
3,
23143,
14196,
2628,
6157,
3,
834,
3313,
834,
509,
1836,
21680,
953,
834,
4350,
834,
940,
549,
17444,
427,
372,
3274,
96,
76,
4651,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which assets did not incur any fault log? List the asset model. | CREATE TABLE Fault_Log (
asset_model VARCHAR,
asset_id VARCHAR
)
CREATE TABLE Assets (
asset_model VARCHAR,
asset_id VARCHAR
) | SELECT asset_model FROM Assets WHERE NOT asset_id IN (SELECT asset_id FROM Fault_Log) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
377,
10335,
834,
22084,
41,
7000,
834,
21770,
584,
4280,
28027,
6,
7000,
834,
23,
26,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
18202,
7,
41,
7000,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
7000,
834,
21770,
21680,
18202,
7,
549,
17444,
427,
4486,
7000,
834,
23,
26,
3388,
41,
23143,
14196,
7000,
834,
23,
26,
21680,
377,
10335,
834,
22084,
61,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
drop goals larger than 0, and a Penalties of 52, and a Number larger than 5 had what lowest score? | CREATE TABLE table_name_96 (
score INTEGER,
number VARCHAR,
drop_goals VARCHAR,
penalties VARCHAR
) | SELECT MIN(score) FROM table_name_96 WHERE drop_goals > 0 AND penalties = 52 AND number > 5 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4314,
41,
2604,
3,
21342,
17966,
6,
381,
584,
4280,
28027,
6,
2328,
834,
839,
5405,
584,
4280,
28027,
6,
17524,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
7,
9022,
61,
21680,
953,
834,
4350,
834,
4314,
549,
17444,
427,
2328,
834,
839,
5405,
2490,
3,
632,
3430,
17524,
3274,
9065,
3430,
381,
2490,
305,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What play has a loss of 2? | CREATE TABLE table_69153 (
"Club" text,
"Played" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text,
"Losing bonus" text,
"Points" text
) | SELECT "Played" FROM table_69153 WHERE "Lost" = '2' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3951,
27025,
41,
96,
254,
11158,
121,
1499,
6,
96,
15800,
15,
26,
121,
1499,
6,
96,
308,
10936,
29,
121,
1499,
6,
96,
434,
3481,
121,
1499,
6,
96,
22512,
7,
21,
121,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
15800,
15,
26,
121,
21680,
953,
834,
3951,
27025,
549,
17444,
427,
96,
434,
3481,
121,
3274,
3,
31,
357,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Name the class for 4th position with year before 2006 | CREATE TABLE table_name_67 (
class VARCHAR,
pos VARCHAR,
year VARCHAR
) | SELECT class FROM table_name_67 WHERE pos = "4th" AND year < 2006 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3708,
41,
853,
584,
4280,
28027,
6,
3,
2748,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
853,
21,
314,
189,
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,
853,
21680,
953,
834,
4350,
834,
3708,
549,
17444,
427,
3,
2748,
3274,
96,
591,
189,
121,
3430,
215,
3,
2,
3581,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Name the copa libertadores 1992 for round of 16 and team of fluminense | CREATE TABLE table_1166 (
"Team" text,
"Copa Libertadores 1992" text,
"Supercopa Sudamericana 1992" text,
"Copa CONMEBOL 1992" text,
"Recopa Sudamericana 1992" text,
"Intercontinental Cup 1992" text
) | SELECT "Copa Libertadores 1992" FROM table_1166 WHERE "Copa CONMEBOL 1992" = 'Round of 16' AND "Team" = 'Fluminense' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2596,
3539,
41,
96,
18699,
121,
1499,
6,
96,
3881,
102,
9,
12774,
17,
10097,
7,
9047,
121,
1499,
6,
96,
23290,
10845,
9,
9010,
23064,
29,
9,
9047,
121,
1499,
6,
96,
3881,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3881,
102,
9,
12774,
17,
10097,
7,
9047,
121,
21680,
953,
834,
2596,
3539,
549,
17444,
427,
96,
3881,
102,
9,
8472,
4369,
279,
5194,
9047,
121,
3274,
3,
31,
448,
32,
1106,
13,
898,
31,
3430,
96,
18699,
121,
... |
If the province is British Columbia, what is the Arabs 2001 total number? | CREATE TABLE table_1939367_1 (
arabs_2001 VARCHAR,
province VARCHAR
) | SELECT COUNT(arabs_2001) FROM table_1939367_1 WHERE province = "British Columbia" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2294,
3288,
519,
3708,
834,
536,
41,
21165,
7,
834,
23658,
584,
4280,
28027,
6,
7985,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
156,
8,
7985,
19,
2390,
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,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
9,
7093,
7,
834,
23658,
61,
21680,
953,
834,
2294,
3288,
519,
3708,
834,
536,
549,
17444,
427,
7985,
3274,
96,
279,
13224,
7,
107,
8183,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the highest round number for donnie caraway? | CREATE TABLE table_name_6 (
round INTEGER,
name VARCHAR
) | SELECT MAX(round) FROM table_name_6 WHERE name = "donnie caraway" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
948,
41,
1751,
3,
21342,
17966,
6,
564,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2030,
1751,
381,
21,
103,
11113,
443,
8006,
58,
1,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
7775,
61,
21680,
953,
834,
4350,
834,
948,
549,
17444,
427,
564,
3274,
96,
26,
32,
11113,
443,
8006,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the highest measure number? | CREATE TABLE table_27942 (
"meas. num." real,
"passed" text,
"YES votes" real,
"NO votes" real,
"% YES" text,
"Const. Amd.?" text,
"type" text,
"description" text
) | SELECT MAX("meas. num.") FROM table_27942 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2555,
4240,
357,
41,
96,
526,
9,
7,
5,
3,
5525,
535,
490,
6,
96,
3968,
15,
26,
121,
1499,
6,
96,
476,
3205,
11839,
121,
490,
6,
96,
7400,
11839,
121,
490,
6,
96,
1454... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
526,
9,
7,
5,
3,
5525,
5,
8512,
21680,
953,
834,
2555,
4240,
357,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which Nationality of the person has a Position on left wing? | CREATE TABLE table_name_30 (nationality VARCHAR, position VARCHAR) | SELECT nationality FROM table_name_30 WHERE position = "left wing" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1458,
41,
16557,
485,
584,
4280,
28027,
6,
1102,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
868,
485,
13,
8,
568,
65,
3,
9,
14258,
30,
646,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1157,
485,
21680,
953,
834,
4350,
834,
1458,
549,
17444,
427,
1102,
3274,
96,
17068,
3,
3108,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
How many losses for the team with less than 4 wins, more than 0 byes and 2510 against? | CREATE TABLE table_62067 (
"Mininera DFL" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
) | SELECT AVG("Losses") FROM table_62067 WHERE "Wins" < '4' AND "Against" = '2510' AND "Byes" > '0' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26898,
3708,
41,
96,
12858,
4899,
9,
309,
10765,
121,
1499,
6,
96,
18455,
7,
121,
490,
6,
96,
279,
10070,
121,
490,
6,
96,
434,
13526,
7,
121,
490,
6,
96,
308,
10936,
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,
71,
17217,
599,
121,
434,
13526,
7,
8512,
21680,
953,
834,
26898,
3708,
549,
17444,
427,
96,
18455,
7,
121,
3,
2,
3,
31,
591,
31,
3430,
96,
20749,
121,
3274,
3,
31,
1828,
1714,
31,
3430,
96,
279,
10070,
121,
249... |
Show ids for all students who live in CHI. | CREATE TABLE Student (
StuID VARCHAR,
city_code VARCHAR
) | SELECT StuID FROM Student WHERE city_code = "CHI" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
6341,
41,
3,
13076,
4309,
584,
4280,
28027,
6,
690,
834,
4978,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
3111,
3,
23,
26,
7,
21,
66,
481,
113,
619,
16,
3,
17226,
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,
3,
13076,
4309,
21680,
6341,
549,
17444,
427,
690,
834,
4978,
3274,
96,
17226,
121,
1,
-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 start date and time of the walk that ends March 28, 2005, 11:31? | CREATE TABLE table_22385461_6 (start___utc__ VARCHAR, end__utc_ VARCHAR) | SELECT start___utc__ FROM table_22385461_6 WHERE end__utc_ = "March 28, 2005, 11:31" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2884,
3747,
5062,
4241,
834,
948,
41,
10208,
834,
834,
834,
76,
17,
75,
834,
834,
584,
4280,
28027,
6,
414,
834,
834,
76,
17,
75,
834,
584,
4280,
28027,
61,
3,
32102,
321... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
456,
834,
834,
834,
76,
17,
75,
834,
834,
21680,
953,
834,
2884,
3747,
5062,
4241,
834,
948,
549,
17444,
427,
414,
834,
834,
76,
17,
75,
834,
3274,
96,
25019,
13719,
3105,
6,
850,
10,
3341,
121,
1,
-100,
-100,
-... |
how many cyclists finished with the speed of at least 47.000 ? | CREATE TABLE table_204_554 (
id number,
"rank" number,
"name" text,
"nation" text,
"time" text,
"speed" number,
"note" text
) | SELECT COUNT("name") FROM table_204_554 WHERE "speed" >= 47 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
3769,
591,
41,
3,
23,
26,
381,
6,
96,
6254,
121,
381,
6,
96,
4350,
121,
1499,
6,
96,
29,
257,
121,
1499,
6,
96,
715,
121,
1499,
6,
96,
9993,
121,
381,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
4350,
8512,
21680,
953,
834,
26363,
834,
3769,
591,
549,
17444,
427,
96,
9993,
121,
2490,
2423,
10635,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
when was patient 007-849 prescribed with a drug via sl route for the last time during the current hospital visit? | CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE 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 patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
) | SELECT medication.drugstarttime FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '007-849' AND patient.hospitaldischargetime IS NULL)) AND medication.routeadmin = 'sl' ORDER BY medication.drugstarttime DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
583,
41,
583,
23,
26,
381,
6,
775,
12417,
1499,
6,
1868,
15878,
3734,
21545,
23,
26,
381,
6,
605,
6137,
1499,
6,
605,
23,
26,
381,
6,
1567,
715,
97,
6,
583,
381,
3,
61,
3,
3210... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
7757,
5,
26,
13534,
10208,
715,
21680,
7757,
549,
17444,
427,
7757,
5,
10061,
15129,
21545,
23,
26,
3388,
41,
23143,
14196,
1868,
5,
10061,
15129,
21545,
23,
26,
21680,
1868,
549,
17444,
427,
1868,
5,
10061,
15878,
37... |
Give me a histogram for what are the naems of all the projects, and how many scientists were assigned to each of them?, and show y-axis in desc order. | CREATE TABLE AssignedTo (
Scientist int,
Project char(4)
)
CREATE TABLE Scientists (
SSN int,
Name Char(30)
)
CREATE TABLE Projects (
Code Char(4),
Name Char(50),
Hours int
) | SELECT Name, COUNT(*) FROM Projects AS T1 JOIN AssignedTo AS T2 ON T1.Code = T2.Project GROUP BY T1.Name ORDER BY COUNT(*) DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
282,
15532,
3696,
41,
21166,
16,
17,
6,
2786,
3,
4059,
10820,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
21166,
7,
41,
180,
8544,
16,
17,
6,
5570,
7435,
599,
1458,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
5570,
6,
2847,
17161,
599,
1935,
61,
21680,
2786,
7,
6157,
332,
536,
3,
15355,
3162,
282,
15532,
3696,
6157,
332,
357,
9191,
332,
5411,
22737,
3274,
332,
4416,
3174,
11827,
350,
4630,
6880,
272,
476,
332,
5411,
23954,... |
what is the cfl team where college is waterloo? | CREATE TABLE table_29212 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
) | SELECT COUNT("CFL Team") FROM table_29212 WHERE "College" = 'Waterloo' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3166,
24837,
41,
96,
345,
3142,
1713,
121,
490,
6,
96,
254,
10765,
2271,
121,
1499,
6,
96,
15800,
49,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
9939,
7883,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
254,
10765,
2271,
8512,
21680,
953,
834,
3166,
24837,
549,
17444,
427,
96,
9939,
7883,
121,
3274,
3,
31,
28632,
40,
32,
32,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
count the number of patients whose primary disease is gastrointestinal bleed and admission year is less than 2124? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE 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 WHERE demographic.diagnosis = "GASTROINTESTINAL BLEED" AND demographic.admityear < "2124" | [
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,
25930,
4844,
159,
3274,
96,
6302,
134,
22749,
21342,
134,
25424,
4090,
272,
3765,
2326,
121,
3430,
... |
Which League has a Venue of martin luther king, jr. recreation center? | CREATE TABLE table_67625 (
"Club" text,
"Sport" text,
"League" text,
"Venue" text,
"Championships (Years)" text
) | SELECT "League" FROM table_67625 WHERE "Venue" = 'martin luther king, jr. recreation center' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3708,
948,
1828,
41,
96,
254,
11158,
121,
1499,
6,
96,
17682,
121,
1499,
6,
96,
2796,
9,
5398,
121,
1499,
6,
96,
553,
35,
76,
15,
121,
1499,
6,
96,
254,
1483,
12364,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
2796,
9,
5398,
121,
21680,
953,
834,
3708,
948,
1828,
549,
17444,
427,
96,
553,
35,
76,
15,
121,
3274,
3,
31,
1635,
17,
77,
3,
40,
76,
189,
49,
3,
1765,
6,
3,
354,
52,
5,
17711,
1530,
31,
1,
-100,
-100,
... |
Who is the manufacturer for the date of June 22? | CREATE TABLE table_24853 (
"Year" text,
"Date" text,
"Driver" text,
"Team" text,
"Manufacturer" text,
"Laps" text,
"Miles (km)" text,
"Race Time" text,
"Average Speed (mph)" text,
"Report" text
) | SELECT "Manufacturer" FROM table_24853 WHERE "Date" = 'June 22' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2266,
4433,
519,
41,
96,
476,
2741,
121,
1499,
6,
96,
308,
342,
121,
1499,
6,
96,
20982,
52,
121,
1499,
6,
96,
18699,
121,
1499,
6,
96,
7296,
76,
8717,
450,
49,
121,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
7296,
76,
8717,
450,
49,
121,
21680,
953,
834,
2266,
4433,
519,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
683,
444,
1630,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
what is the score when the tie no is 28? | CREATE TABLE table_name_97 (score VARCHAR, tie_no VARCHAR) | SELECT score FROM table_name_97 WHERE tie_no = 28 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4327,
41,
7,
9022,
584,
4280,
28027,
6,
6177,
834,
29,
32,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
125,
19,
8,
2604,
116,
8,
6177,
150,
19,
2059,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2604,
21680,
953,
834,
4350,
834,
4327,
549,
17444,
427,
6177,
834,
29,
32,
3274,
2059,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is average age of patients whose admission type is urgent and admission year is greater than or equal to 2176? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
) | SELECT AVG(demographic.age) FROM demographic WHERE demographic.admission_type = "URGENT" AND demographic.admityear >= "2176" | [
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,
71,
17217,
599,
1778,
16587,
5,
545,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
9,
26,
5451,
834,
6137,
3274,
96,
5905,
517,
6431,
121,
3430,
14798,
5,
20466,
17,
1201,
2490,
2423,
96,
2658,
3959,
121,
1,
-100,
... |
Name the highest Draw which has a Rank of 14, and a Televotes larger than 908? | CREATE TABLE table_name_77 (draw INTEGER, rank VARCHAR, televotes VARCHAR) | SELECT MAX(draw) FROM table_name_77 WHERE rank = 14 AND televotes > 908 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4013,
41,
19489,
3,
21342,
17966,
6,
11003,
584,
4280,
28027,
6,
3,
1931,
1621,
1422,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
2030,
19183,
84... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4800,
4,
599,
19489,
61,
21680,
953,
834,
4350,
834,
4013,
549,
17444,
427,
11003,
3274,
968,
3430,
3,
1931,
1621,
1422,
2490,
2777,
927,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
provide the number of patients whose religion is christian scientist and item id is 50811 | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.religion = "CHRISTIAN SCIENTIST" AND lab.itemid = "50811" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7690,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7690,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
A stacked bar graph shows the total number of captains categorize by ranks of different classes. | CREATE TABLE Ship (
Ship_ID int,
Name text,
Type text,
Built_Year real,
Class text,
Flag text
)
CREATE TABLE captain (
Captain_ID int,
Name text,
Ship_ID int,
age text,
Class text,
Rank text
) | SELECT Class, COUNT(Class) FROM captain GROUP BY Rank, Class | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
15508,
41,
15508,
834,
4309,
16,
17,
6,
5570,
1499,
6,
6632,
1499,
6,
14862,
834,
476,
2741,
490,
6,
4501,
1499,
6,
17016,
1499,
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,
4501,
6,
2847,
17161,
599,
21486,
61,
21680,
14268,
350,
4630,
6880,
272,
476,
3,
22557,
6,
4501,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What Time is listed for the Loss of Okajima (1-2)? | CREATE TABLE table_name_72 (
time VARCHAR,
loss VARCHAR
) | SELECT time FROM table_name_72 WHERE loss = "okajima (1-2)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5865,
41,
97,
584,
4280,
28027,
6,
1453,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
2900,
19,
2616,
21,
8,
3144,
7,
13,
8872,
17815,
51,
9,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
97,
21680,
953,
834,
4350,
834,
5865,
549,
17444,
427,
1453,
3274,
96,
1825,
17815,
51,
9,
41,
9596,
61,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
find out the procedure icd9 code and death status of patient with patient id 8440. | 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 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 demographic.expire_flag, procedures.icd9_code FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "8440" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
14798,
5,
994,
2388,
15,
834,
89,
5430,
6,
4293,
5,
447,
26,
1298,
834,
4978,
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,
17... |
Who are all the major users of the Gordon Close-Support Weapon System? | CREATE TABLE table_31149 (
"Name/ designation" text,
"Year of intro" real,
"Country of origin" text,
"Primary cartridge" text,
"Major users" text
) | SELECT "Major users" FROM table_31149 WHERE "Name/ designation" = 'Gordon Close-Support Weapon System' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3341,
24816,
41,
96,
23954,
87,
21767,
121,
1499,
6,
96,
476,
2741,
13,
16728,
121,
490,
6,
96,
10628,
651,
13,
5233,
121,
1499,
6,
96,
7855,
51,
1208,
16041,
121,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
329,
9,
12775,
1105,
121,
21680,
953,
834,
3341,
24816,
549,
17444,
427,
96,
23954,
87,
21767,
121,
3274,
3,
31,
517,
127,
2029,
9084,
18,
134,
413,
1493,
30785,
2149,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which Mall has 140 stores? | CREATE TABLE table_name_3 (
mall_name VARCHAR,
stores VARCHAR
) | SELECT mall_name FROM table_name_3 WHERE stores = "140" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
519,
41,
13912,
834,
4350,
584,
4280,
28027,
6,
3253,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
13552,
65,
11397,
3253,
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,
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,
13912,
834,
4350,
21680,
953,
834,
4350,
834,
519,
549,
17444,
427,
3253,
3274,
96,
22012,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who directed the episode with 3.19 million u.s. viewers? | CREATE TABLE table_12722302_2 (
directed_by VARCHAR,
us_viewers__million_ VARCHAR
) | SELECT directed_by FROM table_12722302_2 WHERE us_viewers__million_ = "3.19" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
22367,
2884,
1458,
357,
834,
357,
41,
6640,
834,
969,
584,
4280,
28027,
6,
178,
834,
4576,
277,
834,
834,
17030,
834,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
6640,
834,
969,
21680,
953,
834,
22367,
2884,
1458,
357,
834,
357,
549,
17444,
427,
178,
834,
4576,
277,
834,
834,
17030,
834,
3274,
96,
5787,
2294,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What format is CBC Radio 2? | CREATE TABLE table_name_84 (
format VARCHAR,
branding VARCHAR
) | SELECT format FROM table_name_84 WHERE branding = "cbc radio 2" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4608,
41,
1910,
584,
4280,
28027,
6,
14282,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
1910,
19,
3,
27403,
5061,
204,
58,
1,
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,
1910,
21680,
953,
834,
4350,
834,
4608,
549,
17444,
427,
14282,
3274,
96,
75,
115,
75,
2252,
204,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Who played hte home team when the score was 2:1? | CREATE TABLE table_name_45 (home VARCHAR, score VARCHAR) | SELECT home FROM table_name_45 WHERE score = "2:1" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2128,
41,
5515,
584,
4280,
28027,
6,
2604,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
1944,
3,
107,
17,
15,
234,
372,
116,
8,
2604,
47,
27078,
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,
234,
21680,
953,
834,
4350,
834,
2128,
549,
17444,
427,
2604,
3274,
96,
357,
10,
536,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
How many people were in attendance when the group position was 3rd? | CREATE TABLE table_name_56 (
attendance VARCHAR,
group_position VARCHAR
) | SELECT attendance FROM table_name_56 WHERE group_position = "3rd" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4834,
41,
11364,
584,
4280,
28027,
6,
563,
834,
4718,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
151,
130,
16,
11364,
116,
8,
563,
1102,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
11364,
21680,
953,
834,
4350,
834,
4834,
549,
17444,
427,
563,
834,
4718,
3274,
96,
519,
52,
26,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the least amount of losses for the team that had more than 0 draws during the seasons earlier than 1926? | CREATE TABLE table_35620 (
"Season" real,
"Team" text,
"Wins" real,
"Losses" real,
"Draws" real
) | SELECT MIN("Losses") FROM table_35620 WHERE "Draws" > '0' AND "Season" < '1926' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2469,
26898,
41,
96,
134,
15,
9,
739,
121,
490,
6,
96,
18699,
121,
1499,
6,
96,
18455,
7,
121,
490,
6,
96,
434,
13526,
7,
121,
490,
6,
96,
308,
10936,
7,
121,
490,
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,
17684,
599,
121,
434,
13526,
7,
8512,
21680,
953,
834,
2469,
26898,
549,
17444,
427,
96,
308,
10936,
7,
121,
2490,
3,
31,
632,
31,
3430,
96,
134,
15,
9,
739,
121,
3,
2,
3,
31,
2294,
2688,
31,
1,
-100,
-100,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.