NATURAL_LANG stringlengths 0 446 | SCHEMA stringlengths 27 2.21k | SQL stringlengths 18 453 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|
how many years was gordon larsen convicted to ? | CREATE TABLE table_204_479 (
id number,
"defendant" text,
"arrested" text,
"charge" text,
"result" text,
"sentence" text
) | SELECT "sentence" FROM table_204_479 WHERE "defendant" = 'gordon larsen' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
591,
4440,
41,
3,
23,
26,
381,
6,
96,
221,
89,
989,
288,
121,
1499,
6,
96,
291,
60,
6265,
121,
1499,
6,
96,
7993,
121,
1499,
6,
96,
60,
7,
83,
17,
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,
5277,
1433,
121,
21680,
953,
834,
26363,
834,
591,
4440,
549,
17444,
427,
96,
221,
89,
989,
288,
121,
3274,
3,
31,
122,
127,
2029,
50,
52,
7,
35,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which Year has Playoffs which did not qualify? | CREATE TABLE table_34130 (
"Year" real,
"Division" real,
"League" text,
"Regular Season" text,
"Playoffs" text,
"Open Cup" text
) | SELECT AVG("Year") FROM table_34130 WHERE "Playoffs" = 'did not qualify' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3710,
21448,
41,
96,
476,
2741,
121,
490,
6,
96,
308,
23,
6610,
121,
490,
6,
96,
2796,
9,
5398,
121,
1499,
6,
96,
17748,
4885,
7960,
121,
1499,
6,
96,
15800,
1647,
7,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
121,
476,
2741,
8512,
21680,
953,
834,
3710,
21448,
549,
17444,
427,
96,
15800,
1647,
7,
121,
3274,
3,
31,
12416,
59,
9448,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
On which date was the GT class at Monterey Sports Car Grand Prix? | CREATE TABLE table_5840 (
"Race" text,
"Length" text,
"Class" text,
"Circuit" text,
"Date" text
) | SELECT "Date" FROM table_5840 WHERE "Class" = 'gt' AND "Race" = 'monterey sports car grand prix' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3449,
2445,
41,
96,
448,
3302,
121,
1499,
6,
96,
434,
4606,
189,
121,
1499,
6,
96,
21486,
121,
1499,
6,
96,
254,
23,
52,
21560,
121,
1499,
6,
96,
308,
342,
121,
1499,
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,
308,
342,
121,
21680,
953,
834,
3449,
2445,
549,
17444,
427,
96,
21486,
121,
3274,
3,
31,
122,
17,
31,
3430,
96,
448,
3302,
121,
3274,
3,
31,
4662,
49,
15,
63,
2100,
443,
1907,
3407,
31,
1,
-100,
-100,
-100,... |
How many of the patients with unspecified chronic obstructive asthma had a lab test for hematology? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) | 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.long_title = "Chronic obstructive asthma, unspecified" AND lab."CATEGORY" = "Hematology" | [
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... |
Who is the rider with a 399cc Kawasaki? | CREATE TABLE table_77587 (
"Rank" real,
"Rider" text,
"Team" text,
"Speed" text,
"Time" text
) | SELECT "Rider" FROM table_77587 WHERE "Team" = '399cc kawasaki' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
940,
3072,
4225,
41,
96,
22557,
121,
490,
6,
96,
448,
23,
588,
121,
1499,
6,
96,
18699,
121,
1499,
6,
96,
28328,
121,
1499,
6,
96,
13368,
121,
1499,
3,
61,
3,
32102,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
448,
23,
588,
121,
21680,
953,
834,
940,
3072,
4225,
549,
17444,
427,
96,
18699,
121,
3274,
3,
31,
519,
3264,
75,
75,
3,
1258,
9491,
11259,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the division for the division semifinals playoffs? | CREATE TABLE table_16351 (
"Year" text,
"Division" text,
"League" text,
"Reg. Season" text,
"Playoffs" text,
"Avg. Attendance" real
) | SELECT "Division" FROM table_16351 WHERE "Playoffs" = 'Division Semifinals' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2938,
2469,
536,
41,
96,
476,
2741,
121,
1499,
6,
96,
308,
23,
6610,
121,
1499,
6,
96,
2796,
9,
5398,
121,
1499,
6,
96,
17748,
5,
7960,
121,
1499,
6,
96,
15800,
1647,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
23,
6610,
121,
21680,
953,
834,
2938,
2469,
536,
549,
17444,
427,
96,
15800,
1647,
7,
121,
3274,
3,
31,
308,
23,
6610,
22217,
12406,
7,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
How many times is the opponents in the final is beti sekulovski cindy watson? | CREATE TABLE table_26458137_2 (
score VARCHAR,
opponents_in_the_final VARCHAR
) | SELECT COUNT(score) FROM table_26458137_2 WHERE opponents_in_the_final = "Beti Sekulovski Cindy Watson" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26755,
3449,
24636,
834,
357,
41,
2604,
584,
4280,
28027,
6,
16383,
834,
77,
834,
532,
834,
12406,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
648,
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,
0... | [
3,
23143,
14196,
2847,
17161,
599,
7,
9022,
61,
21680,
953,
834,
26755,
3449,
24636,
834,
357,
549,
17444,
427,
16383,
834,
77,
834,
532,
834,
12406,
3274,
96,
2703,
17,
23,
679,
2729,
5850,
4009,
27960,
18763,
121,
1,
-100,
-100,
-... |
What are the civil parishes of the townlands with an area of 119 acres? | CREATE TABLE table_30120547_1 (civil_parish VARCHAR, area__acres__ VARCHAR) | SELECT civil_parish FROM table_30120547_1 WHERE area__acres__ = 119 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
25626,
23201,
4177,
834,
536,
41,
27981,
173,
834,
1893,
1273,
584,
4280,
28027,
6,
616,
834,
834,
10610,
7,
834,
834,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3095,
834,
1893,
1273,
21680,
953,
834,
25626,
23201,
4177,
834,
536,
549,
17444,
427,
616,
834,
834,
10610,
7,
834,
834,
3274,
3,
19993,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Which game did rudy gay (12) have the highest points? | CREATE TABLE table_27756474_2 (game VARCHAR, high_points VARCHAR) | SELECT game FROM table_27756474_2 WHERE high_points = "Rudy Gay (12)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2555,
3072,
4389,
4581,
834,
357,
41,
7261,
584,
4280,
28027,
6,
306,
834,
2700,
7,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
467,
410,
3,
17237,
63,
16998,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
467,
21680,
953,
834,
2555,
3072,
4389,
4581,
834,
357,
549,
17444,
427,
306,
834,
2700,
7,
3274,
96,
17137,
26,
63,
20338,
16465,
61,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
For those records from the products and each product's manufacturer, find name and manufacturer , and group by attribute name, and visualize them by a bar chart, and rank names in ascending order. | CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name ORDER BY T1.Name | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
15248,
7,
41,
3636,
3,
21342,
17966,
6,
5570,
584,
4280,
28027,
599,
25502,
201,
3642,
19973,
584,
4280,
28027,
599,
25502,
201,
3,
19145,
584,
4280,
28027,
599,
25502,
201,
19764,
17833... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
332,
5411,
23954,
6,
332,
5411,
7296,
76,
8717,
450,
49,
21680,
7554,
6157,
332,
536,
3,
15355,
3162,
15248,
7,
6157,
332,
357,
9191,
332,
5411,
7296,
76,
8717,
450,
49,
3274,
332,
4416,
22737,
350,
4630,
6880,
272,... |
Which Commenced operations have an Airline of valuair? | CREATE TABLE table_name_10 (
commenced_operations VARCHAR,
airline VARCHAR
) | SELECT commenced_operations FROM table_name_10 WHERE airline = "valuair" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1714,
41,
3,
28916,
834,
22280,
7,
584,
4280,
28027,
6,
11545,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
8192,
3772,
26,
2673,
43,
46,
1761,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
28916,
834,
22280,
7,
21680,
953,
834,
4350,
834,
1714,
549,
17444,
427,
11545,
3274,
96,
7480,
2256,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
how many patients had been diagnosed with liver ca - ca metastatic to liver during this year? | CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
) | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT diagnosis.patientunitstayid FROM diagnosis WHERE diagnosis.diagnosisname = 'liver ca - ca metastatic to liver' AND DATETIME(diagnosis.diagnosistime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year')) | [
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,
2847,
17161,
599,
15438,
25424,
6227,
1868,
5,
202,
1495,
12417,
61,
21680,
1868,
549,
17444,
427,
1868,
5,
10061,
15129,
21545,
23,
26,
3388,
41,
23143,
14196,
8209,
5,
10061,
15129,
21545,
23,
26,
21680,
8209,
549,
... |
what year had the least percent of the popular vote ? | CREATE TABLE table_203_330 (
id number,
"year of election" number,
"candidates elected" number,
"# of seats available" number,
"# of votes" number,
"% of popular vote" text
) | SELECT "year of election" FROM table_203_330 ORDER BY "% of popular vote" LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
17225,
41,
3,
23,
26,
381,
6,
96,
1201,
13,
4356,
121,
381,
6,
96,
1608,
12416,
6203,
8160,
121,
381,
6,
96,
4663,
13,
6116,
347,
121,
381,
6,
96,
4663,
13,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
1201,
13,
4356,
121,
21680,
953,
834,
23330,
834,
17225,
4674,
11300,
272,
476,
96,
1454,
13,
1012,
2902,
121,
8729,
12604,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
how many teams were listed before the mackay sea eagles ? | CREATE TABLE table_204_661 (
id number,
"team" text,
"location" text,
"home ground" text,
"first year in\nqld cup" number,
"last year in\nqld cup" number,
"qld cup\npremierships" text
) | SELECT COUNT("team") FROM table_204_661 WHERE id < (SELECT id FROM table_204_661 WHERE "team" = 'mackay sea eagles') | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
3539,
536,
41,
3,
23,
26,
381,
6,
96,
11650,
121,
1499,
6,
96,
14836,
121,
1499,
6,
96,
5515,
1591,
121,
1499,
6,
96,
14672,
215,
16,
2,
29,
1824,
40,
26,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
11650,
8512,
21680,
953,
834,
26363,
834,
3539,
536,
549,
17444,
427,
3,
23,
26,
3,
2,
41,
23143,
14196,
3,
23,
26,
21680,
953,
834,
26363,
834,
3539,
536,
549,
17444,
427,
96,
11650,
121,
3... |
what challenge came next after jungle falls ? | CREATE TABLE table_204_628 (
id number,
"trial number" text,
"date" text,
"name of trial" text,
"celebrity/ies taking part" text,
"winner/number of stars" text,
"notes" text
) | SELECT "name of trial" FROM table_204_628 WHERE "date" > (SELECT "date" FROM table_204_628 WHERE "name of trial" = 'jungle falls') ORDER BY "date" LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
948,
2577,
41,
3,
23,
26,
381,
6,
96,
17,
12042,
381,
121,
1499,
6,
96,
5522,
121,
1499,
6,
96,
4350,
13,
3689,
121,
1499,
6,
96,
75,
400,
2160,
17,
63,
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,
96,
4350,
13,
3689,
121,
21680,
953,
834,
26363,
834,
948,
2577,
549,
17444,
427,
96,
5522,
121,
2490,
41,
23143,
14196,
96,
5522,
121,
21680,
953,
834,
26363,
834,
948,
2577,
549,
17444,
427,
96,
4350,
13,
3689,
12... |
Who was the presenter on Thursday of the series in which Emma Willis was the presenter on Wednesday, and Alice Levine Jamie East was the presenter on Sunday? | CREATE TABLE table_name_15 (thursday VARCHAR, wednesday VARCHAR, sunday VARCHAR) | SELECT thursday FROM table_name_15 WHERE wednesday = "emma willis" AND sunday = "alice levine jamie east" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1808,
41,
189,
3589,
1135,
584,
4280,
28027,
6,
62,
26,
1496,
1135,
584,
4280,
28027,
6,
1997,
1135,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
189,
3589,
1135,
21680,
953,
834,
4350,
834,
1808,
549,
17444,
427,
62,
26,
1496,
1135,
3274,
96,
15,
635,
9,
56,
159,
121,
3430,
1997,
1135,
3274,
96,
138,
867,
90,
8402,
2662,
2720,
5727,
121,
1,
-100,
-100,
... |
What is the average speed of rider Peter Williams? | CREATE TABLE table_name_44 (speed VARCHAR, rider VARCHAR) | SELECT speed FROM table_name_44 WHERE rider = "peter williams" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3628,
41,
9993,
584,
4280,
28027,
6,
2564,
52,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1348,
1634,
13,
2564,
52,
2737,
6060,
58,
1,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1634,
21680,
953,
834,
4350,
834,
3628,
549,
17444,
427,
2564,
52,
3274,
96,
4995,
49,
56,
23,
265,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Which Opponent has a H / A of a, and a Result F A of 2 0, and a Attendance larger than 30,000? | CREATE TABLE table_39363 (
"Date" text,
"Opponents" text,
"H / A" text,
"Result F \u2013 A" text,
"Attendance" real
) | SELECT "Opponents" FROM table_39363 WHERE "H / A" = 'a' AND "Result F \u2013 A" = '2 – 0' AND "Attendance" > '30,000' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3288,
3420,
519,
41,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
7,
121,
1499,
6,
96,
566,
3,
87,
71,
121,
1499,
6,
96,
20119,
377,
3,
2,
76,
11138,
71,
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,
667,
102,
9977,
7,
121,
21680,
953,
834,
3288,
3420,
519,
549,
17444,
427,
96,
566,
3,
87,
71,
121,
3274,
3,
31,
9,
31,
3430,
96,
20119,
377,
3,
2,
76,
11138,
71,
121,
3274,
3,
31,
357,
3,
104,
3,
632,
... |
Return a scatter chart on what are the ids and details of all accounts? | CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_Type_Name VARCHAR(255),
Document_Type_Description VARCHAR(255)
)
CREATE TABLE Documents_with_Expenses (
Document_ID INTEGER,
Budget_Type_Code CHAR(15),
Document_Details VARCHAR(255)
)
CREATE TABLE Statements (
Statement_ID INTEGER,
Statement_Details VARCHAR(255)
)
CREATE TABLE Documents (
Document_ID INTEGER,
Document_Type_Code CHAR(15),
Project_ID INTEGER,
Document_Date DATETIME,
Document_Name VARCHAR(255),
Document_Description VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Projects (
Project_ID INTEGER,
Project_Details VARCHAR(255)
)
CREATE TABLE Ref_Budget_Codes (
Budget_Type_Code CHAR(15),
Budget_Type_Description VARCHAR(255)
)
CREATE TABLE Accounts (
Account_ID INTEGER,
Statement_ID INTEGER,
Account_Details VARCHAR(255)
) | SELECT Account_ID, Account_Details FROM Accounts | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
419,
89,
834,
4135,
1071,
297,
834,
25160,
7,
41,
11167,
834,
25160,
834,
22737,
3,
28027,
599,
1808,
201,
11167,
834,
25160,
834,
23954,
584,
4280,
28027,
599,
25502,
201,
11167,
834,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
6288,
834,
4309,
6,
6288,
834,
2962,
5756,
7,
21680,
6288,
7,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
which team has the most titles ? | CREATE TABLE table_204_129 (
id number,
"place" number,
"team" text,
"titles" number,
"runners-up" number,
"winning years" text
) | SELECT "team" FROM table_204_129 ORDER BY "titles" DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
22174,
41,
3,
23,
26,
381,
6,
96,
4687,
121,
381,
6,
96,
11650,
121,
1499,
6,
96,
21869,
7,
121,
381,
6,
96,
10806,
7,
18,
413,
121,
381,
6,
96,
8163,
203... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11650,
121,
21680,
953,
834,
26363,
834,
22174,
4674,
11300,
272,
476,
96,
21869,
7,
121,
309,
25067,
8729,
12604,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Find each target user's name and average trust score Visualize by bar chart, I want to show by the x axis in ascending. | CREATE TABLE review (
a_id integer,
u_id integer,
i_id integer,
rating integer,
rank integer
)
CREATE TABLE useracct (
u_id integer,
name varchar(128)
)
CREATE TABLE trust (
source_u_id integer,
target_u_id integer,
trust integer
)
CREATE TABLE item (
i_id integer,
title varchar(20)
) | SELECT name, AVG(trust) FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.target_u_id GROUP BY T2.target_u_id ORDER BY name | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1132,
41,
3,
9,
834,
23,
26,
30278,
6,
3,
76,
834,
23,
26,
30278,
6,
3,
23,
834,
23,
26,
30278,
6,
5773,
30278,
6,
11003,
30278,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
564,
6,
71,
17217,
599,
17691,
61,
21680,
1139,
6004,
17,
6157,
332,
536,
3,
15355,
3162,
2019,
6157,
332,
357,
9191,
332,
5411,
76,
834,
23,
26,
3274,
332,
4416,
24315,
834,
76,
834,
23,
26,
350,
4630,
6880,
272,... |
How many tries had a losing bonus of 5, and were part of the Maesteg Celtic RFC club? | CREATE TABLE table_4940 (
"Club" text,
"Played" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text,
"Losing bonus" text,
"Points" text
) | SELECT "Tries for" FROM table_4940 WHERE "Losing bonus" = '5' AND "Club" = 'maesteg celtic rfc' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3647,
2445,
41,
96,
254,
11158,
121,
1499,
6,
96,
15800,
15,
26,
121,
1499,
6,
96,
308,
10936,
29,
121,
1499,
6,
96,
434,
3481,
121,
1499,
6,
96,
22512,
7,
21,
121,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
382,
2593,
21,
121,
21680,
953,
834,
3647,
2445,
549,
17444,
427,
96,
434,
32,
7,
53,
4023,
121,
3274,
3,
31,
755,
31,
3430,
96,
254,
11158,
121,
3274,
3,
31,
51,
9,
2613,
122,
1503,
1225,
3,
52,
89,
75,
... |
What was the record at the game with a result of W 13-12 after week 4? | CREATE TABLE table_name_10 (
record VARCHAR,
week VARCHAR,
result VARCHAR
) | SELECT record FROM table_name_10 WHERE week > 4 AND result = "w 13-12" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1714,
41,
1368,
584,
4280,
28027,
6,
471,
584,
4280,
28027,
6,
741,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
1368,
44,
8,
467,
28,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1368,
21680,
953,
834,
4350,
834,
1714,
549,
17444,
427,
471,
2490,
314,
3430,
741,
3274,
96,
210,
1179,
5947,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Which municipalities located in the county of Finnmark have populations bigger than 6187.0? | CREATE TABLE table_72714 (
"City/town" text,
"Municipality" text,
"County" text,
"City/town status" real,
"Population" real
) | SELECT "Municipality" FROM table_72714 WHERE "County" = 'Finnmark' AND "Population" > '6187.0' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
940,
2555,
2534,
41,
96,
254,
485,
87,
3540,
121,
1499,
6,
96,
329,
202,
23,
3389,
10355,
121,
1499,
6,
96,
10628,
63,
121,
1499,
6,
96,
254,
485,
87,
3540,
2637,
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,
329,
202,
23,
3389,
10355,
121,
21680,
953,
834,
940,
2555,
2534,
549,
17444,
427,
96,
10628,
63,
121,
3274,
3,
31,
371,
77,
29,
3920,
31,
3430,
96,
27773,
7830,
121,
2490,
3,
31,
948,
2606,
26346,
31,
1,
-1... |
Which County has a Median household income of $37,230? | CREATE TABLE table_name_96 (
county VARCHAR,
median_household_income VARCHAR
) | SELECT county FROM table_name_96 WHERE median_household_income = "$37,230" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4314,
41,
5435,
584,
4280,
28027,
6,
15572,
834,
1840,
6134,
834,
15759,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
1334,
65,
3,
9,
3159,
29,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
5435,
21680,
953,
834,
4350,
834,
4314,
549,
17444,
427,
15572,
834,
1840,
6134,
834,
15759,
3274,
96,
3229,
4118,
6,
13427,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who is the monarch with the heir thado minsaw? | CREATE TABLE table_26460435_8 (
monarch VARCHAR,
heir VARCHAR
) | SELECT monarch FROM table_26460435_8 WHERE heir = "Thado Minsaw" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2688,
25991,
591,
2469,
834,
927,
41,
28397,
584,
4280,
28027,
6,
3,
17265,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
19,
8,
28397,
28,
8,
3,
17265,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
28397,
21680,
953,
834,
2688,
25991,
591,
2469,
834,
927,
549,
17444,
427,
3,
17265,
3274,
96,
382,
8399,
32,
4765,
13125,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What was the winning score of the Buy.com Siouxland Open? | CREATE TABLE table_name_57 (winning_score VARCHAR, tournament VARCHAR) | SELECT winning_score FROM table_name_57 WHERE tournament = "buy.com siouxland open" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3436,
41,
8163,
834,
7,
9022,
584,
4280,
28027,
6,
5892,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
3447,
2604,
13,
8,
4783,
5,
287,
925,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3447,
834,
7,
9022,
21680,
953,
834,
4350,
834,
3436,
549,
17444,
427,
5892,
3274,
96,
14584,
5,
287,
108,
32,
3090,
40,
232,
539,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
How many weeks was there an attendance of 74,347? | CREATE TABLE table_78563 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | SELECT SUM("Week") FROM table_78563 WHERE "Attendance" = '74,347' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3940,
4834,
519,
41,
96,
518,
10266,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
20119,
121,
1499,
6,
96,
188,
17,
324,
26,
663,
121,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
121,
518,
10266,
8512,
21680,
953,
834,
3940,
4834,
519,
549,
17444,
427,
96,
188,
17,
324,
26,
663,
121,
3274,
3,
31,
4581,
6,
519,
4177,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Give me a bar chart to show the theme and their sales of the journal which did not have any of the listed editors serving on the committee, rank in descending by the x axis. | CREATE TABLE editor (
Editor_ID int,
Name text,
Age real
)
CREATE TABLE journal_committee (
Editor_ID int,
Journal_ID int,
Work_Type text
)
CREATE TABLE journal (
Journal_ID int,
Date text,
Theme text,
Sales int
) | SELECT T1.Theme, T1.Sales FROM journal EXCEPT SELECT T1.Date, T1.Theme, T1.Sales FROM journal AS T1 JOIN journal_committee AS T2 ON T1.Journal_ID = T2.Journal_ID ORDER BY T1.Theme DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
6005,
41,
11953,
834,
4309,
16,
17,
6,
5570,
1499,
6,
7526,
490,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
6378,
834,
287,
1538,
17,
15,
15,
41,
11953,
834,
4309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
332,
5411,
634,
526,
6,
332,
5411,
134,
4529,
21680,
6378,
262,
4,
30416,
3,
23143,
14196,
332,
5411,
308,
342,
6,
332,
5411,
634,
526,
6,
332,
5411,
134,
4529,
21680,
6378,
6157,
332,
536,
3,
15355,
3162,
6378,
8... |
Name the years in orlando for penn state | CREATE TABLE table_15621965_1 (
years_in_orlando VARCHAR,
school_club_team VARCHAR
) | SELECT years_in_orlando FROM table_15621965_1 WHERE school_club_team = "Penn State" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1808,
4056,
2294,
4122,
834,
536,
41,
203,
834,
77,
834,
32,
7721,
32,
584,
4280,
28027,
6,
496,
834,
13442,
834,
11650,
584,
4280,
28027,
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
203,
834,
77,
834,
32,
7721,
32,
21680,
953,
834,
1808,
4056,
2294,
4122,
834,
536,
549,
17444,
427,
496,
834,
13442,
834,
11650,
3274,
96,
345,
35,
29,
1015,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is the score for the dams? | CREATE TABLE table_16250 (
"Season" text,
"Series" text,
"Team Name" text,
"Races" real,
"Poles" real,
"Wins" real,
"Points" real,
"Position" text
) | SELECT "Points" FROM table_16250 WHERE "Team Name" = 'DAMS' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2938,
11434,
41,
96,
134,
15,
9,
739,
121,
1499,
6,
96,
12106,
7,
121,
1499,
6,
96,
18699,
5570,
121,
1499,
6,
96,
448,
9,
2319,
121,
490,
6,
96,
8931,
15,
7,
121,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
22512,
7,
121,
21680,
953,
834,
2938,
11434,
549,
17444,
427,
96,
18699,
5570,
121,
3274,
3,
31,
308,
25346,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the venue of the match where the score was 1:3 and team 2 was binh duong? | CREATE TABLE table_name_61 (
venue VARCHAR,
score VARCHAR,
team_2 VARCHAR
) | SELECT venue FROM table_name_61 WHERE score = "1:3" AND team_2 = "binh duong" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4241,
41,
5669,
584,
4280,
28027,
6,
2604,
584,
4280,
28027,
6,
372,
834,
357,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
5669,
13,
8,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
3,
23143,
14196,
5669,
21680,
953,
834,
4350,
834,
4241,
549,
17444,
427,
2604,
3274,
96,
536,
10,
519,
121,
3430,
372,
834,
357,
3274,
96,
4517,
107,
146,
2444,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
The player is Tim Regan and the pick # is position of d, what's the sum? | CREATE TABLE table_31914 (
"Pick #" real,
"MLS team" text,
"Player" text,
"Position" text,
"Affiliation" text
) | SELECT SUM("Pick #") FROM table_31914 WHERE "Position" = 'd' AND "Player" = 'tim regan' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
519,
2294,
2534,
41,
96,
345,
3142,
1713,
121,
490,
6,
96,
17976,
372,
121,
1499,
6,
96,
15800,
49,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
188,
89,
8027,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
345,
3142,
1713,
8512,
21680,
953,
834,
519,
2294,
2534,
549,
17444,
427,
96,
345,
32,
7,
4749,
121,
3274,
3,
31,
26,
31,
3430,
96,
15800,
49,
121,
3274,
3,
31,
2998,
5925,
152,
31,
1,
-100,... |
What was the results for the district oklahoma 3? | CREATE TABLE table_18122 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" text,
"Results" text,
"Candidates" text
) | SELECT "Results" FROM table_18122 WHERE "District" = 'Oklahoma 3' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2606,
20889,
41,
96,
308,
23,
20066,
121,
1499,
6,
96,
1570,
75,
5937,
295,
121,
1499,
6,
96,
13725,
63,
121,
1499,
6,
96,
25171,
8160,
121,
1499,
6,
96,
20119,
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,
20119,
7,
121,
21680,
953,
834,
2606,
20889,
549,
17444,
427,
96,
308,
23,
20066,
121,
3274,
3,
31,
667,
8142,
10207,
9,
220,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the record after game 45? | CREATE TABLE table_47289 (
"Game" text,
"Date" text,
"Opponent" text,
"Score" text,
"Location/Attendance" text,
"Record" text
) | SELECT "Record" FROM table_47289 WHERE "Game" = '45' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4177,
357,
3914,
41,
96,
23055,
121,
1499,
6,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
434,
32,
75,
257,
87,
188,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
1649,
7621,
121,
21680,
953,
834,
4177,
357,
3914,
549,
17444,
427,
96,
23055,
121,
3274,
3,
31,
2128,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
count the number of patients on po/ng route of drug administration who are less than 72 years. | 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 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
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "72" AND prescriptions.route = "PO/NG" | [
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,
7744,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7744,
7,
5,
8399,
51,
834,
23,
26,
549... |
Has Episode 1b-16 (42) been preserved? | CREATE TABLE table_name_16 (preservation VARCHAR, episode VARCHAR) | SELECT preservation FROM table_name_16 WHERE episode = "1b-16 (42)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2938,
41,
2026,
3473,
257,
584,
4280,
28027,
6,
5640,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4498,
16112,
209,
115,
10892,
8457,
7318,
118,
18570,
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,
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,
19368,
21680,
953,
834,
4350,
834,
2938,
549,
17444,
427,
5640,
3274,
96,
536,
115,
10892,
8457,
7318,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is every value of Top 10 when team is #10 Phil Parsons Racing and average finish is 22.9? | CREATE TABLE table_3456 (
"Year" real,
"Starts" real,
"Wins" real,
"Top 5" real,
"Top 10" real,
"Poles" real,
"Avg. Start" text,
"Avg. Finish" text,
"Winnings" text,
"Position" text,
"Team(s)" text
) | SELECT "Top 10" FROM table_3456 WHERE "Team(s)" = '#10 Phil Parsons Racing' AND "Avg. Finish" = '22.9' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3710,
4834,
41,
96,
476,
2741,
121,
490,
6,
96,
7681,
17,
7,
121,
490,
6,
96,
18455,
7,
121,
490,
6,
96,
22481,
3,
17395,
490,
6,
96,
22481,
335,
121,
490,
6,
96,
893... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
22481,
335,
121,
21680,
953,
834,
3710,
4834,
549,
17444,
427,
96,
18699,
599,
7,
61,
121,
3274,
3,
31,
4663,
1714,
8188,
2180,
6577,
16046,
31,
3430,
96,
188,
208,
122,
5,
17578,
121,
3274,
3,
31,
357,
27297,... |
What years did Bobby Moore play? | CREATE TABLE table_2933 (
"Player" text,
"Position" text,
"NASL years" text,
"NASL club(s)" text,
"Accolades (Pre-NASL)" text
) | SELECT "NASL years" FROM table_2933 WHERE "Player" = 'Bobby Moore' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3166,
4201,
41,
96,
15800,
49,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
21277,
434,
203,
121,
1499,
6,
96,
21277,
434,
1886,
599,
7,
61,
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,
21277,
434,
203,
121,
21680,
953,
834,
3166,
4201,
549,
17444,
427,
96,
15800,
49,
121,
3274,
3,
31,
279,
32,
115,
969,
11103,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
the subject has evidence of clinically significant gastrointestinal, cardiovascular, hepatic, renal, hematological, neoplastic, endocrine, neurological, immunodeficiency, pulmonary, or other disorder or disease. | CREATE TABLE table_train_125 (
"id" int,
"carotid_stenosis" int,
"pulmonary_disease" bool,
"neurodegenerative_disease" bool,
"active_infection" bool,
"skin_cancer" bool,
"heart_disease" bool,
"clinical_dementia_rating_scale" float,
"renal_disease" bool,
"cerebrovascular_disease" bool,
"hepatic_disease" bool,
"breast_cancer" bool,
"urinary_tract" bool,
"prostate_cancer" bool,
"coronary_insufficiency" bool,
"cardiovascular_disease" bool,
"peptic_ulcer_disease" bool,
"immune_deficiency_disorder" bool,
"hematologic_disease" bool,
"neoplastic" bool,
"amnestic_mild_cognitive_impairment" bool,
"alzheimer_disease_ad" bool,
"gastrointestinal_disease" bool,
"cancer" bool,
"endocrine_disease" bool,
"cognitive_impairment" bool,
"neurological_disease" bool,
"parkinson_disease" bool,
"other_disorder" bool,
"lewy_body_dementia" bool,
"NOUSE" float
) | SELECT * FROM table_train_125 WHERE gastrointestinal_disease = 1 OR cardiovascular_disease = 1 OR hepatic_disease = 1 OR renal_disease = 1 OR hematologic_disease = 1 OR neoplastic = 1 OR endocrine_disease = 1 OR neurological_disease = 1 OR immune_deficiency_disorder = 1 OR pulmonary_disease = 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
9719,
834,
10124,
41,
96,
23,
26,
121,
16,
17,
6,
96,
658,
2719,
23,
26,
834,
1913,
32,
7,
159,
121,
16,
17,
6,
96,
26836,
834,
26,
159,
14608,
121,
3,
12840,
40,
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,
1429,
21680,
953,
834,
9719,
834,
10124,
549,
17444,
427,
3,
30282,
834,
26,
159,
14608,
3274,
209,
4674,
16712,
834,
26,
159,
14608,
3274,
209,
4674,
3,
88,
7768,
75,
834,
26,
159,
14608,
3274,
209,
4674,
23328,
83... |
What name has a population of 810? | CREATE TABLE table_name_13 (
name VARCHAR,
population VARCHAR
) | SELECT name FROM table_name_13 WHERE population = "810" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2368,
41,
564,
584,
4280,
28027,
6,
2074,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
564,
65,
3,
9,
2074,
13,
505,
1714,
58,
1,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
564,
21680,
953,
834,
4350,
834,
2368,
549,
17444,
427,
2074,
3274,
96,
927,
1714,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what was the last game to be attended by fewer than 30,000 people ? | CREATE TABLE table_204_917 (
id number,
"date" text,
"opponent#" text,
"rank#" text,
"site" text,
"result" text,
"attendance" number
) | SELECT "date" FROM table_204_917 WHERE "attendance" < 30000 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
1298,
2517,
41,
3,
23,
26,
381,
6,
96,
5522,
121,
1499,
6,
96,
32,
102,
9977,
4663,
121,
1499,
6,
96,
6254,
4663,
121,
1499,
6,
96,
3585,
121,
1499,
6,
96,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
5522,
121,
21680,
953,
834,
26363,
834,
1298,
2517,
549,
17444,
427,
96,
15116,
663,
121,
3,
2,
604,
2313,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
When is the latest year that Real Colorado Foxes did not qualify for the playoffs but make it to Open Cup 2nd Round? | CREATE TABLE table_name_95 (year INTEGER, playoffs VARCHAR, open_cup VARCHAR) | SELECT MAX(year) FROM table_name_95 WHERE playoffs = "did not qualify" AND open_cup = "2nd round" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3301,
41,
1201,
3,
21342,
17966,
6,
15289,
7,
584,
4280,
28027,
6,
539,
834,
4658,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
366,
19,
8,
1251,
215,
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,
1201,
61,
21680,
953,
834,
4350,
834,
3301,
549,
17444,
427,
15289,
7,
3274,
96,
12416,
59,
9448,
121,
3430,
539,
834,
4658,
3274,
96,
357,
727,
1751,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what date is the opponent is chicago bears? | CREATE TABLE table_16729076_1 (
date VARCHAR,
opponent VARCHAR
) | SELECT date FROM table_16729076_1 WHERE opponent = "Chicago Bears" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
27650,
23838,
3959,
834,
536,
41,
833,
584,
4280,
28027,
6,
15264,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
125,
833,
19,
8,
15264,
19,
8780,
9,
839,
4595,
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,
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,
27650,
23838,
3959,
834,
536,
549,
17444,
427,
15264,
3274,
96,
3541,
2617,
839,
9034,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the status of the fleet that was commissioned on July 28, 1963? | CREATE TABLE table_name_9 (status VARCHAR, commissioned VARCHAR) | SELECT status FROM table_name_9 WHERE commissioned = "july 28, 1963" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1298,
41,
8547,
302,
584,
4280,
28027,
6,
3,
17183,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2637,
13,
8,
9111,
24,
47,
3,
17183,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2637,
21680,
953,
834,
4350,
834,
1298,
549,
17444,
427,
3,
17183,
3274,
96,
2047,
120,
13719,
20613,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Show the names and details of all the staff members. | CREATE TABLE ref_attraction_types (
attraction_type_code text,
attraction_type_description text
)
CREATE TABLE theme_parks (
theme_park_id number,
theme_park_details text
)
CREATE TABLE museums (
museum_id number,
museum_details text
)
CREATE TABLE staff (
staff_id number,
tourist_attraction_id number,
name text,
other_details text
)
CREATE TABLE royal_family (
royal_family_id number,
royal_family_details text
)
CREATE TABLE photos (
photo_id number,
tourist_attraction_id number,
name text,
description text,
filename text,
other_details text
)
CREATE TABLE visitors (
tourist_id number,
tourist_details text
)
CREATE TABLE tourist_attraction_features (
tourist_attraction_id number,
feature_id number
)
CREATE TABLE tourist_attractions (
tourist_attraction_id number,
attraction_type_code text,
location_id number,
how_to_get_there text,
name text,
description text,
opening_hours text,
other_details text
)
CREATE TABLE shops (
shop_id number,
shop_details text
)
CREATE TABLE hotels (
hotel_id number,
star_rating_code text,
pets_allowed_yn text,
price_range number,
other_hotel_details text
)
CREATE TABLE features (
feature_id number,
feature_details text
)
CREATE TABLE street_markets (
market_id number,
market_details text
)
CREATE TABLE ref_hotel_star_ratings (
star_rating_code text,
star_rating_description text
)
CREATE TABLE visits (
visit_id number,
tourist_attraction_id number,
tourist_id number,
visit_date time,
visit_details text
)
CREATE TABLE locations (
location_id number,
location_name text,
address text,
other_details text
) | SELECT name, other_details FROM staff | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
6273,
834,
144,
10559,
834,
6137,
7,
41,
13715,
834,
6137,
834,
4978,
1499,
6,
13715,
834,
6137,
834,
221,
11830,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
3800... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
564,
6,
119,
834,
221,
5756,
7,
21680,
871,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
On December 5 what team played their home game? | CREATE TABLE table_name_20 (home VARCHAR, date VARCHAR) | SELECT home FROM table_name_20 WHERE date = "december 5" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1755,
41,
5515,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
461,
1882,
305,
125,
372,
1944,
70,
234,
467,
58,
1,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
234,
21680,
953,
834,
4350,
834,
1755,
549,
17444,
427,
833,
3274,
96,
221,
75,
18247,
3,
17395,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the highest rank of a company that has 1,715.8 billion in assets? | CREATE TABLE table_1682026_6 (rank INTEGER, assets__billion_$_ VARCHAR) | SELECT MAX(rank) FROM table_1682026_6 WHERE assets__billion_$_ = "1,715.8" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
24274,
1755,
2688,
834,
948,
41,
6254,
3,
21342,
17966,
6,
4089,
834,
834,
115,
14916,
834,
3229,
834,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2030,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
6254,
61,
21680,
953,
834,
24274,
1755,
2688,
834,
948,
549,
17444,
427,
4089,
834,
834,
115,
14916,
834,
3229,
834,
3274,
96,
4347,
4450,
9125,
927,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Name the womens doubles when tour is malaysia super series | CREATE TABLE table_14496232_2 (womens_doubles VARCHAR, tour VARCHAR) | SELECT womens_doubles FROM table_14496232_2 WHERE tour = "Malaysia Super Series" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
20885,
4314,
23188,
834,
357,
41,
210,
32,
904,
7,
834,
25761,
7,
584,
4280,
28027,
6,
1552,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
887,
7,
1486,
7,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
887,
7,
834,
25761,
7,
21680,
953,
834,
20885,
4314,
23188,
834,
357,
549,
17444,
427,
1552,
3274,
96,
329,
9,
20244,
23,
9,
2011,
4531,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
When bmw activee is the vehicle type what is the u.s national average electric mix? | CREATE TABLE table_24620684_2 (
us_national_average_electric_mix VARCHAR,
vehicle VARCHAR
) | SELECT us_national_average_electric_mix FROM table_24620684_2 WHERE vehicle = "BMW ActiveE" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2266,
4056,
5176,
4608,
834,
357,
41,
178,
834,
16557,
834,
28951,
834,
17470,
834,
13682,
584,
4280,
28027,
6,
1689,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
3,
23143,
14196,
178,
834,
16557,
834,
28951,
834,
17470,
834,
13682,
21680,
953,
834,
2266,
4056,
5176,
4608,
834,
357,
549,
17444,
427,
1689,
3274,
96,
279,
16027,
11383,
427,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What were the high points on june 20? | CREATE TABLE table_name_36 (high_points VARCHAR, date VARCHAR) | SELECT high_points FROM table_name_36 WHERE date = "june 20" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3420,
41,
6739,
834,
2700,
7,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
130,
8,
306,
979,
30,
3,
6959,
15,
460,
58,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
306,
834,
2700,
7,
21680,
953,
834,
4350,
834,
3420,
549,
17444,
427,
833,
3274,
96,
6959,
15,
460,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the drew for the 1999-2000 season when they were in third place? | CREATE TABLE table_63924 (
"Season" text,
"Competition" text,
"Round" text,
"Played" text,
"Drew" text,
"Lost" text
) | SELECT "Drew" FROM table_63924 WHERE "Round" = 'third place' AND "Season" = '1999-2000' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
948,
3288,
2266,
41,
96,
134,
15,
9,
739,
121,
1499,
6,
96,
5890,
4995,
4749,
121,
1499,
6,
96,
448,
32,
1106,
121,
1499,
6,
96,
15800,
15,
26,
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,
60,
210,
121,
21680,
953,
834,
948,
3288,
2266,
549,
17444,
427,
96,
448,
32,
1106,
121,
3274,
3,
31,
14965,
286,
31,
3430,
96,
134,
15,
9,
739,
121,
3274,
3,
31,
2294,
3264,
18,
13527,
31,
1,
-100,
-... |
Return a bar chart on how many stores are headquarted in each city?, display in desc by the the total number . | CREATE TABLE store_product (
Store_ID int,
Product_ID int
)
CREATE TABLE store (
Store_ID int,
Store_Name text,
Type text,
Area_size real,
Number_of_product_category real,
Ranking int
)
CREATE TABLE district (
District_ID int,
District_name text,
Headquartered_City text,
City_Population real,
City_Area real
)
CREATE TABLE product (
product_id int,
product text,
dimensions text,
dpi real,
pages_per_minute_color real,
max_page_size text,
interface text
)
CREATE TABLE store_district (
Store_ID int,
District_ID int
) | SELECT Headquartered_City, COUNT(*) FROM store AS t1 JOIN store_district AS t2 ON t1.Store_ID = t2.Store_ID JOIN district AS t3 ON t2.District_ID = t3.District_ID GROUP BY t3.Headquartered_City ORDER BY COUNT(*) DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1078,
834,
15892,
41,
4493,
834,
4309,
16,
17,
6,
6246,
834,
4309,
16,
17,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
1078,
41,
4493,
834,
4309,
16,
17,
6,
4493,
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,
3642,
19973,
15,
26,
834,
254,
485,
6,
2847,
17161,
599,
1935,
61,
21680,
1078,
6157,
3,
17,
536,
3,
15355,
3162,
1078,
834,
26,
23,
20066,
6157,
3,
17,
357,
9191,
3,
17,
5411,
28719,
834,
4309,
3274,
3,
17,
441... |
How many goals were scored on 21 Junio 2008? | CREATE TABLE table_77791 (
"Goal" real,
"Date" text,
"Venue" text,
"Result" text,
"Competition" text
) | SELECT COUNT("Goal") FROM table_77791 WHERE "Date" = '21 junio 2008' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26225,
4729,
41,
96,
6221,
138,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
553,
35,
76,
15,
121,
1499,
6,
96,
20119,
121,
1499,
6,
96,
5890,
4995,
4749,
121,
1499,
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,
0... | [
3,
23143,
14196,
2847,
17161,
599,
121,
6221,
138,
8512,
21680,
953,
834,
26225,
4729,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
2658,
3,
6959,
23,
32,
2628,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who received the silver in 2006? | CREATE TABLE table_name_31 (silver VARCHAR, year VARCHAR) | SELECT silver FROM table_name_31 WHERE year = "2006" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3341,
41,
7,
173,
624,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
1204,
8,
4294,
16,
3581,
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,
4294,
21680,
953,
834,
4350,
834,
3341,
549,
17444,
427,
215,
3274,
96,
21196,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the average for the agricultural panel that has a National University of Ireland less than 0? | CREATE TABLE table_name_16 (
agricultural_panel INTEGER,
national_university_of_ireland INTEGER
) | SELECT AVG(agricultural_panel) FROM table_name_16 WHERE national_university_of_ireland < 0 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2938,
41,
10687,
834,
28726,
3,
21342,
17966,
6,
1157,
834,
7846,
485,
834,
858,
834,
2060,
40,
232,
3,
21342,
17966,
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,
0... | [
3,
23143,
14196,
71,
17217,
599,
9,
3496,
14700,
834,
28726,
61,
21680,
953,
834,
4350,
834,
2938,
549,
17444,
427,
1157,
834,
7846,
485,
834,
858,
834,
2060,
40,
232,
3,
2,
3,
632,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Who was the home team when the record was 27–14–6? | CREATE TABLE table_name_15 (home VARCHAR, record VARCHAR) | SELECT home FROM table_name_15 WHERE record = "27–14–6" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1808,
41,
5515,
584,
4280,
28027,
6,
1368,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
8,
234,
372,
116,
8,
1368,
47,
2307,
104,
2534,
104,
94... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
234,
21680,
953,
834,
4350,
834,
1808,
549,
17444,
427,
1368,
3274,
96,
2555,
104,
2534,
104,
948,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What are the facility codes of the apartments with more than four bedrooms, and count them by a bar chart, and I want to display in ascending by the facility_code. | CREATE TABLE Guests (
guest_id INTEGER,
gender_code CHAR(1),
guest_first_name VARCHAR(80),
guest_last_name VARCHAR(80),
date_of_birth DATETIME
)
CREATE TABLE Apartment_Buildings (
building_id INTEGER,
building_short_name CHAR(15),
building_full_name VARCHAR(80),
building_description VARCHAR(255),
building_address VARCHAR(255),
building_manager VARCHAR(50),
building_phone VARCHAR(80)
)
CREATE TABLE Apartment_Facilities (
apt_id INTEGER,
facility_code CHAR(15)
)
CREATE TABLE Apartment_Bookings (
apt_booking_id INTEGER,
apt_id INTEGER,
guest_id INTEGER,
booking_status_code CHAR(15),
booking_start_date DATETIME,
booking_end_date DATETIME
)
CREATE TABLE View_Unit_Status (
apt_id INTEGER,
apt_booking_id INTEGER,
status_date DATETIME,
available_yn BIT
)
CREATE TABLE Apartments (
apt_id INTEGER,
building_id INTEGER,
apt_type_code CHAR(15),
apt_number CHAR(10),
bathroom_count INTEGER,
bedroom_count INTEGER,
room_count CHAR(5)
) | SELECT facility_code, COUNT(facility_code) FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 4 GROUP BY facility_code ORDER BY facility_code | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3,
22360,
41,
3886,
834,
23,
26,
3,
21342,
17966,
6,
7285,
834,
4978,
3,
28027,
14296,
6,
3886,
834,
14672,
834,
4350,
584,
4280,
28027,
599,
2079,
201,
3886,
834,
5064,
834,
4350,
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,
3064,
834,
4978,
6,
2847,
17161,
599,
89,
9,
75,
14277,
834,
4978,
61,
21680,
15970,
834,
371,
9,
13067,
3010,
6157,
332,
536,
3,
15355,
3162,
15970,
7,
6157,
332,
357,
9191,
332,
5411,
6789,
834,
23,
26,
3274,
33... |
List the names of wrestlers and the teams in elimination in descending order of days held. | CREATE TABLE elimination (
elimination_id text,
wrestler_id text,
team text,
eliminated_by text,
elimination_move text,
time text
)
CREATE TABLE wrestler (
wrestler_id number,
name text,
reign text,
days_held text,
location text,
event text
) | SELECT T2.name, T1.team FROM elimination AS T1 JOIN wrestler AS T2 ON T1.wrestler_id = T2.wrestler_id ORDER BY T2.days_held DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
23458,
41,
23458,
834,
23,
26,
1499,
6,
26033,
52,
834,
23,
26,
1499,
6,
372,
1499,
6,
17809,
834,
969,
1499,
6,
23458,
834,
7168,
15,
1499,
6,
97,
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,
332,
4416,
4350,
6,
332,
5411,
11650,
21680,
23458,
6157,
332,
536,
3,
15355,
3162,
26033,
52,
6157,
332,
357,
9191,
332,
5411,
210,
6216,
1171,
834,
23,
26,
3274,
332,
4416,
210,
6216,
1171,
834,
23,
26,
4674,
1130... |
Name the score for vijay singh | CREATE TABLE table_name_8 (score VARCHAR, player VARCHAR) | SELECT score FROM table_name_8 WHERE player = "vijay singh" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
927,
41,
7,
9022,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
2604,
21,
5931,
1191,
63,
10159,
107,
1,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2604,
21680,
953,
834,
4350,
834,
927,
549,
17444,
427,
1959,
3274,
96,
2099,
1191,
63,
10159,
107,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Show the number of debates for each person on the negative side in a pie chart. | CREATE TABLE people (
People_ID int,
District text,
Name text,
Party text,
Age int
)
CREATE TABLE debate (
Debate_ID int,
Date text,
Venue text,
Num_of_Audience int
)
CREATE TABLE debate_people (
Debate_ID int,
Affirmative int,
Negative int,
If_Affirmative_Win bool
) | SELECT Name, COUNT(Name) FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Negative = T3.People_ID GROUP BY Name | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
151,
41,
2449,
834,
4309,
16,
17,
6,
3570,
1499,
6,
5570,
1499,
6,
3450,
1499,
6,
7526,
16,
17,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
5054,
41,
9794,
342,
834... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
5570,
6,
2847,
17161,
599,
23954,
61,
21680,
5054,
834,
16588,
6157,
332,
536,
3,
15355,
3162,
5054,
6157,
332,
357,
9191,
332,
5411,
2962,
3697,
15,
834,
4309,
3274,
332,
4416,
2962,
3697,
15,
834,
4309,
3,
15355,
... |
How many classes between senior and junior year for world history | CREATE TABLE table_19048 (
"SUBJECT" text,
"FRESHMAN (Grade 7)" text,
"SOPHOMORE (Grade 8)" text,
"JUNIOR (3rd Year)" text,
"SENIOR (4th Year)" text
) | SELECT COUNT("SENIOR (4th Year)") FROM table_19048 WHERE "JUNIOR (3rd Year)" = 'World History' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
11776,
3707,
41,
96,
4138,
279,
683,
14196,
121,
1499,
6,
96,
371,
12200,
566,
9312,
41,
4744,
221,
3,
12703,
121,
1499,
6,
96,
6582,
8023,
8638,
20888,
41,
4744,
221,
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,
25842,
196,
2990,
8457,
189,
2929,
61,
8512,
21680,
953,
834,
11776,
3707,
549,
17444,
427,
96,
683,
14284,
2990,
6918,
52,
26,
2929,
61,
121,
3274,
3,
31,
17954,
5528,
31,
1,
-100,
-100,
-100... |
How many flights in each destination city? Return a bar chart, and I want to rank y-axis in asc order please. | CREATE TABLE employee (
eid number(9,0),
name varchar2(30),
salary number(10,2)
)
CREATE TABLE flight (
flno number(4,0),
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0)
)
CREATE TABLE certificate (
eid number(9,0),
aid number(9,0)
)
CREATE TABLE aircraft (
aid number(9,0),
name varchar2(30),
distance number(6,0)
) | SELECT destination, COUNT(destination) FROM flight GROUP BY destination ORDER BY COUNT(destination) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3490,
41,
3,
15,
23,
26,
381,
599,
1298,
6,
632,
201,
564,
3,
4331,
4059,
357,
599,
1458,
201,
9090,
381,
599,
1714,
6,
7318,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3954,
6,
2847,
17161,
599,
13557,
257,
61,
21680,
3777,
350,
4630,
6880,
272,
476,
3954,
4674,
11300,
272,
476,
2847,
17161,
599,
13557,
257,
61,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What location has an enrollment greater than 1,313, and kingsmen as the mascot? | CREATE TABLE table_79232 (
"School" text,
"Mascot" text,
"Location" text,
"Enrollment" real,
"IHSAA Class" text,
"IHSAA Football Class" text,
"County" text
) | SELECT "Location" FROM table_79232 WHERE "Enrollment" > '1,313' AND "Mascot" = 'kingsmen' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4440,
23188,
41,
96,
29364,
121,
1499,
6,
96,
329,
9,
7,
4310,
121,
1499,
6,
96,
434,
32,
75,
257,
121,
1499,
6,
96,
8532,
4046,
297,
121,
490,
6,
96,
196,
4950,
5498,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
434,
32,
75,
257,
121,
21680,
953,
834,
4440,
23188,
549,
17444,
427,
96,
8532,
4046,
297,
121,
2490,
3,
31,
4347,
519,
2368,
31,
3430,
96,
329,
9,
7,
4310,
121,
3274,
3,
31,
1765,
7,
904,
31,
1,
-100,
-10... |
Name the total number of pop for ibaraki | CREATE TABLE table_name_10 (pop_¹ VARCHAR, prefecture VARCHAR) | SELECT COUNT(pop_¹) FROM table_name_10 WHERE prefecture = "ibaraki" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1714,
41,
9791,
834,
536,
584,
4280,
28027,
6,
554,
4075,
1462,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
792,
381,
13,
2783,
21,
3,
23,
1047... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
9791,
834,
6982,
21680,
953,
834,
4350,
834,
1714,
549,
17444,
427,
554,
4075,
1462,
3274,
96,
23,
1047,
11259,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Get me the number of patients admitted before 2198 who had diagnoses icd9 code 7830. | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2198" AND diagnoses.icd9_code = "7830" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
5... |
For those employees who do not work in departments with managers that have ids between 100 and 200, give me the comparison about manager_id over the last_name by a bar chart, list by the LAST_NAME from low to high please. | CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
) | SELECT LAST_NAME, MANAGER_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY LAST_NAME | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2476,
41,
446,
10539,
834,
4309,
3,
4331,
4059,
599,
16968,
6,
446,
10539,
834,
382,
3177,
3765,
3,
4331,
4059,
599,
2469,
201,
3,
17684,
834,
134,
4090,
24721,
7908,
1982,
599,
11071,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
301,
12510,
834,
567,
17683,
6,
283,
15610,
17966,
834,
4309,
21680,
1652,
549,
17444,
427,
4486,
3396,
19846,
11810,
834,
4309,
3388,
41,
23143,
14196,
3396,
19846,
11810,
834,
4309,
21680,
10521,
549,
17444,
427,
283,
... |
Which city has a conference of LCC2 and a year earlier than 2009? | CREATE TABLE table_32118 (
"Year" real,
"Conference" text,
"City" text,
"Country" text,
"Local Host(s)" text
) | SELECT "City" FROM table_32118 WHERE "Year" < '2009' AND "Conference" = 'lcc2' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2668,
20056,
41,
96,
476,
2741,
121,
490,
6,
96,
4302,
11788,
121,
1499,
6,
96,
254,
485,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
434,
32,
1489,
1546,
7,
17,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
254,
485,
121,
21680,
953,
834,
2668,
20056,
549,
17444,
427,
96,
476,
2741,
121,
3,
2,
3,
31,
16660,
31,
3430,
96,
4302,
11788,
121,
3274,
3,
31,
40,
75,
75,
357,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What time was the away game played against the High Park Demons? | CREATE TABLE table_name_35 (
time VARCHAR,
away VARCHAR
) | SELECT time FROM table_name_35 WHERE away = "high park demons" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2469,
41,
97,
584,
4280,
28027,
6,
550,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
97,
47,
8,
550,
467,
1944,
581,
8,
1592,
1061,
15782,
29,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
97,
21680,
953,
834,
4350,
834,
2469,
549,
17444,
427,
550,
3274,
96,
6739,
2447,
20,
2157,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
let me know the type of admission and short title of diagnoses for patient with patient id 74032. | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT demographic.admission_type, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "74032" | [
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,
14798,
5,
9,
26,
5451,
834,
6137,
6,
18730,
7,
5,
7,
14184,
834,
21869,
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,
549,
... |
give me the number of patients whose item id is 51214 and lab test abnormal status is abnormal? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.itemid = "51214" AND lab.flag = "abnormal" | [
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,
7690,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7690,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
Which Attendance has an Arena of arrowhead pond of anaheim, and a Loss of giguere (3–3)? | CREATE TABLE table_name_74 (attendance INTEGER, arena VARCHAR, loss VARCHAR) | SELECT MAX(attendance) FROM table_name_74 WHERE arena = "arrowhead pond of anaheim" AND loss = "giguere (3–3)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4581,
41,
15116,
663,
3,
21342,
17966,
6,
15134,
584,
4280,
28027,
6,
1453,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
22497,
663,
65,
46,
14904,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15116,
663,
61,
21680,
953,
834,
4350,
834,
4581,
549,
17444,
427,
15134,
3274,
96,
6770,
3313,
3,
7290,
13,
46,
9,
3254,
121,
3430,
1453,
3274,
96,
122,
15795,
60,
6918,
104,
5268,
121,
1,
-100,
-10... |
What is the total number of Silver for the Nation with more than 1 Bronze and a Rank less than 5? | CREATE TABLE table_name_26 (
silver VARCHAR,
bronze VARCHAR,
rank VARCHAR
) | SELECT COUNT(silver) FROM table_name_26 WHERE bronze > 1 AND rank < 5 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2688,
41,
4294,
584,
4280,
28027,
6,
13467,
584,
4280,
28027,
6,
11003,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
792,
381,
13,
5642,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
7,
173,
624,
61,
21680,
953,
834,
4350,
834,
2688,
549,
17444,
427,
13467,
2490,
209,
3430,
11003,
3,
2,
305,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the lowest against value with less than 2 draws, 10 points, and less than 4 lost? | CREATE TABLE table_name_17 (
against INTEGER,
lost VARCHAR,
drawn VARCHAR,
points VARCHAR
) | SELECT MIN(against) FROM table_name_17 WHERE drawn < 2 AND points = 10 AND lost < 4 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2517,
41,
581,
3,
21342,
17966,
6,
1513,
584,
4280,
28027,
6,
6796,
584,
4280,
28027,
6,
979,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
9,
16720,
7,
17,
61,
21680,
953,
834,
4350,
834,
2517,
549,
17444,
427,
6796,
3,
2,
204,
3430,
979,
3274,
335,
3430,
1513,
3,
2,
314,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the highest track number? | CREATE TABLE table_10848177_1 (track__number INTEGER) | SELECT MAX(track__number) FROM table_10848177_1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
16169,
3707,
26793,
834,
536,
41,
11991,
834,
834,
5525,
1152,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2030,
1463,
381,
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,
4800,
4,
599,
11991,
834,
834,
5525,
1152,
61,
21680,
953,
834,
16169,
3707,
26793,
834,
536,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Before 2007, how many wins were there when the point total was 48? | CREATE TABLE table_name_10 (
wins INTEGER,
points VARCHAR,
year VARCHAR
) | SELECT SUM(wins) FROM table_name_10 WHERE points = "48" AND year < 2007 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1714,
41,
9204,
3,
21342,
17966,
6,
979,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
3103,
11979,
149,
186,
9204,
130,
132,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
180,
6122,
599,
3757,
7,
61,
21680,
953,
834,
4350,
834,
1714,
549,
17444,
427,
979,
3274,
96,
3707,
121,
3430,
215,
3,
2,
4101,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the capacity for b national - basketball? | CREATE TABLE table_name_93 (
capacity VARCHAR,
leagues VARCHAR
) | SELECT COUNT(capacity) FROM table_name_93 WHERE leagues = "b national - basketball" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4271,
41,
2614,
584,
4280,
28027,
6,
5533,
7,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2614,
21,
3,
115,
1157,
3,
18,
8498,
58,
1,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
4010,
9,
6726,
61,
21680,
953,
834,
4350,
834,
4271,
549,
17444,
427,
5533,
7,
3274,
96,
115,
1157,
3,
18,
8498,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
The Liberal Ticket listed which candidate when Jack A. Martin was listed on the Free Libertarian Ticket? | CREATE TABLE table_6925 (
"Office" text,
"Democratic ticket" text,
"Republican ticket" text,
"Conservative ticket" text,
"Liberal ticket" text,
"Free Libertarian ticket" text,
"Socialist Labor ticket" text
) | SELECT "Liberal ticket" FROM table_6925 WHERE "Free Libertarian ticket" = 'jack a. martin' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3951,
1828,
41,
96,
22098,
121,
1499,
6,
96,
19679,
447,
4142,
121,
1499,
6,
96,
1649,
15727,
152,
4142,
121,
1499,
6,
96,
4302,
3473,
1528,
4142,
121,
1499,
6,
96,
14615,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14615,
49,
138,
4142,
121,
21680,
953,
834,
3951,
1828,
549,
17444,
427,
96,
16393,
12774,
17,
6855,
4142,
121,
3274,
3,
31,
9325,
3,
9,
5,
3157,
17,
77,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
For those records from the products and each product's manufacturer, visualize the relationship between manufacturer and code , and group by attribute founder. | CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | SELECT T1.Manufacturer, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
15248,
7,
41,
3636,
3,
21342,
17966,
6,
5570,
584,
4280,
28027,
599,
25502,
201,
3642,
19973,
584,
4280,
28027,
599,
25502,
201,
3,
19145,
584,
4280,
28027,
599,
25502,
201,
19764,
17833... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
332,
5411,
7296,
76,
8717,
450,
49,
6,
332,
5411,
22737,
21680,
7554,
6157,
332,
536,
3,
15355,
3162,
15248,
7,
6157,
332,
357,
9191,
332,
5411,
7296,
76,
8717,
450,
49,
3274,
332,
4416,
22737,
350,
4630,
6880,
272,... |
their final points is equal to 15 | CREATE TABLE table_203_439 (
id number,
"pos." number,
"rider" text,
"semi-final points" number,
"final points" number,
"final heats" text,
"total points" number
) | SELECT "rider" FROM table_203_439 WHERE "final points" = 15 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
591,
3288,
41,
3,
23,
26,
381,
6,
96,
2748,
535,
381,
6,
96,
4055,
49,
121,
1499,
6,
96,
7,
15,
51,
23,
18,
12406,
979,
121,
381,
6,
96,
12406,
979,
121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
4055,
49,
121,
21680,
953,
834,
23330,
834,
591,
3288,
549,
17444,
427,
96,
12406,
979,
121,
3274,
627,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the status of the match with 24 against? | CREATE TABLE table_name_19 (
status VARCHAR,
against VARCHAR
) | SELECT status FROM table_name_19 WHERE against = 24 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2294,
41,
2637,
584,
4280,
28027,
6,
581,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2637,
13,
8,
1588,
28,
997,
581,
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,
2637,
21680,
953,
834,
4350,
834,
2294,
549,
17444,
427,
581,
3274,
997,
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 position of the player from college of virginia | CREATE TABLE table_name_96 (position VARCHAR, college VARCHAR) | SELECT position FROM table_name_96 WHERE college = "virginia" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4314,
41,
4718,
584,
4280,
28027,
6,
1900,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
1102,
13,
8,
1959,
45,
1900,
13,
24556,
23,
9,
1,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1102,
21680,
953,
834,
4350,
834,
4314,
549,
17444,
427,
1900,
3274,
96,
5771,
122,
77,
23,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Show the average age for all female students and group them by first name in a bar chart. | CREATE TABLE Allergy_Type (
Allergy VARCHAR(20),
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20)
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
) | SELECT Fname, AVG(Age) FROM Student WHERE Sex = 'F' GROUP BY Fname | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
432,
49,
122,
63,
834,
25160,
41,
432,
49,
122,
63,
584,
4280,
28027,
599,
1755,
201,
432,
49,
122,
63,
25160,
584,
4280,
28027,
599,
1755,
61,
3,
61,
3,
32102,
32103,
32102,
205,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
377,
4350,
6,
71,
17217,
599,
188,
397,
61,
21680,
6341,
549,
17444,
427,
679,
226,
3274,
3,
31,
371,
31,
350,
4630,
6880,
272,
476,
377,
4350,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What Rodger Corser Episode has a Rank of senior sergeant? | CREATE TABLE table_13069 (
"Actor/actress" text,
"Character" text,
"Rank" text,
"Tenure" text,
"Episodes" text
) | SELECT "Episodes" FROM table_13069 WHERE "Rank" = 'senior sergeant' AND "Actor/actress" = 'rodger corser' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
21448,
3951,
41,
96,
188,
5317,
87,
2708,
9377,
121,
1499,
6,
96,
18947,
2708,
49,
121,
1499,
6,
96,
22557,
121,
1499,
6,
96,
382,
35,
1462,
121,
1499,
6,
96,
427,
102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
427,
102,
159,
32,
1395,
121,
21680,
953,
834,
21448,
3951,
549,
17444,
427,
96,
22557,
121,
3274,
3,
31,
7,
35,
23,
127,
7637,
397,
288,
31,
3430,
96,
188,
5317,
87,
2708,
9377,
121,
3274,
3,
31,
9488,
1304... |
Which Population is the lowest one that has a Median family income of $74,905, and a Number of households smaller than 145,790? | CREATE TABLE table_name_37 (population INTEGER, median_family_income VARCHAR, number_of_households VARCHAR) | SELECT MIN(population) FROM table_name_37 WHERE median_family_income = "$74,905" AND number_of_households < 145 OFFSET 790 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4118,
41,
9791,
7830,
3,
21342,
17966,
6,
15572,
834,
15474,
834,
15759,
584,
4280,
28027,
6,
381,
834,
858,
834,
1840,
6134,
7,
584,
4280,
28027,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
9791,
7830,
61,
21680,
953,
834,
4350,
834,
4118,
549,
17444,
427,
15572,
834,
15474,
834,
15759,
3274,
96,
3229,
4581,
6,
2394,
17395,
3430,
381,
834,
858,
834,
1840,
6134,
7,
3,
2,
3,
20987,
3,
15... |
What was the lowest attendance at a game when there were fewer than 151 away fans and an opponent of Bury? | CREATE TABLE table_69283 (
"Date" text,
"Opponent" text,
"Venue" text,
"Result" text,
"Attendance" real,
"Away Fans" real
) | SELECT MIN("Attendance") FROM table_69283 WHERE "Away Fans" < '151' AND "Opponent" = 'bury' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3951,
2577,
519,
41,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
553,
35,
76,
15,
121,
1499,
6,
96,
20119,
121,
1499,
6,
96,
188,
17,
324,
26,
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,
17684,
599,
121,
188,
17,
324,
26,
663,
8512,
21680,
953,
834,
3951,
2577,
519,
549,
17444,
427,
96,
188,
1343,
15353,
121,
3,
2,
3,
31,
26578,
31,
3430,
96,
667,
102,
9977,
121,
3274,
3,
31,
7165,
31,
1,
-... |
How many tries against were there with points of 150? | CREATE TABLE table_17941032_2 (tries_against VARCHAR, points_for VARCHAR) | SELECT tries_against FROM table_17941032_2 WHERE points_for = "150" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26593,
24175,
2668,
834,
357,
41,
9000,
834,
9,
16720,
7,
17,
584,
4280,
28027,
6,
979,
834,
1161,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
3,
9000,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
9000,
834,
9,
16720,
7,
17,
21680,
953,
834,
26593,
24175,
2668,
834,
357,
549,
17444,
427,
979,
834,
1161,
3274,
96,
12278,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
who is the driver with the engine era 1.5 l6 s and the chassis is era b? | CREATE TABLE table_54040 (
"Driver" text,
"Entrant" text,
"Constructor" text,
"Chassis" text,
"Engine" text,
"Tyre" text
) | SELECT "Driver" FROM table_54040 WHERE "Engine" = 'era 1.5 l6 s' AND "Chassis" = 'era b' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
25379,
2445,
41,
96,
20982,
52,
121,
1499,
6,
96,
16924,
3569,
121,
1499,
6,
96,
4302,
7593,
127,
121,
1499,
6,
96,
3541,
6500,
7,
121,
1499,
6,
96,
31477,
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,
20982,
52,
121,
21680,
953,
834,
25379,
2445,
549,
17444,
427,
96,
31477,
121,
3274,
3,
31,
1498,
8613,
3,
40,
948,
3,
7,
31,
3430,
96,
3541,
6500,
7,
121,
3274,
3,
31,
1498,
3,
115,
31,
1,
-100,
-100,
-10... |
How man fans showed up to watch the game versus the raleigh-durham skyhawks? | CREATE TABLE table_26870 (
"Week" real,
"Date" text,
"Kickoff" text,
"Opponent" text,
"Final score" text,
"Team record" text,
"Game site" text,
"Attendance" real
) | SELECT MAX("Attendance") FROM table_26870 WHERE "Opponent" = 'Raleigh-Durham Skyhawks' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
3651,
2518,
41,
96,
518,
10266,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
439,
3142,
1647,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
371,
10270,
2604,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
188,
17,
324,
26,
663,
8512,
21680,
953,
834,
357,
3651,
2518,
549,
17444,
427,
96,
667,
102,
9977,
121,
3274,
3,
31,
448,
9,
23260,
18,
308,
450,
1483,
5643,
14400,
7,
31,
1,
-100,
-100,
-100... |
What is the lowest total of the player with a t41 finish? | CREATE TABLE table_name_25 (total INTEGER, finish VARCHAR) | SELECT MIN(total) FROM table_name_25 WHERE finish = "t41" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1828,
41,
235,
1947,
3,
21342,
17966,
6,
1992,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
7402,
792,
13,
8,
1959,
28,
3,
9,
3,
17,
4853,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3,
17684,
599,
235,
1947,
61,
21680,
953,
834,
4350,
834,
1828,
549,
17444,
427,
1992,
3274,
96,
17,
4853,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the week 12 opponent for the year that had a week 3 opponent of South Florida (3-0)? | CREATE TABLE table_name_6 (
week_12_nov_16 VARCHAR,
week_3_sept_14 VARCHAR
) | SELECT week_12_nov_16 FROM table_name_6 WHERE week_3_sept_14 = "south florida (3-0)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
948,
41,
471,
834,
2122,
834,
5326,
834,
2938,
584,
4280,
28027,
6,
471,
834,
519,
834,
7,
6707,
834,
2534,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
3210... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
471,
834,
2122,
834,
5326,
834,
2938,
21680,
953,
834,
4350,
834,
948,
549,
17444,
427,
471,
834,
519,
834,
7,
6707,
834,
2534,
3274,
96,
7,
670,
107,
12215,
26,
9,
41,
22773,
61,
121,
1,
-100,
-100,
-100,
-100,
... |
Who was Al Michaels' color commentator in 2003? | CREATE TABLE table_33472 (
"Year" real,
"Network" text,
"Play-by-play" text,
"Color commentator(s)" text,
"Sideline reporter(s)" text
) | SELECT "Color commentator(s)" FROM table_33472 WHERE "Play-by-play" = 'al michaels' AND "Year" > '2003' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4201,
4177,
357,
41,
96,
476,
2741,
121,
490,
6,
96,
9688,
1981,
121,
1499,
6,
96,
15800,
18,
969,
18,
4895,
121,
1499,
6,
96,
3881,
322,
1670,
1016,
599,
7,
61,
121,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
3881,
322,
1670,
1016,
599,
7,
61,
121,
21680,
953,
834,
4201,
4177,
357,
549,
17444,
427,
96,
15800,
18,
969,
18,
4895,
121,
3274,
3,
31,
138,
2278,
9,
3573,
31,
3430,
96,
476,
2741,
121,
2490,
3,
31,
23948... |
give the discharge location of subject id 6983. | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) | SELECT demographic.discharge_location FROM demographic WHERE demographic.subject_id = "6983" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
14798,
5,
26,
159,
7993,
834,
14836,
21680,
14798,
549,
17444,
427,
14798,
5,
7304,
11827,
834,
23,
26,
3274,
96,
3951,
4591,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Show ids for all documents in type CV without expense budgets. | CREATE TABLE Documents_with_expenses (document_id VARCHAR, document_type_code VARCHAR); CREATE TABLE Documents (document_id VARCHAR, document_type_code VARCHAR) | SELECT document_id FROM Documents WHERE document_type_code = "CV" EXCEPT SELECT document_id FROM Documents_with_expenses | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
11167,
7,
834,
4065,
834,
994,
3801,
15,
7,
41,
28244,
834,
23,
26,
584,
4280,
28027,
6,
1708,
834,
6137,
834,
4978,
584,
4280,
28027,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
1708,
834,
23,
26,
21680,
11167,
7,
549,
17444,
427,
1708,
834,
6137,
834,
4978,
3274,
96,
20410,
121,
262,
4,
30416,
3,
23143,
14196,
1708,
834,
23,
26,
21680,
11167,
7,
834,
4065,
834,
994,
3801,
15,
7,
1,
-100,... |
Which Party has Years in Senate of , and Years in Assembly of 2012 present? | CREATE TABLE table_59661 (
"Name" text,
"Residence" text,
"Party" text,
"Years in Assembly" text,
"Years in Senate" text
) | SELECT "Party" FROM table_59661 WHERE "Years in Senate" = '—' AND "Years in Assembly" = '2012–present' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3390,
3539,
536,
41,
96,
23954,
121,
1499,
6,
96,
1649,
1583,
3772,
121,
1499,
6,
96,
13725,
63,
121,
1499,
6,
96,
476,
2741,
7,
16,
11993,
121,
1499,
6,
96,
476,
2741,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13725,
63,
121,
21680,
953,
834,
3390,
3539,
536,
549,
17444,
427,
96,
476,
2741,
7,
16,
7819,
121,
3274,
3,
31,
318,
31,
3430,
96,
476,
2741,
7,
16,
11993,
121,
3274,
3,
31,
12172,
104,
12640,
31,
1,
-100,
... |
What is the name of the person from series bb1 with a hometown of Bolton? | CREATE TABLE table_14759 (
"Series" text,
"Name" text,
"Hometown" text,
"Occupation" text,
"Status" text
) | SELECT "Name" FROM table_14759 WHERE "Series" = 'bb1' AND "Hometown" = 'bolton' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
24719,
3390,
41,
96,
12106,
7,
121,
1499,
6,
96,
23954,
121,
1499,
6,
96,
19040,
3540,
121,
1499,
6,
96,
667,
75,
4658,
257,
121,
1499,
6,
96,
134,
17,
144,
302,
121,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
23954,
121,
21680,
953,
834,
24719,
3390,
549,
17444,
427,
96,
12106,
7,
121,
3274,
3,
31,
115,
115,
536,
31,
3430,
96,
19040,
3540,
121,
3274,
3,
31,
4243,
17,
106,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the result of W. Jasper Talbert who was first elected in 1892? | CREATE TABLE table_36747 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" text,
"Result" text
) | SELECT "Result" FROM table_36747 WHERE "First elected" = '1892' AND "Incumbent" = 'w. jasper talbert' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
519,
3708,
4177,
41,
96,
308,
23,
20066,
121,
1499,
6,
96,
1570,
75,
5937,
295,
121,
1499,
6,
96,
13725,
63,
121,
1499,
6,
96,
25171,
8160,
121,
1499,
6,
96,
20119,
121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
20119,
121,
21680,
953,
834,
519,
3708,
4177,
549,
17444,
427,
96,
25171,
8160,
121,
3274,
3,
31,
2606,
4508,
31,
3430,
96,
1570,
75,
5937,
295,
121,
3274,
3,
31,
210,
5,
2662,
4339,
3,
1947,
7041,
31,
1,
-1... |
what is the number of times patient 027-120477 has received a mcv lab test on their last hospital encounter? | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE 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 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 allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
) | SELECT COUNT(*) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-120477' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1)) AND lab.labname = 'mcv' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7690,
41,
50,
9824,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
7690,
4350,
1499,
6,
50,
1999,
7,
83,
17,
381,
6,
50,
1999,
7,
83,
17,
715,
97,
3,
61,
3,
32102,
32103,
32102,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
7690,
549,
17444,
427,
7690,
5,
10061,
15129,
21545,
23,
26,
3388,
41,
23143,
14196,
1868,
5,
10061,
15129,
21545,
23,
26,
21680,
1868,
549,
17444,
427,
1868,
5,
10061,
15878,
3734,
... |
what is the average points when played is less than 16? | CREATE TABLE table_8629 (
"Position" real,
"Name" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Points" real
) | SELECT AVG("Points") FROM table_8629 WHERE "Played" < '16' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3840,
3166,
41,
96,
345,
32,
7,
4749,
121,
490,
6,
96,
23954,
121,
1499,
6,
96,
15800,
15,
26,
121,
490,
6,
96,
308,
10936,
29,
121,
490,
6,
96,
434,
3481,
121,
490,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
121,
22512,
7,
8512,
21680,
953,
834,
3840,
3166,
549,
17444,
427,
96,
15800,
15,
26,
121,
3,
2,
3,
31,
2938,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Who was the opponent for game 75? | CREATE TABLE table_name_96 (
opponent VARCHAR,
game VARCHAR
) | SELECT opponent FROM table_name_96 WHERE game = 75 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4314,
41,
15264,
584,
4280,
28027,
6,
467,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
8,
15264,
21,
467,
6374,
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,
15264,
21680,
953,
834,
4350,
834,
4314,
549,
17444,
427,
467,
3274,
6374,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.