NATURAL_LANG stringlengths 0 446 | SCHEMA stringlengths 27 2.21k | SQL stringlengths 18 453 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|
What title did the film from Colombia use in its nomination? | CREATE TABLE table_name_33 (
film_title_used_in_nomination VARCHAR,
country VARCHAR
) | SELECT film_title_used_in_nomination FROM table_name_33 WHERE country = "colombia" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4201,
41,
814,
834,
21869,
834,
10064,
834,
77,
834,
29,
32,
14484,
584,
4280,
28027,
6,
684,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
2233,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
814,
834,
21869,
834,
10064,
834,
77,
834,
29,
32,
14484,
21680,
953,
834,
4350,
834,
4201,
549,
17444,
427,
684,
3274,
96,
8135,
14382,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Which 2012 has a 2011 of 17,142,000, and a 2010 smaller than 16,972,000? | CREATE TABLE table_48831 (
"Rank" real,
"Location" text,
"2008" real,
"2009" real,
"2010" real,
"2011" real,
"2012" real
) | SELECT MIN("2012") FROM table_48831 WHERE "2011" = '17,142,000' AND "2010" < '16,972,000' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
4060,
3341,
41,
96,
22557,
121,
490,
6,
96,
434,
32,
75,
257,
121,
1499,
6,
96,
16128,
121,
490,
6,
96,
16660,
121,
490,
6,
96,
14926,
121,
490,
6,
96,
13907,
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,
3,
17684,
599,
121,
12172,
8512,
21680,
953,
834,
591,
4060,
3341,
549,
17444,
427,
96,
13907,
121,
3274,
3,
31,
2517,
6,
2534,
8630,
31,
3430,
96,
14926,
121,
3,
2,
3,
31,
2938,
6,
4327,
8630,
31,
1,
-100,
-100... |
Which Record has a Method of submission (heel hook), a Round larger than 1, and a Time of 2:28? | CREATE TABLE table_name_32 (record VARCHAR, time VARCHAR, method VARCHAR, round VARCHAR) | SELECT record FROM table_name_32 WHERE method = "submission (heel hook)" AND round > 1 AND time = "2:28" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2668,
41,
60,
7621,
584,
4280,
28027,
6,
97,
584,
4280,
28027,
6,
1573,
584,
4280,
28027,
6,
1751,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
11392... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
1368,
21680,
953,
834,
4350,
834,
2668,
549,
17444,
427,
1573,
3274,
96,
7304,
5451,
41,
88,
15,
40,
7970,
61,
121,
3430,
1751,
2490,
209,
3430,
97,
3274,
96,
357,
10,
2577,
121,
1,
-100,
-100,
-100,
-100,
-100,
-... |
Return the characteristic names of the 'sesame' product. | CREATE TABLE ref_product_categories (
product_category_code text,
product_category_description text,
unit_of_measure text
)
CREATE TABLE product_characteristics (
product_id number,
characteristic_id number,
product_characteristic_value text
)
CREATE TABLE ref_colors (
color_code text,
color_description text
)
CREATE TABLE ref_characteristic_types (
characteristic_type_code text,
characteristic_type_description text
)
CREATE TABLE products (
product_id number,
color_code text,
product_category_code text,
product_name text,
typical_buying_price text,
typical_selling_price text,
product_description text,
other_product_details text
)
CREATE TABLE characteristics (
characteristic_id number,
characteristic_type_code text,
characteristic_data_type text,
characteristic_name text,
other_characteristic_details text
) | SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN characteristics AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "sesame" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
6273,
834,
15892,
834,
8367,
839,
2593,
41,
556,
834,
8367,
839,
651,
834,
4978,
1499,
6,
556,
834,
8367,
839,
651,
834,
221,
11830,
1499,
6,
1745,
834,
858,
834,
31038,
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,
3,
17,
5787,
31886,
3040,
834,
4350,
21680,
494,
6157,
3,
17,
536,
3,
15355,
3162,
556,
834,
31886,
3040,
7,
6157,
3,
17,
357,
9191,
3,
17,
5411,
15892,
834,
23,
26,
3274,
3,
17,
4416,
15892,
834,
23,
26,
3,
1... |
Who was the lead with John Shuster as skip in the season of 2009–10? | CREATE TABLE table_name_83 (lead VARCHAR, skip VARCHAR, season VARCHAR) | SELECT lead FROM table_name_83 WHERE skip = "john shuster" AND season = "2009–10" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4591,
41,
109,
9,
26,
584,
4280,
28027,
6,
11202,
584,
4280,
28027,
6,
774,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
8,
991,
28,
1079,
1456... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
991,
21680,
953,
834,
4350,
834,
4591,
549,
17444,
427,
11202,
3274,
96,
27341,
3,
14279,
1370,
121,
3430,
774,
3274,
96,
16660,
104,
1714,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What was the loss of the game when the record was 20-16? | CREATE TABLE table_name_77 (
loss VARCHAR,
record VARCHAR
) | SELECT loss FROM table_name_77 WHERE record = "20-16" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4013,
41,
1453,
584,
4280,
28027,
6,
1368,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
1453,
13,
8,
467,
116,
8,
1368,
47,
460,
10892,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1453,
21680,
953,
834,
4350,
834,
4013,
549,
17444,
427,
1368,
3274,
96,
1755,
10892,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Which team has home game with tie of 4? | CREATE TABLE table_49762 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Attendance" text
) | SELECT "Home team" FROM table_49762 WHERE "Tie no" = '4' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3647,
3959,
357,
41,
96,
382,
23,
15,
150,
121,
1499,
6,
96,
19040,
372,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
188,
1343,
372,
121,
1499,
6,
96,
188,
17,
324,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
121,
21680,
953,
834,
3647,
3959,
357,
549,
17444,
427,
96,
382,
23,
15,
150,
121,
3274,
3,
31,
591,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the smallest attendance in week 1? | CREATE TABLE table_name_76 (
attendance INTEGER,
week VARCHAR
) | SELECT MIN(attendance) FROM table_name_76 WHERE week = 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3959,
41,
11364,
3,
21342,
17966,
6,
471,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
3,
17924,
11364,
16,
471,
209,
58,
1,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
15116,
663,
61,
21680,
953,
834,
4350,
834,
3959,
549,
17444,
427,
471,
3274,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
On January 29, who had the decision of Mason? | CREATE TABLE table_78267 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" real,
"Record" text
) | SELECT "Visitor" FROM table_78267 WHERE "Decision" = 'mason' AND "Date" = 'january 29' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3940,
357,
3708,
41,
96,
308,
342,
121,
1499,
6,
96,
553,
159,
155,
127,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
19040,
121,
1499,
6,
96,
2962,
18901,
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,
553,
159,
155,
127,
121,
21680,
953,
834,
3940,
357,
3708,
549,
17444,
427,
96,
2962,
18901,
121,
3274,
3,
31,
2754,
106,
31,
3430,
96,
308,
342,
121,
3274,
3,
31,
7066,
76,
1208,
2838,
31,
1,
-100,
-100,
-1... |
What is the 1993 value of the 1996 atp masters series? | CREATE TABLE table_name_15 (Id VARCHAR) | SELECT 1993 FROM table_name_15 WHERE 1996 = "atp masters series" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1808,
41,
196,
26,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
8388,
701,
13,
8,
6911,
44,
102,
2325,
7,
939,
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,
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,
8388,
21680,
953,
834,
4350,
834,
1808,
549,
17444,
427,
6911,
3274,
96,
144,
102,
2325,
7,
939,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What are the maximum fastest lap speed in races held after 2004 grouped by race name and ordered by year? | CREATE TABLE results (fastestlapspeed INTEGER, raceid VARCHAR); CREATE TABLE races (name VARCHAR, year INTEGER, raceid VARCHAR) | SELECT MAX(T2.fastestlapspeed), T1.name, T1.year FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year > 2014 GROUP BY T1.name ORDER BY T1.year | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
772,
41,
11584,
222,
8478,
9993,
3,
21342,
17966,
6,
1964,
23,
26,
584,
4280,
28027,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
10879,
41,
4350,
584,
4280,
28027,
6,
215,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
382,
4416,
11584,
222,
8478,
9993,
201,
332,
5411,
4350,
6,
332,
5411,
1201,
21680,
10879,
6157,
332,
536,
3,
15355,
3162,
772,
6157,
332,
357,
9191,
332,
5411,
12614,
23,
26,
3274,
332,
4416,
12614,
2... |
What is the genre of Super Mario Galaxy? | CREATE TABLE table_name_50 (
genre VARCHAR,
game VARCHAR
) | SELECT genre FROM table_name_50 WHERE game = "super mario galaxy" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1752,
41,
5349,
584,
4280,
28027,
6,
467,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
5349,
13,
2011,
14082,
8455,
58,
1,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
5349,
21680,
953,
834,
4350,
834,
1752,
549,
17444,
427,
467,
3274,
96,
21771,
2774,
32,
24856,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the total number of losses for a draw of 7, and 1 points less than 33? | CREATE TABLE table_79098 (
"Position" real,
"Team" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Goals For" real,
"Goals Against" real,
"Goal Difference" text,
"Points 1" real
) | SELECT COUNT("Lost") FROM table_79098 WHERE "Drawn" = '7' AND "Points 1" < '33' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
940,
2394,
3916,
41,
96,
345,
32,
7,
4749,
121,
490,
6,
96,
18699,
121,
1499,
6,
96,
15800,
15,
26,
121,
490,
6,
96,
308,
10936,
29,
121,
490,
6,
96,
434,
3481,
121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
434,
3481,
8512,
21680,
953,
834,
940,
2394,
3916,
549,
17444,
427,
96,
308,
10936,
29,
121,
3274,
3,
31,
940,
31,
3430,
96,
22512,
7,
209,
121,
3,
2,
3,
31,
4201,
31,
1,
-100,
-100,
-100,... |
Where is the location with a record of 50-19? | CREATE TABLE table_name_34 (location VARCHAR, record VARCHAR) | SELECT location FROM table_name_34 WHERE record = "50-19" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3710,
41,
14836,
584,
4280,
28027,
6,
1368,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2840,
19,
8,
1128,
28,
3,
9,
1368,
13,
943,
4481,
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,
1128,
21680,
953,
834,
4350,
834,
3710,
549,
17444,
427,
1368,
3274,
96,
1752,
4481,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What surface was used when she played with Remi Tezuka? | CREATE TABLE table_name_76 (surface VARCHAR, partner VARCHAR) | SELECT surface FROM table_name_76 WHERE partner = "remi tezuka" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3959,
41,
26899,
584,
4280,
28027,
6,
2397,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
1774,
47,
261,
116,
255,
1944,
28,
13466,
23,
2255,
1000,
125... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1774,
21680,
953,
834,
4350,
834,
3959,
549,
17444,
427,
2397,
3274,
96,
60,
51,
23,
3,
17,
457,
1598,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
How many times did an election feature the result robert l. leggett (d) 50.2% albert dehr (r) 49.8%? | CREATE TABLE table_1341672_6 (result VARCHAR, candidates VARCHAR) | SELECT COUNT(result) FROM table_1341672_6 WHERE candidates = "Robert L. Leggett (D) 50.2% Albert Dehr (R) 49.8%" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
27650,
357,
834,
948,
41,
60,
7,
83,
17,
584,
4280,
28027,
6,
4341,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
648,
410,
46,
4356,
1451,
8,
741,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
60,
7,
83,
17,
61,
21680,
953,
834,
23747,
27650,
357,
834,
948,
549,
17444,
427,
4341,
3274,
96,
24372,
49,
17,
301,
5,
18978,
2782,
17,
41,
308,
61,
943,
5,
5406,
11375,
309,
7392,
41,
448,
6... |
What is the total amount of freight produced of u28c? | CREATE TABLE table_name_49 (
total_produced VARCHAR,
service VARCHAR,
builder’s_model VARCHAR
) | SELECT total_produced FROM table_name_49 WHERE service = "freight" AND builder’s_model = "u28c" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3647,
41,
792,
834,
29462,
584,
4280,
28027,
6,
313,
584,
4280,
28027,
6,
918,
49,
22,
7,
834,
21770,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
792,
834,
29462,
21680,
953,
834,
4350,
834,
3647,
549,
17444,
427,
313,
3274,
96,
89,
60,
2632,
121,
3430,
918,
49,
22,
7,
834,
21770,
3274,
96,
76,
2577,
75,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
When are the letters what is the nickname? | CREATE TABLE table_28436909_4 (
nickname VARCHAR,
letters VARCHAR
) | SELECT nickname FROM table_28436909_4 WHERE letters = "ΚΑΘ" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2577,
4906,
3951,
4198,
834,
591,
41,
24649,
584,
4280,
28027,
6,
5487,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
366,
33,
8,
5487,
125,
19,
8,
24649,
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,
24649,
21680,
953,
834,
2577,
4906,
3951,
4198,
834,
591,
549,
17444,
427,
5487,
3274,
96,
2,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What was the attendance of the Blue Jays' game when their record was 47-43? | CREATE TABLE table_68126 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text
) | SELECT SUM("Attendance") FROM table_68126 WHERE "Record" = '47-43' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3651,
21976,
41,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
434,
32,
7,
7,
121,
1499,
6,
96,
188,
17,
324,
26,
663... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
121,
188,
17,
324,
26,
663,
8512,
21680,
953,
834,
3651,
21976,
549,
17444,
427,
96,
1649,
7621,
121,
3274,
3,
31,
4177,
18,
4906,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What are the codes of types of documents of which there are for or more? | CREATE TABLE documents (
document_code text,
document_structure_code text,
document_type_code text,
access_count number,
document_name text
)
CREATE TABLE document_sections (
section_id number,
document_code text,
section_sequence number,
section_code text,
section_title text
)
CREATE TABLE document_sections_images (
section_id number,
image_id number
)
CREATE TABLE document_structures (
document_structure_code text,
parent_document_structure_code text,
document_structure_description text
)
CREATE TABLE document_functional_areas (
document_code text,
functional_area_code text
)
CREATE TABLE images (
image_id number,
image_alt_text text,
image_name text,
image_url text
)
CREATE TABLE functional_areas (
functional_area_code text,
parent_functional_area_code text,
functional_area_description text
)
CREATE TABLE users (
user_id number,
role_code text,
user_name text,
user_login text,
password text
)
CREATE TABLE roles (
role_code text,
role_description text
) | SELECT document_type_code FROM documents GROUP BY document_type_code HAVING COUNT(*) > 4 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2691,
41,
1708,
834,
4978,
1499,
6,
1708,
834,
16180,
834,
4978,
1499,
6,
1708,
834,
6137,
834,
4978,
1499,
6,
592,
834,
13362,
381,
6,
1708,
834,
4350,
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,
1708,
834,
6137,
834,
4978,
21680,
2691,
350,
4630,
6880,
272,
476,
1708,
834,
6137,
834,
4978,
454,
6968,
2365,
2847,
17161,
599,
1935,
61,
2490,
314,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Which Runner-up has a Winning score of −20 (70-69-64-65=268)? | CREATE TABLE table_name_69 (runner_up VARCHAR, winning_score VARCHAR) | SELECT runner_up FROM table_name_69 WHERE winning_score = −20(70 - 69 - 64 - 65 = 268) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3951,
41,
10806,
834,
413,
584,
4280,
28027,
6,
3447,
834,
7,
9022,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
3,
23572,
18,
413,
65,
3,
9,
549,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
3,
23143,
14196,
3,
10806,
834,
413,
21680,
953,
834,
4350,
834,
3951,
549,
17444,
427,
3447,
834,
7,
9022,
3274,
3,
2,
1755,
599,
2518,
3,
18,
3,
3951,
3,
18,
6687,
3,
18,
7123,
3274,
2208,
13520,
1,
-100,
-100,
-100,
-100,
-10... |
What position does the Colorado Rapids pick after 15 play? | CREATE TABLE table_31777 (
"Pick #" real,
"MLS Team" text,
"Player" text,
"Position" text,
"Affiliation" text
) | SELECT "Position" FROM table_31777 WHERE "MLS Team" = 'colorado rapids' AND "Pick #" > '15' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3341,
26225,
41,
96,
345,
3142,
1713,
121,
490,
6,
96,
17976,
2271,
121,
1499,
6,
96,
15800,
49,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
188,
89,
8027,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
345,
32,
7,
4749,
121,
21680,
953,
834,
3341,
26225,
549,
17444,
427,
96,
17976,
2271,
121,
3274,
3,
31,
8135,
19042,
3607,
7,
31,
3430,
96,
345,
3142,
1713,
121,
2490,
3,
31,
1808,
31,
1,
-100,
-100,
-100,
... |
What is the score of the match won by Willie Hunter at the Royal Liverpool Golf Club? | CREATE TABLE table_42942 (
"Year" text,
"Venue" text,
"Champion" text,
"Country" text,
"Score" text,
"Runner-up" text
) | SELECT "Score" FROM table_42942 WHERE "Venue" = 'royal liverpool golf club' AND "Champion" = 'willie hunter' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4165,
4240,
357,
41,
96,
476,
2741,
121,
1499,
6,
96,
553,
35,
76,
15,
121,
1499,
6,
96,
254,
1483,
12364,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
134,
9022,
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,
134,
9022,
121,
21680,
953,
834,
4165,
4240,
357,
549,
17444,
427,
96,
553,
35,
76,
15,
121,
3274,
3,
31,
8170,
138,
11501,
13194,
4319,
1886,
31,
3430,
96,
254,
1483,
12364,
121,
3274,
3,
31,
8894,
23,
15,
... |
Show the names of customers having an order with shipping method FedEx and order status Paid. | CREATE TABLE customer_orders (
order_id number,
customer_id number,
order_status_code text,
shipping_method_code text,
order_placed_datetime time,
order_delivered_datetime time,
order_shipping_charges text
)
CREATE TABLE customers (
customer_id number,
payment_method text,
customer_name text,
customer_phone text,
customer_email text,
customer_address text,
customer_login text,
customer_password text
)
CREATE TABLE customer_addresses (
customer_id number,
premise_id number,
date_address_from time,
address_type_code text,
date_address_to time
)
CREATE TABLE premises (
premise_id number,
premises_type text,
premise_details text
)
CREATE TABLE order_items (
item_id number,
order_item_status_code text,
order_id number,
product_id number,
item_status_code text,
item_delivered_datetime time,
item_order_quantity text
)
CREATE TABLE mailshot_campaigns (
mailshot_id number,
product_category text,
mailshot_name text,
mailshot_start_date time,
mailshot_end_date time
)
CREATE TABLE mailshot_customers (
mailshot_id number,
customer_id number,
outcome_code text,
mailshot_customer_date time
)
CREATE TABLE products (
product_id number,
product_category text,
product_name text
) | SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE shipping_method_code = 'FedEx' AND order_status_code = 'Paid' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
884,
834,
9397,
7,
41,
455,
834,
23,
26,
381,
6,
884,
834,
23,
26,
381,
6,
455,
834,
8547,
302,
834,
4978,
1499,
6,
3365,
834,
23152,
834,
4978,
1499,
6,
455,
834,
4687,
26,
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,
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,
549,
17444,
427,
33... |
Name the engine with entrant of larrousse f1 | CREATE TABLE table_name_59 (
engine VARCHAR,
entrant VARCHAR
) | SELECT engine FROM table_name_59 WHERE entrant = "larrousse f1" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3390,
41,
1948,
584,
4280,
28027,
6,
3,
295,
3569,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
1948,
28,
3,
295,
3569,
13,
50,
52,
52,
174... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1948,
21680,
953,
834,
4350,
834,
3390,
549,
17444,
427,
3,
295,
3569,
3274,
96,
40,
291,
52,
17486,
3,
89,
536,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the number of laps completed by the car in grid 10? | CREATE TABLE table_name_19 (laps VARCHAR, grid VARCHAR) | SELECT laps FROM table_name_19 WHERE grid = "10" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2294,
41,
8478,
7,
584,
4280,
28027,
6,
8634,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
381,
13,
14941,
7,
2012,
57,
8,
443,
16,
8634,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
14941,
7,
21680,
953,
834,
4350,
834,
2294,
549,
17444,
427,
8634,
3274,
96,
1714,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name The Title which has a Track number of 07, and a Record label of emi on 21 april 2006? | CREATE TABLE table_name_73 (
title VARCHAR,
release_date VARCHAR,
track_number VARCHAR,
record_label VARCHAR
) | SELECT title FROM table_name_73 WHERE track_number = "07" AND record_label = "emi" AND release_date = "21 april 2006" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4552,
41,
2233,
584,
4280,
28027,
6,
1576,
834,
5522,
584,
4280,
28027,
6,
1463,
834,
5525,
1152,
584,
4280,
28027,
6,
1368,
834,
40,
10333,
584,
4280,
28027,
3,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2233,
21680,
953,
834,
4350,
834,
4552,
549,
17444,
427,
1463,
834,
5525,
1152,
3274,
96,
4560,
121,
3430,
1368,
834,
40,
10333,
3274,
96,
15,
51,
23,
121,
3430,
1576,
834,
5522,
3274,
96,
2658,
3,
9,
2246,
40,
35... |
when was the first time that the heartrate of patient 006-158689 was measured / taken? | CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
) | SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-158689')) AND NOT vitalperiodic.heartrate IS NULL ORDER BY vitalperiodic.observationtime LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3362,
4267,
32,
4370,
41,
3362,
4267,
32,
26,
1294,
26,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
2912,
381,
6,
3,
7,
9,
32,
357,
381,
6,
842,
2206,
381,
6,
14114,
257,
381,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3362,
4267,
32,
4370,
5,
11755,
257,
715,
21680,
3362,
4267,
32,
4370,
549,
17444,
427,
3362,
4267,
32,
4370,
5,
10061,
15129,
21545,
23,
26,
3388,
41,
23143,
14196,
1868,
5,
10061,
15129,
21545,
23,
26,
21680,
1868,
... |
Name the candidates for pennsylvania 14 | CREATE TABLE table_2668347_17 (candidates VARCHAR, district VARCHAR) | SELECT candidates FROM table_2668347_17 WHERE district = "Pennsylvania 14" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2688,
3651,
519,
4177,
834,
2517,
41,
1608,
12416,
6203,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
4341,
21,
4550,
29,
7,
63,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4341,
21680,
953,
834,
2688,
3651,
519,
4177,
834,
2517,
549,
17444,
427,
3939,
3274,
96,
345,
35,
29,
7,
63,
40,
16658,
9,
968,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the lowest Draws, when Against is '1547', and when Wins is greater than 3? | CREATE TABLE table_name_42 (
draws INTEGER,
against VARCHAR,
wins VARCHAR
) | SELECT MIN(draws) FROM table_name_42 WHERE against = 1547 AND wins > 3 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4165,
41,
14924,
3,
21342,
17966,
6,
581,
584,
4280,
28027,
6,
9204,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
7402,
19183,
7,
6,
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,
1,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
19489,
7,
61,
21680,
953,
834,
4350,
834,
4165,
549,
17444,
427,
581,
3274,
627,
4177,
3430,
9204,
2490,
220,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the Time when the Set 2 is 25–21, on 29 may? | CREATE TABLE table_name_91 (time VARCHAR, set_2 VARCHAR, date VARCHAR) | SELECT time FROM table_name_91 WHERE set_2 = "25–21" AND date = "29 may" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4729,
41,
715,
584,
4280,
28027,
6,
356,
834,
357,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2900,
116,
8,
2821,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
97,
21680,
953,
834,
4350,
834,
4729,
549,
17444,
427,
356,
834,
357,
3274,
96,
1828,
104,
2658,
121,
3430,
833,
3274,
96,
3166,
164,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What was the venue of season 1907? | CREATE TABLE table_name_48 (venue VARCHAR, season VARCHAR) | SELECT venue FROM table_name_48 WHERE season = "1907" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3707,
41,
15098,
584,
4280,
28027,
6,
774,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
5669,
13,
774,
957,
4560,
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,
5669,
21680,
953,
834,
4350,
834,
3707,
549,
17444,
427,
774,
3274,
96,
2294,
4560,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name the sum of year for swimming and first of mike | CREATE TABLE table_name_68 (year INTEGER, sport VARCHAR, first VARCHAR) | SELECT SUM(year) FROM table_name_68 WHERE sport = "swimming" AND first = "mike" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3651,
41,
1201,
3,
21342,
17966,
6,
2600,
584,
4280,
28027,
6,
166,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
4505,
13,
215,
21,
5989,
11,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
180,
6122,
599,
1201,
61,
21680,
953,
834,
4350,
834,
3651,
549,
17444,
427,
2600,
3274,
96,
7,
210,
23,
635,
53,
121,
3430,
166,
3274,
96,
20068,
15,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
when did the patient stephanie suchan get discharged? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) | SELECT demographic.dischtime FROM demographic WHERE demographic.name = "Stephanie Suchan" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
14798,
5,
26,
2499,
715,
21680,
14798,
549,
17444,
427,
14798,
5,
4350,
3274,
96,
14337,
8237,
23,
15,
3900,
152,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What was the result of the game that was attended by 41,650 people? | CREATE TABLE table_name_56 (
result VARCHAR,
attendance VARCHAR
) | SELECT result FROM table_name_56 WHERE attendance = "41,650" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4834,
41,
741,
584,
4280,
28027,
6,
11364,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
741,
13,
8,
467,
24,
47,
5526,
57,
8798,
6,
1534... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
741,
21680,
953,
834,
4350,
834,
4834,
549,
17444,
427,
11364,
3274,
96,
4853,
6,
15348,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the total number of losses of the player with an avg/g smaller than -3.3 and a gain larger than 126? | CREATE TABLE table_name_86 (loss VARCHAR, avg_g VARCHAR, gain VARCHAR) | SELECT COUNT(loss) FROM table_name_86 WHERE avg_g < -3.3 AND gain > 126 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3840,
41,
2298,
7,
584,
4280,
28027,
6,
3,
9,
208,
122,
834,
122,
584,
4280,
28027,
6,
2485,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
2298,
7,
61,
21680,
953,
834,
4350,
834,
3840,
549,
17444,
427,
3,
9,
208,
122,
834,
122,
3,
2,
3,
18,
19660,
3430,
2485,
2490,
3,
21976,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What in 2007 has a 2010 of qf, and a 2012 of w? | CREATE TABLE table_75964 (
"Tournament" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text,
"Win %" text
) | SELECT "2007" FROM table_75964 WHERE "2010" = 'qf' AND "2012" = 'w' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3072,
4314,
591,
41,
96,
382,
1211,
20205,
17,
121,
1499,
6,
96,
22594,
121,
1499,
6,
96,
21196,
121,
1499,
6,
96,
20615,
121,
1499,
6,
96,
16128,
121,
1499,
6,
96,
16660... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
20615,
121,
21680,
953,
834,
3072,
4314,
591,
549,
17444,
427,
96,
14926,
121,
3274,
3,
31,
1824,
89,
31,
3430,
96,
12172,
121,
3274,
3,
31,
210,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the skip when Tony Angiboust was a lead? | CREATE TABLE table_name_40 (
skip VARCHAR,
lead VARCHAR
) | SELECT skip FROM table_name_40 WHERE lead = "tony angiboust" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2445,
41,
11202,
584,
4280,
28027,
6,
991,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
11202,
116,
9137,
3,
8365,
23,
4076,
7,
17,
47,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
11202,
21680,
953,
834,
4350,
834,
2445,
549,
17444,
427,
991,
3274,
96,
17,
106,
63,
3,
1468,
23,
4076,
7,
17,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
how many chroma format with name being high profile | CREATE TABLE table_1376890_2 (
chroma_format VARCHAR,
name VARCHAR
) | SELECT COUNT(chroma_format) FROM table_1376890_2 WHERE name = "High profile" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
24636,
3651,
2394,
834,
357,
41,
3,
10363,
51,
9,
834,
8995,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
149,
186,
3,
10363,
51,
9,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
10363,
51,
9,
834,
8995,
61,
21680,
953,
834,
24636,
3651,
2394,
834,
357,
549,
17444,
427,
564,
3274,
96,
21417,
3278,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Show all track names that have had no races. | CREATE TABLE track (name VARCHAR, track_id VARCHAR); CREATE TABLE race (name VARCHAR, track_id VARCHAR) | SELECT name FROM track WHERE NOT track_id IN (SELECT track_id FROM race) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1463,
41,
4350,
584,
4280,
28027,
6,
1463,
834,
23,
26,
584,
4280,
28027,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
1964,
41,
4350,
584,
4280,
28027,
6,
1463,
834,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
3,
23143,
14196,
564,
21680,
1463,
549,
17444,
427,
4486,
1463,
834,
23,
26,
3388,
41,
23143,
14196,
1463,
834,
23,
26,
21680,
1964,
61,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What was the away team at mcg? | CREATE TABLE table_name_44 (
away_team VARCHAR,
venue VARCHAR
) | SELECT away_team FROM table_name_44 WHERE venue = "mcg" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3628,
41,
550,
834,
11650,
584,
4280,
28027,
6,
5669,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
550,
372,
44,
3,
51,
75,
122,
58,
1,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
550,
834,
11650,
21680,
953,
834,
4350,
834,
3628,
549,
17444,
427,
5669,
3274,
96,
51,
75,
122,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
how many swimmers swam the 100 meters in under 55 seconds ? | CREATE TABLE table_204_3 (
id number,
"rank" number,
"name" text,
"nationality" text,
"time" number
) | SELECT COUNT("name") FROM table_204_3 WHERE "time" < 55 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
519,
41,
3,
23,
26,
381,
6,
96,
6254,
121,
381,
6,
96,
4350,
121,
1499,
6,
96,
16557,
485,
121,
1499,
6,
96,
715,
121,
381,
3,
61,
3,
32102,
32103,
32101,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
4350,
8512,
21680,
953,
834,
26363,
834,
519,
549,
17444,
427,
96,
715,
121,
3,
2,
6897,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the maximum speed for straight-4, 1.466 cc Type r 150? | CREATE TABLE table_name_60 (vmax VARCHAR, type VARCHAR, cylinder VARCHAR, capacity VARCHAR) | SELECT vmax FROM table_name_60 WHERE cylinder = "straight-4" AND capacity = "1.466 cc" AND type = "r 150" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3328,
41,
208,
9128,
584,
4280,
28027,
6,
686,
584,
4280,
28027,
6,
3,
12980,
584,
4280,
28027,
6,
2614,
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,
1,
1,
1,
1,
1,
1,
0,
0... | [
3,
23143,
14196,
3,
208,
9128,
21680,
953,
834,
4350,
834,
3328,
549,
17444,
427,
3,
12980,
3274,
96,
3109,
2632,
18,
20364,
3430,
2614,
3274,
96,
14912,
3539,
3,
75,
75,
121,
3430,
686,
3274,
96,
52,
4261,
121,
1,
-100,
-100,
-10... |
count the number of patients whose days of hospital stay is greater than 29 and admission year is less than 2179? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.days_stay > "29" AND demographic.admityear < "2179" | [
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,
549,
17444,
427,
14798,
5,
1135,
7,
834,
21545,
2490,
96,
3166,
121,
3430,
14798,
5,
20466,
17,
1201,
3,
2,
96,
2658,
4440,... |
How many height entries are there for players from bayside high school? | CREATE TABLE table_22496374_1 (height VARCHAR, high_school VARCHAR) | SELECT COUNT(height) FROM table_22496374_1 WHERE high_school = "Bayside" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2884,
3647,
3891,
4581,
834,
536,
41,
88,
2632,
584,
4280,
28027,
6,
306,
834,
6646,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
3902,
10066,
33,
132,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
88,
2632,
61,
21680,
953,
834,
2884,
3647,
3891,
4581,
834,
536,
549,
17444,
427,
306,
834,
6646,
3274,
96,
279,
9,
63,
1583,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
List all headquarters and the number of companies in each headquarter. | CREATE TABLE company (
company_id number,
rank number,
company text,
headquarters text,
main_industry text,
sales_billion number,
profits_billion number,
assets_billion number,
market_value number
)
CREATE TABLE station_company (
station_id number,
company_id number,
rank_of_the_year number
)
CREATE TABLE gas_station (
station_id number,
open_year number,
location text,
manager_name text,
vice_manager_name text,
representative_name text
) | SELECT headquarters, COUNT(*) FROM company GROUP BY headquarters | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
349,
41,
349,
834,
23,
26,
381,
6,
11003,
381,
6,
349,
1499,
6,
13767,
1499,
6,
711,
834,
13580,
7,
8224,
1499,
6,
1085,
834,
115,
14916,
381,
6,
9613,
834,
115,
14916,
381,
6,
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,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
13767,
6,
2847,
17161,
599,
1935,
61,
21680,
349,
350,
4630,
6880,
272,
476,
13767,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
On what Date was the match with a Score of 6-2, 6-4? | CREATE TABLE table_47433 (
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent" text,
"Score" text
) | SELECT "Date" FROM table_47433 WHERE "Score" = '6-2, 6-4' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4177,
4906,
519,
41,
96,
308,
342,
121,
1499,
6,
96,
382,
1211,
20205,
17,
121,
1499,
6,
96,
134,
450,
4861,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
134,
90... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4177,
4906,
519,
549,
17444,
427,
96,
134,
9022,
121,
3274,
3,
31,
25369,
6,
3,
25618,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which category earlier than 2006 has Bart Brentjens as rider 2? | CREATE TABLE table_name_33 (category VARCHAR, date VARCHAR, rider_2 VARCHAR) | SELECT category FROM table_name_33 WHERE date < 2006 AND rider_2 = "bart brentjens" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4201,
41,
8367,
839,
651,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
6,
2564,
52,
834,
357,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
3295,
2283,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3295,
21680,
953,
834,
4350,
834,
4201,
549,
17444,
427,
833,
3,
2,
3581,
3430,
2564,
52,
834,
357,
3274,
96,
1047,
17,
6397,
295,
354,
35,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
For all employees who have the letters D or S in their first name, return a bar chart about the distribution of job_id and the average of salary , and group by attribute job_id, I want to sort by the Y-axis in descending please. | CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
) | SELECT JOB_ID, AVG(SALARY) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY AVG(SALARY) DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
613,
834,
10193,
10972,
41,
262,
5244,
5017,
476,
5080,
834,
4309,
7908,
1982,
599,
11071,
632,
201,
5097,
8241,
834,
308,
6048,
833,
6,
3,
14920,
834,
308,
6048,
833,
6,
446,
10539,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
446,
10539,
834,
4309,
6,
71,
17217,
599,
134,
4090,
24721,
61,
21680,
1652,
549,
17444,
427,
30085,
834,
567,
17683,
8729,
9914,
3,
31,
1454,
308,
1454,
31,
4674,
30085,
834,
567,
17683,
8729,
9914,
3,
31,
1454,
13... |
How many people participated in the Rasmussen Reports poll on October 13, 2010? | CREATE TABLE table_name_61 (
sample_size VARCHAR,
poll_source VARCHAR,
date_s__administered VARCHAR
) | SELECT sample_size FROM table_name_61 WHERE poll_source = "rasmussen reports" AND date_s__administered = "october 13, 2010" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4241,
41,
3106,
834,
7991,
584,
4280,
28027,
6,
5492,
834,
7928,
584,
4280,
28027,
6,
833,
834,
7,
834,
834,
9,
26,
17791,
15,
26,
584,
4280,
28027,
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,
3106,
834,
7991,
21680,
953,
834,
4350,
834,
4241,
549,
17444,
427,
5492,
834,
7928,
3274,
96,
52,
9,
7,
3252,
7,
35,
2279,
121,
3430,
833,
834,
7,
834,
834,
9,
26,
17791,
15,
26,
3274,
96,
32,
75,
235,
1152,
... |
What is the grid when the driver was Michael Schumacher? | CREATE TABLE table_name_20 (
grid VARCHAR,
driver VARCHAR
) | SELECT grid FROM table_name_20 WHERE driver = "michael schumacher" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1755,
41,
8634,
584,
4280,
28027,
6,
2535,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
8634,
116,
8,
2535,
47,
2457,
6824,
24113,
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,
8634,
21680,
953,
834,
4350,
834,
1755,
549,
17444,
427,
2535,
3274,
96,
51,
362,
9,
15,
40,
3,
7,
8019,
24113,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What Nationality's time is 2:07.64? | CREATE TABLE table_67970 (
"Event" text,
"Time" text,
"Nationality" text,
"Date" text,
"Meet" text,
"Location" text
) | SELECT "Nationality" FROM table_67970 WHERE "Time" = '2:07.64' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3708,
4327,
632,
41,
96,
427,
2169,
121,
1499,
6,
96,
13368,
121,
1499,
6,
96,
24732,
485,
121,
1499,
6,
96,
308,
342,
121,
1499,
6,
96,
329,
15,
15,
17,
121,
1499,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
24732,
485,
121,
21680,
953,
834,
3708,
4327,
632,
549,
17444,
427,
96,
13368,
121,
3274,
3,
31,
357,
10,
14681,
4389,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Which Name has a Yes Saturday and a Yes Evening? | CREATE TABLE table_48426 (
"Name" text,
"Daytime" text,
"Evening" text,
"Saturday" text,
"Sunday" text
) | SELECT "Name" FROM table_48426 WHERE "Saturday" = 'yes' AND "Evening" = 'yes' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3707,
591,
2688,
41,
96,
23954,
121,
1499,
6,
96,
16803,
715,
121,
1499,
6,
96,
427,
1926,
53,
121,
1499,
6,
96,
134,
6010,
1135,
121,
1499,
6,
96,
134,
202,
1135,
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,
23954,
121,
21680,
953,
834,
3707,
591,
2688,
549,
17444,
427,
96,
134,
6010,
1135,
121,
3274,
3,
31,
10070,
31,
3430,
96,
427,
1926,
53,
121,
3274,
3,
31,
10070,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What was the undecided with Roy Barnes at 47%? | CREATE TABLE table_name_22 (
undecided VARCHAR,
roy_barnes VARCHAR
) | SELECT undecided FROM table_name_22 WHERE roy_barnes = "47%" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2884,
41,
3550,
10812,
15,
26,
584,
4280,
28027,
6,
3,
8170,
834,
1047,
1496,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
3550,
10812,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3550,
10812,
15,
26,
21680,
953,
834,
4350,
834,
2884,
549,
17444,
427,
3,
8170,
834,
1047,
1496,
3274,
96,
591,
6170,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
how many patients who are married had hematology as the lab test category? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "MARRIED" AND lab."CATEGORY" = "Hematology" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7690,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7690,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
WHAT IS THE TOTAL AVERAGE WITH A PLACE SMALLER THAN 1? | CREATE TABLE table_name_53 (average VARCHAR, place INTEGER) | SELECT COUNT(average) FROM table_name_53 WHERE place < 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4867,
41,
28951,
584,
4280,
28027,
6,
286,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
21665,
6827,
1853,
3001,
16359,
71,
16174,
11187,
11951,
71,
17501,
47... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
28951,
61,
21680,
953,
834,
4350,
834,
4867,
549,
17444,
427,
286,
3,
2,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
for what disease subject id 6983 has been diagnosed for? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT diagnoses.long_title FROM diagnoses WHERE diagnoses.subject_id = "6983" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
14798,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
564,
1499,
6,
2774,
1947,
834,
8547,
302,
1499,
6,
1246,
1499,
6,
103,
115,
1499,
6,
7285,
1499,
6,
1612,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
18730,
7,
5,
2961,
834,
21869,
21680,
18730,
7,
549,
17444,
427,
18730,
7,
5,
7304,
11827,
834,
23,
26,
3274,
96,
3951,
4591,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Who wrote the episode where the original air date is july20,2007? | CREATE TABLE table_28044 (
"Series no." real,
"No. in season" real,
"Title" text,
"Written by" text,
"Directed by" text,
"Original air date" text,
"U.S. viewers (millions)" text
) | SELECT "Written by" FROM table_28044 WHERE "Original air date" = 'July20,2007' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
17518,
3628,
41,
96,
12106,
7,
150,
535,
490,
6,
96,
4168,
5,
16,
774,
121,
490,
6,
96,
382,
155,
109,
121,
1499,
6,
96,
24965,
324,
57,
121,
1499,
6,
96,
23620,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
24965,
324,
57,
121,
21680,
953,
834,
17518,
3628,
549,
17444,
427,
96,
667,
3380,
10270,
799,
833,
121,
3274,
3,
31,
683,
83,
63,
1755,
6,
20615,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Name the date that is a cd | CREATE TABLE table_name_81 (date VARCHAR, format VARCHAR) | SELECT date FROM table_name_81 WHERE format = "cd" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4959,
41,
5522,
584,
4280,
28027,
6,
1910,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
833,
24,
19,
3,
9,
3,
75,
26,
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,
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,
833,
21680,
953,
834,
4350,
834,
4959,
549,
17444,
427,
1910,
3274,
96,
75,
26,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the lowest crowd when the away side scores 11.16 (82)? | CREATE TABLE table_4522 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT MIN("Crowd") FROM table_4522 WHERE "Away team score" = '11.16 (82)' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2128,
2884,
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,
3,
17684,
599,
121,
254,
3623,
26,
8512,
21680,
953,
834,
2128,
2884,
549,
17444,
427,
96,
188,
1343,
372,
2604,
121,
3274,
3,
31,
10032,
2938,
13642,
7318,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
find the location and Representative name of the gas stations owned by the companies with top 3 Asset amounts. | CREATE TABLE gas_station (location VARCHAR, Representative_Name VARCHAR, station_id VARCHAR); CREATE TABLE station_company (company_id VARCHAR, station_id VARCHAR); CREATE TABLE company (company_id VARCHAR, Assets_billion VARCHAR) | SELECT T3.location, T3.Representative_Name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id ORDER BY T2.Assets_billion DESC LIMIT 3 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1807,
834,
6682,
41,
14836,
584,
4280,
28027,
6,
13517,
834,
23954,
584,
4280,
28027,
6,
2478,
834,
23,
26,
584,
4280,
28027,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
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,
5787,
14836,
6,
332,
5787,
1649,
12640,
1528,
834,
23954,
21680,
2478,
834,
29179,
6157,
332,
536,
3,
15355,
3162,
349,
6157,
332,
357,
9191,
332,
5411,
29179,
834,
23,
26,
3274,
332,
4416,
29179,
834,
23,
26,
... |
What is High Points, when Game is '3'? | CREATE TABLE table_49208 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Series" text
) | SELECT "High points" FROM table_49208 WHERE "Game" = '3' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3647,
23946,
41,
96,
23055,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
18699,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
21417,
979,
121,
1499,
6,
96,
21417,
3,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
21417,
979,
121,
21680,
953,
834,
3647,
23946,
549,
17444,
427,
96,
23055,
121,
3274,
3,
31,
519,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Give me a pie chart to reflect the proportion of Sex and the amount of Sex. | CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate real
)
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight real
) | SELECT Sex, COUNT(Sex) FROM people GROUP BY Sex | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4775,
41,
25833,
17,
15,
834,
4309,
16,
17,
6,
2449,
834,
4309,
16,
17,
6,
14457,
834,
23799,
1499,
6,
7678,
1499,
6,
4224,
834,
2206,
490,
6,
9151,
834,
2206,
490,
6,
4495,
2748,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
679,
226,
6,
2847,
17161,
599,
134,
994,
61,
21680,
151,
350,
4630,
6880,
272,
476,
679,
226,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the home team in the February 22 game that Legace played in for the St. Louis Blues? | CREATE TABLE table_name_78 (
home VARCHAR,
date VARCHAR,
decision VARCHAR,
visitor VARCHAR
) | SELECT home FROM table_name_78 WHERE decision = "legace" AND visitor = "st. louis" AND date = "february 22" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3940,
41,
234,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
6,
1357,
584,
4280,
28027,
6,
7019,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
234,
21680,
953,
834,
4350,
834,
3940,
549,
17444,
427,
1357,
3274,
96,
5772,
3302,
121,
3430,
7019,
3274,
96,
7,
17,
5,
16585,
159,
121,
3430,
833,
3274,
96,
89,
15,
9052,
1208,
1630,
121,
1,
-100,
-100,
-100,
-1... |
Name the dominant religion of srpska crnja | CREATE TABLE table_2562572_37 (dominant_religion__2002_ VARCHAR, settlement VARCHAR) | SELECT dominant_religion__2002_ FROM table_2562572_37 WHERE settlement = "Srpska Crnja" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
19337,
1828,
5865,
834,
4118,
41,
5012,
77,
288,
834,
60,
2825,
23,
106,
834,
834,
24898,
834,
584,
4280,
28027,
6,
7025,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
12613,
834,
60,
2825,
23,
106,
834,
834,
24898,
834,
21680,
953,
834,
19337,
1828,
5865,
834,
4118,
549,
17444,
427,
7025,
3274,
96,
134,
52,
102,
10717,
8427,
29,
1191,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the title of the person who started their reign in 1999? | CREATE TABLE table_name_63 (
title VARCHAR,
start_of_reign VARCHAR
) | SELECT title FROM table_name_63 WHERE start_of_reign = 1999 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3891,
41,
2233,
584,
4280,
28027,
6,
456,
834,
858,
834,
60,
3191,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2233,
13,
8,
568,
113,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2233,
21680,
953,
834,
4350,
834,
3891,
549,
17444,
427,
456,
834,
858,
834,
60,
3191,
3274,
5247,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Frequency of the aircrafts that has win an award, across by its name as a pie chart | CREATE TABLE pilot (
Pilot_Id int(11),
Name varchar(50),
Age int(11)
)
CREATE TABLE aircraft (
Aircraft_ID int(11),
Aircraft varchar(50),
Description varchar(50),
Max_Gross_Weight varchar(50),
Total_disk_area varchar(50),
Max_disk_Loading varchar(50)
)
CREATE TABLE airport (
Airport_ID int,
Airport_Name text,
Total_Passengers real,
%_Change_2007 text,
International_Passengers real,
Domestic_Passengers real,
Transit_Passengers real,
Aircraft_Movements real,
Freight_Metric_Tonnes real
)
CREATE TABLE airport_aircraft (
ID int,
Airport_ID int,
Aircraft_ID int
)
CREATE TABLE match (
Round real,
Location text,
Country text,
Date text,
Fastest_Qualifying text,
Winning_Pilot text,
Winning_Aircraft text
) | SELECT Aircraft, COUNT(*) FROM aircraft AS T1 JOIN match AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4487,
41,
17777,
834,
196,
26,
16,
17,
599,
2596,
201,
5570,
3,
4331,
4059,
599,
1752,
201,
7526,
16,
17,
599,
2596,
61,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
1761,
6696,
6,
2847,
17161,
599,
1935,
61,
21680,
6442,
6157,
332,
536,
3,
15355,
3162,
1588,
6157,
332,
357,
9191,
332,
5411,
20162,
6696,
834,
4309,
3274,
332,
4416,
518,
10503,
834,
20162,
6696,
350,
4630,
6880,
27... |
What is the nationality of the player from Drexel who had a pick larger than 183? | CREATE TABLE table_name_9 (
nationality VARCHAR,
pick VARCHAR,
school_club_team VARCHAR
) | SELECT nationality FROM table_name_9 WHERE pick > 183 AND school_club_team = "drexel" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1298,
41,
1157,
485,
584,
4280,
28027,
6,
1432,
584,
4280,
28027,
6,
496,
834,
13442,
834,
11650,
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,
0... | [
3,
23143,
14196,
1157,
485,
21680,
953,
834,
4350,
834,
1298,
549,
17444,
427,
1432,
2490,
3,
24361,
3430,
496,
834,
13442,
834,
11650,
3274,
96,
26,
52,
6667,
40,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the high rebounds with a record that is 18-14? | CREATE TABLE table_name_44 (high_rebounds VARCHAR, record VARCHAR) | SELECT high_rebounds FROM table_name_44 WHERE record = "18-14" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3628,
41,
6739,
834,
23768,
584,
4280,
28027,
6,
1368,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
306,
3,
23768,
28,
3,
9,
1368,
24,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
306,
834,
23768,
21680,
953,
834,
4350,
834,
3628,
549,
17444,
427,
1368,
3274,
96,
2606,
11590,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the D 42 number when the D 45 is r 16? | CREATE TABLE table_name_6 (
d_42_√ VARCHAR,
d_45_√ VARCHAR
) | SELECT d_42_√ FROM table_name_6 WHERE d_45_√ = "r 16" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
948,
41,
3,
26,
834,
4165,
834,
2,
584,
4280,
28027,
6,
3,
26,
834,
2128,
834,
2,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
309,
64... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
26,
834,
4165,
834,
2,
21680,
953,
834,
4350,
834,
948,
549,
17444,
427,
3,
26,
834,
2128,
834,
2,
3274,
96,
52,
898,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Show all the faculty ranks and the number of students advised by each rank Visualize by bar chart, and list y-axis from low to high order. | CREATE TABLE Activity (
actid INTEGER,
activity_name varchar(25)
)
CREATE TABLE Faculty_Participates_in (
FacID INTEGER,
actid INTEGER
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
)
CREATE TABLE Participates_in (
stuid INTEGER,
actid INTEGER
)
CREATE TABLE Faculty (
FacID INTEGER,
Lname VARCHAR(15),
Fname VARCHAR(15),
Rank VARCHAR(15),
Sex VARCHAR(1),
Phone INTEGER,
Room VARCHAR(5),
Building VARCHAR(13)
) | SELECT Rank, COUNT(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.Advisor GROUP BY T1.Rank ORDER BY COUNT(*) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
22536,
41,
1810,
23,
26,
3,
21342,
17966,
6,
1756,
834,
4350,
3,
4331,
4059,
599,
1828,
61,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
16896,
834,
13725,
23,
3389,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
22557,
6,
2847,
17161,
599,
1935,
61,
21680,
16896,
6157,
332,
536,
3,
15355,
3162,
6341,
6157,
332,
357,
9191,
332,
5411,
371,
9,
75,
4309,
3274,
332,
4416,
188,
26,
24680,
350,
4630,
6880,
272,
476,
332,
5411,
... |
Which authors have a Unit of densu -ciula formation? | CREATE TABLE table_6914 (
"Name" text,
"Novelty" text,
"Status" text,
"Authors" text,
"Unit" text,
"Location" text
) | SELECT "Authors" FROM table_6914 WHERE "Unit" = 'densuș-ciula formation' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3951,
2534,
41,
96,
23954,
121,
1499,
6,
96,
4168,
4911,
17,
63,
121,
1499,
6,
96,
134,
17,
144,
302,
121,
1499,
6,
96,
23602,
127,
7,
121,
1499,
6,
96,
5110,
155,
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,
23602,
127,
7,
121,
21680,
953,
834,
3951,
2534,
549,
17444,
427,
96,
5110,
155,
121,
3274,
3,
31,
537,
7,
76,
1198,
18,
8469,
521,
3239,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Name the team for arco arena 13,685 | CREATE TABLE table_17102076_5 (
team VARCHAR,
location_attendance VARCHAR
) | SELECT team FROM table_17102076_5 WHERE location_attendance = "ARCO Arena 13,685" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2517,
1714,
1755,
3959,
834,
755,
41,
372,
584,
4280,
28027,
6,
1128,
834,
15116,
663,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
372,
21,
1584,
509,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
372,
21680,
953,
834,
2517,
1714,
1755,
3959,
834,
755,
549,
17444,
427,
1128,
834,
15116,
663,
3274,
96,
18971,
667,
14904,
10670,
3651,
17395,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
WHAT YEAR WAS AT GIANTS STADIUM, WITH WINNER OF NEW YORK GIANTS? | CREATE TABLE table_8334 (
"Year" real,
"Date" text,
"Winner" text,
"Result" text,
"Loser" text,
"Location" text
) | SELECT MIN("Year") FROM table_8334 WHERE "Location" = 'giants stadium' AND "Winner" = 'new york giants' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4591,
3710,
41,
96,
476,
2741,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
18455,
687,
121,
1499,
6,
96,
20119,
121,
1499,
6,
96,
434,
32,
7,
49,
121,
1499,
6,
96,
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,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
121,
476,
2741,
8512,
21680,
953,
834,
4591,
3710,
549,
17444,
427,
96,
434,
32,
75,
257,
121,
3274,
3,
31,
22898,
17,
7,
14939,
31,
3430,
96,
18455,
687,
121,
3274,
3,
31,
5534,
25453,
6079,
7,
3... |
What is the least amount of points the entrant Simoniz received before 1960? | CREATE TABLE table_name_19 (
points INTEGER,
year VARCHAR,
entrant VARCHAR
) | SELECT MIN(points) FROM table_name_19 WHERE year < 1960 AND entrant = "simoniz" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2294,
41,
979,
3,
21342,
17966,
6,
215,
584,
4280,
28027,
6,
3,
295,
3569,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
709,
866,
13,
97... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2700,
7,
61,
21680,
953,
834,
4350,
834,
2294,
549,
17444,
427,
215,
3,
2,
8754,
3430,
3,
295,
3569,
3274,
96,
28348,
24362,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
which patients have prescription for sodium polystyrene sulfonate? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "Sodium Polystyrene Sulfonate" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7744,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7744,
7,
5,
8399,
51,
834,
23,
26,
549... |
what is the number of patients whose admission year is less than 2168 and diagnoses short title is prim cardiomyopathy nec? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2168" AND diagnoses.short_title = "Prim cardiomyopathy NEC" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
5... |
How many rounds did Patrick Tambay record the fastest lap? | CREATE TABLE table_16721 (
"Rnd" real,
"Race" text,
"Date" text,
"Location" text,
"Pole Position" text,
"Fastest Lap" text,
"Race Winner" text,
"Constructor" text,
"Report" text
) | SELECT COUNT("Rnd") FROM table_16721 WHERE "Fastest Lap" = 'Patrick Tambay' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
27650,
2658,
41,
96,
448,
727,
121,
490,
6,
96,
448,
3302,
121,
1499,
6,
96,
308,
342,
121,
1499,
6,
96,
434,
32,
75,
257,
121,
1499,
6,
96,
8931,
15,
14258,
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,
2847,
17161,
599,
121,
448,
727,
8512,
21680,
953,
834,
27650,
2658,
549,
17444,
427,
96,
371,
9,
7,
4377,
325,
102,
121,
3274,
3,
31,
20742,
2406,
10903,
11119,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
how many times has jifar placed third or better in the 10,000 meter race ? | CREATE TABLE table_203_189 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"notes" text
) | SELECT COUNT(*) FROM table_203_189 WHERE "position" <= 3 AND "notes" = 10000 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
25312,
41,
3,
23,
26,
381,
6,
96,
1201,
121,
381,
6,
96,
287,
4995,
4749,
121,
1499,
6,
96,
15098,
121,
1499,
6,
96,
4718,
121,
1499,
6,
96,
7977,
7,
121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
953,
834,
23330,
834,
25312,
549,
17444,
427,
96,
4718,
121,
3,
2,
2423,
220,
3430,
96,
7977,
7,
121,
3274,
335,
2313,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the lowest First Elected, when Party is "Republican", and when District is "Minnesota 1"? | CREATE TABLE table_name_19 (first_elected INTEGER, party VARCHAR, district VARCHAR) | SELECT MIN(first_elected) FROM table_name_19 WHERE party = "republican" AND district = "minnesota 1" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2294,
41,
14672,
834,
19971,
3,
21342,
17966,
6,
1088,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
7402,
1485,
1289... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14672,
834,
19971,
61,
21680,
953,
834,
4350,
834,
2294,
549,
17444,
427,
1088,
3274,
96,
60,
15727,
152,
121,
3430,
3939,
3274,
96,
1109,
1496,
32,
17,
9,
209,
121,
1,
-100,
-100,
-100,
-100,
-100,
... |
How many were written by Peter Winther? | CREATE TABLE table_23826 (
"Series #" real,
"Season #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"U.S. viewers (in millions)" text
) | SELECT COUNT("Written by") FROM table_23826 WHERE "Directed by" = 'Peter Winther' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
3747,
2688,
41,
96,
12106,
7,
1713,
121,
490,
6,
96,
134,
15,
9,
739,
1713,
121,
490,
6,
96,
382,
155,
109,
121,
1499,
6,
96,
23620,
15,
26,
57,
121,
1499,
6,
96... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
24965,
324,
57,
8512,
21680,
953,
834,
357,
3747,
2688,
549,
17444,
427,
96,
23620,
15,
26,
57,
121,
3274,
3,
31,
345,
15,
449,
4871,
189,
49,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
find out how many patients were discharged from the hospital until 2101. | CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
) | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE NOT patient.hospitaldischargetime IS NULL AND STRFTIME('%y', patient.hospitaldischargetime) <= '2101' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
11963,
670,
2562,
41,
11963,
670,
2562,
23,
26,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
2358,
8292,
1499,
6,
2358,
40,
10333,
1499,
6,
2358,
7480,
35,
76,
17552,
381,
6,
11963,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4486,
1868,
5,
31386,
26,
159,
7993,
715,
6827,
13046,
10376,
3430,
3,
13733,
6245,
15382,
599,
31,
1454,
63,
31,
6,
... |
What year did the team based in the city of Winamac join the conference? | CREATE TABLE table_name_6 (
year_joined VARCHAR,
city VARCHAR
) | SELECT year_joined FROM table_name_6 WHERE city = "winamac" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
948,
41,
215,
834,
1927,
630,
26,
584,
4280,
28027,
6,
690,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
215,
410,
8,
372,
3,
390,
16,
8,
690,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
215,
834,
1927,
630,
26,
21680,
953,
834,
4350,
834,
948,
549,
17444,
427,
690,
3274,
96,
3757,
9,
11101,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
how many euro 2000 qualifying competitions are listed ? | CREATE TABLE table_203_537 (
id number,
"#" number,
"date" text,
"venue" text,
"opponent" text,
"score" text,
"result" text,
"competition" text
) | SELECT COUNT(DISTINCT "date") FROM table_203_537 WHERE "competition" = 'euro 2000 qualifying' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
755,
4118,
41,
3,
23,
26,
381,
6,
96,
4663,
121,
381,
6,
96,
5522,
121,
1499,
6,
96,
15098,
121,
1499,
6,
96,
32,
102,
9977,
121,
1499,
6,
96,
7,
9022,
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,
2847,
17161,
599,
15438,
25424,
6227,
96,
5522,
8512,
21680,
953,
834,
23330,
834,
755,
4118,
549,
17444,
427,
96,
287,
4995,
4749,
121,
3274,
3,
31,
1238,
32,
2766,
18002,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What's the Bronze with the Year of 1998? | CREATE TABLE table_name_52 (
bronze VARCHAR,
year VARCHAR
) | SELECT bronze FROM table_name_52 WHERE year = 1998 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5373,
41,
13467,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
31,
7,
8,
20841,
28,
8,
2929,
13,
6260,
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,
13467,
21680,
953,
834,
4350,
834,
5373,
549,
17444,
427,
215,
3274,
6260,
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... |
How many customers are there? | CREATE TABLE complaints (
complaint_id number,
product_id number,
customer_id number,
complaint_outcome_code text,
complaint_status_code text,
complaint_type_code text,
date_complaint_raised time,
date_complaint_closed time,
staff_id number
)
CREATE TABLE customers (
customer_id number,
customer_type_code text,
address_line_1 text,
address_line_2 text,
town_city text,
state text,
email_address text,
phone_number text
)
CREATE TABLE products (
product_id number,
parent_product_id number,
product_category_code text,
date_product_first_available time,
date_product_discontinued time,
product_name text,
product_description text,
product_price number
)
CREATE TABLE staff (
staff_id number,
gender text,
first_name text,
last_name text,
email_address text,
phone_number text
) | SELECT COUNT(*) FROM customers | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
11244,
41,
10394,
834,
23,
26,
381,
6,
556,
834,
23,
26,
381,
6,
884,
834,
23,
26,
381,
6,
10394,
834,
670,
287,
15,
834,
4978,
1499,
6,
10394,
834,
8547,
302,
834,
4978,
1499,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
722,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
how many prisons are in nubarashen ? | CREATE TABLE table_204_414 (
id number,
"name" text,
"armenian" text,
"location" text,
"# of prisoners designed for" number,
"notes" text
) | SELECT COUNT("name") FROM table_204_414 WHERE "location" = 'nubarashen' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
591,
2534,
41,
3,
23,
26,
381,
6,
96,
4350,
121,
1499,
6,
96,
13451,
15710,
121,
1499,
6,
96,
14836,
121,
1499,
6,
96,
4663,
13,
22040,
876,
21,
121,
381,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
4350,
8512,
21680,
953,
834,
26363,
834,
591,
2534,
549,
17444,
427,
96,
14836,
121,
3274,
3,
31,
29,
17309,
12380,
35,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the outcome in mari andersson's tournament? | CREATE TABLE table_37607 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent" text,
"Score" text
) | SELECT "Outcome" FROM table_37607 WHERE "Opponent" = 'mari andersson' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
519,
3959,
4560,
41,
96,
15767,
287,
15,
121,
1499,
6,
96,
308,
342,
121,
1499,
6,
96,
382,
1211,
20205,
17,
121,
1499,
6,
96,
134,
450,
4861,
121,
1499,
6,
96,
667,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
15767,
287,
15,
121,
21680,
953,
834,
519,
3959,
4560,
549,
17444,
427,
96,
667,
102,
9977,
121,
3274,
3,
31,
17289,
11,
277,
739,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who were the partners in games where the score was 1-6, 2-6? | CREATE TABLE table_2650 (
"Outcome" text,
"Year" real,
"Championship" text,
"Surface" text,
"Partner" text,
"Opponents" text,
"Score" text
) | SELECT "Partner" FROM table_2650 WHERE "Score" = '1-6, 2-6' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2688,
1752,
41,
96,
15767,
287,
15,
121,
1499,
6,
96,
476,
2741,
121,
490,
6,
96,
254,
1483,
12364,
2009,
121,
1499,
6,
96,
134,
450,
4861,
121,
1499,
6,
96,
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,
13725,
687,
121,
21680,
953,
834,
2688,
1752,
549,
17444,
427,
96,
134,
9022,
121,
3274,
3,
31,
27019,
6,
204,
5783,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What was the Week number on November 20, 1977? | CREATE TABLE table_name_54 (week INTEGER, date VARCHAR) | SELECT SUM(week) FROM table_name_54 WHERE date = "november 20, 1977" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5062,
41,
8041,
3,
21342,
17966,
6,
833,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
6551,
381,
30,
1671,
16047,
16433,
58,
1,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
180,
6122,
599,
8041,
61,
21680,
953,
834,
4350,
834,
5062,
549,
17444,
427,
833,
3274,
96,
5326,
18247,
16047,
16433,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
During the loss on march 26, 2005, what was the venue where the match was played? | CREATE TABLE table_78405 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) | SELECT "Venue" FROM table_78405 WHERE "Result" = 'loss' AND "Date" = 'march 26, 2005' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3940,
591,
3076,
41,
96,
308,
342,
121,
1499,
6,
96,
553,
35,
76,
15,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
20119,
121,
1499,
6,
96,
5890,
4995,
4749,
121,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
553,
35,
76,
15,
121,
21680,
953,
834,
3940,
591,
3076,
549,
17444,
427,
96,
20119,
121,
3274,
3,
31,
2298,
7,
31,
3430,
96,
308,
342,
121,
3274,
3,
31,
51,
7064,
13597,
3105,
31,
1,
-100,
-100,
-100,
-100,
... |
what is minimum age of patients whose admission type is emergency and primary disease is pneumonia;human immunodefiency virus;rule out tuberculosis? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) | SELECT MIN(demographic.age) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.diagnosis = "PNEUMONIA;HUMAN IMMUNODEFIENCY VIRUS;RULE OUT TUBERCULOSIS" | [
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,
3,
17684,
599,
1778,
16587,
5,
545,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
9,
26,
5451,
834,
6137,
3274,
96,
427,
13098,
18464,
17063,
121,
3430,
14798,
5,
25930,
4844,
159,
3274,
96,
15420,
12062,
5365,
26077,
... |
What year was Jerry Huckaby first elected? | CREATE TABLE table_1341663_19 (first_elected VARCHAR, incumbent VARCHAR) | SELECT first_elected FROM table_1341663_19 WHERE incumbent = "Jerry Huckaby" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2938,
3891,
834,
2294,
41,
14672,
834,
19971,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
215,
47,
16637,
454,
4636,
9,
969,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
166,
834,
19971,
21680,
953,
834,
23747,
2938,
3891,
834,
2294,
549,
17444,
427,
28406,
3274,
96,
683,
49,
651,
454,
4636,
9,
969,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the rank of the team who raced at a time of 7:16.13? | CREATE TABLE table_name_76 (rank VARCHAR, time VARCHAR) | SELECT rank FROM table_name_76 WHERE time = "7:16.13" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3959,
41,
6254,
584,
4280,
28027,
6,
97,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
11003,
13,
8,
372,
113,
1964,
26,
44,
3,
9,
97,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
11003,
21680,
953,
834,
4350,
834,
3959,
549,
17444,
427,
97,
3274,
96,
940,
10,
2938,
5,
2368,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the number of Goals on 1950-05-30? | CREATE TABLE table_52150 (
"Date" text,
"Venue" text,
"Result" text,
"Competition" text,
"Goals" real
) | SELECT COUNT("Goals") FROM table_52150 WHERE "Date" = '1950-05-30' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
5373,
12278,
41,
96,
308,
342,
121,
1499,
6,
96,
553,
35,
76,
15,
121,
1499,
6,
96,
20119,
121,
1499,
6,
96,
5890,
4995,
4749,
121,
1499,
6,
96,
6221,
5405,
121,
490,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
6221,
5405,
8512,
21680,
953,
834,
5373,
12278,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
22464,
18629,
755,
10086,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Which event was Tatyana Lebedeva in? | CREATE TABLE table_name_75 (event VARCHAR, athlete VARCHAR) | SELECT event FROM table_name_75 WHERE athlete = "tatyana lebedeva" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3072,
41,
15,
2169,
584,
4280,
28027,
6,
17893,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
605,
47,
9233,
21247,
312,
4143,
4721,
16,
58,
1,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
605,
21680,
953,
834,
4350,
834,
3072,
549,
17444,
427,
17893,
3274,
96,
17,
144,
21247,
90,
4143,
4721,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
what is the unemployment rate for wayne county? | CREATE TABLE table_25341 (
"County" text,
"Population" real,
"Unemployment Rate" text,
"Market Income Per Capita" text,
"Poverty Rate" text,
"Status" text
) | SELECT "Unemployment Rate" FROM table_25341 WHERE "County" = 'Wayne' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
3710,
536,
41,
96,
10628,
63,
121,
1499,
6,
96,
27773,
7830,
121,
490,
6,
96,
5110,
29056,
13002,
121,
1499,
6,
96,
22572,
20110,
1915,
4000,
155,
9,
121,
1499,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
5110,
29056,
13002,
121,
21680,
953,
834,
1828,
3710,
536,
549,
17444,
427,
96,
10628,
63,
121,
3274,
3,
31,
518,
21993,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the result on November 20, 1988? | CREATE TABLE table_name_49 (
result VARCHAR,
date VARCHAR
) | SELECT result FROM table_name_49 WHERE date = "november 20, 1988" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3647,
41,
741,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
741,
30,
1671,
16047,
10414,
58,
1,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
741,
21680,
953,
834,
4350,
834,
3647,
549,
17444,
427,
833,
3274,
96,
5326,
18247,
16047,
10414,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the date that is Away team is Honduras? | CREATE TABLE table_name_25 (
date VARCHAR,
away_team VARCHAR
) | SELECT date FROM table_name_25 WHERE away_team = "honduras" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1828,
41,
833,
584,
4280,
28027,
6,
550,
834,
11650,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
833,
24,
19,
71,
1343,
372,
19,
11772,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
833,
21680,
953,
834,
4350,
834,
1828,
549,
17444,
427,
550,
834,
11650,
3274,
96,
107,
106,
26,
2414,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
has patient 029-584 received any medication during a year before? | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
) | SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '029-584')) AND DATETIME(medication.drugstarttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
23886,
41,
23886,
23,
26,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
2672,
4350,
1499,
6,
23886,
4350,
1499,
6,
23886,
715,
97,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
2490,
3,
632,
21680,
7757,
549,
17444,
427,
7757,
5,
10061,
15129,
21545,
23,
26,
3388,
41,
23143,
14196,
1868,
5,
10061,
15129,
21545,
23,
26,
21680,
1868,
549,
17444,
427,
1868,
5,
10061,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.