NATURAL_LANG stringlengths 0 446 | SCHEMA stringlengths 27 2.21k | SQL stringlengths 18 453 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|
Show the average age of members for each coffee shop address in a bar chart. | CREATE TABLE shop (
Shop_ID int,
Address text,
Num_of_staff text,
Score real,
Open_Year text
)
CREATE TABLE happy_hour_member (
HH_ID int,
Member_ID int,
Total_amount real
)
CREATE TABLE member (
Member_ID int,
Name text,
Membership_card text,
Age int,
Time_of_purchase int,
Level_of_membership int,
Address text
)
CREATE TABLE happy_hour (
HH_ID int,
Shop_ID int,
Month text,
Num_of_shaff_in_charge int
) | SELECT Address, AVG(Age) FROM member GROUP BY Address ORDER BY Time_of_purchase | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1814,
41,
3687,
834,
4309,
16,
17,
6,
13246,
1499,
6,
1174,
51,
834,
858,
834,
26416,
1499,
6,
17763,
490,
6,
2384,
834,
476,
2741,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
13246,
6,
71,
17217,
599,
188,
397,
61,
21680,
1144,
350,
4630,
6880,
272,
476,
13246,
4674,
11300,
272,
476,
2900,
834,
858,
834,
29446,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What's utah's lowest swimsuit with an interview over 8.53? | CREATE TABLE table_name_43 (
swimsuit INTEGER,
state VARCHAR,
interview VARCHAR
) | SELECT MIN(swimsuit) FROM table_name_43 WHERE state = "utah" AND interview > 8.53 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4906,
41,
9728,
7628,
3,
21342,
17966,
6,
538,
584,
4280,
28027,
6,
2772,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
31,
7,
3,
76,
17,
9,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3,
17684,
599,
7,
210,
603,
7628,
61,
21680,
953,
834,
4350,
834,
4906,
549,
17444,
427,
538,
3274,
96,
76,
17,
9,
107,
121,
3430,
2772,
2490,
4848,
4867,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the number of gold for the country ranked 19? | CREATE TABLE table_65872 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT SUM("Gold") FROM table_65872 WHERE "Rank" = '19' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4122,
4225,
357,
41,
96,
22557,
121,
1499,
6,
96,
567,
257,
121,
1499,
6,
96,
23576,
121,
490,
6,
96,
134,
173,
624,
121,
490,
6,
96,
22780,
29,
776,
121,
490,
6,
96,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
121,
23576,
8512,
21680,
953,
834,
4122,
4225,
357,
549,
17444,
427,
96,
22557,
121,
3274,
3,
31,
2294,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the race for the world championship formula 1 at a venue of hungaroring? | CREATE TABLE table_47607 (
"Race" text,
"Date" text,
"Venue" text,
"Winner" text,
"Notes" text
) | SELECT "Race" FROM table_47607 WHERE "Notes" = 'world championship formula 1' AND "Venue" = 'hungaroring' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
3959,
4560,
41,
96,
448,
3302,
121,
1499,
6,
96,
308,
342,
121,
1499,
6,
96,
553,
35,
76,
15,
121,
1499,
6,
96,
18455,
687,
121,
1499,
6,
96,
10358,
15,
7,
121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
448,
3302,
121,
21680,
953,
834,
591,
3959,
4560,
549,
17444,
427,
96,
10358,
15,
7,
121,
3274,
3,
31,
7276,
10183,
5403,
209,
31,
3430,
96,
553,
35,
76,
15,
121,
3274,
3,
31,
6668,
291,
127,
53,
31,
1,
-1... |
What tournament was played on Feb 3, 1991? | CREATE TABLE table_40833 (
"Date" text,
"Tournament" text,
"Winning score" text,
"Margin of victory" text,
"Runner(s)-up" text
) | SELECT "Tournament" FROM table_40833 WHERE "Date" = 'feb 3, 1991' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2445,
4591,
519,
41,
96,
308,
342,
121,
1499,
6,
96,
382,
1211,
20205,
17,
121,
1499,
6,
96,
518,
10503,
2604,
121,
1499,
6,
96,
7286,
122,
77,
13,
6224,
121,
1499,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
382,
1211,
20205,
17,
121,
21680,
953,
834,
2445,
4591,
519,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
89,
15,
115,
6180,
9957,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
how many hours have it been since patient 006-202970 was admitted in the icu? | 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 treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime 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 lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime 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 microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
) | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.unitadmittime)) FROM patient WHERE patient.uniquepid = '006-202970' AND patient.unitdischargetime IS NULL | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3362,
4267,
32,
4370,
41,
3362,
4267,
32,
26,
1294,
26,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
2912,
381,
6,
3,
7,
9,
32,
357,
381,
6,
842,
2206,
381,
6,
14114,
257,
381,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
997,
1429,
41,
13733,
6245,
15382,
599,
31,
1454,
354,
31,
6,
3,
5211,
12224,
6431,
834,
382,
15382,
9960,
61,
3,
18,
3,
13733,
6245,
15382,
599,
31,
1454,
354,
31,
6,
1868,
5,
15129,
20466,
17,
715,
61,
61,
216... |
Where did he finish when he started at 21.6? | CREATE TABLE table_2649597_1 (
finish VARCHAR,
start VARCHAR
) | SELECT COUNT(finish) FROM table_2649597_1 WHERE start = "21.6" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26755,
3301,
4327,
834,
536,
41,
1992,
584,
4280,
28027,
6,
456,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2840,
410,
3,
88,
1992,
116,
3,
88,
708,
44,
204,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
25535,
61,
21680,
953,
834,
26755,
3301,
4327,
834,
536,
549,
17444,
427,
456,
3274,
96,
357,
15062,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What County has a Median Family Income of $79,331? | CREATE TABLE table_name_3 (county VARCHAR, median_family_income VARCHAR) | SELECT county FROM table_name_3 WHERE median_family_income = "$79,331" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
519,
41,
13362,
63,
584,
4280,
28027,
6,
15572,
834,
15474,
834,
15759,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
1334,
65,
3,
9,
3159,
29,
3712,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5435,
21680,
953,
834,
4350,
834,
519,
549,
17444,
427,
15572,
834,
15474,
834,
15759,
3274,
96,
3229,
4440,
6,
519,
3341,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Name the total number of troops per one million being 2.76 | CREATE TABLE table_31482 (
"Country" text,
"Number of Troops" real,
"% of Total Troops" text,
"Troops per one million population" text,
"Troops per $1 billion ( USD ) GDP" text
) | SELECT COUNT("Troops per one million population") FROM table_31482 WHERE "Troops per $1 billion ( USD ) GDP" = '2.76' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3341,
3707,
357,
41,
96,
10628,
651,
121,
1499,
6,
96,
567,
5937,
49,
13,
7080,
9280,
121,
490,
6,
96,
1454,
13,
9273,
7080,
9280,
121,
1499,
6,
96,
382,
52,
6631,
7,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
382,
52,
6631,
7,
399,
80,
770,
2074,
8512,
21680,
953,
834,
3341,
3707,
357,
549,
17444,
427,
96,
382,
52,
6631,
7,
399,
1970,
2108,
41,
9513,
3,
61,
11284,
121,
3274,
3,
31,
4416,
3959,
... |
What is the Away team score when they played Geelong as the Home team? | CREATE TABLE table_name_15 (
away_team VARCHAR,
home_team VARCHAR
) | SELECT away_team AS score FROM table_name_15 WHERE home_team = "geelong" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1808,
41,
550,
834,
11650,
584,
4280,
28027,
6,
234,
834,
11650,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
71,
1343,
372,
2604,
116,
79... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
550,
834,
11650,
6157,
2604,
21680,
953,
834,
4350,
834,
1808,
549,
17444,
427,
234,
834,
11650,
3274,
96,
397,
15,
2961,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What was the attendance when they played at Dallas Cowboys? | CREATE TABLE table_9765 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) | SELECT "Attendance" FROM table_9765 WHERE "Opponent" = 'at dallas cowboys' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4327,
4122,
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,
490,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
188,
17,
324,
26,
663,
121,
21680,
953,
834,
4327,
4122,
549,
17444,
427,
96,
667,
102,
9977,
121,
3274,
3,
31,
144,
836,
195,
9,
7,
9321,
7531,
7,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the latitude of the 0 diameter? | CREATE TABLE table_name_18 (
latitude VARCHAR,
diameter__km_ VARCHAR
) | SELECT latitude FROM table_name_18 WHERE diameter__km_ = 0 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2606,
41,
50,
6592,
584,
4280,
28027,
6,
9260,
834,
834,
5848,
834,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
50,
6592,
13,
8,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
50,
6592,
21680,
953,
834,
4350,
834,
2606,
549,
17444,
427,
9260,
834,
834,
5848,
834,
3274,
3,
632,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the highest number of division championships where playoff berths were 11? | CREATE TABLE table_2063 (
"Teams With Division Titles" text,
"Division Championships" real,
"Playoff Berths" real,
"AFC Titles" real,
"Super Bowl Wins" real
) | SELECT MAX("Division Championships") FROM table_2063 WHERE "Playoff Berths" = '11' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1755,
3891,
41,
96,
18699,
7,
438,
6022,
11029,
7,
121,
1499,
6,
96,
308,
23,
6610,
7666,
7,
121,
490,
6,
96,
15800,
1647,
5653,
189,
7,
121,
490,
6,
96,
188,
5390,
110... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
121,
308,
23,
6610,
7666,
7,
8512,
21680,
953,
834,
1755,
3891,
549,
17444,
427,
96,
15800,
1647,
5653,
189,
7,
121,
3274,
3,
31,
2596,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
WHAT IS THE NAME WITH 01.0 10 light street? | CREATE TABLE table_name_63 (
name VARCHAR,
street_address VARCHAR
) | SELECT name FROM table_name_63 WHERE street_address = "01.0 10 light street" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3891,
41,
564,
584,
4280,
28027,
6,
2815,
834,
9,
26,
12039,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
21665,
6827,
1853,
445,
17683,
11951,
3,
10068... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
564,
21680,
953,
834,
4350,
834,
3891,
549,
17444,
427,
2815,
834,
9,
26,
12039,
3274,
96,
10068,
632,
335,
659,
2815,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name the chassis of 147 points and engine of ford cosworth dfx | CREATE TABLE table_name_43 (chassis VARCHAR, points VARCHAR, engine VARCHAR) | SELECT chassis FROM table_name_43 WHERE points = 147 AND engine = "ford cosworth dfx" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4906,
41,
524,
6500,
7,
584,
4280,
28027,
6,
979,
584,
4280,
28027,
6,
1948,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
22836,
13,
3,
24719,
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
22836,
21680,
953,
834,
4350,
834,
4906,
549,
17444,
427,
979,
3274,
3,
24719,
3430,
1948,
3274,
96,
2590,
576,
7,
7048,
3,
26,
89,
226,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What district did Donald Ray Matthews belong to? | CREATE TABLE table_1341865_11 (district VARCHAR, incumbent VARCHAR) | SELECT district FROM table_1341865_11 WHERE incumbent = "Donald Ray Matthews" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2606,
4122,
834,
2596,
41,
26,
23,
20066,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
3939,
410,
7459,
8279,
9771,
7,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3939,
21680,
953,
834,
23747,
2606,
4122,
834,
2596,
549,
17444,
427,
28406,
3274,
96,
13843,
138,
26,
8279,
9771,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
find the number of patients whose diagnosis short title was ac on chr syst hrt fail and had lab test for joint fluid. | 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
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Ac on chr syst hrt fail" AND lab.fluid = "Joint Fluid" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
14798,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
564,
1499,
6,
2774,
1947,
834,
8547,
302,
1499,
6,
1246,
1499,
6,
103,
115,
1499,
6,
7285,
1499,
6,
1612,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
3... |
Which record has john flemming as the opponent? | CREATE TABLE table_name_14 (record VARCHAR, opponent VARCHAR) | SELECT record FROM table_name_14 WHERE opponent = "john flemming" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2534,
41,
60,
7621,
584,
4280,
28027,
6,
15264,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
1368,
65,
3,
27341,
8079,
635,
53,
38,
8,
15264,
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,
1368,
21680,
953,
834,
4350,
834,
2534,
549,
17444,
427,
15264,
3274,
96,
27341,
8079,
635,
53,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
which area has a rank of 60? | CREATE TABLE table_2739 (
"Rank" real,
"Census-designated place" text,
"Metropolitan area" text,
"State" text,
"Population (2000 census)" real,
"Land area (mi 2 )" text,
"Population density (people per mi 2 )" text
) | SELECT "Metropolitan area" FROM table_2739 WHERE "Rank" = '60' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2555,
3288,
41,
96,
22557,
121,
490,
6,
96,
254,
35,
7,
302,
18,
9124,
920,
286,
121,
1499,
6,
96,
329,
15252,
21631,
29,
616,
121,
1499,
6,
96,
134,
4748,
121,
1499,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
329,
15252,
21631,
29,
616,
121,
21680,
953,
834,
2555,
3288,
549,
17444,
427,
96,
22557,
121,
3274,
3,
31,
3328,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
In which host city was Margaret Thatcher the President-in-Office in 1981? | CREATE TABLE table_51628 (
"Year" real,
"Date" text,
"Type" text,
"EU Council presidency" text,
"President-in-Office" text,
"Host city" text
) | SELECT "Host city" FROM table_51628 WHERE "President-in-Office" = 'margaret thatcher' AND "Year" = '1981' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
755,
2938,
2577,
41,
96,
476,
2741,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
25160,
121,
1499,
6,
96,
12062,
2063,
27405,
121,
1499,
6,
96,
345,
15704,
18,
77,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
566,
3481,
690,
121,
21680,
953,
834,
755,
2938,
2577,
549,
17444,
427,
96,
345,
15704,
18,
77,
18,
22098,
121,
3274,
3,
31,
1635,
1478,
15,
17,
24,
1703,
31,
3430,
96,
476,
2741,
121,
3274,
3,
31,
2294,
495... |
What is Season, when Prize is '$100,000'? | CREATE TABLE table_name_37 (
season VARCHAR,
prize VARCHAR
) | SELECT season FROM table_name_37 WHERE prize = "$100,000" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4118,
41,
774,
584,
4280,
28027,
6,
6441,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
7960,
6,
116,
11329,
19,
3,
31,
3229,
2915,
6,
2313,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
774,
21680,
953,
834,
4350,
834,
4118,
549,
17444,
427,
6441,
3274,
96,
3229,
2915,
6,
2313,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Which series number had the production code of 116 | CREATE TABLE table_15938543_1 (no_in_series VARCHAR, production_code VARCHAR) | SELECT no_in_series FROM table_15938543_1 WHERE production_code = 116 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1808,
4271,
4433,
4906,
834,
536,
41,
29,
32,
834,
77,
834,
10833,
7,
584,
4280,
28027,
6,
999,
834,
4978,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
939,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
150,
834,
77,
834,
10833,
7,
21680,
953,
834,
1808,
4271,
4433,
4906,
834,
536,
549,
17444,
427,
999,
834,
4978,
3274,
3,
20159,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is team 1 when the 1st leg is 92-82? | CREATE TABLE table_64689 (
"Team #1" text,
"Agg." text,
"Team #2" text,
"1st leg" text,
"2nd leg" text
) | SELECT "Team #1" FROM table_64689 WHERE "1st leg" = '92-82' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4389,
948,
3914,
41,
96,
18699,
7172,
121,
1499,
6,
96,
188,
4102,
535,
1499,
6,
96,
18699,
15493,
121,
1499,
6,
96,
536,
7,
17,
4553,
121,
1499,
6,
96,
357,
727,
4553,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
18699,
7172,
121,
21680,
953,
834,
4389,
948,
3914,
549,
17444,
427,
96,
536,
7,
17,
4553,
121,
3274,
3,
31,
4508,
18,
4613,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who was the opponent for the game played with 54,136 people in attendance? | CREATE TABLE table_name_38 (opponent VARCHAR, attendance VARCHAR) | SELECT opponent FROM table_name_38 WHERE attendance = "54,136" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3747,
41,
32,
102,
9977,
584,
4280,
28027,
6,
11364,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
8,
15264,
21,
8,
467,
1944,
28,
10630,
6,
234... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15264,
21680,
953,
834,
4350,
834,
3747,
549,
17444,
427,
11364,
3274,
96,
5062,
6,
23459,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which state has a 2010-05-01 (saa) association agreement? | CREATE TABLE table_name_36 (
state VARCHAR,
association_agreement VARCHAR
) | SELECT state FROM table_name_36 WHERE association_agreement = "2010-05-01 (saa)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3420,
41,
538,
584,
4280,
28027,
6,
6028,
834,
9,
3584,
1194,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
538,
65,
3,
9,
2735,
18,
3076,
14772,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
538,
21680,
953,
834,
4350,
834,
3420,
549,
17444,
427,
6028,
834,
9,
3584,
1194,
3274,
96,
14926,
18,
3076,
14772,
41,
7,
9,
9,
61,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
When salt of this sea is the english title who is the director? | CREATE TABLE table_28781 (
"Year (Ceremony)" text,
"English title" text,
"Arabic title" text,
"Director" text,
"Result" text
) | SELECT "Director" FROM table_28781 WHERE "English title" = 'Salt of this Sea' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2577,
3940,
536,
41,
96,
476,
2741,
41,
254,
49,
15,
21208,
61,
121,
1499,
6,
96,
26749,
2233,
121,
1499,
6,
96,
188,
7093,
447,
2233,
121,
1499,
6,
96,
23620,
127,
121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
23620,
127,
121,
21680,
953,
834,
2577,
3940,
536,
549,
17444,
427,
96,
26749,
2233,
121,
3274,
3,
31,
134,
2920,
13,
48,
3319,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Tell me the average top 10 for cuts made less than 10, wins less than 1 and top 25 of 5 | CREATE TABLE table_name_42 (top_10 INTEGER, cuts_made VARCHAR, wins VARCHAR, top_25 VARCHAR) | SELECT AVG(top_10) FROM table_name_42 WHERE wins < 1 AND top_25 = 5 AND cuts_made < 10 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4165,
41,
2916,
834,
1714,
3,
21342,
17966,
6,
8620,
834,
4725,
584,
4280,
28027,
6,
9204,
584,
4280,
28027,
6,
420,
834,
1828,
584,
4280,
28027,
61,
3,
32102,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
2916,
834,
16968,
21680,
953,
834,
4350,
834,
4165,
549,
17444,
427,
9204,
3,
2,
209,
3430,
420,
834,
1828,
3274,
305,
3430,
8620,
834,
4725,
3,
2,
335,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the smallest capacity for Fandok? | CREATE TABLE table_name_84 (capacity INTEGER, team VARCHAR) | SELECT MIN(capacity) FROM table_name_84 WHERE team = "fandok" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4608,
41,
4010,
9,
6726,
3,
21342,
17966,
6,
372,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
3,
17924,
2614,
21,
377,
232,
1825,
58,
1,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
4010,
9,
6726,
61,
21680,
953,
834,
4350,
834,
4608,
549,
17444,
427,
372,
3274,
96,
89,
232,
1825,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Which School has an IHSAA Class of aaa, and a Mascot of saints? | CREATE TABLE table_63308 (
"School" text,
"Mascot" text,
"Enrollment" real,
"IHSAA Class" text,
"IHSAA Football Class" text
) | SELECT "School" FROM table_63308 WHERE "IHSAA Class" = 'aaa' AND "Mascot" = 'saints' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3891,
1458,
927,
41,
96,
29364,
121,
1499,
6,
96,
329,
9,
7,
4310,
121,
1499,
6,
96,
8532,
4046,
297,
121,
490,
6,
96,
196,
4950,
5498,
4501,
121,
1499,
6,
96,
196,
495... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
29364,
121,
21680,
953,
834,
3891,
1458,
927,
549,
17444,
427,
96,
196,
4950,
5498,
4501,
121,
3274,
3,
31,
9,
9,
9,
31,
3430,
96,
329,
9,
7,
4310,
121,
3274,
3,
31,
7,
9,
77,
17,
7,
31,
1,
-100,
-100,
... |
In heat 4, what is Byun Hye-young's Nationality? | CREATE TABLE table_name_62 (nationality VARCHAR, heat VARCHAR, name VARCHAR) | SELECT nationality FROM table_name_62 WHERE heat = 4 AND name = "byun hye-young" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4056,
41,
16557,
485,
584,
4280,
28027,
6,
1678,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
86,
1678,
6464,
125,
19,
938,
202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1157,
485,
21680,
953,
834,
4350,
834,
4056,
549,
17444,
427,
1678,
3274,
314,
3430,
564,
3274,
96,
969,
202,
3,
107,
63,
15,
18,
4188,
1725,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Name the 2009 for when 2007 is 3r and 2010 is q2 | CREATE TABLE table_name_52 (Id VARCHAR) | SELECT 2009 FROM table_name_52 WHERE 2007 = "3r" AND 2010 = "q2" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5373,
41,
196,
26,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
2464,
21,
116,
4101,
19,
220,
52,
11,
2735,
19,
3,
1824,
357,
1,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2464,
21680,
953,
834,
4350,
834,
5373,
549,
17444,
427,
4101,
3274,
96,
519,
52,
121,
3430,
2735,
3274,
96,
1824,
357,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
How many u.s. viewers (million) have a series # 83? | CREATE TABLE table_25123 (
"Series #" real,
"Season #" real,
"Episode title" text,
"Written by" text,
"Directed by" text,
"U.S. viewers (millions)" text,
"Original air date" text
) | SELECT "U.S. viewers (millions)" FROM table_25123 WHERE "Series #" = '83' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
14574,
41,
96,
12106,
7,
1713,
121,
490,
6,
96,
134,
15,
9,
739,
1713,
121,
490,
6,
96,
427,
102,
159,
32,
221,
2233,
121,
1499,
6,
96,
24965,
324,
57,
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,
1265,
5,
134,
5,
13569,
41,
17030,
7,
61,
121,
21680,
953,
834,
1828,
14574,
549,
17444,
427,
96,
12106,
7,
1713,
121,
3274,
3,
31,
4591,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
How many games featured a home team scoring 12.18 (90)? | CREATE TABLE table_33456 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT COUNT("Crowd") FROM table_33456 WHERE "Home team score" = '12.18 (90)' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4201,
2128,
948,
41,
96,
19040,
372,
121,
1499,
6,
96,
19040,
372,
2604,
121,
1499,
6,
96,
188,
1343,
372,
121,
1499,
6,
96,
188,
1343,
372,
2604,
121,
1499,
6,
96,
553,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
254,
3623,
26,
8512,
21680,
953,
834,
4201,
2128,
948,
549,
17444,
427,
96,
19040,
372,
2604,
121,
3274,
3,
31,
9368,
2606,
41,
2394,
61,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Which Year has an Edition of 41st? | CREATE TABLE table_name_58 (
year VARCHAR,
edition VARCHAR
) | SELECT year FROM table_name_58 WHERE edition = "41st" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3449,
41,
215,
584,
4280,
28027,
6,
4182,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
2929,
65,
46,
7504,
13,
8798,
7,
17,
58,
1,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
215,
21680,
953,
834,
4350,
834,
3449,
549,
17444,
427,
4182,
3274,
96,
4853,
7,
17,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
count the number of patients whose gender is f and age is less than 68? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE 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
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.age < "68" | [
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,
122,
3868,
3274,
96,
371,
121,
3430,
14798,
5,
545,
3,
2,
96,
3651,
121,
1,
-100,
-100,
-100,
... |
who was in the 2005 role when the original broadway cast was played by jesse l. martin? | CREATE TABLE table_26436_2 (original_broadway_cast VARCHAR) | SELECT 2005 AS _film FROM table_26436_2 WHERE original_broadway_cast = "Jesse L. Martin" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26755,
3420,
834,
357,
41,
21878,
834,
115,
8635,
1343,
834,
5254,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
113,
47,
16,
8,
3105,
1075,
116,
8,
926,
4358,
1343,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3105,
6157,
3,
834,
9988,
21680,
953,
834,
26755,
3420,
834,
357,
549,
17444,
427,
926,
834,
115,
8635,
1343,
834,
5254,
3274,
96,
683,
6119,
301,
5,
3394,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the engine code for the Xdrive25i? | CREATE TABLE table_name_76 (engine_code VARCHAR, model VARCHAR) | SELECT engine_code FROM table_name_76 WHERE model = "xdrive25i" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3959,
41,
20165,
834,
4978,
584,
4280,
28027,
6,
825,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1948,
1081,
21,
8,
3,
4,
13739,
1828,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1948,
834,
4978,
21680,
953,
834,
4350,
834,
3959,
549,
17444,
427,
825,
3274,
96,
226,
13739,
1828,
23,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Tell me the HDD capacity for # FDD larger than 0 when FDD capacity is 710kb | CREATE TABLE table_name_7 (hdd_capacity VARCHAR, _number_fdd VARCHAR, fdd_capacity__each_ VARCHAR) | SELECT hdd_capacity FROM table_name_7 WHERE _number_fdd > 0 AND fdd_capacity__each_ = "710kb" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
940,
41,
107,
26,
26,
834,
4010,
9,
6726,
584,
4280,
28027,
6,
3,
834,
5525,
1152,
834,
89,
26,
26,
584,
4280,
28027,
6,
3,
89,
26,
26,
834,
4010,
9,
6726,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
107,
26,
26,
834,
4010,
9,
6726,
21680,
953,
834,
4350,
834,
940,
549,
17444,
427,
3,
834,
5525,
1152,
834,
89,
26,
26,
2490,
3,
632,
3430,
3,
89,
26,
26,
834,
4010,
9,
6726,
834,
834,
15,
1836,
834,
3274,
... |
When was the earliest founded university? | CREATE TABLE table_261941_1 (
founded INTEGER
) | SELECT MIN(founded) FROM table_261941_1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2688,
2294,
4853,
834,
536,
41,
5710,
3,
21342,
17966,
3,
61,
3,
32102,
32103,
32101,
32103,
366,
47,
8,
3,
16454,
5710,
3819,
58,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
23329,
61,
21680,
953,
834,
2688,
2294,
4853,
834,
536,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name the colorado when alaska is connecticut | CREATE TABLE table_17425749_1 (colorado VARCHAR, alaska VARCHAR) | SELECT colorado FROM table_17425749_1 WHERE alaska = "Connecticut" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2517,
4165,
3436,
3647,
834,
536,
41,
8135,
19042,
584,
4280,
28027,
6,
491,
9,
10717,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
945,
9,
26,
32,
116,
49... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
945,
9,
26,
32,
21680,
953,
834,
2517,
4165,
3436,
3647,
834,
536,
549,
17444,
427,
491,
9,
10717,
3274,
96,
25772,
23,
3044,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Which Heat has a Nation of australia, and a Rank larger than 7? | CREATE TABLE table_13664 (
"Rank" real,
"Heat" real,
"Cyclist" text,
"Nation" text,
"Result" text
) | SELECT MAX("Heat") FROM table_13664 WHERE "Nation" = 'australia' AND "Rank" > '7' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23459,
4389,
41,
96,
22557,
121,
490,
6,
96,
3845,
144,
121,
490,
6,
96,
254,
63,
75,
3350,
121,
1499,
6,
96,
567,
257,
121,
1499,
6,
96,
20119,
121,
1499,
3,
61,
3,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
121,
3845,
144,
8512,
21680,
953,
834,
23459,
4389,
549,
17444,
427,
96,
567,
257,
121,
3274,
3,
31,
2064,
8792,
23,
9,
31,
3430,
96,
22557,
121,
2490,
3,
31,
940,
31,
1,
-100,
-100,
-100,
-100,
-1... |
Name the mens singles for 1989 | CREATE TABLE table_14903491_1 (
mens_singles VARCHAR,
year VARCHAR
) | SELECT mens_singles FROM table_14903491_1 WHERE year = 1989 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2534,
2394,
3710,
4729,
834,
536,
41,
1076,
7,
834,
7,
53,
965,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
1076,
7,
712,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1076,
7,
834,
7,
53,
965,
21680,
953,
834,
2534,
2394,
3710,
4729,
834,
536,
549,
17444,
427,
215,
3274,
9975,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the opposing team for the second test? | CREATE TABLE table_name_5 (
opposing_team VARCHAR,
status VARCHAR
) | SELECT opposing_team FROM table_name_5 WHERE status = "second test" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
755,
41,
10720,
53,
834,
11650,
584,
4280,
28027,
6,
2637,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
10720,
53,
372,
21,
8,
511,
794,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10720,
53,
834,
11650,
21680,
953,
834,
4350,
834,
755,
549,
17444,
427,
2637,
3274,
96,
12091,
794,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the number of patients who died in or before 2165 who had other electric countershock of heart? | 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
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dod_year <= "2165.0" AND procedures.short_title = "Heart countershock NEC" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7690,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
2118,
23,
26,
1499,
6,
5059,
715,
1499,
6,
5692,
1499,
6,
701,
834,
15129,
1499,
6,
3783,
1499,
6,
5798,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
What date was the record 20 16? | CREATE TABLE table_name_38 (
date VARCHAR,
record VARCHAR
) | SELECT date FROM table_name_38 WHERE record = "20–16" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3747,
41,
833,
584,
4280,
28027,
6,
1368,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
833,
47,
8,
1368,
460,
898,
58,
1,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
833,
21680,
953,
834,
4350,
834,
3747,
549,
17444,
427,
1368,
3274,
96,
1755,
104,
2938,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Where did Croatia lead? | CREATE TABLE table_name_1 (
lead VARCHAR,
nation VARCHAR
) | SELECT lead FROM table_name_1 WHERE nation = "croatia" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
536,
41,
991,
584,
4280,
28027,
6,
2982,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2840,
410,
19789,
991,
58,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
991,
21680,
953,
834,
4350,
834,
536,
549,
17444,
427,
2982,
3274,
96,
2771,
144,
23,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which Score has a Series of flyers lead 3 2? | CREATE TABLE table_name_17 (
score VARCHAR,
series VARCHAR
) | SELECT score FROM table_name_17 WHERE series = "flyers lead 3–2" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2517,
41,
2604,
584,
4280,
28027,
6,
939,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
17763,
65,
3,
9,
4531,
13,
3971,
277,
991,
220,
204,
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,
2604,
21680,
953,
834,
4350,
834,
2517,
549,
17444,
427,
939,
3274,
96,
89,
120,
277,
991,
220,
104,
357,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What are all the different product names, and how many complains has each received Show bar chart, and show in desc by the bars. | CREATE TABLE Complaints (
complaint_id INTEGER,
product_id INTEGER,
customer_id INTEGER,
complaint_outcome_code VARCHAR(20),
complaint_status_code VARCHAR(20),
complaint_type_code VARCHAR(20),
date_complaint_raised DATETIME,
date_complaint_closed DATETIME,
staff_id INTEGER
)
CREATE TABLE Products (
product_id INTEGER,
parent_product_id INTEGER,
product_category_code VARCHAR(20),
date_product_first_available DATETIME,
date_product_discontinued DATETIME,
product_name VARCHAR(80),
product_description VARCHAR(255),
product_price DECIMAL(19,4)
)
CREATE TABLE Staff (
staff_id INTEGER,
gender VARCHAR(1),
first_name VARCHAR(80),
last_name VARCHAR(80),
email_address VARCHAR(255),
phone_number VARCHAR(80)
)
CREATE TABLE Customers (
customer_id INTEGER,
customer_type_code VARCHAR(20),
address_line_1 VARCHAR(80),
address_line_2 VARCHAR(80),
town_city VARCHAR(80),
state VARCHAR(80),
email_address VARCHAR(255),
phone_number VARCHAR(80)
) | SELECT product_name, COUNT(*) FROM Products AS t1 JOIN Complaints AS t2 ON t1.product_id = t2.product_id GROUP BY t1.product_name ORDER BY product_name DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2570,
18689,
17,
7,
41,
10394,
834,
23,
26,
3,
21342,
17966,
6,
556,
834,
23,
26,
3,
21342,
17966,
6,
884,
834,
23,
26,
3,
21342,
17966,
6,
10394,
834,
670,
287,
15,
834,
4978,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
556,
834,
4350,
6,
2847,
17161,
599,
1935,
61,
21680,
7554,
6157,
3,
17,
536,
3,
15355,
3162,
2570,
18689,
17,
7,
6157,
3,
17,
357,
9191,
3,
17,
5411,
15892,
834,
23,
26,
3274,
3,
17,
4416,
15892,
834,
23,
26,
... |
What time did Channel 4 air an episode number larger than 106 with the title of Marry Me A Little? | CREATE TABLE table_name_74 (
time_of_airing_on_channel_4 VARCHAR,
episode_number VARCHAR,
title VARCHAR
) | SELECT time_of_airing_on_channel_4 FROM table_name_74 WHERE episode_number > 106 AND title = "marry me a little" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4581,
41,
97,
834,
858,
834,
2256,
53,
834,
106,
834,
19778,
834,
591,
584,
4280,
28027,
6,
5640,
834,
5525,
1152,
584,
4280,
28027,
6,
2233,
584,
4280,
28027,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
97,
834,
858,
834,
2256,
53,
834,
106,
834,
19778,
834,
591,
21680,
953,
834,
4350,
834,
4581,
549,
17444,
427,
5640,
834,
5525,
1152,
2490,
3,
16431,
3430,
2233,
3274,
96,
1635,
651,
140,
3,
9,
385,
121,
1,
-100,... |
Which syndicate is associated with the stars & stripes yacht? | CREATE TABLE table_54697 (
"Sail" text,
"Yacht" text,
"Syndicate" text,
"Yacht Club" text,
"Nation" text
) | SELECT "Syndicate" FROM table_54697 WHERE "Yacht" = 'stars & stripes' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
755,
4448,
4327,
41,
96,
134,
9,
173,
121,
1499,
6,
96,
476,
9,
3997,
121,
1499,
6,
96,
31715,
342,
121,
1499,
6,
96,
476,
9,
3997,
1949,
121,
1499,
6,
96,
567,
257,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
31715,
342,
121,
21680,
953,
834,
755,
4448,
4327,
549,
17444,
427,
96,
476,
9,
3997,
121,
3274,
3,
31,
3624,
7,
3,
184,
24428,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the Series, when the Season is after 2008, when the value for Podiums is 3, and when the Position is 8th? | CREATE TABLE table_name_28 (
series VARCHAR,
position VARCHAR,
season VARCHAR,
podiums VARCHAR
) | SELECT series FROM table_name_28 WHERE season > 2008 AND podiums = "3" AND position = "8th" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2577,
41,
939,
584,
4280,
28027,
6,
1102,
584,
4280,
28027,
6,
774,
584,
4280,
28027,
6,
22828,
7,
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,
1,
1,
1... | [
3,
23143,
14196,
939,
21680,
953,
834,
4350,
834,
2577,
549,
17444,
427,
774,
2490,
2628,
3430,
22828,
7,
3274,
96,
519,
121,
3430,
1102,
3274,
96,
927,
189,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who was first elected as the result of a retired republican gain in the district of ohio 21? | CREATE TABLE table_name_45 (first_elected VARCHAR, result VARCHAR, district VARCHAR) | SELECT first_elected FROM table_name_45 WHERE result = "retired republican gain" AND district = "ohio 21" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2128,
41,
14672,
834,
19971,
584,
4280,
28027,
6,
741,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
166,
8160,
38,
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,
0,
0... | [
3,
23143,
14196,
166,
834,
19971,
21680,
953,
834,
4350,
834,
2128,
549,
17444,
427,
741,
3274,
96,
10682,
1271,
20237,
152,
2485,
121,
3430,
3939,
3274,
96,
32,
107,
23,
32,
1401,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the Nielsen ranking for Season 8? | CREATE TABLE table_name_99 (
nielsen_ranking VARCHAR,
season VARCHAR
) | SELECT nielsen_ranking FROM table_name_99 WHERE season = "season 8" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3264,
41,
6691,
40,
7,
35,
834,
6254,
53,
584,
4280,
28027,
6,
774,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
30298,
11592,
21,
7960,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6691,
40,
7,
35,
834,
6254,
53,
21680,
953,
834,
4350,
834,
3264,
549,
17444,
427,
774,
3274,
96,
9476,
505,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
In what year was Lesli Margherita nominated? | CREATE TABLE table_46414 (
"Year" real,
"Award" text,
"Category" text,
"Nominee" text,
"Result" text
) | SELECT SUM("Year") FROM table_46414 WHERE "Nominee" = 'lesli margherita' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
4389,
2534,
41,
96,
476,
2741,
121,
490,
6,
96,
188,
2239,
121,
1499,
6,
96,
18610,
6066,
651,
121,
1499,
6,
96,
4168,
8695,
15,
121,
1499,
6,
96,
20119,
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,
180,
6122,
599,
121,
476,
2741,
8512,
21680,
953,
834,
591,
4389,
2534,
549,
17444,
427,
96,
4168,
8695,
15,
121,
3274,
3,
31,
965,
40,
23,
3157,
122,
88,
10694,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What are the first names and last names of students with address in Wisconsin state? | CREATE TABLE Students (
first_name VARCHAR,
last_name VARCHAR,
address_id VARCHAR
)
CREATE TABLE Addresses (
address_id VARCHAR,
state_province_county VARCHAR
) | SELECT T2.first_name, T2.last_name FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id = T2.address_id WHERE T1.state_province_county = "Wisconsin" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4375,
41,
166,
834,
4350,
584,
4280,
28027,
6,
336,
834,
4350,
584,
4280,
28027,
6,
1115,
834,
23,
26,
584,
4280,
28027,
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,
1... | [
3,
23143,
14196,
332,
4416,
14672,
834,
4350,
6,
332,
4416,
5064,
834,
4350,
21680,
13246,
15,
7,
6157,
332,
536,
3,
15355,
3162,
4375,
6157,
332,
357,
9191,
332,
5411,
9,
26,
12039,
834,
23,
26,
3274,
332,
4416,
9,
26,
12039,
834... |
Show the names and heights of buildings with at least two institutions founded after 1880 Plot them as bar chart, and list by the Y in ascending. | CREATE TABLE protein (
common_name text,
protein_name text,
divergence_from_human_lineage real,
accession_number text,
sequence_length real,
sequence_identity_to_human_protein text,
Institution_id text
)
CREATE TABLE Institution (
Institution_id text,
Institution text,
Location text,
Founded real,
Type text,
Enrollment int,
Team text,
Primary_Conference text,
building_id text
)
CREATE TABLE building (
building_id text,
Name text,
Street_address text,
Years_as_tallest text,
Height_feet int,
Floors int
) | SELECT Name, Height_feet FROM building AS T1 JOIN Institution AS T2 ON T1.building_id = T2.building_id WHERE T2.Founded > 1880 ORDER BY Height_feet | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3619,
41,
1017,
834,
4350,
1499,
6,
3619,
834,
4350,
1499,
6,
12355,
122,
1433,
834,
7152,
834,
12450,
834,
747,
545,
490,
6,
4991,
1938,
834,
5525,
1152,
1499,
6,
5932,
834,
19457,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
24231,
834,
89,
15,
15,
17,
21680,
740,
6157,
332,
536,
3,
15355,
3162,
14932,
6157,
332,
357,
9191,
332,
5411,
10905,
834,
23,
26,
3274,
332,
4416,
10905,
834,
23,
26,
549,
17444,
427,
332,
4416,
20100,
... |
Name the loss with record of 71-33 | CREATE TABLE table_name_4 (loss VARCHAR, record VARCHAR) | SELECT loss FROM table_name_4 WHERE record = "71-33" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
591,
41,
2298,
7,
584,
4280,
28027,
6,
1368,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
1453,
28,
1368,
13,
3,
4450,
18,
4201,
1,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1453,
21680,
953,
834,
4350,
834,
591,
549,
17444,
427,
1368,
3274,
96,
4450,
18,
4201,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Which date had 67,472 in attendance? | CREATE TABLE table_name_73 (date VARCHAR, attendance VARCHAR) | SELECT date FROM table_name_73 WHERE attendance = "67,472" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4552,
41,
5522,
584,
4280,
28027,
6,
11364,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
833,
141,
3,
3708,
6,
4177,
357,
16,
11364,
58,
1,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
833,
21680,
953,
834,
4350,
834,
4552,
549,
17444,
427,
11364,
3274,
96,
3708,
6,
4177,
357,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the average Money ( $ ), when Country is 'United States', and when To par is '+3'? | CREATE TABLE table_name_14 (
money___ INTEGER,
country VARCHAR,
to_par VARCHAR
) | SELECT AVG(money___) AS $__ FROM table_name_14 WHERE country = "united states" AND to_par = "+3" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2534,
41,
540,
834,
834,
834,
3,
21342,
17966,
6,
684,
584,
4280,
28027,
6,
12,
834,
1893,
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,
71,
17217,
599,
28442,
834,
834,
834,
61,
6157,
1514,
834,
834,
21680,
953,
834,
4350,
834,
2534,
549,
17444,
427,
684,
3274,
96,
15129,
15,
26,
2315,
121,
3430,
12,
834,
1893,
3274,
96,
1220,
519,
121,
1,
-100,
-... |
Which country first started using nuclear power plant(s)? | CREATE TABLE nuclear_power_plants (
id text,
name text,
latitude text,
longitude text,
country text,
status text,
reactortype text,
reactormodel text,
constructionstartat text,
operationalfrom text,
operationalto text,
capacity text,
lastupdatedat text,
source text
) | SELECT country FROM nuclear_power_plants ORDER BY operationalfrom LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
6414,
834,
6740,
834,
14925,
7,
41,
3,
23,
26,
1499,
6,
564,
1499,
6,
50,
6592,
1499,
6,
307,
20341,
1499,
6,
684,
1499,
6,
2637,
1499,
6,
24715,
6137,
1499,
6,
24715,
21770,
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,
684,
21680,
6414,
834,
6740,
834,
14925,
7,
4674,
11300,
272,
476,
7763,
7152,
8729,
12604,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
how many times is the jewel malachite? | CREATE TABLE table_28828 (
"Name" text,
"Jewel" text,
"Species" text,
"Gender" text,
"Jewel Power" text,
"Attribute" text,
"Birthday" text,
"Media Debut" text,
"Voice actor" text
) | SELECT COUNT("Birthday") FROM table_28828 WHERE "Jewel" = 'Malachite' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
4060,
2577,
41,
96,
23954,
121,
1499,
6,
96,
7851,
9803,
121,
1499,
6,
96,
7727,
725,
121,
1499,
6,
96,
517,
3868,
121,
1499,
6,
96,
7851,
9803,
2621,
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,
279,
23,
52,
189,
1135,
8512,
21680,
953,
834,
357,
4060,
2577,
549,
17444,
427,
96,
7851,
9803,
121,
3274,
3,
31,
329,
138,
11015,
17,
15,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
count the number of patients whose diagnoses icd9 code is 35981 and drug type is base? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "35981" AND prescriptions.drug_type = "BASE" | [
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... |
Who was number 3 that had a number 2 of Delfina and a Final of Pedro? | CREATE TABLE table_14998 (
"No.1" text,
"No.2" text,
"No.3" text,
"No.4" text,
"No.5" text,
"No.6" text,
"No.7" text,
"No.8" text,
"No.9" text,
"No.10" text,
"FINAL" text
) | SELECT "No.3" FROM table_14998 WHERE "No.2" = 'delfina' AND "FINAL" = 'pedro' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
24816,
3916,
41,
96,
4168,
5,
536,
121,
1499,
6,
96,
4168,
5,
357,
121,
1499,
6,
96,
4168,
5,
519,
121,
1499,
6,
96,
4168,
5,
20364,
1499,
6,
96,
4168,
5,
17395,
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,
4168,
5,
519,
121,
21680,
953,
834,
24816,
3916,
549,
17444,
427,
96,
4168,
5,
357,
121,
3274,
3,
31,
26,
10386,
77,
9,
31,
3430,
96,
17630,
4090,
121,
3274,
3,
31,
3138,
52,
32,
31,
1,
-100,
-100,
-100,
-... |
Name the chassis for alta | CREATE TABLE table_21977704_1 (chassis VARCHAR, constructor VARCHAR) | SELECT chassis FROM table_21977704_1 WHERE constructor = "Alta" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
2294,
26225,
6348,
834,
536,
41,
524,
6500,
7,
584,
4280,
28027,
6,
6774,
127,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
22836,
21,
8771,
1,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
22836,
21680,
953,
834,
357,
2294,
26225,
6348,
834,
536,
549,
17444,
427,
6774,
127,
3274,
96,
188,
40,
17,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
provide the number of patients whose year of birth is less than 2103 and procedure short title is skin closure nec? | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dob_year < "2103" AND procedures.short_title = "Skin closure NEC" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
In New Zealand, what's the value that has an unknown date and is an energy business? | CREATE TABLE table_71611 (
"Date" text,
"Company" text,
"Business" text,
"Country" text,
"Value ( USD )" text
) | SELECT "Value ( USD )" FROM table_71611 WHERE "Date" = 'unknown' AND "Business" = 'energy' AND "Country" = 'new zealand' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
940,
2938,
2596,
41,
96,
308,
342,
121,
1499,
6,
96,
5890,
2837,
63,
121,
1499,
6,
96,
26269,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
18392,
76,
15,
41,
9513,
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,
96,
18392,
76,
15,
41,
9513,
3,
61,
121,
21680,
953,
834,
940,
2938,
2596,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
202,
5661,
31,
3430,
96,
26269,
121,
3274,
3,
31,
24310,
31,
3430,
96,
10628,
651,
121,... |
What was the US national average electric mix rating for the vehicle that was rated 280 g/mi (174 g/km) in the Midwest? | CREATE TABLE table_20553 (
"Vehicle" text,
"EPA rated All-electric range" text,
"EPA rated combined fuel economy" text,
"Alaska ( Juneau )" text,
"California (San Francisco)" text,
"Mid-Atlantic South (Washington, D.C.)" text,
"U.S. national average electric mix" text,
"Southeast (Atlanta)" text,
"Midwest (Des Moines)" text,
"Rocky Mountains (Denver)" text
) | SELECT "U.S. national average electric mix" FROM table_20553 WHERE "Midwest (Des Moines)" = '280 g/mi (174 g/km)' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23201,
4867,
41,
96,
553,
15,
107,
23,
2482,
121,
1499,
6,
96,
13986,
3,
4094,
432,
18,
17470,
620,
121,
1499,
6,
96,
13986,
3,
4094,
3334,
2914,
2717,
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,
1265,
5,
134,
5,
1157,
1348,
2806,
2153,
121,
21680,
953,
834,
23201,
4867,
549,
17444,
427,
96,
329,
23,
26,
12425,
41,
2962,
7,
1290,
4477,
61,
121,
3274,
3,
31,
17518,
3,
122,
87,
51,
23,
41,
27693,
3,
... |
what is the period if the player is Hashan Tillakaratne? | CREATE TABLE table_28280 (
"Rank" real,
"Dismissals" real,
"Catches" real,
"Stumps" real,
"Player" text,
"Period" text
) | SELECT "Period" FROM table_28280 WHERE "Player" = 'Hashan Tillakaratne' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2577,
17518,
41,
96,
22557,
121,
490,
6,
96,
308,
159,
11502,
5405,
121,
490,
6,
96,
18610,
2951,
121,
490,
6,
96,
134,
17,
22028,
121,
490,
6,
96,
15800,
49,
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,
12988,
23,
32,
26,
121,
21680,
953,
834,
2577,
17518,
549,
17444,
427,
96,
15800,
49,
121,
3274,
3,
31,
566,
3198,
152,
22067,
5667,
1795,
29,
15,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the sum of the number of wins for racers with 0 3rd place finishes? | CREATE TABLE table_14886 (
"Rider" text,
"Years active" text,
"Races" real,
"Wins" real,
"2nd pl." real,
"3rd pl." real,
"Titles." real
) | SELECT SUM("Wins") FROM table_14886 WHERE "3rd pl." < '0' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
24748,
3840,
41,
96,
448,
23,
588,
121,
1499,
6,
96,
476,
2741,
7,
1676,
121,
1499,
6,
96,
448,
9,
2319,
121,
490,
6,
96,
18455,
7,
121,
490,
6,
96,
357,
727,
4752,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
121,
18455,
7,
8512,
21680,
953,
834,
24748,
3840,
549,
17444,
427,
96,
519,
52,
26,
4752,
535,
3,
2,
3,
31,
632,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
When john w. leftwich (uu) is the successor what is the date the successor was seated? | CREATE TABLE table_24400 (
"District" text,
"Vacator" text,
"Reason for change" text,
"Successor" text,
"Date successor seated" text
) | SELECT "Date successor seated" FROM table_24400 WHERE "Successor" = 'John W. Leftwich (UU)' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2266,
5548,
41,
96,
308,
23,
20066,
121,
1499,
6,
96,
25203,
1016,
121,
1499,
6,
96,
1649,
9,
739,
21,
483,
121,
1499,
6,
96,
134,
17431,
24901,
121,
1499,
6,
96,
308,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
342,
22261,
3,
22933,
121,
21680,
953,
834,
2266,
5548,
549,
17444,
427,
96,
134,
17431,
24901,
121,
3274,
3,
31,
18300,
549,
5,
14298,
210,
362,
41,
1265,
1265,
61,
31,
1,
-100,
-100,
-100,
-100,
-100,
-... |
What is the locomotive class that has a wheel arrangement of 2-8-2 and a quantity made of 25? | CREATE TABLE table_name_48 (class VARCHAR, wheel_arrangement VARCHAR, quantity_made VARCHAR) | SELECT class FROM table_name_48 WHERE wheel_arrangement = "2-8-2" AND quantity_made = "25" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3707,
41,
4057,
584,
4280,
28027,
6,
5094,
834,
291,
5517,
297,
584,
4280,
28027,
6,
8708,
834,
4725,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
853,
21680,
953,
834,
4350,
834,
3707,
549,
17444,
427,
5094,
834,
291,
5517,
297,
3274,
96,
357,
6039,
4949,
121,
3430,
8708,
834,
4725,
3274,
96,
1828,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many teams finished in the top team with an average finish of 23.3? | CREATE TABLE table_73355 (
"Year" real,
"Starts" real,
"Wins" real,
"Top 10" real,
"Poles" real,
"Avg. Start" text,
"Avg. Finish" text,
"Winnings" text,
"Position" text,
"Team(s)" text
) | SELECT COUNT("Top 10") FROM table_73355 WHERE "Avg. Finish" = '23.3' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4552,
2469,
755,
41,
96,
476,
2741,
121,
490,
6,
96,
7681,
17,
7,
121,
490,
6,
96,
18455,
7,
121,
490,
6,
96,
22481,
335,
121,
490,
6,
96,
8931,
15,
7,
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,
22481,
335,
8512,
21680,
953,
834,
4552,
2469,
755,
549,
17444,
427,
96,
188,
208,
122,
5,
17578,
121,
3274,
3,
31,
357,
19660,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is Volume:Issue, when Artist is Elton John, and when Weeks on Top is 4? | CREATE TABLE table_name_86 (
volume VARCHAR,
artist VARCHAR,
weeks_on_top VARCHAR
) | SELECT volume AS :issue FROM table_name_86 WHERE artist = "elton john" AND weeks_on_top = 4 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3840,
41,
2908,
584,
4280,
28027,
6,
2377,
584,
4280,
28027,
6,
1274,
834,
106,
834,
2916,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
14816,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2908,
6157,
3,
10,
13159,
21680,
953,
834,
4350,
834,
3840,
549,
17444,
427,
2377,
3274,
96,
15,
7377,
3,
27341,
121,
3430,
1274,
834,
106,
834,
2916,
3274,
314,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the Loco Nos of the e3 class? | CREATE TABLE table_56087 (
"Class" text,
"Wheels" text,
"Date" text,
"No. built" real,
"Loco Nos." text,
"Comments" text
) | SELECT "Loco Nos." FROM table_56087 WHERE "Class" = 'e3' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
755,
3328,
4225,
41,
96,
21486,
121,
1499,
6,
96,
518,
88,
3573,
121,
1499,
6,
96,
308,
342,
121,
1499,
6,
96,
4168,
5,
1192,
121,
490,
6,
96,
434,
32,
509,
465,
7,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
434,
32,
509,
465,
7,
535,
21680,
953,
834,
755,
3328,
4225,
549,
17444,
427,
96,
21486,
121,
3274,
3,
31,
15,
519,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
On what date was the result w 26 20? | CREATE TABLE table_name_54 (
date VARCHAR,
result VARCHAR
) | SELECT date FROM table_name_54 WHERE result = "w 26–20" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5062,
41,
833,
584,
4280,
28027,
6,
741,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
461,
125,
833,
47,
8,
741,
3,
210,
2208,
460,
58,
1,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
833,
21680,
953,
834,
4350,
834,
5062,
549,
17444,
427,
741,
3274,
96,
210,
2208,
104,
1755,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
How long is the XXX track used by the Minnesota Vikings? | CREATE TABLE table_name_14 (time VARCHAR, team_s_ VARCHAR, artist_s_ VARCHAR) | SELECT time FROM table_name_14 WHERE team_s_ = "minnesota vikings" AND artist_s_ = "xxx" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2534,
41,
715,
584,
4280,
28027,
6,
372,
834,
7,
834,
584,
4280,
28027,
6,
2377,
834,
7,
834,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
307,
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,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
97,
21680,
953,
834,
4350,
834,
2534,
549,
17444,
427,
372,
834,
7,
834,
3274,
96,
1109,
1496,
32,
17,
9,
3,
21346,
53,
7,
121,
3430,
2377,
834,
7,
834,
3274,
96,
226,
19230,
121,
1,
-100,
-100,
-100,
-100,
-100... |
What is the team's record on may 12 when they play the giants? | CREATE TABLE table_name_58 (
record VARCHAR,
opponent VARCHAR,
date VARCHAR
) | SELECT record FROM table_name_58 WHERE opponent = "giants" AND date = "may 12" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3449,
41,
1368,
584,
4280,
28027,
6,
15264,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
372,
31,
7,
1368,
30,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1368,
21680,
953,
834,
4350,
834,
3449,
549,
17444,
427,
15264,
3274,
96,
22898,
17,
7,
121,
3430,
833,
3274,
96,
13726,
586,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
The Western Oval venue has what date? | CREATE TABLE table_name_37 (date VARCHAR, venue VARCHAR) | SELECT date FROM table_name_37 WHERE venue = "western oval" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4118,
41,
5522,
584,
4280,
28027,
6,
5669,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
37,
3782,
411,
2165,
5669,
65,
125,
833,
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,
833,
21680,
953,
834,
4350,
834,
4118,
549,
17444,
427,
5669,
3274,
96,
24411,
17986,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
How many average plays have points greater than 14, with an against greater than 17? | CREATE TABLE table_name_4 (
played INTEGER,
points VARCHAR,
against VARCHAR
) | SELECT AVG(played) FROM table_name_4 WHERE points > 14 AND against > 17 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
591,
41,
1944,
3,
21342,
17966,
6,
979,
584,
4280,
28027,
6,
581,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
1348,
4805,
43,
979,
2123,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
71,
17217,
599,
4895,
15,
26,
61,
21680,
953,
834,
4350,
834,
591,
549,
17444,
427,
979,
2490,
968,
3430,
581,
2490,
1003,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the Name with an Event that is men's time trial? | CREATE TABLE table_name_15 (name VARCHAR, event VARCHAR) | SELECT name FROM table_name_15 WHERE event = "men's time trial" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1808,
41,
4350,
584,
4280,
28027,
6,
605,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
5570,
28,
46,
8042,
24,
19,
1076,
31,
7,
97,
3689,
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,
564,
21680,
953,
834,
4350,
834,
1808,
549,
17444,
427,
605,
3274,
96,
904,
31,
7,
97,
3689,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who is the Second with Nikolina Petric as Third? | CREATE TABLE table_name_41 (second VARCHAR, third VARCHAR) | SELECT second FROM table_name_41 WHERE third = "nikolina petric" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4853,
41,
12091,
584,
4280,
28027,
6,
1025,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
19,
8,
5212,
28,
445,
12027,
8280,
1276,
3929,
38,
9879,
58,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
511,
21680,
953,
834,
4350,
834,
4853,
549,
17444,
427,
1025,
3274,
96,
4953,
12057,
9,
158,
3929,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Which nationality is Dick Walker? | CREATE TABLE table_name_35 (
nationality VARCHAR,
player VARCHAR
) | SELECT nationality FROM table_name_35 WHERE player = "dick walker" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2469,
41,
1157,
485,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
1157,
485,
19,
21269,
13521,
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,
1157,
485,
21680,
953,
834,
4350,
834,
2469,
549,
17444,
427,
1959,
3274,
96,
26,
3142,
3,
24063,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
How many faculty members participate in each activity? Return the activity names and the number of faculty members by a bar chart, rank by the activity_name in ascending. | CREATE TABLE Activity (
actid INTEGER,
activity_name varchar(25)
)
CREATE TABLE Participates_in (
stuid INTEGER,
actid INTEGER
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
)
CREATE TABLE Faculty (
FacID INTEGER,
Lname VARCHAR(15),
Fname VARCHAR(15),
Rank VARCHAR(15),
Sex VARCHAR(1),
Phone INTEGER,
Room VARCHAR(5),
Building VARCHAR(13)
)
CREATE TABLE Faculty_Participates_in (
FacID INTEGER,
actid INTEGER
) | SELECT activity_name, COUNT(*) FROM Activity AS T1 JOIN Faculty_Participates_in AS T2 ON T1.actid = T2.actid GROUP BY T1.actid ORDER BY activity_name | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
22536,
41,
1810,
23,
26,
3,
21342,
17966,
6,
1756,
834,
4350,
3,
4331,
4059,
599,
1828,
61,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
15077,
6203,
834,
77,
41,
2134... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
1756,
834,
4350,
6,
2847,
17161,
599,
1935,
61,
21680,
22536,
6157,
332,
536,
3,
15355,
3162,
16896,
834,
13725,
23,
3389,
6203,
834,
77,
6157,
332,
357,
9191,
332,
5411,
2708,
23,
26,
3274,
332,
4416,
2708,
23,
26,... |
Which Engine has a Year that's Larger than 2006 and Power of BHP (KW)? | CREATE TABLE table_36888 (
"Year" real,
"Trim" text,
"Engine" text,
"Power" text,
"Torque" text,
"EPA (2008) City" text
) | SELECT "Engine" FROM table_36888 WHERE "Year" > '2006' AND "Power" = 'bhp (kw)' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3420,
10927,
41,
96,
476,
2741,
121,
490,
6,
96,
19310,
51,
121,
1499,
6,
96,
31477,
121,
1499,
6,
96,
23553,
121,
1499,
6,
96,
382,
127,
835,
121,
1499,
6,
96,
13986,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
31477,
121,
21680,
953,
834,
3420,
10927,
549,
17444,
427,
96,
476,
2741,
121,
2490,
3,
31,
21196,
31,
3430,
96,
23553,
121,
3274,
3,
31,
115,
107,
102,
41,
157,
210,
61,
31,
1,
-100,
-100,
-100,
-100,
-100,
... |
What is the Attendance with a Date that is october 31, 1965? | CREATE TABLE table_name_15 (
attendance VARCHAR,
date VARCHAR
) | SELECT attendance FROM table_name_15 WHERE date = "october 31, 1965" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1808,
41,
11364,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
22497,
663,
28,
3,
9,
7678,
24,
19,
3,
32,
75,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
11364,
21680,
953,
834,
4350,
834,
1808,
549,
17444,
427,
833,
3274,
96,
32,
75,
235,
1152,
12074,
19201,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Which Tonnage is on 25 july 1942? | CREATE TABLE table_13190 (
"Date" text,
"Ship" text,
"Tonnage" text,
"Nationality" text,
"Fate" text
) | SELECT "Tonnage" FROM table_13190 WHERE "Date" = '25 july 1942' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
11776,
41,
96,
308,
342,
121,
1499,
6,
96,
134,
10462,
121,
1499,
6,
96,
382,
106,
9761,
121,
1499,
6,
96,
24732,
485,
121,
1499,
6,
96,
371,
342,
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,
0,
0... | [
3,
23143,
14196,
96,
382,
106,
9761,
121,
21680,
953,
834,
2368,
11776,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
1828,
3,
2047,
120,
24466,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
How many record data were written when Devin Harris (6) was High Assists? | CREATE TABLE table_27700375_8 (
record VARCHAR,
high_assists VARCHAR
) | SELECT COUNT(record) FROM table_27700375_8 WHERE high_assists = "Devin Harris (6)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2555,
9295,
22954,
834,
927,
41,
1368,
584,
4280,
28027,
6,
306,
834,
6500,
7,
17,
7,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
1368,
331,
130,
1545... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2847,
17161,
599,
60,
7621,
61,
21680,
953,
834,
2555,
9295,
22954,
834,
927,
549,
17444,
427,
306,
834,
6500,
7,
17,
7,
3274,
96,
2962,
2494,
12551,
3,
18669,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What competition was at the Daugava Stadium, Riga, Latvia? | CREATE TABLE table_54323 (
"Goal" real,
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) | SELECT "Competition" FROM table_54323 WHERE "Venue" = 'daugava stadium, riga, latvia' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
5062,
2668,
519,
41,
96,
6221,
138,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
553,
35,
76,
15,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
20119,
121,
1499,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
5890,
4995,
4749,
121,
21680,
953,
834,
5062,
2668,
519,
549,
17444,
427,
96,
553,
35,
76,
15,
121,
3274,
3,
31,
26,
9,
12204,
900,
14939,
6,
3,
3380,
9,
6,
50,
17,
5907,
31,
1,
-100,
-100,
-100,
-100,
-10... |
What is the category for trains numbered 16609/16610? | CREATE TABLE table_21716139_1 (category VARCHAR, train_no VARCHAR) | SELECT category FROM table_21716139_1 WHERE train_no = "16609/16610" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
2517,
2938,
24090,
834,
536,
41,
8367,
839,
651,
584,
4280,
28027,
6,
2412,
834,
29,
32,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
3295,
21,
140... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3295,
21680,
953,
834,
357,
2517,
2938,
24090,
834,
536,
549,
17444,
427,
2412,
834,
29,
32,
3274,
96,
26811,
4198,
16033,
27097,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
With Sheffield United as the away team and the date, what home team has a tie no of 15? | CREATE TABLE table_name_27 (home_team VARCHAR, date VARCHAR, tie_no VARCHAR, away_team VARCHAR) | SELECT home_team FROM table_name_27 WHERE tie_no = "15" AND away_team = "sheffield united" AND date = "sheffield united" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2555,
41,
5515,
834,
11650,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
6,
6177,
834,
29,
32,
584,
4280,
28027,
6,
550,
834,
11650,
584,
4280,
28027,
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,
234,
834,
11650,
21680,
953,
834,
4350,
834,
2555,
549,
17444,
427,
6177,
834,
29,
32,
3274,
96,
1808,
121,
3430,
550,
834,
11650,
3274,
96,
7,
88,
89,
1846,
18279,
121,
3430,
833,
3274,
96,
7,
88,
89,
1846,
18279... |
Which Chassis was featured in the year 1971? | CREATE TABLE table_69832 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" real
) | SELECT "Chassis" FROM table_69832 WHERE "Year" = '1971' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3951,
4591,
357,
41,
96,
476,
2741,
121,
490,
6,
96,
16924,
3569,
121,
1499,
6,
96,
3541,
6500,
7,
121,
1499,
6,
96,
31477,
121,
1499,
6,
96,
22512,
7,
121,
490,
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,
0,
0... | [
3,
23143,
14196,
96,
3541,
6500,
7,
121,
21680,
953,
834,
3951,
4591,
357,
549,
17444,
427,
96,
476,
2741,
121,
3274,
3,
31,
2294,
4450,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
How many crimes are still 'Under investigation' to date? | CREATE TABLE greatermanchestercrime (
crimeid text,
crimets time,
location text,
lsoa text,
type text,
outcome text
) | SELECT COUNT(*) FROM greatermanchestercrime WHERE outcome LIKE "%Under investigation%" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2123,
348,
13263,
2685,
526,
41,
5447,
23,
26,
1499,
6,
5447,
17,
7,
97,
6,
1128,
1499,
6,
3,
40,
7,
32,
9,
1499,
6,
686,
1499,
6,
6138,
1499,
3,
61,
3,
32102,
32103,
32101,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
2123,
348,
13263,
2685,
526,
549,
17444,
427,
6138,
8729,
9914,
96,
1454,
5110,
588,
4962,
1454,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How much Draw has a Televote larger than 18, and an Artist of elizabeth anastasiou, and a Jury larger than 4? | CREATE TABLE table_name_44 (draw VARCHAR, jury VARCHAR, televote VARCHAR, artist VARCHAR) | SELECT COUNT(draw) FROM table_name_44 WHERE televote > 18 AND artist = "elizabeth anastasiou" AND jury > 4 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3628,
41,
19489,
584,
4280,
28027,
6,
12730,
584,
4280,
28027,
6,
3,
1931,
1621,
17,
15,
584,
4280,
28027,
6,
2377,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
19489,
61,
21680,
953,
834,
4350,
834,
3628,
549,
17444,
427,
3,
1931,
1621,
17,
15,
2490,
507,
3430,
2377,
3274,
96,
15,
13287,
9,
346,
189,
46,
12518,
7,
23,
1063,
121,
3430,
12730,
2490,
314,
... |
What is the lowest round for Fort Lauderdale, Florida, United States, with a win and a time of 3:38? | CREATE TABLE table_name_14 (round INTEGER, time VARCHAR, res VARCHAR, location VARCHAR) | SELECT MIN(round) FROM table_name_14 WHERE res = "win" AND location = "fort lauderdale, florida, united states" AND time = "3:38" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2534,
41,
7775,
3,
21342,
17966,
6,
97,
584,
4280,
28027,
6,
3,
60,
7,
584,
4280,
28027,
6,
1128,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
7775,
61,
21680,
953,
834,
4350,
834,
2534,
549,
17444,
427,
3,
60,
7,
3274,
96,
3757,
121,
3430,
1128,
3274,
96,
1161,
17,
3,
12513,
49,
5437,
6,
12215,
26,
9,
6,
18279,
2315,
121,
3430,
97,
3274... |
Return the number of the claim start date for the claims whose claimed amount is no more than the average, show total number from high to low order. | CREATE TABLE Settlements (
Settlement_ID INTEGER,
Claim_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settled INTEGER,
Customer_Policy_ID INTEGER
)
CREATE TABLE Customers (
Customer_ID INTEGER,
Customer_Details VARCHAR(255)
)
CREATE TABLE Customer_Policies (
Policy_ID INTEGER,
Customer_ID INTEGER,
Policy_Type_Code CHAR(15),
Start_Date DATE,
End_Date DATE
)
CREATE TABLE Payments (
Payment_ID INTEGER,
Settlement_ID INTEGER,
Payment_Method_Code VARCHAR(255),
Date_Payment_Made DATE,
Amount_Payment INTEGER
)
CREATE TABLE Claims (
Claim_ID INTEGER,
Policy_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settled INTEGER
) | SELECT Date_Claim_Made, COUNT(Date_Claim_Made) FROM Claims WHERE Amount_Settled <= (SELECT AVG(Amount_Settled) FROM Claims) ORDER BY COUNT(Date_Claim_Made) DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
31044,
7,
41,
31044,
834,
4309,
3,
21342,
17966,
6,
7781,
603,
834,
4309,
3,
21342,
17966,
6,
7678,
834,
254,
521,
603,
834,
329,
9,
221,
309,
6048,
6,
7678,
834,
254,
521,
603,
83... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
7678,
834,
254,
521,
603,
834,
329,
9,
221,
6,
2847,
17161,
599,
308,
342,
834,
254,
521,
603,
834,
329,
9,
221,
61,
21680,
4779,
8345,
549,
17444,
427,
71,
11231,
834,
17175,
17,
1361,
3,
2,
2423,
41,
23143,
14... |
Visualize a bar chart about the distribution of meter_600 and ID , order total number from high to low order. | 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 event (
ID int,
Name text,
Stadium_ID int,
Year 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
) | SELECT meter_600, ID FROM swimmer ORDER BY ID DESC | [
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,
4699,
21680,
27424,
4674,
11300,
272,
476,
4699,
309,
25067,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which venue had the result 7-1? | CREATE TABLE table_name_50 (venue VARCHAR, result VARCHAR) | SELECT venue FROM table_name_50 WHERE result = "7-1" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1752,
41,
15098,
584,
4280,
28027,
6,
741,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
5669,
141,
8,
741,
489,
2292,
58,
1,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5669,
21680,
953,
834,
4350,
834,
1752,
549,
17444,
427,
741,
3274,
96,
940,
2292,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the average gold medals for countries with more than 0 bronze, more than 0 silver, rank over 2 and total over 3? | CREATE TABLE table_74893 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT AVG("Gold") FROM table_74893 WHERE "Bronze" > '0' AND "Silver" > '0' AND "Rank" > '2' AND "Total" > '3' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4581,
3914,
519,
41,
96,
22557,
121,
490,
6,
96,
567,
257,
121,
1499,
6,
96,
23576,
121,
490,
6,
96,
134,
173,
624,
121,
490,
6,
96,
22780,
29,
776,
121,
490,
6,
96,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
121,
23576,
8512,
21680,
953,
834,
4581,
3914,
519,
549,
17444,
427,
96,
22780,
29,
776,
121,
2490,
3,
31,
632,
31,
3430,
96,
134,
173,
624,
121,
2490,
3,
31,
632,
31,
3430,
96,
22557,
121,
2490,
... |
What is the date of the match where Jeriome Robertson lost? | CREATE TABLE table_5381 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Save" text
) | SELECT "Date" FROM table_5381 WHERE "Loss" = 'jeriome robertson' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4867,
4959,
41,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
434,
32,
7,
7,
121,
1499,
6,
96,
23163,
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,
308,
342,
121,
21680,
953,
834,
4867,
4959,
549,
17444,
427,
96,
434,
32,
7,
7,
121,
3274,
3,
31,
12488,
23,
7159,
3,
5840,
49,
17,
739,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
If Arthur Albert is the director, what is the maximum series number? | CREATE TABLE table_21622 (
"Series #" real,
"Season #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text
) | SELECT MAX("Series #") FROM table_21622 WHERE "Directed by" = 'Arthur Albert' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
27184,
2884,
41,
96,
12106,
7,
1713,
121,
490,
6,
96,
134,
15,
9,
739,
1713,
121,
490,
6,
96,
382,
155,
109,
121,
1499,
6,
96,
23620,
15,
26,
57,
121,
1499,
6,
96,
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,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
121,
12106,
7,
1713,
8512,
21680,
953,
834,
27184,
2884,
549,
17444,
427,
96,
23620,
15,
26,
57,
121,
3274,
3,
31,
7754,
10666,
11375,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.