NATURAL_LANG stringlengths 0 446 | SCHEMA stringlengths 27 2.21k | SQL stringlengths 18 453 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|
What was McCain's vote when Obama had 48.35% | CREATE TABLE table_20722805_1 (mccain_number INTEGER, obama_percentage VARCHAR) | SELECT MIN(mccain_number) FROM table_20722805_1 WHERE obama_percentage = "48.35%" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1755,
5865,
2577,
3076,
834,
536,
41,
51,
12464,
77,
834,
5525,
1152,
3,
21342,
17966,
6,
3,
32,
115,
265,
9,
834,
883,
3728,
545,
584,
4280,
28027,
61,
3,
32102,
32103,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
51,
12464,
77,
834,
5525,
1152,
61,
21680,
953,
834,
1755,
5865,
2577,
3076,
834,
536,
549,
17444,
427,
3,
32,
115,
265,
9,
834,
883,
3728,
545,
3274,
96,
3707,
5,
519,
2712,
121,
1,
-100,
-100,
-... |
Give me a histogram for what are the name and level of catalog structure with level number between 5 and 10, list by the x axis in desc. | CREATE TABLE Catalogs (
catalog_id INTEGER,
catalog_name VARCHAR(50),
catalog_publisher VARCHAR(80),
date_of_publication DATETIME,
date_of_latest_revision DATETIME
)
CREATE TABLE Attribute_Definitions (
attribute_id INTEGER,
attribute_name VARCHAR(30),
attribute_data_type VARCHAR(10)
)
... | SELECT catalog_level_name, catalog_level_number FROM Catalog_Structure WHERE catalog_level_number BETWEEN 5 AND 10 ORDER BY catalog_level_name DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
22424,
7,
41,
10173,
834,
23,
26,
3,
21342,
17966,
6,
10173,
834,
4350,
584,
4280,
28027,
599,
1752,
201,
10173,
834,
29337,
49,
584,
4280,
28027,
599,
2079,
201,
833,
834,
858,
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,
10173,
834,
4563,
834,
4350,
6,
10173,
834,
4563,
834,
5525,
1152,
21680,
22424,
834,
134,
17,
11783,
2693,
549,
17444,
427,
10173,
834,
4563,
834,
5525,
1152,
272,
7969,
518,
23394,
305,
3430,
335,
4674,
11300,
272,
... |
How many people vacated to successor Dave E. Satterfield, Jr. (d)? | CREATE TABLE table_2159547_3 (
vacator VARCHAR,
successor VARCHAR
) | SELECT COUNT(vacator) FROM table_2159547_3 WHERE successor = "Dave E. Satterfield, Jr. (D)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
1808,
3301,
4177,
834,
519,
41,
3,
8938,
1016,
584,
4280,
28027,
6,
22261,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
151,
3,
8938,
920,
12,
222... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
8938,
1016,
61,
21680,
953,
834,
357,
1808,
3301,
4177,
834,
519,
549,
17444,
427,
22261,
3274,
96,
308,
9,
162,
262,
5,
180,
12828,
1846,
6,
8206,
5,
41,
308,
61,
121,
1,
-100,
-100,
-100,
-100,... |
What class had 1 made and fleet number of 406? | CREATE TABLE table_name_36 (
class VARCHAR,
quantity_made VARCHAR,
fleet_number_s_ VARCHAR
) | SELECT class FROM table_name_36 WHERE quantity_made = "1" AND fleet_number_s_ = "406" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3420,
41,
853,
584,
4280,
28027,
6,
8708,
834,
4725,
584,
4280,
28027,
6,
9111,
834,
5525,
1152,
834,
7,
834,
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,
853,
21680,
953,
834,
4350,
834,
3420,
549,
17444,
427,
8708,
834,
4725,
3274,
96,
536,
121,
3430,
9111,
834,
5525,
1152,
834,
7,
834,
3274,
96,
2445,
948,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
what does patient 015-8398 age be in their last hospital encounter? | CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetake... | SELECT patient.age FROM patient WHERE patient.uniquepid = '015-8398' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7757,
41,
7757,
23,
26,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
2672,
4350,
1499,
6,
17166,
1499,
6,
2981,
20466,
29,
1499,
6,
2672,
10208,
715,
97,
6,
4845,
2916,
715,
97,
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,
1868,
5,
545,
21680,
1868,
549,
17444,
427,
1868,
5,
202,
1495,
12417,
3274,
3,
31,
4542,
27698,
519,
3916,
31,
3430,
4486,
1868,
5,
31386,
26,
159,
7993,
715,
6827,
13046,
10376,
4674,
11300,
272,
476,
1868,
5,
313... |
what is the sum of matches when the player is jim laker and wikets is less than 9? | CREATE TABLE table_name_25 (
matches INTEGER,
player VARCHAR,
wickets VARCHAR
) | SELECT SUM(matches) FROM table_name_25 WHERE player = "jim laker" AND wickets < 9 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1828,
41,
6407,
3,
21342,
17966,
6,
1959,
584,
4280,
28027,
6,
29719,
7,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
125,
19,
8,
4505,
13,
6407,
116,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
180,
6122,
599,
19515,
15,
7,
61,
21680,
953,
834,
4350,
834,
1828,
549,
17444,
427,
1959,
3274,
96,
354,
603,
50,
2304,
121,
3430,
29719,
7,
3,
2,
668,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Which Division does the City being jacksonville, florida belong to? | CREATE TABLE table_name_14 (
division VARCHAR,
city VARCHAR
) | SELECT division FROM table_name_14 WHERE city = "jacksonville, florida" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2534,
41,
4889,
584,
4280,
28027,
6,
690,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
6022,
405,
8,
896,
271,
3,
9325,
739,
1420,
6,
12215,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4889,
21680,
953,
834,
4350,
834,
2534,
549,
17444,
427,
690,
3274,
96,
9325,
739,
1420,
6,
12215,
26,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
give me the number of patients whose age is less than 27 and lab test abnormal status is delta? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "27" AND lab.flag = "delta" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7690,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7690,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
What is the Music if the Dance is Jive? | CREATE TABLE table_43107 (
"Team" text,
"Dance" text,
"Music" text,
"Points jury" text,
"Place" text
) | SELECT "Music" FROM table_43107 WHERE "Dance" = 'jive' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4906,
18057,
41,
96,
18699,
121,
1499,
6,
96,
308,
663,
121,
1499,
6,
96,
29035,
121,
1499,
6,
96,
22512,
7,
12730,
121,
1499,
6,
96,
345,
11706,
121,
1499,
3,
61,
3,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
3,
23143,
14196,
96,
29035,
121,
21680,
953,
834,
4906,
18057,
549,
17444,
427,
96,
308,
663,
121,
3274,
3,
31,
354,
757,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
How much Gold has a Nation of mongolia, and a Total larger than 18? | CREATE TABLE table_name_37 (gold INTEGER, nation VARCHAR, total VARCHAR) | SELECT SUM(gold) FROM table_name_37 WHERE nation = "mongolia" AND total > 18 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4118,
41,
14910,
3,
21342,
17966,
6,
2982,
584,
4280,
28027,
6,
792,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
231,
2540,
65,
3,
9,
11046,
13,
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
180,
6122,
599,
14910,
61,
21680,
953,
834,
4350,
834,
4118,
549,
17444,
427,
2982,
3274,
96,
2157,
7579,
23,
9,
121,
3430,
792,
2490,
507,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the Event in the city of copenhagen? | CREATE TABLE table_71054 (
"Date" text,
"City" text,
"Event" text,
"Winner" text,
"Prize" text
) | SELECT "Event" FROM table_71054 WHERE "City" = 'copenhagen' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4450,
3076,
591,
41,
96,
308,
342,
121,
1499,
6,
96,
254,
485,
121,
1499,
6,
96,
427,
2169,
121,
1499,
6,
96,
18455,
687,
121,
1499,
6,
96,
7855,
776,
121,
1499,
3,
61,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
427,
2169,
121,
21680,
953,
834,
4450,
3076,
591,
549,
17444,
427,
96,
254,
485,
121,
3274,
3,
31,
10845,
35,
1024,
729,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the notion when the crystal structure is tetragonal and the formula is bi 2 sr 2 cacu 2 o 8 | CREATE TABLE table_101336_1 (
notation VARCHAR,
crystal_structure VARCHAR,
formula VARCHAR
) | SELECT notation FROM table_101336_1 WHERE crystal_structure = "Tetragonal" AND formula = "Bi 2 Sr 2 CaCu 2 O 8" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1714,
2368,
3420,
834,
536,
41,
59,
257,
584,
4280,
28027,
6,
6884,
834,
16180,
584,
4280,
28027,
6,
5403,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
59,
257,
21680,
953,
834,
1714,
2368,
3420,
834,
536,
549,
17444,
427,
6884,
834,
16180,
3274,
96,
382,
15,
5031,
9533,
121,
3430,
5403,
3274,
96,
279,
23,
204,
180,
52,
204,
1336,
15784,
204,
411,
505,
121,
1,
-1... |
what is the heat when the athlete is anita pistone? | CREATE TABLE table_name_89 (heat INTEGER, athlete VARCHAR) | SELECT SUM(heat) FROM table_name_89 WHERE athlete = "anita pistone" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3914,
41,
88,
144,
3,
21342,
17966,
6,
17893,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
125,
19,
8,
1678,
116,
8,
17893,
19,
46,
155,
9,
28688,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
180,
6122,
599,
88,
144,
61,
21680,
953,
834,
4350,
834,
3914,
549,
17444,
427,
17893,
3274,
96,
152,
155,
9,
28688,
15,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Show a bar graph, the data is those times of trains that run through stations for the local authority Chiltern, and the Y axis is the total number of different times, display X from low to high order please. | CREATE TABLE station (
id int,
network_name text,
services text,
local_authority text
)
CREATE TABLE route (
train_id int,
station_id int
)
CREATE TABLE weekly_weather (
station_id int,
day_of_week text,
high_temperature int,
low_temperature int,
precipitation real,
win... | SELECT time, COUNT(time) FROM station AS t1 JOIN route AS t2 ON t1.id = t2.station_id JOIN train AS t3 ON t2.train_id = t3.id WHERE t1.local_authority = "Chiltern" GROUP BY time ORDER BY time | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2478,
41,
3,
23,
26,
16,
17,
6,
1229,
834,
4350,
1499,
6,
364,
1499,
6,
415,
834,
17415,
485,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
2981,
41,
2412,
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,
97,
6,
2847,
17161,
599,
715,
61,
21680,
2478,
6157,
3,
17,
536,
3,
15355,
3162,
2981,
6157,
3,
17,
357,
9191,
3,
17,
5411,
23,
26,
3274,
3,
17,
4416,
6682,
834,
23,
26,
3,
15355,
3162,
2412,
6157,
3,
17,
519,... |
What is the series minimum if the season number is 2.08? | CREATE TABLE table_24639086_3 (series__number INTEGER, season__number VARCHAR) | SELECT MIN(series__number) FROM table_24639086_3 WHERE season__number = "2.08" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2266,
3891,
2394,
3840,
834,
519,
41,
10833,
7,
834,
834,
5525,
1152,
3,
21342,
17966,
6,
774,
834,
834,
5525,
1152,
584,
4280,
28027,
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
10833,
7,
834,
834,
5525,
1152,
61,
21680,
953,
834,
2266,
3891,
2394,
3840,
834,
519,
549,
17444,
427,
774,
834,
834,
5525,
1152,
3274,
96,
4416,
4018,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Name the Outcome has a Surface of hard, and a Score in the final of 6 2, 6 4? | CREATE TABLE table_61330 (
"Outcome" text,
"Date" real,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents in the final" text,
"Score in the final" text
) | SELECT "Outcome" FROM table_61330 WHERE "Surface" = 'hard' AND "Score in the final" = '6–2, 6–4' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4241,
17225,
41,
96,
15767,
287,
15,
121,
1499,
6,
96,
308,
342,
121,
490,
6,
96,
382,
1211,
20205,
17,
121,
1499,
6,
96,
134,
450,
4861,
121,
1499,
6,
96,
13725,
687,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15767,
287,
15,
121,
21680,
953,
834,
4241,
17225,
549,
17444,
427,
96,
134,
450,
4861,
121,
3274,
3,
31,
5651,
31,
3430,
96,
134,
9022,
16,
8,
804,
121,
3274,
3,
31,
948,
104,
4482,
431,
104,
591,
31,
1,
... |
How many points did the club with 13 losses and 461 points against have? | CREATE TABLE table_name_59 (points VARCHAR, lost VARCHAR, points_against VARCHAR) | SELECT points FROM table_name_59 WHERE lost = "13" AND points_against = "461" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3390,
41,
2700,
7,
584,
4280,
28027,
6,
1513,
584,
4280,
28027,
6,
979,
834,
9,
16720,
7,
17,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
979,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
979,
21680,
953,
834,
4350,
834,
3390,
549,
17444,
427,
1513,
3274,
96,
2368,
121,
3430,
979,
834,
9,
16720,
7,
17,
3274,
96,
4448,
536,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
How many schools are listed for the player who played the years for Jazz in 2010-11? | CREATE TABLE table_11545282_5 (
school_club_team VARCHAR,
years_for_jazz VARCHAR
) | SELECT COUNT(school_club_team) FROM table_11545282_5 WHERE years_for_jazz = "2010-11" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
15660,
2128,
2577,
357,
834,
755,
41,
496,
834,
13442,
834,
11650,
584,
4280,
28027,
6,
203,
834,
1161,
834,
1191,
5271,
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,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
6646,
834,
13442,
834,
11650,
61,
21680,
953,
834,
15660,
2128,
2577,
357,
834,
755,
549,
17444,
427,
203,
834,
1161,
834,
1191,
5271,
3274,
96,
14926,
9169,
121,
1,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the Finish on June 1, 2008? | CREATE TABLE table_name_61 (finish VARCHAR, date VARCHAR) | SELECT finish FROM table_name_61 WHERE date = "june 1, 2008" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4241,
41,
25535,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
17578,
30,
1515,
1914,
2628,
58,
1,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1992,
21680,
953,
834,
4350,
834,
4241,
549,
17444,
427,
833,
3274,
96,
6959,
15,
1914,
2628,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
List the carriers of devices that have no devices in stock. | CREATE TABLE stock (
shop_id number,
device_id number,
quantity number
)
CREATE TABLE shop (
shop_id number,
shop_name text,
location text,
open_date text,
open_year number
)
CREATE TABLE device (
device_id number,
device text,
carrier text,
package_version text,
ap... | SELECT carrier FROM device WHERE NOT device_id IN (SELECT device_id FROM stock) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1519,
41,
1814,
834,
23,
26,
381,
6,
1407,
834,
23,
26,
381,
6,
8708,
381,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
1814,
41,
1814,
834,
23,
26,
381,
6,
1814,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
9568,
21680,
1407,
549,
17444,
427,
4486,
1407,
834,
23,
26,
3388,
41,
23143,
14196,
1407,
834,
23,
26,
21680,
1519,
61,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
return me the journal, which have the most number of papers by ' H. V. Jagadish ' . | CREATE TABLE domain (
did int,
name varchar
)
CREATE TABLE writes (
aid int,
pid int
)
CREATE TABLE keyword (
keyword varchar,
kid int
)
CREATE TABLE domain_publication (
did int,
pid int
)
CREATE TABLE cite (
cited int,
citing int
)
CREATE TABLE conference (
cid int,
... | SELECT journal.name FROM author, journal, publication, writes WHERE author.name = 'H. V. Jagadish' AND publication.jid = journal.jid AND writes.aid = author.aid AND writes.pid = publication.pid GROUP BY journal.name ORDER BY COUNT(DISTINCT (publication.title)) DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3303,
41,
410,
16,
17,
6,
564,
3,
4331,
4059,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
11858,
41,
3052,
16,
17,
6,
3,
12417,
16,
17,
3,
61,
3,
32102,
32103,
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,
6378,
5,
4350,
21680,
2291,
6,
6378,
6,
5707,
6,
11858,
549,
17444,
427,
2291,
5,
4350,
3274,
3,
31,
566,
5,
584,
5,
21520,
9,
26,
1273,
31,
3430,
5707,
5,
354,
23,
26,
3274,
6378,
5,
354,
23,
26,
3430,
11858,... |
What is the winning score for the runner-up Ernie Els? | CREATE TABLE table_name_7 (winning_score VARCHAR, runner_s__up VARCHAR) | SELECT winning_score FROM table_name_7 WHERE runner_s__up = "ernie els" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
940,
41,
8163,
834,
7,
9022,
584,
4280,
28027,
6,
3,
10806,
834,
7,
834,
834,
413,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
3447,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3447,
834,
7,
9022,
21680,
953,
834,
4350,
834,
940,
549,
17444,
427,
3,
10806,
834,
7,
834,
834,
413,
3274,
96,
15,
23752,
3,
3573,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many different total EVAs are there for the walk that lasted 45:34? | CREATE TABLE table_938 (
"Number" real,
"Astronaut" text,
"Agency" text,
"Total EVAs" real,
"Total Time Hours:Minutes" text
) | SELECT COUNT("Total EVAs") FROM table_938 WHERE "Total Time Hours:Minutes" = '45:34' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4271,
927,
41,
96,
567,
5937,
49,
121,
490,
6,
96,
188,
6626,
15785,
121,
1499,
6,
96,
188,
122,
4392,
121,
1499,
6,
96,
3696,
1947,
262,
8230,
7,
121,
490,
6,
96,
3696... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
3696,
1947,
262,
8230,
7,
8512,
21680,
953,
834,
4271,
927,
549,
17444,
427,
96,
3696,
1947,
2900,
10768,
7,
10,
12858,
2810,
7,
121,
3274,
3,
31,
2128,
10,
3710,
31,
1,
-100,
-100,
-100,
-1... |
Name the real life years of operation for amtrak | CREATE TABLE table_26781 (
"Railroad" text,
"Game Cost" text,
"Real-Life Years of Operation" text,
"Real-Life Eventual Outcome" text,
"Currently\u00b9 Part Of..." text
) | SELECT "Real-Life Years of Operation" FROM table_26781 WHERE "Currently\u00b9 Part Of..." = 'Amtrak' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2688,
3940,
536,
41,
96,
448,
9,
173,
8635,
121,
1499,
6,
96,
23055,
6409,
121,
1499,
6,
96,
1649,
138,
18,
16427,
13825,
13,
6411,
1575,
121,
1499,
6,
96,
1649,
138,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
1649,
138,
18,
16427,
13825,
13,
6411,
1575,
121,
21680,
953,
834,
2688,
3940,
536,
549,
17444,
427,
96,
8212,
2,
76,
1206,
115,
1298,
2733,
1129,
10011,
3274,
3,
31,
8123,
17,
9782,
31,
1,
-100,
-100,
-100,
-... |
what is average age of patients whose primary disease is hypertension;rule out coronary artery disease\cardiac cath and days of hospital stay is 7? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT AVG(demographic.age) FROM demographic WHERE demographic.diagnosis = "HYPERTENSION;RULE OUT CORONARY ARTERY DISEASE\CARDIAC CATH" AND demographic.days_stay = "7" | [
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,
71,
17217,
599,
1778,
16587,
5,
545,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
25930,
4844,
159,
3274,
96,
15761,
8742,
17779,
134,
9215,
117,
8503,
3765,
3,
9744,
2847,
13044,
24721,
11155,
5946,
476,
309,
19056,
... |
What are the wins for the 7th position? | CREATE TABLE table_29701 (
"Season" real,
"Series" text,
"Team" text,
"Races" real,
"Wins" real,
"Poles" real,
"F/Laps" real,
"Podiums" real,
"Points" text,
"Position" text
) | SELECT "Wins" FROM table_29701 WHERE "Position" = '7th' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3166,
2518,
536,
41,
96,
134,
15,
9,
739,
121,
490,
6,
96,
12106,
7,
121,
1499,
6,
96,
18699,
121,
1499,
6,
96,
448,
9,
2319,
121,
490,
6,
96,
18455,
7,
121,
490,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
18455,
7,
121,
21680,
953,
834,
3166,
2518,
536,
549,
17444,
427,
96,
345,
32,
7,
4749,
121,
3274,
3,
31,
940,
189,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
provide the number of patients whose language is cape and admission location is transfer from hosp/extram? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.language = "CAPE" AND demographic.admission_location = "TRANSFER FROM HOSP/EXTRAM" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
24925,
3274,
96,
16986,
427,
121,
3430,
14798,
5,
9,
26,
5451,
834,
14836,
3274,
96,
11359,
7369,
... |
What is the smallest number for old membership total? | CREATE TABLE table_27671835_3 (
old_membership_total INTEGER
) | SELECT MIN(old_membership_total) FROM table_27671835_3 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2555,
3708,
2606,
2469,
834,
519,
41,
625,
834,
12066,
2009,
834,
235,
1947,
3,
21342,
17966,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
3,
17924,
381,
21,
625,
4757... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
1490,
834,
12066,
2009,
834,
235,
1947,
61,
21680,
953,
834,
2555,
3708,
2606,
2469,
834,
519,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What was the original air date of the episode written by amanda segel? | CREATE TABLE table_25923164_1 (original_air_date VARCHAR, written_by VARCHAR) | SELECT original_air_date FROM table_25923164_1 WHERE written_by = "Amanda Segel" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
4508,
3341,
4389,
834,
536,
41,
21878,
834,
2256,
834,
5522,
584,
4280,
28027,
6,
1545,
834,
969,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
926,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
926,
834,
2256,
834,
5522,
21680,
953,
834,
1828,
4508,
3341,
4389,
834,
536,
549,
17444,
427,
1545,
834,
969,
3274,
96,
8123,
232,
9,
679,
1803,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
what is 1977 when 1980 is chile? | CREATE TABLE table_name_65 (Id VARCHAR) | SELECT 1977 FROM table_name_65 WHERE 1980 = "chile" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4122,
41,
196,
26,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
125,
19,
16433,
116,
6694,
19,
3,
1436,
109,
58,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
16433,
21680,
953,
834,
4350,
834,
4122,
549,
17444,
427,
6694,
3274,
96,
1436,
109,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
count the number of patients who had received a sputum, expectorated microbiology test last year. | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
... | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT microlab.patientunitstayid FROM microlab WHERE microlab.culturesite = 'sputum, expectorated' AND DATETIME(microlab.culturetakentime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')) | [
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,
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,
2179,
9339,
5,
10061,
15129,
21545,
23,
26,
21680,
2179,
... |
who ruled longer , ali saibou or mamadou tandja ? | CREATE TABLE table_203_528 (
id number,
"year" number,
"political rights" number,
"civil liberties" number,
"status" text,
"president" text
) | SELECT "president" FROM table_203_528 WHERE "president" IN ('ali saibou', 'mamadou tandja') GROUP BY "president" ORDER BY COUNT(*) DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
755,
2577,
41,
3,
23,
26,
381,
6,
96,
1201,
121,
381,
6,
96,
3003,
17,
1950,
2166,
121,
381,
6,
96,
27981,
173,
5486,
3010,
121,
381,
6,
96,
8547,
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... | [
3,
23143,
14196,
96,
102,
15704,
121,
21680,
953,
834,
23330,
834,
755,
2577,
549,
17444,
427,
96,
102,
15704,
121,
3388,
41,
31,
4288,
3,
7,
9,
23,
4076,
31,
6,
3,
31,
51,
9,
11374,
1063,
3,
17,
232,
1191,
31,
61,
350,
4630,
... |
What conference does Luke Zettlemoyer publish the most in | CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE field (
fieldid int
)
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE dat... | SELECT DISTINCT COUNT(1), paper.venueid FROM author, paper, writes WHERE author.authorname = 'Luke Zettlemoyer' AND writes.authorid = author.authorid AND writes.paperid = paper.paperid GROUP BY paper.venueid ORDER BY COUNT(1) DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2291,
41,
2291,
23,
26,
16,
17,
6,
2291,
4350,
3,
4331,
4059,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
1057,
41,
1057,
23,
26,
16,
17,
3,
61,
3,
32102,
32103,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
15438,
25424,
6227,
2847,
17161,
14296,
6,
1040,
5,
15098,
23,
26,
21680,
2291,
6,
1040,
6,
11858,
549,
17444,
427,
2291,
5,
17415,
4350,
3274,
3,
31,
434,
1598,
15,
4603,
8692,
51,
32,
7975,
31,
3430,
11858,
5... |
Which opponent has a Time of 1:34? | CREATE TABLE table_name_46 (
opponent VARCHAR,
time VARCHAR
) | SELECT opponent FROM table_name_46 WHERE time = "1:34" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4448,
41,
15264,
584,
4280,
28027,
6,
97,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
15264,
65,
3,
9,
2900,
13,
209,
10,
3710,
58,
1,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
15264,
21680,
953,
834,
4350,
834,
4448,
549,
17444,
427,
97,
3274,
96,
536,
10,
3710,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
If the spacecraft is the Shenzhou 7 Eva 1, what is the start (utc) date and time? | CREATE TABLE table_22385461_9 (
start___utc__ VARCHAR,
spacecraft VARCHAR
) | SELECT start___utc__ FROM table_22385461_9 WHERE spacecraft = "Shenzhou 7 EVA 1" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2884,
3747,
5062,
4241,
834,
1298,
41,
456,
834,
834,
834,
76,
17,
75,
834,
834,
584,
4280,
28027,
6,
628,
6696,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
156... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
456,
834,
834,
834,
76,
17,
75,
834,
834,
21680,
953,
834,
2884,
3747,
5062,
4241,
834,
1298,
549,
17444,
427,
628,
6696,
3274,
96,
10499,
35,
25303,
489,
262,
8230,
209,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the Theme when the Original artist was carole king, and a Week # shows hollywood? | CREATE TABLE table_41969 (
"Week #" text,
"Theme" text,
"Song choice" text,
"Original artist" text,
"Order #" text,
"Result" text
) | SELECT "Theme" FROM table_41969 WHERE "Original artist" = 'carole king' AND "Week #" = 'hollywood' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
2294,
3951,
41,
96,
518,
10266,
1713,
121,
1499,
6,
96,
634,
526,
121,
1499,
6,
96,
134,
2444,
1160,
121,
1499,
6,
96,
667,
3380,
10270,
2377,
121,
1499,
6,
96,
7395... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
634,
526,
121,
21680,
953,
834,
591,
2294,
3951,
549,
17444,
427,
96,
667,
3380,
10270,
2377,
121,
3274,
3,
31,
1720,
32,
109,
3,
1765,
31,
3430,
96,
518,
10266,
1713,
121,
3274,
3,
31,
107,
30322,
31,
1,
-1... |
how many patients admitted and transferred from hosp/extram are below 58 years of age? | 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... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "TRANSFER FROM HOSP/EXTRAM" AND demographic.age < "58" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
9,
26,
5451,
834,
14836,
3274,
96,
11359,
7369,
20805,
21680,
3,
6299,
4274,
87,
427,
4,
11359,
... |
What did the away team score when they were playing collingwood? | CREATE TABLE table_77775 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Away team score" FROM table_77775 WHERE "Home team" = 'collingwood' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26225,
3072,
41,
96,
19040,
372,
121,
1499,
6,
96,
19040,
372,
2604,
121,
1499,
6,
96,
188,
1343,
372,
121,
1499,
6,
96,
188,
1343,
372,
2604,
121,
1499,
6,
96,
553,
35,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
188,
1343,
372,
2604,
121,
21680,
953,
834,
26225,
3072,
549,
17444,
427,
96,
19040,
372,
121,
3274,
3,
31,
3297,
697,
2037,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
How many Picks have a Position of kicker, and an Overall smaller than 137? | CREATE TABLE table_name_59 (
pick__number INTEGER,
position VARCHAR,
overall VARCHAR
) | SELECT SUM(pick__number) FROM table_name_59 WHERE position = "kicker" AND overall < 137 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3390,
41,
1432,
834,
834,
5525,
1152,
3,
21342,
17966,
6,
1102,
584,
4280,
28027,
6,
1879,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
8356,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
180,
6122,
599,
17967,
834,
834,
5525,
1152,
61,
21680,
953,
834,
4350,
834,
3390,
549,
17444,
427,
1102,
3274,
96,
2168,
3383,
121,
3430,
1879,
3,
2,
3,
24636,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Who is the away team for tie no 11? | CREATE TABLE table_24887326_6 (away_team VARCHAR, tie_no VARCHAR) | SELECT away_team FROM table_24887326_6 WHERE tie_no = 11 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2266,
4060,
4552,
2688,
834,
948,
41,
8006,
834,
11650,
584,
4280,
28027,
6,
6177,
834,
29,
32,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
19,
8,
550,
372,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
550,
834,
11650,
21680,
953,
834,
2266,
4060,
4552,
2688,
834,
948,
549,
17444,
427,
6177,
834,
29,
32,
3274,
850,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
what was the name of the last lab test that patient 006-133605 had on this hospital visit? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
... | SELECT lab.labname FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-133605' AND patient.hospitaldischargetime IS NULL)) ORDER BY lab.labresulttime DESC L... | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2179,
9339,
41,
2179,
521,
9824,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
1543,
3585,
1499,
6,
9329,
1499,
6,
1543,
4914,
29,
715,
97,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
7690,
5,
9339,
4350,
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,
21545,
... |
What was the average place for the song that had 69 points and a draw smaller than 13? | CREATE TABLE table_76345 (
"Draw" real,
"Language" text,
"Artist" text,
"Song" text,
"English translation" text,
"Place" real,
"Points" real
) | SELECT AVG("Place") FROM table_76345 WHERE "Points" = '69' AND "Draw" < '13' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3959,
519,
2128,
41,
96,
308,
10936,
121,
490,
6,
96,
434,
1468,
76,
545,
121,
1499,
6,
96,
7754,
343,
121,
1499,
6,
96,
134,
2444,
121,
1499,
6,
96,
26749,
7314,
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,
71,
17217,
599,
121,
345,
11706,
8512,
21680,
953,
834,
3959,
519,
2128,
549,
17444,
427,
96,
22512,
7,
121,
3274,
3,
31,
3951,
31,
3430,
96,
308,
10936,
121,
3,
2,
3,
31,
2368,
31,
1,
-100,
-100,
-100,
-100,
-1... |
What is the total number of flags of ships that do not have a captain with the rank of Midshipman? Show the result using a bar chart, rank y-axis in asc order. | CREATE TABLE Ship (
Ship_ID int,
Name text,
Type text,
Built_Year real,
Class text,
Flag text
)
CREATE TABLE captain (
Captain_ID int,
Name text,
Ship_ID int,
age text,
Class text,
Rank text
) | SELECT Flag, COUNT(Flag) FROM Ship WHERE NOT Ship_ID IN (SELECT Ship_ID FROM captain WHERE Rank = 'Midshipman') GROUP BY Flag ORDER BY COUNT(Flag) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
15508,
41,
15508,
834,
4309,
16,
17,
6,
5570,
1499,
6,
6632,
1499,
6,
14862,
834,
476,
2741,
490,
6,
4501,
1499,
6,
17016,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
17016,
6,
2847,
17161,
599,
371,
5430,
61,
21680,
15508,
549,
17444,
427,
4486,
15508,
834,
4309,
3388,
41,
23143,
14196,
15508,
834,
4309,
21680,
14268,
549,
17444,
427,
3,
22557,
3274,
3,
31,
329,
23,
26,
2009,
348,... |
number of picks the st. louis hawks made in the draft | CREATE TABLE table_204_93 (
id number,
"round" number,
"pick" number,
"player" text,
"position" text,
"nationality" text,
"team" text,
"college" text
) | SELECT COUNT("player") FROM table_204_93 WHERE "team" = 'st. louis hawks' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
4271,
41,
3,
23,
26,
381,
6,
96,
7775,
121,
381,
6,
96,
17967,
121,
381,
6,
96,
20846,
121,
1499,
6,
96,
4718,
121,
1499,
6,
96,
16557,
485,
121,
1499,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
20846,
8512,
21680,
953,
834,
26363,
834,
4271,
549,
17444,
427,
96,
11650,
121,
3274,
3,
31,
7,
17,
5,
16585,
159,
3,
14400,
7,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the lowest number of National University of Ireland that has a Cultural and Educational Panel of 0, and a Labour Panel smaller than 1? | CREATE TABLE table_name_49 (national_university_of_ireland INTEGER, cultural_and_educational_panel VARCHAR, labour_panel VARCHAR) | SELECT MIN(national_university_of_ireland) FROM table_name_49 WHERE cultural_and_educational_panel = 0 AND labour_panel < 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3647,
41,
16557,
834,
7846,
485,
834,
858,
834,
2060,
40,
232,
3,
21342,
17966,
6,
2779,
834,
232,
834,
29117,
138,
834,
28726,
584,
4280,
28027,
6,
12568,
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,
3,
17684,
599,
16557,
834,
7846,
485,
834,
858,
834,
2060,
40,
232,
61,
21680,
953,
834,
4350,
834,
3647,
549,
17444,
427,
2779,
834,
232,
834,
29117,
138,
834,
28726,
3274,
3,
632,
3430,
12568,
834,
28726,
3,
2,
... |
What is the time when the rank is 14? | CREATE TABLE table_46296 (
"Rank" real,
"Heat" real,
"Name" text,
"Nationality" text,
"Time" text
) | SELECT "Time" FROM table_46296 WHERE "Rank" = '14' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4448,
357,
4314,
41,
96,
22557,
121,
490,
6,
96,
3845,
144,
121,
490,
6,
96,
23954,
121,
1499,
6,
96,
24732,
485,
121,
1499,
6,
96,
13368,
121,
1499,
3,
61,
3,
32102,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
96,
13368,
121,
21680,
953,
834,
4448,
357,
4314,
549,
17444,
427,
96,
22557,
121,
3274,
3,
31,
2534,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What day was the result a win, the score 2-1, and the year before 2012? | CREATE TABLE table_11543 (
"Year" real,
"Date" text,
"Location" text,
"Score" text,
"Result" text
) | SELECT "Date" FROM table_11543 WHERE "Result" = 'win' AND "Score" = '2-1' AND "Year" < '2012' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
15660,
4906,
41,
96,
476,
2741,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
434,
32,
75,
257,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
20119,
121,
1499,
3,
61,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
308,
342,
121,
21680,
953,
834,
15660,
4906,
549,
17444,
427,
96,
20119,
121,
3274,
3,
31,
3757,
31,
3430,
96,
134,
9022,
121,
3274,
3,
31,
17234,
31,
3430,
96,
476,
2741,
121,
3,
2,
3,
31,
12172,
31,
1,
-... |
What is the place of player peter oosterhuis, who has $7,500? | CREATE TABLE table_50497 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" real,
"Money ( $ )" text
) | SELECT "Place" FROM table_50497 WHERE "Money ( $ )" = '7,500' AND "Player" = 'peter oosterhuis' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1752,
591,
4327,
41,
96,
345,
11706,
121,
1499,
6,
96,
15800,
49,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
3696,
260,
121,
490,
6,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
345,
11706,
121,
21680,
953,
834,
1752,
591,
4327,
549,
17444,
427,
96,
9168,
15,
63,
41,
1514,
3,
61,
121,
3274,
3,
31,
940,
6,
2560,
31,
3430,
96,
15800,
49,
121,
3274,
3,
31,
4995,
49,
3,
32,
32,
1370,
... |
Which premiere had languages in danish? | CREATE TABLE table_172 (
"Country/Region" text,
"Show Title" text,
"Languages" text,
"Host" text,
"Channel" text,
"Premiere" text,
"Seasons" text,
"Status" text
) | SELECT "Premiere" FROM table_172 WHERE "Languages" = 'Danish' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
27156,
41,
96,
10628,
651,
87,
17748,
23,
106,
121,
1499,
6,
96,
134,
4067,
11029,
121,
1499,
6,
96,
434,
1468,
76,
2568,
121,
1499,
6,
96,
566,
3481,
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,
10572,
2720,
60,
121,
21680,
953,
834,
27156,
549,
17444,
427,
96,
434,
1468,
76,
2568,
121,
3274,
3,
31,
308,
152,
1273,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the 1995 value with a 2005 value bigger than 74, a 2008 value of 84, and a 2000 value less than 80? | CREATE TABLE table_name_35 (
Id VARCHAR
) | SELECT SUM(1995) FROM table_name_35 WHERE 2005 > 74 AND 2008 = 84 AND 2000 < 80 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2469,
41,
27,
26,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
7273,
701,
28,
3,
9,
3105,
701,
4038,
145,
3,
4581,
6,
3,
9,
2628,
701,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
180,
6122,
599,
19479,
9120,
21680,
953,
834,
4350,
834,
2469,
549,
17444,
427,
3105,
2490,
3,
4581,
3430,
2628,
3274,
3,
4608,
3430,
2766,
3,
2,
2775,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the length of the highway with the route name sh 2? | CREATE TABLE table_name_57 (
length VARCHAR,
route_name VARCHAR
) | SELECT length FROM table_name_57 WHERE route_name = "sh 2" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3436,
41,
2475,
584,
4280,
28027,
6,
2981,
834,
4350,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2475,
13,
8,
10367,
28,
8,
2981,
564,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2475,
21680,
953,
834,
4350,
834,
3436,
549,
17444,
427,
2981,
834,
4350,
3274,
96,
7,
107,
204,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Count the number of captains younger than 50 of each rank by a bar chart, and order from high to low by the X. | CREATE TABLE Ship (
Ship_ID int,
Name text,
Type text,
Built_Year real,
Class text,
Flag text
)
CREATE TABLE captain (
Captain_ID int,
Name text,
Ship_ID int,
age text,
Class text,
Rank text
) | SELECT Rank, COUNT(*) FROM captain WHERE age < 50 GROUP BY Rank ORDER BY Rank DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
15508,
41,
15508,
834,
4309,
16,
17,
6,
5570,
1499,
6,
6632,
1499,
6,
14862,
834,
476,
2741,
490,
6,
4501,
1499,
6,
17016,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
22557,
6,
2847,
17161,
599,
1935,
61,
21680,
14268,
549,
17444,
427,
1246,
3,
2,
943,
350,
4630,
6880,
272,
476,
3,
22557,
4674,
11300,
272,
476,
3,
22557,
309,
25067,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Which home team has the Brunswick Street Oval venue? | CREATE TABLE table_32358 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Home team score" FROM table_32358 WHERE "Venue" = 'brunswick street oval' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2668,
519,
3449,
41,
96,
19040,
372,
121,
1499,
6,
96,
19040,
372,
2604,
121,
1499,
6,
96,
188,
1343,
372,
121,
1499,
6,
96,
188,
1343,
372,
2604,
121,
1499,
6,
96,
553,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
19040,
372,
2604,
121,
21680,
953,
834,
2668,
519,
3449,
549,
17444,
427,
96,
553,
35,
76,
15,
121,
3274,
3,
31,
9052,
29,
7,
5981,
2815,
17986,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Show the property type descriptions of properties belonging to that code. | CREATE TABLE Properties (property_type_code VARCHAR); CREATE TABLE Ref_Property_Types (property_type_description VARCHAR, property_type_code VARCHAR) | SELECT T2.property_type_description FROM Properties AS T1 JOIN Ref_Property_Types AS T2 ON T1.property_type_code = T2.property_type_code GROUP BY T1.property_type_code | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
21098,
41,
10401,
49,
17,
63,
834,
6137,
834,
4978,
584,
4280,
28027,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
419,
89,
834,
3174,
883,
17,
63,
834,
25160,
7,
41,
104... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10401,
49,
17,
63,
834,
6137,
834,
221,
11830,
21680,
21098,
6157,
332,
536,
3,
15355,
3162,
419,
89,
834,
3174,
883,
17,
63,
834,
25160,
7,
6157,
332,
357,
9191,
332,
5411,
10401,
49,
17,
63,
834,
6137... |
What was the score of the game against Milwaukee? | CREATE TABLE table_name_9 (
score VARCHAR,
visitor VARCHAR
) | SELECT score FROM table_name_9 WHERE visitor = "milwaukee" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1298,
41,
2604,
584,
4280,
28027,
6,
7019,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
2604,
13,
8,
467,
581,
21140,
58,
1,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2604,
21680,
953,
834,
4350,
834,
1298,
549,
17444,
427,
7019,
3274,
96,
51,
173,
210,
402,
1050,
15,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the position of pick 32? | CREATE TABLE table_name_81 (
position VARCHAR,
pick VARCHAR
) | SELECT position FROM table_name_81 WHERE pick = 32 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4959,
41,
1102,
584,
4280,
28027,
6,
1432,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1102,
13,
1432,
3538,
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,
1102,
21680,
953,
834,
4350,
834,
4959,
549,
17444,
427,
1432,
3274,
3538,
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... |
what's the saturday saturnus ( saturn) with wednesday mercurius (mercury) being mercuridi | CREATE TABLE table_1277350_1 (saturday_saturnus___saturn_ VARCHAR, wednesday_mercurius__mercury_ VARCHAR) | SELECT saturday_saturnus___saturn_ FROM table_1277350_1 WHERE wednesday_mercurius__mercury_ = "Mercuridi" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2122,
4013,
16975,
834,
536,
41,
7,
6010,
1135,
834,
7,
9,
7535,
302,
834,
834,
834,
7,
9,
7535,
834,
584,
4280,
28027,
6,
62,
26,
1496,
1135,
834,
935,
9659,
302,
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,
3,
7,
6010,
1135,
834,
7,
9,
7535,
302,
834,
834,
834,
7,
9,
7535,
834,
21680,
953,
834,
2122,
4013,
16975,
834,
536,
549,
17444,
427,
62,
26,
1496,
1135,
834,
935,
9659,
302,
834,
834,
935,
3663,
63,
834,
3274,... |
what is the number of patients whose primary disease is pneumonia and year of death is less than or equal to 2131? | 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,... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "PNEUMONIA" AND demographic.dod_year <= "2131.0" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
25930,
4844,
159,
3274,
96,
15420,
12062,
5365,
26077,
121,
3430,
14798,
5,
26,
32,
26,
834,
1201,... |
In what year is Zaxxon the Standalone? | CREATE TABLE table_name_88 (
year VARCHAR,
standalone VARCHAR
) | SELECT year FROM table_name_88 WHERE standalone = "zaxxon" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4060,
41,
215,
584,
4280,
28027,
6,
27162,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
86,
125,
215,
19,
4904,
19230,
106,
8,
7351,
138,
782,
58,
1,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
215,
21680,
953,
834,
4350,
834,
4060,
549,
17444,
427,
27162,
3274,
96,
1629,
19230,
106,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
count the number of patients whose marital status is widowed and drug route is ng? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.marital_status = "WIDOWED" AND prescriptions.route = "NG" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7744,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7744,
7,
5,
8399,
51,
834,
23,
26,
549... |
How many sets were played in the 2011 Tournament in which there were 3R in 2007? | CREATE TABLE table_14541 (
"Tournament" text,
"2007" text,
"2008" text,
"2009" text,
"2011" text,
"2012" text,
"2013" text
) | SELECT "2011" FROM table_14541 WHERE "2007" = '3r' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
20987,
4853,
41,
96,
382,
1211,
20205,
17,
121,
1499,
6,
96,
20615,
121,
1499,
6,
96,
16128,
121,
1499,
6,
96,
16660,
121,
1499,
6,
96,
13907,
121,
1499,
6,
96,
12172,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
13907,
121,
21680,
953,
834,
20987,
4853,
549,
17444,
427,
96,
20615,
121,
3274,
3,
31,
519,
52,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the best time for a rusport driver with a qual 2 time of 1:10.166? | CREATE TABLE table_34673 (
"Name" text,
"Team" text,
"Qual 1" text,
"Qual 2" text,
"Best" real
) | SELECT MAX("Best") FROM table_34673 WHERE "Team" = 'rusport' AND "Qual 2" = '1:10.166' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3710,
3708,
519,
41,
96,
23954,
121,
1499,
6,
96,
18699,
121,
1499,
6,
96,
5991,
138,
209,
121,
1499,
6,
96,
5991,
138,
204,
121,
1499,
6,
96,
17278,
121,
490,
3,
61,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
121,
17278,
8512,
21680,
953,
834,
3710,
3708,
519,
549,
17444,
427,
96,
18699,
121,
3274,
3,
31,
4502,
1493,
31,
3430,
96,
5991,
138,
204,
121,
3274,
3,
31,
536,
10,
22567,
3539,
31,
1,
-100,
-100,
... |
what is maximum age of patients whose gender is m and primary disease is left femur fracture? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
... | SELECT MAX(demographic.age) FROM demographic WHERE demographic.gender = "M" AND demographic.diagnosis = "LEFT FEMUR FRACTURE" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
1778,
16587,
5,
545,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
122,
3868,
3274,
96,
329,
121,
3430,
14798,
5,
25930,
4844,
159,
3274,
96,
3765,
6245,
377,
6037,
5905,
377,
22034,
25380,
121,
1,
-100... |
What is the second party where the first party is Tory and the year is 1820? | CREATE TABLE table_name_88 (
second_party VARCHAR,
first_party VARCHAR,
year VARCHAR
) | SELECT second_party FROM table_name_88 WHERE first_party = "tory" AND year = 1820 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4060,
41,
511,
834,
8071,
584,
4280,
28027,
6,
166,
834,
8071,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
511,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
511,
834,
8071,
21680,
953,
834,
4350,
834,
4060,
549,
17444,
427,
166,
834,
8071,
3274,
96,
10972,
121,
3430,
215,
3274,
507,
1755,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Which callsign has ERP W of 99 and a frequency of greater than 88.7MHz? | CREATE TABLE table_name_15 (
call_sign VARCHAR,
frequency_mhz VARCHAR,
erp_w VARCHAR
) | SELECT call_sign FROM table_name_15 WHERE frequency_mhz > 88.7 AND erp_w = 99 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1808,
41,
580,
834,
6732,
584,
4280,
28027,
6,
7321,
834,
51,
107,
172,
584,
4280,
28027,
6,
3,
49,
102,
834,
210,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
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,
580,
834,
6732,
21680,
953,
834,
4350,
834,
1808,
549,
17444,
427,
7321,
834,
51,
107,
172,
2490,
3,
4060,
5,
940,
3430,
3,
49,
102,
834,
210,
3274,
12185,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the fewest points that has more than 29 goals? | CREATE TABLE table_name_42 (
points INTEGER,
goal_difference INTEGER
) | SELECT MIN(points) FROM table_name_42 WHERE goal_difference > 29 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4165,
41,
979,
3,
21342,
17966,
6,
1288,
834,
26,
99,
11788,
3,
21342,
17966,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
360,
222,
979,
24,
65,
72,
145,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
2700,
7,
61,
21680,
953,
834,
4350,
834,
4165,
549,
17444,
427,
1288,
834,
26,
99,
11788,
2490,
2838,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Where is the Eastern Creek Raceway located? | CREATE TABLE table_name_19 (
location___state VARCHAR,
circuit VARCHAR
) | SELECT location___state FROM table_name_19 WHERE circuit = "eastern creek raceway" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2294,
41,
1128,
834,
834,
834,
5540,
584,
4280,
28027,
6,
4558,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2840,
19,
8,
7345,
7682,
10949,
1343,
1069,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1128,
834,
834,
834,
5540,
21680,
953,
834,
4350,
834,
2294,
549,
17444,
427,
4558,
3274,
96,
15,
9,
13072,
25153,
1964,
1343,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the lowest Total that has a Gold larger than 0, Silver smaller than 4, Sport of football, and a Bronze larger than 1? | CREATE TABLE table_55761 (
"Sport" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT MIN("Total") FROM table_55761 WHERE "Gold" > '0' AND "Silver" < '4' AND "Sport" = 'football' AND "Bronze" > '1' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3769,
3959,
536,
41,
96,
17682,
121,
1499,
6,
96,
23576,
121,
490,
6,
96,
134,
173,
624,
121,
490,
6,
96,
22780,
29,
776,
121,
490,
6,
96,
3696,
1947,
121,
490,
3,
61,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
121,
3696,
1947,
8512,
21680,
953,
834,
3769,
3959,
536,
549,
17444,
427,
96,
23576,
121,
2490,
3,
31,
632,
31,
3430,
96,
134,
173,
624,
121,
3,
2,
3,
31,
591,
31,
3430,
96,
17682,
121,
3274,
3,
... |
For those employees who do not work in departments with managers that have ids between 100 and 200, a bar chart shows the distribution of email and salary , could you order by the bars from low to high? | 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(... | SELECT EMAIL, SALARY FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY EMAIL | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1652,
41,
262,
5244,
5017,
476,
5080,
834,
4309,
7908,
1982,
599,
11071,
632,
201,
30085,
834,
567,
17683,
3,
4331,
4059,
599,
1755,
201,
301,
12510,
834,
567,
17683,
3,
4331,
4059,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
20211,
3502,
6,
180,
4090,
24721,
21680,
1652,
549,
17444,
427,
4486,
3396,
19846,
11810,
834,
4309,
3388,
41,
23143,
14196,
3396,
19846,
11810,
834,
4309,
21680,
10521,
549,
17444,
427,
283,
15610,
17966,
834,
4309,
... |
who was the next judge to resign after alexander campbell king ? | CREATE TABLE table_203_563 (
id number,
"#" number,
"judge" text,
"state" text,
"born/died" text,
"active" text,
"chief" text,
"senior" text,
"appointed by" text,
"reason for\ntermination" text
) | SELECT "judge" FROM table_203_563 WHERE "reason for\ntermination" = 'resignation' AND "#" > (SELECT "#" FROM table_203_563 WHERE "judge" = 'alexander campbell king') ORDER BY "#" LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
4834,
519,
41,
3,
23,
26,
381,
6,
96,
4663,
121,
381,
6,
96,
354,
13164,
121,
1499,
6,
96,
5540,
121,
1499,
6,
96,
7473,
87,
2498,
26,
121,
1499,
6,
96,
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,
354,
13164,
121,
21680,
953,
834,
23330,
834,
4834,
519,
549,
17444,
427,
96,
864,
739,
21,
2,
29,
6544,
257,
121,
3274,
3,
31,
60,
6732,
257,
31,
3430,
96,
4663,
121,
2490,
41,
23143,
14196,
96,
4663,
121,
... |
What is the nickname of the team in division 2? | CREATE TABLE table_name_34 (nickname VARCHAR, division VARCHAR) | SELECT nickname FROM table_name_34 WHERE division = "division 2" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3710,
41,
11191,
4350,
584,
4280,
28027,
6,
4889,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
24649,
13,
8,
372,
16,
4889,
204,
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,
24649,
21680,
953,
834,
4350,
834,
3710,
549,
17444,
427,
4889,
3274,
96,
26,
23,
6610,
204,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the school of the player who went to the college of michigan and originally comes from Wheaton, Illinois? | CREATE TABLE table_name_2 (
school VARCHAR,
college VARCHAR,
hometown VARCHAR
) | SELECT school FROM table_name_2 WHERE college = "michigan" AND hometown = "wheaton, illinois" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
357,
41,
496,
584,
4280,
28027,
6,
1900,
584,
4280,
28027,
6,
22295,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
496,
13,
8,
1959,
113,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
496,
21680,
953,
834,
4350,
834,
357,
549,
17444,
427,
1900,
3274,
96,
51,
362,
12588,
121,
3430,
22295,
3274,
96,
210,
88,
144,
106,
6,
3,
1092,
77,
32,
159,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What shows for 2000 when 2013 shows 3rd? | CREATE TABLE table_name_19 (Id VARCHAR) | SELECT 2000 FROM table_name_19 WHERE 2013 = "3rd" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2294,
41,
196,
26,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
1267,
21,
2766,
116,
2038,
1267,
220,
52,
26,
58,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2766,
21680,
953,
834,
4350,
834,
2294,
549,
17444,
427,
2038,
3274,
96,
519,
52,
26,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Which grid is constructed by Maserati and driven by Oscar Alfredo Gálvez? | CREATE TABLE table_name_74 (grid VARCHAR, constructor VARCHAR, driver VARCHAR) | SELECT grid FROM table_name_74 WHERE constructor = "maserati" AND driver = "oscar alfredo gálvez" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4581,
41,
3496,
26,
584,
4280,
28027,
6,
6774,
127,
584,
4280,
28027,
6,
2535,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
8634,
19,
8520,
57,
6664,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8634,
21680,
953,
834,
4350,
834,
4581,
549,
17444,
427,
6774,
127,
3274,
96,
2754,
15,
6850,
121,
3430,
2535,
3274,
96,
32,
7,
1720,
491,
89,
1271,
32,
3,
122,
2975,
40,
6071,
121,
1,
-100,
-100,
-100,
-100,
-100... |
which player is from georgia | CREATE TABLE table_10015132_7 (
player VARCHAR,
school_club_team VARCHAR
) | SELECT player FROM table_10015132_7 WHERE school_club_team = "Georgia" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2915,
1808,
23757,
834,
940,
41,
1959,
584,
4280,
28027,
6,
496,
834,
13442,
834,
11650,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
84,
1959,
19,
45,
873,
1677,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1959,
21680,
953,
834,
2915,
1808,
23757,
834,
940,
549,
17444,
427,
496,
834,
13442,
834,
11650,
3274,
96,
517,
15,
1677,
23,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the score for set 2 when the time is 18:00 and the score of set 1 is 18 25? | CREATE TABLE table_49825 (
"Date" text,
"Time" text,
"Score" text,
"Set 1" text,
"Set 2" text,
"Set 3" text,
"Total" text
) | SELECT "Set 2" FROM table_49825 WHERE "Time" = '18:00' AND "Set 1" = '18–25' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
3916,
1828,
41,
96,
308,
342,
121,
1499,
6,
96,
13368,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
17175,
209,
121,
1499,
6,
96,
17175,
204,
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,
1... | [
3,
23143,
14196,
96,
17175,
204,
121,
21680,
953,
834,
591,
3916,
1828,
549,
17444,
427,
96,
13368,
121,
3274,
3,
31,
536,
15692,
31,
3430,
96,
17175,
209,
121,
3274,
3,
31,
2606,
104,
1828,
31,
1,
-100,
-100,
-100,
-100,
-100,
-1... |
Which player won the Masters in 1976? | CREATE TABLE table_name_66 (
player VARCHAR,
year_s__won VARCHAR
) | SELECT player FROM table_name_66 WHERE year_s__won = "1976" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3539,
41,
1959,
584,
4280,
28027,
6,
215,
834,
7,
834,
834,
210,
106,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
1959,
751,
8,
14119,
16,
1616... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1959,
21680,
953,
834,
4350,
834,
3539,
549,
17444,
427,
215,
834,
7,
834,
834,
210,
106,
3274,
96,
2294,
3959,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is the race on 23 october? | CREATE TABLE table_46525 (
"Date" text,
"Race" text,
"Circuit" text,
"Location" text,
"Winner" text
) | SELECT "Race" FROM table_46525 WHERE "Date" = '23 october' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
4122,
1828,
41,
96,
308,
342,
121,
1499,
6,
96,
448,
3302,
121,
1499,
6,
96,
254,
23,
52,
21560,
121,
1499,
6,
96,
434,
32,
75,
257,
121,
1499,
6,
96,
18455,
687,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
448,
3302,
121,
21680,
953,
834,
591,
4122,
1828,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
2773,
3,
32,
75,
235,
1152,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
where college is british columbia what are all the player | CREATE TABLE table_26996293_2 (player VARCHAR, college VARCHAR) | SELECT player FROM table_26996293_2 WHERE college = "British Columbia" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2688,
3264,
4056,
4271,
834,
357,
41,
20846,
584,
4280,
28027,
6,
1900,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
213,
1900,
19,
3,
2160,
17,
1273,
7632,
5937,
23,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1959,
21680,
953,
834,
2688,
3264,
4056,
4271,
834,
357,
549,
17444,
427,
1900,
3274,
96,
279,
13224,
7,
107,
8183,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Return a bar chart about the distribution of All_Road and Team_ID . | CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | SELECT All_Road, Team_ID FROM basketball_match | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
8498,
834,
19515,
41,
2271,
834,
4309,
16,
17,
6,
1121,
834,
4309,
16,
17,
6,
2271,
834,
23954,
1499,
6,
3,
14775,
834,
17748,
4885,
834,
134,
15,
9,
739,
1499,
6,
3,
14775,
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,
432,
834,
448,
32,
9,
26,
6,
2271,
834,
4309,
21680,
8498,
834,
19515,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What Offer Team has a date of July 29, 1994? | CREATE TABLE table_70644 (
"Player" text,
"Date" text,
"Original Team" text,
"Offer Team" text,
"Result" text
) | SELECT "Offer Team" FROM table_70644 WHERE "Date" = 'july 29, 1994' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2518,
4389,
591,
41,
96,
15800,
49,
121,
1499,
6,
96,
308,
342,
121,
1499,
6,
96,
667,
3380,
10270,
2271,
121,
1499,
6,
96,
21265,
49,
2271,
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,
21265,
49,
2271,
121,
21680,
953,
834,
2518,
4389,
591,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
2047,
120,
14405,
7520,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What party did the re-elected incumbent of the Texas 11 district belong to? | CREATE TABLE table_18523 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" text,
"Result" text,
"Candidates" text
) | SELECT "Party" FROM table_18523 WHERE "Result" = 'Re-elected' AND "District" = 'Texas 11' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
21594,
2773,
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,
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,
13725,
63,
121,
21680,
953,
834,
21594,
2773,
549,
17444,
427,
96,
20119,
121,
3274,
3,
31,
1649,
18,
19971,
31,
3430,
96,
308,
23,
20066,
121,
3274,
3,
31,
13598,
9,
7,
850,
31,
1,
-100,
-100,
-100,
-100,
-... |
How many games played for the team with 48 points? | CREATE TABLE table_1676073_12 (played VARCHAR, points VARCHAR) | SELECT played FROM table_1676073_12 WHERE points = "48" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2938,
28212,
4552,
834,
2122,
41,
4895,
15,
26,
584,
4280,
28027,
6,
979,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
1031,
1944,
21,
8,
372,
28,
4678,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1944,
21680,
953,
834,
2938,
28212,
4552,
834,
2122,
549,
17444,
427,
979,
3274,
96,
3707,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Show the nominees that have nominated musicals for both 'Tony Award' and 'Drama Desk Award'. | CREATE TABLE actor (
actor_id number,
name text,
musical_id number,
character text,
duration text,
age number
)
CREATE TABLE musical (
musical_id number,
name text,
year number,
award text,
category text,
nominee text,
result text
) | SELECT nominee FROM musical WHERE award = "Tony Award" INTERSECT SELECT nominee FROM musical WHERE award = "Drama Desk Award" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7556,
41,
7556,
834,
23,
26,
381,
6,
564,
1499,
6,
4183,
834,
23,
26,
381,
6,
1848,
1499,
6,
8659,
1499,
6,
1246,
381,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
21077,
21680,
4183,
549,
17444,
427,
2760,
3274,
96,
382,
106,
63,
3677,
121,
3,
21342,
5249,
14196,
3,
23143,
14196,
21077,
21680,
4183,
549,
17444,
427,
2760,
3274,
96,
308,
10819,
19047,
3677,
121,
1,
-100,
-100,
-... |
What is the unit of measurement of product named "cumin"? | CREATE TABLE ref_product_categories (unit_of_measure VARCHAR, product_category_code VARCHAR); CREATE TABLE products (product_category_code VARCHAR, product_name VARCHAR) | SELECT t2.unit_of_measure FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code WHERE t1.product_name = "cumin" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
6273,
834,
15892,
834,
8367,
839,
2593,
41,
15129,
834,
858,
834,
31038,
584,
4280,
28027,
6,
556,
834,
8367,
839,
651,
834,
4978,
584,
4280,
28027,
61,
3,
32102,
32103,
32102,
205,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17,
4416,
15129,
834,
858,
834,
31038,
21680,
494,
6157,
3,
17,
536,
3,
15355,
3162,
6273,
834,
15892,
834,
8367,
839,
2593,
6157,
3,
17,
357,
9191,
3,
17,
5411,
15892,
834,
8367,
839,
651,
834,
4978,
3274,
3,
... |
How many wins in 1992? | CREATE TABLE table_name_52 (
wins VARCHAR,
year VARCHAR
) | SELECT wins FROM table_name_52 WHERE year = 1992 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5373,
41,
9204,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
9204,
16,
9047,
58,
1,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
9204,
21680,
953,
834,
4350,
834,
5373,
549,
17444,
427,
215,
3274,
9047,
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... |
did john lee win before lord hugh seymor ? | CREATE TABLE table_204_820 (
id number,
"date" text,
"constituency" text,
"c/u" text,
"former incumbent" text,
"winner" text,
"cause" text
) | SELECT (SELECT "date" FROM table_204_820 WHERE "winner" = 'john lee') < (SELECT "date" FROM table_204_820 WHERE "winner" = 'lord hugh seymour') | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
927,
1755,
41,
3,
23,
26,
381,
6,
96,
5522,
121,
1499,
6,
96,
8056,
17,
155,
76,
4392,
121,
1499,
6,
96,
75,
87,
76,
121,
1499,
6,
96,
2032,
49,
28406,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
41,
23143,
14196,
96,
5522,
121,
21680,
953,
834,
26363,
834,
927,
1755,
549,
17444,
427,
96,
3757,
687,
121,
3274,
3,
31,
27341,
90,
15,
31,
61,
3,
2,
41,
23143,
14196,
96,
5522,
121,
21680,
953,
834,
26363,
834,... |
Provide me the number of patients with pituitary bleed primary disease who died in or before 2165. | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "PITUITARY BLEED" AND demographic.dod_year <= "2165.0" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
25930,
4844,
159,
3274,
96,
4111,
9968,
3177,
24721,
272,
3765,
2326,
121,
3430,
14798,
5,
26,
32,... |
How many patients stayed in the hospital for more than 43 days and used the drug named bag? | 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,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "43" AND prescriptions.drug = "Bag" | [
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,
7744,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7744,
7,
5,
8399,
51,
834,
23,
26,
549... |
Name the total number of laps for 23rd position | CREATE TABLE table_name_17 (
laps VARCHAR,
pos VARCHAR
) | SELECT COUNT(laps) FROM table_name_17 WHERE pos = "23rd" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2517,
41,
14941,
7,
584,
4280,
28027,
6,
3,
2748,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
792,
381,
13,
14941,
7,
21,
1902,
52,
26,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8478,
7,
61,
21680,
953,
834,
4350,
834,
2517,
549,
17444,
427,
3,
2748,
3274,
96,
2773,
52,
26,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the episode # of the episode that originally aired on January 21, 2001? | CREATE TABLE table_name_95 (
episode__number VARCHAR,
original_airdate VARCHAR
) | SELECT episode__number FROM table_name_95 WHERE original_airdate = "january 21, 2001" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3301,
41,
5640,
834,
834,
5525,
1152,
584,
4280,
28027,
6,
926,
834,
2256,
5522,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
5640,
1713,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5640,
834,
834,
5525,
1152,
21680,
953,
834,
4350,
834,
3301,
549,
17444,
427,
926,
834,
2256,
5522,
3274,
96,
7066,
76,
1208,
12026,
4402,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the date against the Tampa bay Storm? | CREATE TABLE table_11901 (
"Week" real,
"Date" text,
"Opponent" text,
"Home/Away" text,
"Result" text
) | SELECT "Date" FROM table_11901 WHERE "Opponent" = 'tampa bay storm' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
19993,
4542,
41,
96,
518,
10266,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
19040,
87,
188,
1343,
121,
1499,
6,
96,
20119,
121,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
3,
23143,
14196,
96,
308,
342,
121,
21680,
953,
834,
19993,
4542,
549,
17444,
427,
96,
667,
102,
9977,
121,
3274,
3,
31,
17,
4624,
9,
10210,
5536,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is the school for Ivey armstrong? | CREATE TABLE table_name_90 (school VARCHAR, name VARCHAR) | SELECT school FROM table_name_90 WHERE name = "ivey armstrong" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2394,
41,
6646,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
125,
19,
8,
496,
21,
27,
162,
63,
2939,
25866,
58,
1,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
496,
21680,
953,
834,
4350,
834,
2394,
549,
17444,
427,
564,
3274,
96,
757,
63,
2939,
25866,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Name the silver for ronald weigel category:articles with hcards | CREATE TABLE table_24948 (
"Rank" real,
"Athlete" text,
"Nation" text,
"Olympics" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total(min. 2 medals)" real
) | SELECT MAX("Silver") FROM table_24948 WHERE "Athlete" = 'Ronald Weigel Category:Articles with hCards' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
3647,
3707,
41,
96,
22557,
121,
490,
6,
96,
188,
189,
1655,
15,
121,
1499,
6,
96,
567,
257,
121,
1499,
6,
96,
667,
120,
51,
6174,
7,
121,
1499,
6,
96,
23576,
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,
4800,
4,
599,
121,
134,
173,
624,
8512,
21680,
953,
834,
357,
3647,
3707,
549,
17444,
427,
96,
188,
189,
1655,
15,
121,
3274,
3,
31,
448,
9533,
26,
101,
23,
1803,
17459,
10,
7754,
447,
965,
28,
3,
107,
6936,
26,... |
Show the names of students who have a grade higher than 5 and have at least 2 friends. | CREATE TABLE Friend (student_id VARCHAR); CREATE TABLE Highschooler (name VARCHAR, id VARCHAR, grade INTEGER) | SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.grade > 5 GROUP BY T1.student_id HAVING COUNT(*) >= 2 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3,
17701,
41,
8637,
295,
834,
23,
26,
584,
4280,
28027,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
1592,
6646,
49,
41,
4350,
584,
4280,
28027,
6,
3,
23,
26,
584,
4280,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
332,
4416,
4350,
21680,
3,
17701,
6157,
332,
536,
3,
15355,
3162,
1592,
6646,
49,
6157,
332,
357,
9191,
332,
5411,
8637,
295,
834,
23,
26,
3274,
332,
4416,
23,
26,
549,
17444,
427,
332,
4416,
6801,
2490,
305,
350,
... |
Show the name of the customer who has the most orders. | CREATE TABLE customer_orders (
customer_id VARCHAR
)
CREATE TABLE customers (
customer_name VARCHAR,
customer_id VARCHAR
) | SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
884,
834,
9397,
7,
41,
884,
834,
23,
26,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
722,
41,
884,
834,
4350,
584,
4280,
28027,
6,
884,
834,
23,
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,
332,
5411,
25697,
49,
834,
4350,
21680,
722,
6157,
332,
536,
3,
15355,
3162,
884,
834,
9397,
7,
6157,
332,
357,
9191,
332,
5411,
25697,
49,
834,
23,
26,
3274,
332,
4416,
25697,
49,
834,
23,
26,
350,
4630,
6880,
27... |
What engine was used by Curb Motorsports after 1982 that had 11 points? | CREATE TABLE table_name_2 (
engine VARCHAR,
team VARCHAR,
year VARCHAR,
points VARCHAR
) | SELECT engine FROM table_name_2 WHERE year > 1982 AND points = 11 AND team = "curb motorsports" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
357,
41,
1948,
584,
4280,
28027,
6,
372,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
6,
979,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
1948,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1948,
21680,
953,
834,
4350,
834,
357,
549,
17444,
427,
215,
2490,
14505,
3430,
979,
3274,
850,
3430,
372,
3274,
96,
3663,
115,
2340,
6661,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What are the scores for games played on september 9? | CREATE TABLE table_21318 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location/Attendance" text,
"Record" text
) | SELECT "Score" FROM table_21318 WHERE "Date" = 'September 9' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
2368,
2606,
41,
96,
23055,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
21417,
979,
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,
134,
9022,
121,
21680,
953,
834,
357,
2368,
2606,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
27652,
668,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Name the kicks with goals of 1 | CREATE TABLE table_name_40 (
kicks VARCHAR,
goals VARCHAR
) | SELECT kicks FROM table_name_40 WHERE goals = "1" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2445,
41,
4583,
7,
584,
4280,
28027,
6,
1766,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
4583,
7,
28,
1766,
13,
209,
1,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4583,
7,
21680,
953,
834,
4350,
834,
2445,
549,
17444,
427,
1766,
3274,
96,
536,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Who was the winner for ASTC round 8? | CREATE TABLE table_44012 (
"Date" text,
"Series" text,
"Circuit" text,
"City / State" text,
"Winner" text,
"Team" text
) | SELECT "Winner" FROM table_44012 WHERE "Series" = 'astc round 8' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
22335,
2122,
41,
96,
308,
342,
121,
1499,
6,
96,
12106,
7,
121,
1499,
6,
96,
254,
23,
52,
21560,
121,
1499,
6,
96,
254,
485,
3,
87,
1015,
121,
1499,
6,
96,
18455,
687,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
18455,
687,
121,
21680,
953,
834,
22335,
2122,
549,
17444,
427,
96,
12106,
7,
121,
3274,
3,
31,
9,
7,
17,
75,
1751,
505,
31,
1,
-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.