NATURAL_LANG stringlengths 0 446 | SCHEMA stringlengths 27 2.21k | SQL stringlengths 18 453 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|
Round 4 for larger than 19 Round 1 and a 27 Round 2? | CREATE TABLE table_name_45 (
round_4 VARCHAR,
round_1 VARCHAR,
round_2 VARCHAR
) | SELECT round_4 FROM table_name_45 WHERE round_1 > 19 AND round_2 = "27" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2128,
41,
1751,
834,
591,
584,
4280,
28027,
6,
1751,
834,
536,
584,
4280,
28027,
6,
1751,
834,
357,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
9609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1751,
834,
591,
21680,
953,
834,
4350,
834,
2128,
549,
17444,
427,
1751,
834,
536,
2490,
957,
3430,
1751,
834,
357,
3274,
96,
2555,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What was the position has a played entry of more than 24? | CREATE TABLE table_name_68 (
position VARCHAR,
played INTEGER
) | SELECT COUNT(position) FROM table_name_68 WHERE played > 24 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3651,
41,
1102,
584,
4280,
28027,
6,
1944,
3,
21342,
17966,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
1102,
65,
3,
9,
1944,
1764,
13,
72,
145,
997,
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... | [
3,
23143,
14196,
2847,
17161,
599,
4718,
61,
21680,
953,
834,
4350,
834,
3651,
549,
17444,
427,
1944,
2490,
997,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which Home team had attendance 160? | CREATE TABLE table_name_91 (home_team VARCHAR, attendance VARCHAR) | SELECT home_team FROM table_name_91 WHERE attendance = "160" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4729,
41,
5515,
834,
11650,
584,
4280,
28027,
6,
11364,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
1210,
372,
141,
11364,
11321,
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,
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,
234,
834,
11650,
21680,
953,
834,
4350,
834,
4729,
549,
17444,
427,
11364,
3274,
96,
19129,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What Time has a Year of 1984? | CREATE TABLE table_name_77 (
time VARCHAR,
year VARCHAR
) | SELECT time FROM table_name_77 WHERE year = 1984 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4013,
41,
97,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
2900,
65,
3,
9,
2929,
13,
13480,
58,
1,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
97,
21680,
953,
834,
4350,
834,
4013,
549,
17444,
427,
215,
3274,
13480,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
what is the average number of losses for the first three on the list ? | CREATE TABLE table_204_623 (
id number,
"opponent" text,
"goals" text,
"wins" number,
"draws" number,
"losses" number,
"+- goals" number,
"matches" number,
"qualified" number,
"eliminated" number
) | SELECT AVG("losses") FROM table_204_623 WHERE id <= 3 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
4056,
519,
41,
3,
23,
26,
381,
6,
96,
32,
102,
9977,
121,
1499,
6,
96,
839,
5405,
121,
1499,
6,
96,
3757,
7,
121,
381,
6,
96,
19489,
7,
121,
381,
6,
96,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
121,
2298,
2260,
8512,
21680,
953,
834,
26363,
834,
4056,
519,
549,
17444,
427,
3,
23,
26,
3,
2,
2423,
220,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Which episode is number 3 in the season? | CREATE TABLE table_29960651_5 (
episode VARCHAR,
no_for_season VARCHAR
) | SELECT episode FROM table_29960651_5 WHERE no_for_season = 3 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3166,
27699,
4122,
536,
834,
755,
41,
5640,
584,
4280,
28027,
6,
150,
834,
1161,
834,
9476,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
5640,
19,
381,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5640,
21680,
953,
834,
3166,
27699,
4122,
536,
834,
755,
549,
17444,
427,
150,
834,
1161,
834,
9476,
3274,
220,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which city of license/market has 3 (26) as their channel tv (dt)? | CREATE TABLE table_1553485_1 (city_of_license__market VARCHAR, channel_tv___dt__ VARCHAR) | SELECT city_of_license__market FROM table_1553485_1 WHERE channel_tv___dt__ = "3 (26)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
20896,
3710,
4433,
834,
536,
41,
6726,
834,
858,
834,
28062,
834,
834,
8809,
584,
4280,
28027,
6,
4245,
834,
17,
208,
834,
834,
834,
26,
17,
834,
834,
584,
4280,
28027,
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,
690,
834,
858,
834,
28062,
834,
834,
8809,
21680,
953,
834,
20896,
3710,
4433,
834,
536,
549,
17444,
427,
4245,
834,
17,
208,
834,
834,
834,
26,
17,
834,
834,
3274,
96,
519,
4743,
10938,
121,
1,
-100,
-100,
-100,
... |
What is the tyre on the race where Bruce Mclaren had the fastest lap? | CREATE TABLE table_name_58 (
tyre VARCHAR,
fastest_lap VARCHAR
) | SELECT tyre FROM table_name_58 WHERE fastest_lap = "bruce mclaren" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3449,
41,
3,
17,
63,
60,
584,
4280,
28027,
6,
10391,
834,
8478,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
3,
17,
63,
60,
30,
8,
196... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
17,
63,
60,
21680,
953,
834,
4350,
834,
3449,
549,
17444,
427,
10391,
834,
8478,
3274,
96,
9052,
565,
3,
51,
23982,
35,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the Name of the power station with a Capacity of 25 MW? | CREATE TABLE table_42980 (
"Name" text,
"Location" text,
"Field" text,
"Capacity (MW)" real,
"Annual Generation (average GWh)" text,
"Commissioned" text
) | SELECT "Name" FROM table_42980 WHERE "Capacity (MW)" = '25' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
3166,
2079,
41,
96,
23954,
121,
1499,
6,
96,
434,
32,
75,
257,
121,
1499,
6,
96,
3183,
8804,
121,
1499,
6,
96,
19566,
9,
6726,
41,
16027,
61,
121,
490,
6,
96,
1760... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
591,
3166,
2079,
549,
17444,
427,
96,
19566,
9,
6726,
41,
16027,
61,
121,
3274,
3,
31,
1828,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
If the working force of HK is 10.4%, what is the salary range? | CREATE TABLE table_27257896_2 (salary_range VARCHAR, working_force_of_hk VARCHAR) | SELECT salary_range FROM table_27257896_2 WHERE working_force_of_hk = "10.4%" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2555,
1828,
3940,
4314,
834,
357,
41,
7,
138,
1208,
834,
5517,
584,
4280,
28027,
6,
464,
834,
10880,
834,
858,
834,
107,
157,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
3,
23143,
14196,
9090,
834,
5517,
21680,
953,
834,
2555,
1828,
3940,
4314,
834,
357,
549,
17444,
427,
464,
834,
10880,
834,
858,
834,
107,
157,
3274,
96,
10415,
5988,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Name the time with track number less than 4 for you're my everything | CREATE TABLE table_34074 (
"Track number" real,
"Song title" text,
"Songwriter(s)" text,
"Orchestra" text,
"Time" text
) | SELECT "Time" FROM table_34074 WHERE "Track number" < '4' AND "Song title" = 'you''re my everything' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
21129,
4581,
41,
96,
382,
16729,
381,
121,
490,
6,
96,
134,
2444,
2233,
121,
1499,
6,
96,
134,
2444,
12756,
599,
7,
61,
121,
1499,
6,
96,
7395,
1033,
3109,
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,
13368,
121,
21680,
953,
834,
21129,
4581,
549,
17444,
427,
96,
382,
16729,
381,
121,
3,
2,
3,
31,
591,
31,
3430,
96,
134,
2444,
2233,
121,
3274,
3,
31,
4188,
31,
31,
60,
82,
762,
31,
1,
-100,
-100,
-100,
-... |
Which country had a contestant that was 1.76 meters tall? | CREATE TABLE table_23495048_2 (represent VARCHAR, height__mtr_ VARCHAR) | SELECT represent FROM table_23495048_2 WHERE height__mtr_ = "1.76" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2773,
3647,
1752,
3707,
834,
357,
41,
60,
12640,
584,
4280,
28027,
6,
3902,
834,
834,
51,
17,
52,
834,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
684,
141,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4221,
21680,
953,
834,
2773,
3647,
1752,
3707,
834,
357,
549,
17444,
427,
3902,
834,
834,
51,
17,
52,
834,
3274,
96,
5411,
3959,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
how many years after sir carne rasch 's election was john macnamara elected ? | CREATE TABLE table_202_150 (
id number,
"election" number,
"member" text,
"party" text
) | SELECT (SELECT "election" FROM table_202_150 WHERE "member" = 'john macnamara') - (SELECT "election" FROM table_202_150 WHERE "member" = 'sir carne rasch, bt') | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
19818,
834,
12278,
41,
3,
23,
26,
381,
6,
96,
15,
12252,
121,
381,
6,
96,
12066,
121,
1499,
6,
96,
8071,
121,
1499,
3,
61,
3,
32102,
32103,
32101,
32103,
149,
186,
203,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
3,
23143,
14196,
41,
23143,
14196,
96,
15,
12252,
121,
21680,
953,
834,
19818,
834,
12278,
549,
17444,
427,
96,
12066,
121,
3274,
3,
31,
27341,
11486,
13363,
2551,
31,
61,
3,
18,
41,
23143,
14196,
96,
15,
12252,
121,
21680,
953,
834... |
Show the number of games in each season and group by home team in a group line chart The x-axis is season, list by the Season from high to low. | CREATE TABLE game (
stadium_id int,
id int,
Season int,
Date text,
Home_team text,
Away_team text,
Score text,
Competition text
)
CREATE TABLE stadium (
id int,
name text,
Home_Games int,
Average_Attendance real,
Total_Attendance real,
Capacity_Percentage real
)
CREATE TABLE injury_accident (
game_id int,
id int,
Player text,
Injury text,
Number_of_matches text,
Source text
) | SELECT Season, COUNT(Season) FROM game GROUP BY Home_team ORDER BY Season DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
467,
41,
14939,
834,
23,
26,
16,
17,
6,
3,
23,
26,
16,
17,
6,
7960,
16,
17,
6,
7678,
1499,
6,
1210,
834,
11650,
1499,
6,
71,
1343,
834,
11650,
1499,
6,
17763,
1499,
6,
15571,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
7960,
6,
2847,
17161,
599,
134,
15,
9,
739,
61,
21680,
467,
350,
4630,
6880,
272,
476,
1210,
834,
11650,
4674,
11300,
272,
476,
7960,
309,
25067,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What record company has robert craft conducting? | CREATE TABLE table_32673 (
"Orchestra" text,
"Conductor" text,
"Record Company" text,
"Year of Recording" real,
"Format" text
) | SELECT "Record Company" FROM table_32673 WHERE "Conductor" = 'robert craft' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2668,
3708,
519,
41,
96,
7395,
1033,
3109,
121,
1499,
6,
96,
4302,
7472,
127,
121,
1499,
6,
96,
1649,
7621,
1958,
121,
1499,
6,
96,
476,
2741,
13,
11392,
53,
121,
490,
6,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
1649,
7621,
1958,
121,
21680,
953,
834,
2668,
3708,
519,
549,
17444,
427,
96,
4302,
7472,
127,
121,
3274,
3,
31,
5840,
49,
17,
5449,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the Time (EEST), when the Stage is ss8? | CREATE TABLE table_name_5 (time__eest_ VARCHAR, stage VARCHAR) | SELECT time__eest_ FROM table_name_5 WHERE stage = "ss8" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
755,
41,
715,
834,
834,
15,
222,
834,
584,
4280,
28027,
6,
1726,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2900,
41,
427,
6038,
201,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
97,
834,
834,
15,
222,
834,
21680,
953,
834,
4350,
834,
755,
549,
17444,
427,
1726,
3274,
96,
7,
7,
927,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
When 4 is the week what is the location? | CREATE TABLE table_24136365_2 (
location VARCHAR,
week VARCHAR
) | SELECT location FROM table_24136365_2 WHERE week = 4 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2266,
23459,
10402,
834,
357,
41,
1128,
584,
4280,
28027,
6,
471,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
366,
314,
19,
8,
471,
125,
19,
8,
1128,
58,
1,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1128,
21680,
953,
834,
2266,
23459,
10402,
834,
357,
549,
17444,
427,
471,
3274,
314,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of first_name and commission_pct . | 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 departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE 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)
) | SELECT FIRST_NAME, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3248,
41,
301,
5618,
8015,
834,
4309,
7908,
1982,
599,
8525,
632,
201,
3,
13733,
26418,
834,
24604,
12200,
134,
3,
4331,
4059,
599,
2445,
201,
3,
16034,
16359,
834,
5911,
5596,
3,
4331... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
30085,
834,
567,
17683,
6,
3,
6657,
329,
16994,
9215,
834,
4051,
382,
21680,
1652,
549,
17444,
427,
4486,
3396,
19846,
11810,
834,
4309,
3388,
41,
23143,
14196,
3396,
19846,
11810,
834,
4309,
21680,
10521,
549,
17444,
4... |
For those records from the products and each product's manufacturer, draw a bar chart about the distribution of name and price , and group by attribute headquarter, could you display by the y axis in desc? | CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | SELECT T1.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name ORDER BY T1.Price DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
15248,
7,
41,
3636,
3,
21342,
17966,
6,
5570,
584,
4280,
28027,
599,
25502,
201,
3642,
19973,
584,
4280,
28027,
599,
25502,
201,
3,
19145,
584,
4280,
28027,
599,
25502,
201,
19764,
17833... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
332,
5411,
23954,
6,
332,
5411,
345,
4920,
21680,
7554,
6157,
332,
536,
3,
15355,
3162,
15248,
7,
6157,
332,
357,
9191,
332,
5411,
7296,
76,
8717,
450,
49,
3274,
332,
4416,
22737,
350,
4630,
6880,
272,
476,
3642,
19... |
What's the length of the route with junctions of ur 1472 sh 255? | CREATE TABLE table_name_99 (
length VARCHAR,
junctions VARCHAR
) | SELECT length FROM table_name_99 WHERE junctions = "ur 1472 sh 255" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3264,
41,
2475,
584,
4280,
28027,
6,
23704,
7,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
31,
7,
8,
2475,
13,
8,
2981,
28,
23704,
7,
13,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2475,
21680,
953,
834,
4350,
834,
3264,
549,
17444,
427,
23704,
7,
3274,
96,
450,
968,
5865,
6660,
944,
17395,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Who is the head coach of the team, whose shirt sponsor is karstadt quelle versicherungen? | CREATE TABLE table_name_34 (head_coach VARCHAR, shirt_sponsor VARCHAR) | SELECT head_coach FROM table_name_34 WHERE shirt_sponsor = "karstadt quelle versicherungen" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3710,
41,
3313,
834,
509,
1836,
584,
4280,
28027,
6,
8677,
834,
7,
5041,
7,
127,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
19,
8,
819,
3763,
13,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
3,
23143,
14196,
819,
834,
509,
1836,
21680,
953,
834,
4350,
834,
3710,
549,
17444,
427,
8677,
834,
7,
5041,
7,
127,
3274,
96,
4031,
6208,
3,
6104,
3,
15587,
35,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What are the titles of the pieces that are number 2 in season? | CREATE TABLE table_25604014_6 (
title VARCHAR,
no_in_season VARCHAR
) | SELECT title FROM table_25604014_6 WHERE no_in_season = 2 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
3328,
2445,
2534,
834,
948,
41,
2233,
584,
4280,
28027,
6,
150,
834,
77,
834,
9476,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
33,
8,
8342,
13,
8,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2233,
21680,
953,
834,
1828,
3328,
2445,
2534,
834,
948,
549,
17444,
427,
150,
834,
77,
834,
9476,
3274,
204,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the average number of top-10s for the major with 2 top-25s and fewer than 10 cuts made? | CREATE TABLE table_39577 (
"Tournament" text,
"Wins" real,
"Top-5" real,
"Top-10" real,
"Top-25" real,
"Events" real,
"Cuts made" real
) | SELECT AVG("Top-10") FROM table_39577 WHERE "Top-25" = '2' AND "Cuts made" < '10' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
519,
3301,
4013,
41,
96,
382,
1211,
20205,
17,
121,
1499,
6,
96,
18455,
7,
121,
490,
6,
96,
22481,
18,
17395,
490,
6,
96,
22481,
4536,
121,
490,
6,
96,
22481,
14855,
121,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
121,
22481,
4536,
8512,
21680,
953,
834,
519,
3301,
4013,
549,
17444,
427,
96,
22481,
14855,
121,
3274,
3,
31,
357,
31,
3430,
96,
15784,
17,
7,
263,
121,
3,
2,
3,
31,
1714,
31,
1,
-100,
-100,
-10... |
Show the average, maximum, minimum enrollment of all schools. | CREATE TABLE school (
enrollment INTEGER
) | SELECT AVG(enrollment), MAX(enrollment), MIN(enrollment) FROM school | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
496,
41,
17938,
3,
21342,
17966,
3,
61,
3,
32102,
32103,
32101,
32103,
3111,
8,
1348,
6,
2411,
6,
2559,
17938,
13,
66,
2061,
5,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
71,
17217,
599,
35,
4046,
297,
201,
4800,
4,
599,
35,
4046,
297,
201,
3,
17684,
599,
35,
4046,
297,
61,
21680,
496,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
For those employees who was hired before 2002-06-21, show me about the distribution of job_id and the amount of job_id , and group by attribute job_id in a bar chart. | 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 job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
) | SELECT JOB_ID, COUNT(JOB_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3248,
41,
301,
5618,
8015,
834,
4309,
7908,
1982,
599,
8525,
632,
201,
3,
13733,
26418,
834,
24604,
12200,
134,
3,
4331,
4059,
599,
2445,
201,
3,
16034,
16359,
834,
5911,
5596,
3,
4331... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2847,
17161,
599,
15355,
279,
834,
4309,
61,
21680,
1652,
549,
17444,
427,
454,
14132,
834,
308,
6048,
3,
2,
3,
31,
24898,
18,
5176,
16539,
31,
350,
4630,
6880,
272,
476,
446,
10539,
834,
... |
What is the total number scored of the team positioned lower than 10? | CREATE TABLE table_35960 (
"Position" real,
"Team" text,
"Played" real,
"Wins" real,
"Draws" real,
"Losses" real,
"Scored" real,
"Conceded" real,
"Points" real
) | SELECT COUNT("Scored") FROM table_35960 WHERE "Position" > '10' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2469,
27699,
41,
96,
345,
32,
7,
4749,
121,
490,
6,
96,
18699,
121,
1499,
6,
96,
15800,
15,
26,
121,
490,
6,
96,
18455,
7,
121,
490,
6,
96,
308,
10936,
7,
121,
490,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
134,
9022,
26,
8512,
21680,
953,
834,
2469,
27699,
549,
17444,
427,
96,
345,
32,
7,
4749,
121,
2490,
3,
31,
1714,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Name the total number of EBIT (US $m) in 2011 and a Earnings per share ( ) larger than 47? | CREATE TABLE table_60286 (
"Year to April" real,
"Revenue (US $million)" real,
"EBIT (US $m)" real,
"Net profit (US $m)" real,
"Earnings per share (\u00a2)" real
) | SELECT COUNT("EBIT (US $m)") FROM table_60286 WHERE "Year to April" = '2011' AND "Earnings per share (\u00a2)" > '47' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3328,
357,
3840,
41,
96,
476,
2741,
12,
1186,
121,
490,
6,
96,
1649,
15098,
41,
3063,
1514,
17030,
61,
121,
490,
6,
96,
427,
26417,
41,
3063,
1514,
51,
61,
121,
490,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
427,
26417,
41,
3063,
1514,
51,
61,
8512,
21680,
953,
834,
3328,
357,
3840,
549,
17444,
427,
96,
476,
2741,
12,
1186,
121,
3274,
3,
31,
13907,
31,
3430,
96,
427,
291,
29,
53,
7,
399,
698,
... |
give the number of black /african american patients whose hospital stay is more than 1 day. | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/AFRICAN AMERICAN" AND demographic.days_stay > "1" | [
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,
15,
189,
2532,
485,
3274,
96,
8775,
15339,
87,
6282,
5593,
11425,
3,
17683,
5593,
11425,
121,
3430... |
what opponent has the record of 78-63? | CREATE TABLE table_name_25 (opponent VARCHAR, record VARCHAR) | SELECT opponent FROM table_name_25 WHERE record = "78-63" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1828,
41,
32,
102,
9977,
584,
4280,
28027,
6,
1368,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
125,
15264,
65,
8,
1368,
13,
3,
3940,
18,
3891,
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,
15264,
21680,
953,
834,
4350,
834,
1828,
549,
17444,
427,
1368,
3274,
96,
3940,
18,
3891,
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 2007 value with a 2r in 2012 and 1r in 2002? | CREATE TABLE table_68056 (
"Tournament" text,
"1999" text,
"2002" text,
"2004" text,
"2006" text,
"2007" text,
"2010" text,
"2011" text,
"2012" text
) | SELECT "2007" FROM table_68056 WHERE "2012" = '2r' AND "2002" = '1r' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
948,
2079,
4834,
41,
96,
382,
1211,
20205,
17,
121,
1499,
6,
96,
2294,
3264,
121,
1499,
6,
96,
24898,
121,
1499,
6,
96,
21653,
121,
1499,
6,
96,
21196,
121,
1499,
6,
96,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
20615,
121,
21680,
953,
834,
948,
2079,
4834,
549,
17444,
427,
96,
12172,
121,
3274,
3,
31,
357,
52,
31,
3430,
96,
24898,
121,
3274,
3,
31,
536,
52,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What's the position of the player with a Height of 2.06 and club of Triumph Lyubertsy? | CREATE TABLE table_name_99 (
position VARCHAR,
height VARCHAR,
current_club VARCHAR
) | SELECT position FROM table_name_99 WHERE height = 2.06 AND current_club = "triumph lyubertsy" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3264,
41,
1102,
584,
4280,
28027,
6,
3902,
584,
4280,
28027,
6,
750,
834,
13442,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
31,
7,
8,
1102,
13,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
3,
23143,
14196,
1102,
21680,
953,
834,
4350,
834,
3264,
549,
17444,
427,
3902,
3274,
6864,
948,
3430,
750,
834,
13442,
3274,
96,
1788,
76,
7656,
3,
120,
14659,
17,
7,
63,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
How long has the longest song spent in the top 10? | CREATE TABLE table_27813010_2 (weeks_in_top_10 INTEGER) | SELECT MAX(weeks_in_top_10) FROM table_27813010_2 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2555,
4959,
1458,
1714,
834,
357,
41,
8041,
7,
834,
77,
834,
2916,
834,
1714,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
571,
307,
65,
8,
14783,
2324,
1869,
16,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
8041,
7,
834,
77,
834,
2916,
834,
16968,
21680,
953,
834,
2555,
4959,
1458,
1714,
834,
357,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the type of allergy Cat? | CREATE TABLE Allergy_type (
allergytype VARCHAR,
allergy VARCHAR
) | SELECT allergytype FROM Allergy_type WHERE allergy = "Cat" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
432,
49,
122,
63,
834,
6137,
41,
23886,
6137,
584,
4280,
28027,
6,
23886,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
686,
13,
23886,
3431,
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,
23886,
6137,
21680,
432,
49,
122,
63,
834,
6137,
549,
17444,
427,
23886,
3274,
96,
18610,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Plot salary by grouped by email as a bar graph, and show y-axis in descending order. | CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE 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 job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
) | SELECT EMAIL, SALARY FROM employees ORDER BY SALARY DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
10521,
41,
3396,
19846,
11810,
834,
4309,
7908,
1982,
599,
8525,
632,
201,
3396,
19846,
11810,
834,
567,
17683,
3,
4331,
4059,
599,
1458,
201,
283,
15610,
17966,
834,
4309,
7908,
1982,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
20211,
3502,
6,
180,
4090,
24721,
21680,
1652,
4674,
11300,
272,
476,
180,
4090,
24721,
309,
25067,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
what is the name when death is november 10, 1842? | CREATE TABLE table_name_80 (name VARCHAR, death VARCHAR) | SELECT name FROM table_name_80 WHERE death = "november 10, 1842" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2079,
41,
4350,
584,
4280,
28027,
6,
1687,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
125,
19,
8,
564,
116,
1687,
19,
3,
5326,
18247,
10372,
507,
4165,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
564,
21680,
953,
834,
4350,
834,
2079,
549,
17444,
427,
1687,
3274,
96,
5326,
18247,
10372,
507,
4165,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the the total top attendance with a score of 0 4? | CREATE TABLE table_54461 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" real,
"Series" text
) | SELECT MAX("Attendance") FROM table_54461 WHERE "Score" = '0 – 4' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
755,
3628,
4241,
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,
4800,
4,
599,
121,
188,
17,
324,
26,
663,
8512,
21680,
953,
834,
755,
3628,
4241,
549,
17444,
427,
96,
134,
9022,
121,
3274,
3,
31,
632,
3,
104,
314,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the sum of silver medals for the entry with rank 3 and a total of 4 medals? | CREATE TABLE table_name_43 (silver INTEGER, total VARCHAR, rank VARCHAR) | SELECT SUM(silver) FROM table_name_43 WHERE total = 4 AND rank = "3" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4906,
41,
7,
173,
624,
3,
21342,
17966,
6,
792,
584,
4280,
28027,
6,
11003,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
4505,
13,
4294,
9365... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
3,
23143,
14196,
180,
6122,
599,
7,
173,
624,
61,
21680,
953,
834,
4350,
834,
4906,
549,
17444,
427,
792,
3274,
314,
3430,
11003,
3274,
96,
519,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is Example Spelled Free, when Example Spelled Checked is 'op / p/ ('on')'? | CREATE TABLE table_78608 (
"Letter" text,
"Pronunciation spelled free" text,
"Pronunciation spelled checked" text,
"Example spelled free" text,
"Example spelled checked" text
) | SELECT "Example spelled free" FROM table_78608 WHERE "Example spelled checked" = 'op /ɔp/ ("on")' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3940,
3328,
927,
41,
96,
434,
15583,
121,
1499,
6,
96,
3174,
29,
15254,
257,
3,
7,
14528,
339,
121,
1499,
6,
96,
3174,
29,
15254,
257,
3,
7,
14528,
7122,
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,
5420,
9,
9208,
3,
7,
14528,
339,
121,
21680,
953,
834,
3940,
3328,
927,
549,
17444,
427,
96,
5420,
9,
9208,
3,
7,
14528,
7122,
121,
3274,
3,
31,
32,
102,
3,
87,
2,
102,
87,
13308,
106,
8512,
31,
1,
-100,
... |
What did United States place when the score was 71-70-72-68=281? | CREATE TABLE table_name_17 (place VARCHAR, country VARCHAR, score VARCHAR) | SELECT place FROM table_name_17 WHERE country = "united states" AND score = 71 - 70 - 72 - 68 = 281 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2517,
41,
4687,
584,
4280,
28027,
6,
684,
584,
4280,
28027,
6,
2604,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
410,
907,
1323,
286,
116,
8,
2604,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
286,
21680,
953,
834,
4350,
834,
2517,
549,
17444,
427,
684,
3274,
96,
15129,
15,
26,
2315,
121,
3430,
2604,
3274,
3,
4450,
3,
18,
2861,
3,
18,
9455,
3,
18,
3,
3651,
3274,
204,
4959,
1,
-100,
-100,
-100,
-100,
-... |
What is the 20 year for Nitrous Oxide? | CREATE TABLE table_21350772_2 (
gas_name VARCHAR
) | SELECT 20 AS _yr FROM table_21350772_2 WHERE gas_name = "Nitrous oxide" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2658,
16975,
4013,
357,
834,
357,
41,
1807,
834,
4350,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
460,
215,
21,
31466,
302,
20919,
1599,
58,
1,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
460,
6157,
3,
834,
63,
52,
21680,
953,
834,
2658,
16975,
4013,
357,
834,
357,
549,
17444,
427,
1807,
834,
4350,
3274,
96,
567,
155,
8283,
21491,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Alana Boyd of group B with a 4.30 result has what nationality? | CREATE TABLE table_name_24 (nationality VARCHAR, name VARCHAR, group VARCHAR, result VARCHAR) | SELECT nationality FROM table_name_24 WHERE group = "b" AND result = "4.30" AND name = "alana boyd" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2266,
41,
16557,
485,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
6,
563,
584,
4280,
28027,
6,
741,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
12453,
9,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1157,
485,
21680,
953,
834,
4350,
834,
2266,
549,
17444,
427,
563,
3274,
96,
115,
121,
3430,
741,
3274,
96,
7984,
1458,
121,
3430,
564,
3274,
96,
9,
1618,
9,
4940,
26,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Who attended the school in 2006, that Jasmine Wilson attended in 2005? | CREATE TABLE table_name_70 (
Id VARCHAR
) | SELECT 2006 FROM table_name_70 WHERE 2005 = "jasmine wilson" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2518,
41,
27,
26,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
5526,
8,
496,
16,
3581,
6,
24,
2215,
7,
8695,
9439,
5526,
16,
3105,
58,
1,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3581,
21680,
953,
834,
4350,
834,
2518,
549,
17444,
427,
3105,
3274,
96,
1191,
7,
8695,
3,
210,
173,
739,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which team does Pierre Duguay play for? | CREATE TABLE table_17467 (
"Pick #" real,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
) | SELECT "NHL team" FROM table_17467 WHERE "Player" = 'Pierre Duguay' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
27693,
3708,
41,
96,
345,
3142,
1713,
121,
490,
6,
96,
15800,
49,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
24732,
485,
121,
1499,
6,
96,
15743,
434,
372,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
15743,
434,
372,
121,
21680,
953,
834,
27693,
3708,
549,
17444,
427,
96,
15800,
49,
121,
3274,
3,
31,
26928,
970,
1744,
9,
63,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What position did the player who was with the grizzlies from 2007-2009 play? | CREATE TABLE table_name_89 (position VARCHAR, years_for_grizzlies VARCHAR) | SELECT position FROM table_name_89 WHERE years_for_grizzlies = "2007-2009" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3914,
41,
4718,
584,
4280,
28027,
6,
203,
834,
1161,
834,
3496,
5271,
4664,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
1102,
410,
8,
1959,
113,
47,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1102,
21680,
953,
834,
4350,
834,
3914,
549,
17444,
427,
203,
834,
1161,
834,
3496,
5271,
4664,
3274,
96,
20615,
18,
16660,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
When was the game at Collingwood? | CREATE TABLE table_name_59 (date VARCHAR, away_team VARCHAR) | SELECT date FROM table_name_59 WHERE away_team = "collingwood" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3390,
41,
5522,
584,
4280,
28027,
6,
550,
834,
11650,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
366,
47,
8,
467,
44,
9919,
53,
2037,
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,
833,
21680,
953,
834,
4350,
834,
3390,
549,
17444,
427,
550,
834,
11650,
3274,
96,
3297,
697,
2037,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
give me the number of patients whose marital status is single and primary disease is copd exacerbation? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.diagnosis = "COPD EXACERBATION" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
14798,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
564,
1499,
6,
2774,
1947,
834,
8547,
302,
1499,
6,
1246,
1499,
6,
103,
115,
1499,
6,
7285,
1499,
6,
1612,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
1635,
9538,
834,
8547,
302,
3274,
96,
134,
2365,
3765,
121,
3430,
14798,
5,
25930,
4844,
159,
3274... |
Find out the number of male patients who have an arip10 drug code. | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.gender = "M" AND prescriptions.formulary_drug_cd = "ARIP10" | [
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... |
Name the dominant religion 2002 for | CREATE TABLE table_3338 (
"Settlement" text,
"Cyrillic Name Other Names" text,
"Type" text,
"Population (2011)" real,
"Largest ethnic group (2002)" text,
"Dominant religion (2002)" text
) | SELECT "Dominant religion (2002)" FROM table_3338 WHERE "Cyrillic Name Other Names" = 'Меленци' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4201,
3747,
41,
96,
17175,
17,
3335,
121,
1499,
6,
96,
254,
63,
52,
173,
2176,
5570,
2502,
5570,
7,
121,
1499,
6,
96,
25160,
121,
1499,
6,
96,
27773,
7830,
25163,
121,
49... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
4135,
1109,
288,
5562,
3,
31444,
121,
21680,
953,
834,
4201,
3747,
549,
17444,
427,
96,
254,
63,
52,
173,
2176,
5570,
2502,
5570,
7,
121,
3274,
3,
31,
2,
1757,
19229,
7184,
2,
2795,
31,
1,
-100,
-100,
-100,
... |
how many patients born before 2117 have lab test item id 51176? | 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 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2117" AND lab.itemid = "51176" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7690,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7690,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
What is the highest wins that has 350cc as the class, yamaha for the team, with points less than 37, and a year after 1979? | CREATE TABLE table_name_7 (
wins INTEGER,
year VARCHAR,
points VARCHAR,
class VARCHAR,
team VARCHAR
) | SELECT MAX(wins) FROM table_name_7 WHERE class = "350cc" AND team = "yamaha" AND points < 37 AND year > 1979 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
940,
41,
9204,
3,
21342,
17966,
6,
215,
584,
4280,
28027,
6,
979,
584,
4280,
28027,
6,
853,
584,
4280,
28027,
6,
372,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
3757,
7,
61,
21680,
953,
834,
4350,
834,
940,
549,
17444,
427,
853,
3274,
96,
16975,
75,
75,
121,
3430,
372,
3274,
96,
22990,
1024,
121,
3430,
979,
3,
2,
6862,
3430,
215,
2490,
15393,
1,
-100,
-100,
... |
Who is the crew chief of team Joe Gibbs Racing, which has a Chevrolet Monte Carlo and Fedex as the primary sponsor? | CREATE TABLE table_37456 (
"Team" text,
"Car(s)" text,
"Driver(s)" text,
"Primary Sponsor(s)" text,
"Crew Chief" text
) | SELECT "Crew Chief" FROM table_37456 WHERE "Car(s)" = 'chevrolet monte carlo' AND "Team" = 'joe gibbs racing' AND "Primary Sponsor(s)" = 'fedex' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4118,
2128,
948,
41,
96,
18699,
121,
1499,
6,
96,
6936,
599,
7,
61,
121,
1499,
6,
96,
20982,
52,
599,
7,
61,
121,
1499,
6,
96,
7855,
51,
1208,
19254,
599,
7,
61,
121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
254,
60,
210,
5116,
121,
21680,
953,
834,
4118,
2128,
948,
549,
17444,
427,
96,
6936,
599,
7,
61,
121,
3274,
3,
31,
13847,
3491,
15,
17,
6278,
15,
443,
40,
32,
31,
3430,
96,
18699,
121,
3274,
3,
31,
1927,
... |
What is the donor payment in Belgium? | CREATE TABLE table_16175217_1 (donor_payment VARCHAR, country VARCHAR) | SELECT donor_payment FROM table_16175217_1 WHERE country = "Belgium" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2938,
2517,
5373,
2517,
834,
536,
41,
2029,
127,
834,
21752,
584,
4280,
28027,
6,
684,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
18936,
1942,
16,
15575... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
18936,
834,
21752,
21680,
953,
834,
2938,
2517,
5373,
2517,
834,
536,
549,
17444,
427,
684,
3274,
96,
2703,
40,
122,
2552,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
what is the average yearly number of patients who have had cardiomyopathy - dilated until 4 years ago? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
) | SELECT AVG(t1.c1) FROM (SELECT COUNT(DISTINCT diagnosis.patientunitstayid) AS c1 FROM diagnosis WHERE diagnosis.diagnosisname = 'cardiomyopathy - dilated' AND DATETIME(diagnosis.diagnosistime) <= DATETIME(CURRENT_TIME(), '-4 year') GROUP BY STRFTIME('%y', diagnosis.diagnosistime)) AS t1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2179,
9339,
41,
2179,
521,
9824,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
1543,
3585,
1499,
6,
9329,
1499,
6,
1543,
4914,
29,
715,
97,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
17,
5411,
75,
6982,
21680,
41,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
8209,
5,
10061,
15129,
21545,
23,
26,
61,
6157,
3,
75,
536,
21680,
8209,
549,
17444,
427,
8209,
5,
25930,
4844,
159,
... |
Show the number of document type for different document type description in a bar chart, and show in ascending by the x-axis. | CREATE TABLE Statements (
Statement_ID INTEGER,
Statement_Details VARCHAR(255)
)
CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_Type_Name VARCHAR(255),
Document_Type_Description VARCHAR(255)
)
CREATE TABLE Accounts (
Account_ID INTEGER,
Statement_ID INTEGER,
Account_Details VARCHAR(255)
)
CREATE TABLE Documents_with_Expenses (
Document_ID INTEGER,
Budget_Type_Code CHAR(15),
Document_Details VARCHAR(255)
)
CREATE TABLE Ref_Budget_Codes (
Budget_Type_Code CHAR(15),
Budget_Type_Description VARCHAR(255)
)
CREATE TABLE Documents (
Document_ID INTEGER,
Document_Type_Code CHAR(15),
Project_ID INTEGER,
Document_Date DATETIME,
Document_Name VARCHAR(255),
Document_Description VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Projects (
Project_ID INTEGER,
Project_Details VARCHAR(255)
) | SELECT Document_Type_Description, COUNT(Document_Type_Description) FROM Ref_Document_Types GROUP BY Document_Type_Description ORDER BY Document_Type_Description | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
16836,
7,
41,
16836,
834,
4309,
3,
21342,
17966,
6,
16836,
834,
2962,
5756,
7,
584,
4280,
28027,
599,
25502,
61,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
419,
89,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
11167,
834,
25160,
834,
2962,
11830,
6,
2847,
17161,
599,
4135,
1071,
297,
834,
25160,
834,
2962,
11830,
61,
21680,
419,
89,
834,
4135,
1071,
297,
834,
25160,
7,
350,
4630,
6880,
272,
476,
11167,
834,
25160,
834,
2962... |
How many years have an Award of venice film festival, and a Title of lust, caution? | CREATE TABLE table_64622 (
"Award" text,
"Category" text,
"Year" real,
"Title" text,
"Result" text
) | SELECT COUNT("Year") FROM table_64622 WHERE "Award" = 'venice film festival' AND "Title" = 'lust, caution' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4389,
4056,
357,
41,
96,
188,
2239,
121,
1499,
6,
96,
18610,
6066,
651,
121,
1499,
6,
96,
476,
2741,
121,
490,
6,
96,
382,
155,
109,
121,
1499,
6,
96,
20119,
121,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
476,
2741,
8512,
21680,
953,
834,
4389,
4056,
357,
549,
17444,
427,
96,
188,
2239,
121,
3274,
3,
31,
1926,
867,
814,
3994,
31,
3430,
96,
382,
155,
109,
121,
3274,
3,
31,
10008,
6,
14291,
31,... |
What is the total number of medals for West Germany with more than 1 bronze medal and more than 2 gold medals? | CREATE TABLE table_66480 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT COUNT("Total") FROM table_66480 WHERE "Bronze" > '1' AND "Nation" = 'west germany' AND "Gold" > '2' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3539,
20579,
41,
96,
22557,
121,
1499,
6,
96,
567,
257,
121,
1499,
6,
96,
23576,
121,
490,
6,
96,
134,
173,
624,
121,
490,
6,
96,
22780,
29,
776,
121,
490,
6,
96,
3696,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
3696,
1947,
8512,
21680,
953,
834,
3539,
20579,
549,
17444,
427,
96,
22780,
29,
776,
121,
2490,
3,
31,
536,
31,
3430,
96,
567,
257,
121,
3274,
3,
31,
12425,
13692,
63,
31,
3430,
96,
23576,
1... |
Tell me the high assists for orlando | CREATE TABLE table_name_46 (high_assists VARCHAR, team VARCHAR) | SELECT high_assists FROM table_name_46 WHERE team = "orlando" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4448,
41,
6739,
834,
6500,
7,
17,
7,
584,
4280,
28027,
6,
372,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
8779,
140,
8,
306,
13041,
21,
3,
32,
7721,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
306,
834,
6500,
7,
17,
7,
21680,
953,
834,
4350,
834,
4448,
549,
17444,
427,
372,
3274,
96,
32,
7721,
32,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Please show different denominations and the corresponding number of schools in descending order. | CREATE TABLE school (Denomination VARCHAR) | SELECT Denomination, COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
496,
41,
308,
35,
32,
14484,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
863,
504,
315,
28730,
7,
11,
8,
3,
9921,
381,
13,
2061,
16,
3,
30960,
455,
5,
1,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3128,
32,
14484,
6,
2847,
17161,
599,
1935,
61,
21680,
496,
350,
4630,
6880,
272,
476,
3128,
32,
14484,
4674,
11300,
272,
476,
2847,
17161,
599,
1935,
61,
309,
25067,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Which open cup was after 1993? | CREATE TABLE table_name_18 (
open_cup VARCHAR,
year INTEGER
) | SELECT open_cup FROM table_name_18 WHERE year > 1993 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2606,
41,
539,
834,
4658,
584,
4280,
28027,
6,
215,
3,
21342,
17966,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
539,
4119,
47,
227,
8388,
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,
539,
834,
4658,
21680,
953,
834,
4350,
834,
2606,
549,
17444,
427,
215,
2490,
8388,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is the number of patients whose diagnoses short title is perinat gi sys dis nec and drug route is po/ng? | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Perinat GI sys dis NEC" AND prescriptions.route = "PO/NG" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7690,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
2118,
23,
26,
1499,
6,
5059,
715,
1499,
6,
5692,
1499,
6,
701,
834,
15129,
1499,
6,
3783,
1499,
6,
5798,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
3... |
What is the set 2 with a 25-23 set 1 and a 17-19 set 5? | CREATE TABLE table_name_48 (set_2 VARCHAR, set_1 VARCHAR, set_5 VARCHAR) | SELECT set_2 FROM table_name_48 WHERE set_1 = "25-23" AND set_5 = "17-19" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3707,
41,
2244,
834,
357,
584,
4280,
28027,
6,
356,
834,
536,
584,
4280,
28027,
6,
356,
834,
755,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
3,
23143,
14196,
356,
834,
357,
21680,
953,
834,
4350,
834,
3707,
549,
17444,
427,
356,
834,
536,
3274,
96,
1828,
18,
2773,
121,
3430,
356,
834,
755,
3274,
96,
2517,
4481,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
what is the total population of burnett township ? | CREATE TABLE table_203_510 (
id number,
"township" text,
"fips" number,
"population\ncenter" text,
"population" number,
"population\ndensity\n(/mi2)" number,
"population\ndensity\n(/km2)" number,
"land area\n(mi2)" number,
"land area\n(km2)" number,
"water area\n(mi2)" number,
"water area\n(km2)" number,
"geographic coordinates" text
) | SELECT "population" FROM table_203_510 WHERE "township" = 'burnett' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
25926,
41,
3,
23,
26,
381,
6,
96,
3540,
2009,
121,
1499,
6,
96,
89,
15432,
121,
381,
6,
96,
9791,
7830,
2,
29,
13866,
121,
1499,
6,
96,
9791,
7830,
121,
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,
96,
9791,
7830,
121,
21680,
953,
834,
23330,
834,
25926,
549,
17444,
427,
96,
3540,
2009,
121,
3274,
3,
31,
5808,
10544,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
How many figures are there for Rank 07-11 when the world ranking is 4? | CREATE TABLE table_167354_2 (rank_07_11 VARCHAR, world_ranking VARCHAR) | SELECT COUNT(rank_07_11) FROM table_167354_2 WHERE world_ranking = "4" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2938,
4552,
5062,
834,
357,
41,
6254,
834,
4560,
834,
2596,
584,
4280,
28027,
6,
296,
834,
6254,
53,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
5638,
33,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
6254,
834,
4560,
834,
2596,
61,
21680,
953,
834,
2938,
4552,
5062,
834,
357,
549,
17444,
427,
296,
834,
6254,
53,
3274,
96,
20364,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
how many times does mpa -lrb- kpsi -rrb- appear under the units column ? | CREATE TABLE table_204_229 (
id number,
"property" text,
"test method" text,
"units" text,
"4275" text,
"4301" text,
"4435" text,
"4630" text,
"4645" text
) | SELECT COUNT(*) FROM table_204_229 WHERE "units" = 'mpa (kpsi)' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
357,
3166,
41,
3,
23,
26,
381,
6,
96,
10401,
49,
17,
63,
121,
1499,
6,
96,
4377,
1573,
121,
1499,
6,
96,
15129,
7,
121,
1499,
6,
96,
4165,
3072,
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,
1935,
61,
21680,
953,
834,
26363,
834,
357,
3166,
549,
17444,
427,
96,
15129,
7,
121,
3274,
3,
31,
1167,
9,
41,
157,
102,
7,
23,
61,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
how many patients with bradycardia were unmarried? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT AVG(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.diagnosis = "BRADYCARDIA" | [
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,
71,
17217,
599,
1778,
16587,
5,
545,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
1635,
9538,
834,
8547,
302,
3274,
96,
134,
2365,
3765,
121,
3430,
14798,
5,
25930,
4844,
159,
3274,
96,
22899,
19409,
254,
4280,
24605,... |
What is the population in millions for 2011 where the GDP (nominal) (billions USD) is 4? | CREATE TABLE table_24458 (
"Country" text,
"Area (km\u00b2)" text,
"Population (millions, 2011)" text,
"GDP (PPP) (USD, per capita)" real,
"GDP (nominal) (billions USD)" text,
"HDI (2011)" text
) | SELECT "Population (millions, 2011)" FROM table_24458 WHERE "GDP (nominal) (billions USD)" = '4' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
3628,
3449,
41,
96,
10628,
651,
121,
1499,
6,
96,
188,
864,
41,
5848,
2,
76,
1206,
115,
7318,
121,
1499,
6,
96,
27773,
7830,
41,
17030,
7,
6,
2722,
61,
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,
27773,
7830,
41,
17030,
7,
6,
2722,
61,
121,
21680,
953,
834,
357,
3628,
3449,
549,
17444,
427,
96,
517,
7410,
41,
3114,
10270,
61,
41,
115,
14916,
7,
9513,
61,
121,
3274,
3,
31,
591,
31,
1,
-100,
-100,
-100... |
What's time is Best Mix Overnight? | CREATE TABLE table_name_94 (time VARCHAR, show_name VARCHAR) | SELECT time FROM table_name_94 WHERE show_name = "best mix overnight" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4240,
41,
715,
584,
4280,
28027,
6,
504,
834,
4350,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
31,
7,
97,
19,
1648,
7382,
2035,
7602,
58,
1,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
97,
21680,
953,
834,
4350,
834,
4240,
549,
17444,
427,
504,
834,
4350,
3274,
96,
9606,
2153,
8521,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
How many patients of black/african american ethinicty are born before 2200? | 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
)
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 WHERE demographic.ethnicity = "BLACK/AFRICAN AMERICAN" AND demographic.dob_year < "2200" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
15,
189,
2532,
485,
3274,
96,
8775,
15339,
87,
6282,
5593,
11425,
3,
17683,
5593,
11425,
121,
3430... |
What is the name of the manager who was replaced by michael skibbe? | CREATE TABLE table_62209 (
"Name" text,
"Club" text,
"Date of departure" text,
"Replacement" text,
"Date of appointment" text
) | SELECT "Name" FROM table_62209 WHERE "Replacement" = 'michael skibbe' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4056,
357,
4198,
41,
96,
23954,
121,
1499,
6,
96,
254,
11158,
121,
1499,
6,
96,
308,
342,
13,
12028,
121,
1499,
6,
96,
1649,
4687,
297,
121,
1499,
6,
96,
308,
342,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
23954,
121,
21680,
953,
834,
4056,
357,
4198,
549,
17444,
427,
96,
1649,
4687,
297,
121,
3274,
3,
31,
51,
362,
9,
15,
40,
5210,
115,
346,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Where did the player who won in 1991 finish? | CREATE TABLE table_61462 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" real,
"To par" text,
"Finish" text
) | SELECT "Finish" FROM table_61462 WHERE "Year(s) won" = '1991' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4241,
4448,
357,
41,
96,
15800,
49,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
476,
2741,
599,
7,
61,
751,
121,
1499,
6,
96,
3696,
1947,
121,
490,
6,
96,
3696,
260... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
371,
77,
1273,
121,
21680,
953,
834,
4241,
4448,
357,
549,
17444,
427,
96,
476,
2741,
599,
7,
61,
751,
121,
3274,
3,
31,
2294,
4729,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What are the names of catalog entries with level number 8, and count them by a bar chart, and sort x axis from low to high order. | CREATE TABLE Catalog_Structure (
catalog_level_number INTEGER,
catalog_id INTEGER,
catalog_level_name VARCHAR(50)
)
CREATE TABLE Catalog_Contents (
catalog_entry_id INTEGER,
catalog_level_number INTEGER,
parent_entry_id INTEGER,
previous_entry_id INTEGER,
next_entry_id INTEGER,
catalog_entry_name VARCHAR(80),
product_stock_number VARCHAR(50),
price_in_dollars DOUBLE,
price_in_euros DOUBLE,
price_in_pounds DOUBLE,
capacity VARCHAR(20),
length VARCHAR(20),
height VARCHAR(20),
width VARCHAR(20)
)
CREATE TABLE Attribute_Definitions (
attribute_id INTEGER,
attribute_name VARCHAR(30),
attribute_data_type VARCHAR(10)
)
CREATE TABLE Catalogs (
catalog_id INTEGER,
catalog_name VARCHAR(50),
catalog_publisher VARCHAR(80),
date_of_publication DATETIME,
date_of_latest_revision DATETIME
)
CREATE TABLE Catalog_Contents_Additional_Attributes (
catalog_entry_id INTEGER,
catalog_level_number INTEGER,
attribute_id INTEGER,
attribute_value VARCHAR(255)
) | SELECT catalog_entry_name, COUNT(catalog_entry_name) FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.catalog_level_number = "8" GROUP BY catalog_entry_name ORDER BY catalog_entry_name | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
22424,
834,
134,
17,
11783,
2693,
41,
10173,
834,
4563,
834,
5525,
1152,
3,
21342,
17966,
6,
10173,
834,
23,
26,
3,
21342,
17966,
6,
10173,
834,
4563,
834,
4350,
584,
4280,
28027,
599,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
10173,
834,
295,
651,
834,
4350,
6,
2847,
17161,
599,
2138,
9,
2152,
834,
295,
651,
834,
4350,
61,
21680,
22424,
834,
4302,
4669,
7,
6157,
3,
17,
536,
3,
15355,
3162,
22424,
834,
4302,
4669,
7,
834,
20773,
4749,
1... |
tell me the average roll for the featherston area and integrated authority. | CREATE TABLE table_68262 (
"Name" text,
"Years" text,
"Gender" text,
"Area" text,
"Authority" text,
"Decile" real,
"Roll" real
) | SELECT AVG("Roll") FROM table_68262 WHERE "Area" = 'featherston' AND "Authority" = 'integrated' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3651,
2688,
357,
41,
96,
23954,
121,
1499,
6,
96,
476,
2741,
7,
121,
1499,
6,
96,
517,
3868,
121,
1499,
6,
96,
188,
864,
121,
1499,
6,
96,
23602,
127,
485,
121,
1499,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
121,
29807,
8512,
21680,
953,
834,
3651,
2688,
357,
549,
17444,
427,
96,
188,
864,
121,
3274,
3,
31,
89,
1544,
760,
4411,
31,
3430,
96,
23602,
127,
485,
121,
3274,
3,
31,
8576,
920,
31,
1,
-100,
... |
How many gb's have an iso number of cn-65? | CREATE TABLE table_254234_1 (gb VARCHAR, iso_№ VARCHAR) | SELECT COUNT(gb) FROM table_254234_1 WHERE iso_№ = "CN-65" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
4165,
3710,
834,
536,
41,
122,
115,
584,
4280,
28027,
6,
19,
32,
834,
4168,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
3,
122,
115,
31,
7,
43,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
122,
115,
61,
21680,
953,
834,
1828,
4165,
3710,
834,
536,
549,
17444,
427,
19,
32,
834,
4168,
3274,
96,
10077,
18,
4122,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Name the event for hans ruep | CREATE TABLE table_18646111_13 (
event VARCHAR,
athlete VARCHAR
) | SELECT event FROM table_18646111_13 WHERE athlete = "Hans Ruep" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
25398,
4448,
15866,
834,
2368,
41,
605,
584,
4280,
28027,
6,
17893,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
605,
21,
3,
2618,
7,
11902,
102,
1,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
605,
21680,
953,
834,
25398,
4448,
15866,
834,
2368,
549,
17444,
427,
17893,
3274,
96,
566,
3247,
2770,
15,
102,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Find the name of the swimmer who has the most records. | CREATE TABLE stadium (
id number,
name text,
capacity number,
city text,
country text,
opening_year number
)
CREATE TABLE record (
id number,
result text,
swimmer_id number,
event_id number
)
CREATE TABLE swimmer (
id number,
name text,
nationality text,
meter_100 number,
meter_200 text,
meter_300 text,
meter_400 text,
meter_500 text,
meter_600 text,
meter_700 text,
time text
)
CREATE TABLE event (
id number,
name text,
stadium_id number,
year text
) | SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id = t2.swimmer_id GROUP BY t2.swimmer_id ORDER BY COUNT(*) DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
14939,
41,
3,
23,
26,
381,
6,
564,
1499,
6,
2614,
381,
6,
690,
1499,
6,
684,
1499,
6,
2101,
834,
1201,
381,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
1368,
41,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5411,
4350,
21680,
27424,
6157,
3,
17,
536,
3,
15355,
3162,
1368,
6157,
3,
17,
357,
9191,
3,
17,
5411,
23,
26,
3274,
3,
17,
4416,
7,
210,
12174,
834,
23,
26,
350,
4630,
6880,
272,
476,
3,
17,
4416,
7,
... |
Find the state of the college which player Charles is attending. | CREATE TABLE college (
cname text,
state text,
enr number
)
CREATE TABLE player (
pid number,
pname text,
ycard text,
hs number
)
CREATE TABLE tryout (
pid number,
cname text,
ppos text,
decision text
) | SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cname = T2.cname JOIN player AS T3 ON T2.pid = T3.pid WHERE T3.pname = 'Charles' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1900,
41,
3,
75,
4350,
1499,
6,
538,
1499,
6,
3,
35,
52,
381,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
1959,
41,
3,
12417,
381,
6,
3,
102,
4350,
1499,
6,
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,
332,
5411,
5540,
21680,
1900,
6157,
332,
536,
3,
15355,
3162,
653,
670,
6157,
332,
357,
9191,
332,
5411,
75,
4350,
3274,
332,
4416,
75,
4350,
3,
15355,
3162,
1959,
6157,
332,
519,
9191,
332,
4416,
12417,
3274,
332,
... |
Which Notes have a Time larger than 23.34, and a Rank of 8? | CREATE TABLE table_name_24 (
notes VARCHAR,
time___sec__ VARCHAR,
rank VARCHAR
) | SELECT notes FROM table_name_24 WHERE time___sec__ > 23.34 AND rank = 8 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2266,
41,
3358,
584,
4280,
28027,
6,
97,
834,
834,
834,
7549,
834,
834,
584,
4280,
28027,
6,
11003,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3358,
21680,
953,
834,
4350,
834,
2266,
549,
17444,
427,
97,
834,
834,
834,
7549,
834,
834,
2490,
1902,
5,
3710,
3430,
11003,
3274,
505,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
what's the rank for iceland | CREATE TABLE table_72568 (
"Rank" real,
"Country" text,
"Overall" text,
"Justice" text,
"Health" text,
"Education" text,
"Economics" text,
"Politics" text
) | SELECT "Rank" FROM table_72568 WHERE "Country" = 'Iceland' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
940,
1828,
3651,
41,
96,
22557,
121,
490,
6,
96,
10628,
651,
121,
1499,
6,
96,
23847,
1748,
121,
1499,
6,
96,
19969,
867,
121,
1499,
6,
96,
20718,
121,
1499,
6,
96,
18846... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
22557,
121,
21680,
953,
834,
940,
1828,
3651,
549,
17444,
427,
96,
10628,
651,
121,
3274,
3,
31,
196,
7125,
232,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What was the score against houston? | CREATE TABLE table_22893781_5 (
score VARCHAR,
team VARCHAR
) | SELECT score FROM table_22893781_5 WHERE team = "Houston" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2884,
3914,
4118,
4959,
834,
755,
41,
2604,
584,
4280,
28027,
6,
372,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
2604,
581,
3,
9492,
4411,
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,
2604,
21680,
953,
834,
2884,
3914,
4118,
4959,
834,
755,
549,
17444,
427,
372,
3274,
96,
4489,
76,
4411,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What was the first series in this list that Jack Orman wrote? | CREATE TABLE table_533 (
"Series #" real,
"Season #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text
) | SELECT MIN("Series #") FROM table_533 WHERE "Written by" = 'Jack Orman' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4867,
519,
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,
2496... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12106,
7,
1713,
8512,
21680,
953,
834,
4867,
519,
549,
17444,
427,
96,
24965,
324,
57,
121,
3274,
3,
31,
683,
4365,
955,
348,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What district did the Democratic party incumbent Stephen J. Solarz get first elected to in 1974? | CREATE TABLE table_1341663_33 (district VARCHAR, incumbent VARCHAR, party VARCHAR, first_elected VARCHAR) | SELECT district FROM table_1341663_33 WHERE party = "Democratic" AND first_elected = 1974 AND incumbent = "Stephen J. Solarz" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2938,
3891,
834,
4201,
41,
26,
23,
20066,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
6,
1088,
584,
4280,
28027,
6,
166,
834,
19971,
584,
4280,
28027,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3939,
21680,
953,
834,
23747,
2938,
3891,
834,
4201,
549,
17444,
427,
1088,
3274,
96,
19679,
447,
121,
3430,
166,
834,
19971,
3274,
17184,
3430,
28406,
3274,
96,
14337,
19017,
446,
5,
9334,
172,
121,
1,
-100,
-100,
-1... |
count the number of patients whose age is less than 45 and diagnoses short title is poison-analgesics? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "45" AND diagnoses.short_title = "Poison-analgesics" | [
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,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
5... |
What are the names of the nations with the 3 lowest populations? | CREATE TABLE country (Name VARCHAR, Population VARCHAR) | SELECT Name FROM country ORDER BY Population LIMIT 3 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
684,
41,
23954,
584,
4280,
28027,
6,
29659,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
33,
8,
3056,
13,
8,
9352,
28,
8,
220,
7402,
11683,
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,
5570,
21680,
684,
4674,
11300,
272,
476,
29659,
8729,
12604,
220,
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,
... |
What was the final episode credited of 187? | CREATE TABLE table_name_72 (final_episode VARCHAR, episodes_credited VARCHAR) | SELECT final_episode FROM table_name_72 WHERE episodes_credited = 187 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5865,
41,
12406,
834,
15,
102,
159,
32,
221,
584,
4280,
28027,
6,
13562,
834,
16473,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
804,
5640,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
804,
834,
15,
102,
159,
32,
221,
21680,
953,
834,
4350,
834,
5865,
549,
17444,
427,
13562,
834,
16473,
3274,
3,
25828,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the rank 16 wins with the latest win at the 1967 Belgian Grand Prix? | CREATE TABLE table_name_47 (
wins VARCHAR,
rank VARCHAR,
latest_win VARCHAR
) | SELECT wins FROM table_name_47 WHERE rank > 16 AND latest_win = "1967 belgian grand prix" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4177,
41,
9204,
584,
4280,
28027,
6,
11003,
584,
4280,
28027,
6,
1251,
834,
3757,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
11003,
898,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9204,
21680,
953,
834,
4350,
834,
4177,
549,
17444,
427,
11003,
2490,
898,
3430,
1251,
834,
3757,
3274,
96,
2294,
3708,
36,
40,
22898,
1907,
3407,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Which artist created the silver dollar for the 400th anniversary of Quebec? | CREATE TABLE table_52236 (
"Year" real,
"Theme" text,
"Artist" text,
"Mintage" text,
"Issue Price" text
) | SELECT "Artist" FROM table_52236 WHERE "Theme" = '400th anniversary of quebec' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
5373,
357,
3420,
41,
96,
476,
2741,
121,
490,
6,
96,
634,
526,
121,
1499,
6,
96,
7754,
343,
121,
1499,
6,
96,
12858,
6505,
121,
1499,
6,
96,
196,
7,
7,
76,
15,
5312,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7754,
343,
121,
21680,
953,
834,
5373,
357,
3420,
549,
17444,
427,
96,
634,
526,
121,
3274,
3,
31,
5548,
189,
7685,
13,
238,
346,
75,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Draw a bar chart about the distribution of meter_200 and the sum of ID , and group by attribute meter_200, and order bars from high to low order. | CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text,
meter_300 text,
meter_400 text,
meter_500 text,
meter_600 text,
meter_700 text,
Time text
)
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
) | SELECT meter_200, SUM(ID) FROM swimmer GROUP BY meter_200 ORDER BY meter_200 DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
14939,
41,
4699,
16,
17,
6,
564,
1499,
6,
4000,
9,
6726,
16,
17,
6,
896,
1499,
6,
6993,
1499,
6,
20360,
834,
1201,
16,
17,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
4401,
834,
3632,
6,
180,
6122,
599,
4309,
61,
21680,
27424,
350,
4630,
6880,
272,
476,
3,
4401,
834,
3632,
4674,
11300,
272,
476,
3,
4401,
834,
3632,
309,
25067,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Which school has a hometown of winter park, FL? | CREATE TABLE table_53569 (
"Player" text,
"Height" text,
"School" text,
"Hometown" text,
"College" text
) | SELECT "School" FROM table_53569 WHERE "Hometown" = 'winter park, fl' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
755,
2469,
3951,
41,
96,
15800,
49,
121,
1499,
6,
96,
3845,
2632,
121,
1499,
6,
96,
29364,
121,
1499,
6,
96,
19040,
3540,
121,
1499,
6,
96,
9939,
7883,
121,
1499,
3,
61,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
3,
23143,
14196,
96,
29364,
121,
21680,
953,
834,
755,
2469,
3951,
549,
17444,
427,
96,
19040,
3540,
121,
3274,
3,
31,
210,
3870,
2447,
6,
3,
89,
40,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Show all destinations and the number of flights to each destination Plot them as bar chart, I want to list bar in desc order please. | CREATE TABLE aircraft (
aid number(9,0),
name varchar2(30),
distance number(6,0)
)
CREATE TABLE certificate (
eid number(9,0),
aid number(9,0)
)
CREATE TABLE employee (
eid number(9,0),
name varchar2(30),
salary number(10,2)
)
CREATE TABLE flight (
flno number(4,0),
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0)
) | SELECT destination, COUNT(*) FROM flight GROUP BY destination ORDER BY destination DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
6442,
41,
3052,
381,
599,
1298,
6,
632,
201,
564,
3,
4331,
4059,
357,
599,
1458,
201,
2357,
381,
599,
11071,
632,
61,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
6017... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3954,
6,
2847,
17161,
599,
1935,
61,
21680,
3777,
350,
4630,
6880,
272,
476,
3954,
4674,
11300,
272,
476,
3954,
309,
25067,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is all the customer information for customers in NY state? | CREATE TABLE playlisttrack (
playlistid number,
trackid number
)
CREATE TABLE playlist (
playlistid number,
name text
)
CREATE TABLE customer (
customerid number,
firstname text,
lastname text,
company text,
address text,
city text,
state text,
country text,
postalcode text,
phone text,
fax text,
email text,
supportrepid number
)
CREATE TABLE artist (
artistid number,
name text
)
CREATE TABLE album (
albumid number,
title text,
artistid number
)
CREATE TABLE invoice (
invoiceid number,
customerid number,
invoicedate time,
billingaddress text,
billingcity text,
billingstate text,
billingcountry text,
billingpostalcode text,
total number
)
CREATE TABLE genre (
genreid number,
name text
)
CREATE TABLE mediatype (
mediatypeid number,
name text
)
CREATE TABLE employee (
employeeid number,
lastname text,
firstname text,
title text,
reportsto number,
birthdate time,
hiredate time,
address text,
city text,
state text,
country text,
postalcode text,
phone text,
fax text,
email text
)
CREATE TABLE invoiceline (
invoicelineid number,
invoiceid number,
trackid number,
unitprice number,
quantity number
)
CREATE TABLE track (
trackid number,
name text,
albumid number,
mediatypeid number,
genreid number,
composer text,
milliseconds number,
bytes number,
unitprice number
) | SELECT * FROM customer WHERE state = "NY" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
23424,
11991,
41,
23424,
23,
26,
381,
6,
1463,
23,
26,
381,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
23424,
41,
23424,
23,
26,
381,
6,
564,
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,
1429,
21680,
884,
549,
17444,
427,
538,
3274,
96,
12056,
121,
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... |
How many times did anderson university leave? | CREATE TABLE table_11658094_3 (left VARCHAR, institution VARCHAR) | SELECT COUNT(left) FROM table_11658094_3 WHERE institution = "Anderson University" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2596,
4122,
2079,
4240,
834,
519,
41,
17068,
584,
4280,
28027,
6,
6568,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
648,
410,
11,
13515,
3819,
1175,
58,
1,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
17068,
61,
21680,
953,
834,
2596,
4122,
2079,
4240,
834,
519,
549,
17444,
427,
6568,
3274,
96,
7175,
13515,
636,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the total Tonnage GRT with a Type of cargo ship, and a Nationality of norway? | CREATE TABLE table_name_23 (tonnage_grt INTEGER, type VARCHAR, nationality VARCHAR) | SELECT SUM(tonnage_grt) FROM table_name_23 WHERE type = "cargo ship" AND nationality = "norway" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2773,
41,
17,
106,
9761,
834,
122,
52,
17,
3,
21342,
17966,
6,
686,
584,
4280,
28027,
6,
1157,
485,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
17,
106,
9761,
834,
122,
52,
17,
61,
21680,
953,
834,
4350,
834,
2773,
549,
17444,
427,
686,
3274,
96,
1720,
839,
4383,
121,
3430,
1157,
485,
3274,
96,
29,
127,
1343,
121,
1,
-100,
-100,
-100,
-100... |
How many points did Donald Green score? | CREATE TABLE table_25730209_2 (points VARCHAR, player VARCHAR) | SELECT COUNT(points) FROM table_25730209_2 WHERE player = "Donald Green" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
4552,
4305,
4198,
834,
357,
41,
2700,
7,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
979,
410,
7459,
1862,
2604,
58,
1,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
2700,
7,
61,
21680,
953,
834,
1828,
4552,
4305,
4198,
834,
357,
549,
17444,
427,
1959,
3274,
96,
13843,
138,
26,
1862,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Where was the successor formally installed on December 3, 1858? | CREATE TABLE table_1802760_3 (state__class_ VARCHAR, date_of_successors_formal_installation VARCHAR) | SELECT state__class_ FROM table_1802760_3 WHERE date_of_successors_formal_installation = "December 3, 1858" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
20829,
2555,
3328,
834,
519,
41,
5540,
834,
834,
4057,
834,
584,
4280,
28027,
6,
833,
834,
858,
834,
7,
17431,
24901,
7,
834,
2032,
138,
834,
14790,
584,
4280,
28027,
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,
0,
0,
0... | [
3,
23143,
14196,
538,
834,
834,
4057,
834,
21680,
953,
834,
20829,
2555,
3328,
834,
519,
549,
17444,
427,
833,
834,
858,
834,
7,
17431,
24901,
7,
834,
2032,
138,
834,
14790,
3274,
96,
29835,
6180,
507,
3449,
121,
1,
-100,
-100,
-100... |
What was the event for round 1 against Lance Wipf? | CREATE TABLE table_name_9 (
event VARCHAR,
round VARCHAR,
opponent VARCHAR
) | SELECT event FROM table_name_9 WHERE round = "1" AND opponent = "lance wipf" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1298,
41,
605,
584,
4280,
28027,
6,
1751,
584,
4280,
28027,
6,
15264,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
605,
21,
1751,
209,
581... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
605,
21680,
953,
834,
4350,
834,
1298,
549,
17444,
427,
1751,
3274,
96,
536,
121,
3430,
15264,
3274,
96,
40,
663,
11064,
102,
89,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the release date for Destiny of the Daleks? | CREATE TABLE table_1681535_1 (
release_date VARCHAR,
title VARCHAR
) | SELECT release_date FROM table_1681535_1 WHERE title = "Destiny of the Daleks" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
24274,
1808,
2469,
834,
536,
41,
1576,
834,
5522,
584,
4280,
28027,
6,
2233,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1576,
833,
21,
19344,
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,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1576,
834,
5522,
21680,
953,
834,
24274,
1808,
2469,
834,
536,
549,
17444,
427,
2233,
3274,
96,
308,
222,
77,
63,
13,
8,
10729,
16789,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which team uses the kitmaker Saller and has Krombacher as their shirt sponsor? | CREATE TABLE table_name_73 (team VARCHAR, kitmaker VARCHAR, shirt_sponsor VARCHAR) | SELECT team FROM table_name_73 WHERE kitmaker = "saller" AND shirt_sponsor = "krombacher" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4552,
41,
11650,
584,
4280,
28027,
6,
3650,
8337,
584,
4280,
28027,
6,
8677,
834,
7,
5041,
7,
127,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
372,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
372,
21680,
953,
834,
4350,
834,
4552,
549,
17444,
427,
3650,
8337,
3274,
96,
7,
11211,
121,
3430,
8677,
834,
7,
5041,
7,
127,
3274,
96,
22318,
18015,
1703,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Who is the player from the United States with a t6 place and a 71-70-76-72=289 score? | CREATE TABLE table_44865 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" real,
"Money ( $ )" real
) | SELECT "Player" FROM table_44865 WHERE "Country" = 'united states' AND "Place" = 't6' AND "Score" = '71-70-76-72=289' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
3707,
4122,
41,
96,
345,
11706,
121,
1499,
6,
96,
15800,
49,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
3696,
260,
121,
490,
6,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
15800,
49,
121,
21680,
953,
834,
591,
3707,
4122,
549,
17444,
427,
96,
10628,
651,
121,
3274,
3,
31,
15129,
15,
26,
2315,
31,
3430,
96,
345,
11706,
121,
3274,
3,
31,
17,
948,
31,
3430,
96,
134,
9022,
121,
32... |
What is the 2006 when the 2013 is 1r, and the 2012 is 1r? | CREATE TABLE table_name_89 (Id VARCHAR) | SELECT 2006 FROM table_name_89 WHERE 2013 = "1r" AND 2012 = "1r" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3914,
41,
196,
26,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
3581,
116,
8,
2038,
19,
209,
52,
6,
11,
8,
1673,
19,
209,
52,
58,
1,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3581,
21680,
953,
834,
4350,
834,
3914,
549,
17444,
427,
2038,
3274,
96,
536,
52,
121,
3430,
1673,
3274,
96,
536,
52,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
For those employees who was hired before 2002-06-21, show me about the change of department_id over hire_date in a line chart, could you list in descending by the x axis? | 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 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 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 departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
) | SELECT HIRE_DATE, DEPARTMENT_ID FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY HIRE_DATE 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,
454,
14132,
834,
308,
6048,
6,
3396,
19846,
11810,
834,
4309,
21680,
1652,
549,
17444,
427,
454,
14132,
834,
308,
6048,
3,
2,
3,
31,
24898,
18,
5176,
16539,
31,
4674,
11300,
272,
476,
454,
14132,
834,
308,
6048,
309... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.