NATURAL_LANG stringlengths 0 446 | SCHEMA stringlengths 27 2.21k | SQL stringlengths 18 453 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|
What is the 2009 when 2012 is Year-End Championship? | CREATE TABLE table_7928 (
"Tournament" text,
"1998" text,
"1999" text,
"2000" text,
"2001" text,
"2002" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
) | SELECT "2009" FROM table_7928 WHERE "2012" = 'year-end championship' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4440,
2577,
41,
96,
382,
1211,
20205,
17,
121,
1499,
6,
96,
2294,
3916,
121,
1499,
6,
96,
2294,
3264,
121,
1499,
6,
96,
13527,
121,
1499,
6,
96,
23658,
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,
16660,
121,
21680,
953,
834,
4440,
2577,
549,
17444,
427,
96,
12172,
121,
3274,
3,
31,
1201,
18,
989,
10183,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the sum of low estimate(s) that is listed for the date of 1978? | CREATE TABLE table_name_66 (
low_estimate INTEGER,
date VARCHAR
) | SELECT SUM(low_estimate) FROM table_name_66 WHERE date = "1978" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3539,
41,
731,
834,
3340,
5058,
3,
21342,
17966,
6,
833,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
4505,
13,
731,
7037,
599,
7,
61,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
180,
6122,
599,
3216,
834,
3340,
5058,
61,
21680,
953,
834,
4350,
834,
3539,
549,
17444,
427,
833,
3274,
96,
2294,
3940,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the sum of values for INT'S with Mossy Cade for 0 yards and less than 3 sacks? | CREATE TABLE table_37007 (
"Player" text,
"Sacks" real,
"INT'S" real,
"Yards" real,
"Average" real,
"Long" text
) | SELECT SUM("INT'S") FROM table_37007 WHERE "Yards" = '0' AND "Sacks" < '3' AND "Player" = 'mossy cade' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
22520,
4560,
41,
96,
15800,
49,
121,
1499,
6,
96,
134,
4365,
7,
121,
490,
6,
96,
13777,
31,
134,
121,
490,
6,
96,
476,
986,
7,
121,
490,
6,
96,
188,
624,
545,
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,
180,
6122,
599,
121,
13777,
31,
134,
8512,
21680,
953,
834,
22520,
4560,
549,
17444,
427,
96,
476,
986,
7,
121,
3274,
3,
31,
632,
31,
3430,
96,
134,
4365,
7,
121,
3,
2,
3,
31,
519,
31,
3430,
96,
15800,
49,
121... |
What cart has a serpent shield animal? | CREATE TABLE table_name_47 (cart VARCHAR, shield_animal VARCHAR) | SELECT cart FROM table_name_47 WHERE shield_animal = "serpent" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4177,
41,
1720,
17,
584,
4280,
28027,
6,
13128,
834,
13607,
138,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
6998,
65,
3,
9,
30890,
13128,
2586,
58,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
6998,
21680,
953,
834,
4350,
834,
4177,
549,
17444,
427,
13128,
834,
13607,
138,
3274,
96,
7,
49,
102,
295,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What county has a school mascot of the Pioneers? | CREATE TABLE table_name_71 (county VARCHAR, mascot VARCHAR) | SELECT county FROM table_name_71 WHERE mascot = "pioneers" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4450,
41,
13362,
63,
584,
4280,
28027,
6,
3,
2754,
4310,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
5435,
65,
3,
9,
496,
3,
2754,
4310,
13,
8,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
5435,
21680,
953,
834,
4350,
834,
4450,
549,
17444,
427,
3,
2754,
4310,
3274,
96,
12364,
15,
277,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What player plays center? | CREATE TABLE table_590 (
"No" real,
"Player" text,
"Height" text,
"Position" text,
"Year born" real,
"Current Club" text
) | SELECT "Player" FROM table_590 WHERE "Position" = 'Center' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
755,
2394,
41,
96,
4168,
121,
490,
6,
96,
15800,
49,
121,
1499,
6,
96,
3845,
2632,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
476,
2741,
2170,
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,
15800,
49,
121,
21680,
953,
834,
755,
2394,
549,
17444,
427,
96,
345,
32,
7,
4749,
121,
3274,
3,
31,
24382,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
In what week was the December 21, 1969 game? | CREATE TABLE table_name_68 (
week INTEGER,
date VARCHAR
) | SELECT AVG(week) FROM table_name_68 WHERE date = "december 21, 1969" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3651,
41,
471,
3,
21342,
17966,
6,
833,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
86,
125,
471,
47,
8,
1882,
12026,
17185,
467,
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,
71,
17217,
599,
8041,
61,
21680,
953,
834,
4350,
834,
3651,
549,
17444,
427,
833,
3274,
96,
221,
75,
18247,
12026,
17185,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
When is the Save of Ayala and a Loss of Olivares | CREATE TABLE table_name_70 (date VARCHAR, save VARCHAR, loss VARCHAR) | SELECT date FROM table_name_70 WHERE save = "ayala" AND loss = "olivares" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2518,
41,
5522,
584,
4280,
28027,
6,
1097,
584,
4280,
28027,
6,
1453,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
366,
19,
8,
7242,
13,
71,
63,
138,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
833,
21680,
953,
834,
4350,
834,
2518,
549,
17444,
427,
1097,
3274,
96,
9,
63,
138,
9,
121,
3430,
1453,
3274,
96,
4172,
4331,
15,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what series was on may 14 | CREATE TABLE table_34831 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Series" text
) | SELECT "Series" FROM table_34831 WHERE "Date" = 'may 14' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
519,
3707,
3341,
41,
96,
23055,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
12106,
7,
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,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
96,
12106,
7,
121,
21680,
953,
834,
519,
3707,
3341,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
13726,
968,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Name the least floor exercise for parallel bars more than 9.687 and pommel horse less than 8.45 | CREATE TABLE table_name_58 (floor_exercise INTEGER, pommel_horse VARCHAR, parallel_bars VARCHAR) | SELECT MIN(floor_exercise) FROM table_name_58 WHERE pommel_horse < 8.45 AND parallel_bars > 9.687 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3449,
41,
20924,
834,
6667,
21645,
15,
3,
21342,
17966,
6,
26234,
40,
834,
107,
127,
7,
15,
584,
4280,
28027,
6,
8449,
834,
1047,
7,
584,
4280,
28027,
61,
3,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
20924,
834,
6667,
21645,
15,
61,
21680,
953,
834,
4350,
834,
3449,
549,
17444,
427,
26234,
40,
834,
107,
127,
7,
15,
3,
2,
4848,
2128,
3430,
8449,
834,
1047,
7,
2490,
5835,
3651,
940,
1,
-100,
-100,... |
What is Part 1, when Part 3 is 'heldu'? | CREATE TABLE table_name_83 (
part_1 VARCHAR,
part_3 VARCHAR
) | SELECT part_1 FROM table_name_83 WHERE part_3 = "heldu" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4591,
41,
294,
834,
536,
584,
4280,
28027,
6,
294,
834,
519,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
2733,
1914,
116,
2733,
220,
19,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
294,
834,
536,
21680,
953,
834,
4350,
834,
4591,
549,
17444,
427,
294,
834,
519,
3274,
96,
14796,
76,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What's the date for Details of 1000 copies? | CREATE TABLE table_name_74 (date INTEGER, other_details VARCHAR) | SELECT MIN(date) FROM table_name_74 WHERE other_details = "1000 copies" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4581,
41,
5522,
3,
21342,
17966,
6,
119,
834,
221,
5756,
7,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
31,
7,
8,
833,
21,
9487,
13,
5580,
8167,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3,
17684,
599,
5522,
61,
21680,
953,
834,
4350,
834,
4581,
549,
17444,
427,
119,
834,
221,
5756,
7,
3274,
96,
16824,
8167,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which date has a Score of 4 6, 2 6? | CREATE TABLE table_name_92 (
date VARCHAR,
score VARCHAR
) | SELECT date FROM table_name_92 WHERE score = "4–6, 2–6" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4508,
41,
833,
584,
4280,
28027,
6,
2604,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
833,
65,
3,
9,
17763,
13,
314,
8580,
204,
431,
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,
833,
21680,
953,
834,
4350,
834,
4508,
549,
17444,
427,
2604,
3274,
96,
591,
104,
11071,
204,
104,
948,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Show the number of games for each away team in a bar chart. | CREATE TABLE game (
stadium_id int,
id int,
Season int,
Date text,
Home_team text,
Away_team text,
Score text,
Competition text
)
CREATE TABLE injury_accident (
game_id int,
id int,
Player text,
Injury text,
Number_of_matches text,
Source text
)
CREATE TABLE stadium (
id int,
name text,
Home_Games int,
Average_Attendance real,
Total_Attendance real,
Capacity_Percentage real
) | SELECT Away_team, COUNT(Away_team) FROM game GROUP BY Away_team | [
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,
71,
1343,
834,
11650,
6,
2847,
17161,
599,
188,
1343,
834,
11650,
61,
21680,
467,
350,
4630,
6880,
272,
476,
71,
1343,
834,
11650,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the smallest production number for the LT series with the Dumb Patrol title? | CREATE TABLE table_name_85 (
production_num INTEGER,
series VARCHAR,
title VARCHAR
) | SELECT MIN(production_num) FROM table_name_85 WHERE series = "lt" AND title = "dumb patrol" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4433,
41,
999,
834,
5525,
3,
21342,
17966,
6,
939,
584,
4280,
28027,
6,
2233,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
3,
17924,
999,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
20762,
834,
5525,
61,
21680,
953,
834,
4350,
834,
4433,
549,
17444,
427,
939,
3274,
96,
40,
17,
121,
3430,
2233,
3274,
96,
26,
5937,
20404,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the transfer fee of Diogo? | CREATE TABLE table_70530 (
"Name" text,
"Country" text,
"Status" text,
"Transfer window" text,
"Transfer fee" text
) | SELECT "Transfer fee" FROM table_70530 WHERE "Name" = 'diogo' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2518,
26918,
41,
96,
23954,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
134,
17,
144,
302,
121,
1499,
6,
96,
18474,
1010,
2034,
121,
1499,
6,
96,
18474,
1010,
2572,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
96,
18474,
1010,
2572,
121,
21680,
953,
834,
2518,
26918,
549,
17444,
427,
96,
23954,
121,
3274,
3,
31,
26,
23,
32,
839,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
how many patients with copd exacerbation underwent the procedure with short title allo hem stem ct w/o pur? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "COPD EXACERBATION" AND procedures.short_title = "Allo hem stem ct w/o pur" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
14798,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
564,
1499,
6,
2774,
1947,
834,
8547,
302,
1499,
6,
1246,
1499,
6,
103,
115,
1499,
6,
7285,
1499,
6,
1612,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
what is the total sack when totaltk is 1 and asst. is more than 0? | CREATE TABLE table_54607 (
"Player" text,
"Tackles" real,
"Asst." real,
"TotalTK" real,
"Sack" real,
"Yards" real,
"FumR" real
) | SELECT SUM("Sack") FROM table_54607 WHERE "TotalTK" = '1' AND "Asst." > '0' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
755,
4448,
4560,
41,
96,
15800,
49,
121,
1499,
6,
96,
382,
4365,
965,
121,
490,
6,
96,
188,
7,
7,
17,
535,
490,
6,
96,
3696,
1947,
22110,
121,
490,
6,
96,
134,
4365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
121,
134,
4365,
8512,
21680,
953,
834,
755,
4448,
4560,
549,
17444,
427,
96,
3696,
1947,
22110,
121,
3274,
3,
31,
536,
31,
3430,
96,
188,
7,
7,
17,
535,
2490,
3,
31,
632,
31,
1,
-100,
-100,
-100,... |
What is the group name on the date of 20 July 1999? | CREATE TABLE table_53772 (
"Group name" text,
"English abbr." text,
"French abbr." text,
"Formal European Parliament name" text,
"From" text
) | SELECT "Group name" FROM table_53772 WHERE "From" = '20 july 1999' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4867,
4013,
357,
41,
96,
27247,
564,
121,
1499,
6,
96,
26749,
3,
12982,
52,
535,
1499,
6,
96,
371,
60,
5457,
3,
12982,
52,
535,
1499,
6,
96,
3809,
1982,
1611,
12876,
564,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
27247,
564,
121,
21680,
953,
834,
4867,
4013,
357,
549,
17444,
427,
96,
22674,
121,
3274,
3,
31,
1755,
3,
2047,
120,
5247,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
How many positive votes for Tennessee in 2006? | CREATE TABLE table_67456 (
"State" text,
"Date" text,
"Yes vote" text,
"No vote" text,
"Vote outcome" text
) | SELECT "Yes vote" FROM table_67456 WHERE "Date" = '2006' AND "State" = 'tennessee' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3708,
2128,
948,
41,
96,
134,
4748,
121,
1499,
6,
96,
308,
342,
121,
1499,
6,
96,
19739,
2902,
121,
1499,
6,
96,
4168,
2902,
121,
1499,
6,
96,
553,
32,
17,
15,
6138,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
3,
23143,
14196,
96,
19739,
2902,
121,
21680,
953,
834,
3708,
2128,
948,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
21196,
31,
3430,
96,
134,
4748,
121,
3274,
3,
31,
324,
655,
15,
15,
31,
1,
-100,
-100,
-100,
-100,
-100,
-... |
What's the nationality of Louisiana Tech? | CREATE TABLE table_44328 (
"Round" real,
"Pick" real,
"Player" text,
"Nationality" text,
"College" text
) | SELECT "Nationality" FROM table_44328 WHERE "College" = 'louisiana tech' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3628,
28070,
41,
96,
448,
32,
1106,
121,
490,
6,
96,
345,
3142,
121,
490,
6,
96,
15800,
49,
121,
1499,
6,
96,
24732,
485,
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,
0,
0,
0... | [
3,
23143,
14196,
96,
24732,
485,
121,
21680,
953,
834,
3628,
28070,
549,
17444,
427,
96,
9939,
7883,
121,
3274,
3,
31,
40,
1063,
159,
13662,
5256,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the Place 2 Player? | CREATE TABLE table_name_1 (player VARCHAR, place VARCHAR) | SELECT player FROM table_name_1 WHERE place = "2" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
536,
41,
20846,
584,
4280,
28027,
6,
286,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
3399,
204,
12387,
58,
1,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1959,
21680,
953,
834,
4350,
834,
536,
549,
17444,
427,
286,
3274,
96,
357,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Name the number of top 10s for scoring rank of 9 | CREATE TABLE table_18198579_6 (top_10s VARCHAR, scoring_rank VARCHAR) | SELECT COUNT(top_10s) FROM table_18198579_6 WHERE scoring_rank = "9" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2606,
2294,
4433,
4440,
834,
948,
41,
2916,
834,
1714,
7,
584,
4280,
28027,
6,
10389,
834,
6254,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
381,
13,
420,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
2916,
834,
1714,
7,
61,
21680,
953,
834,
2606,
2294,
4433,
4440,
834,
948,
549,
17444,
427,
10389,
834,
6254,
3274,
96,
1298,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
non _ smoker ( for 1 year prior to entry ) | CREATE TABLE table_train_245 (
"id" int,
"renal_disease" bool,
"diabetic" string,
"creatinine_clearance_cl" float,
"smoking" bool,
"kidney_disease" bool,
"body_mass_index_bmi" float,
"fasting_glucose" int,
"NOUSE" float
) | SELECT * FROM table_train_245 WHERE smoking = 0 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
9719,
834,
357,
2128,
41,
96,
23,
26,
121,
16,
17,
6,
96,
1536,
138,
834,
26,
159,
14608,
121,
3,
12840,
40,
6,
96,
26,
23,
9,
346,
1225,
121,
6108,
6,
96,
5045,
144,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
1429,
21680,
953,
834,
9719,
834,
357,
2128,
549,
17444,
427,
10257,
3274,
3,
632,
1,
-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 record in the game where the opponent wasd the atlanta falcons? | CREATE TABLE table_58951 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Game site" text,
"Record" text,
"Attendance" real
) | SELECT "Record" FROM table_58951 WHERE "Opponent" = 'atlanta falcons' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3449,
3301,
536,
41,
96,
518,
10266,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
20119,
121,
1499,
6,
96,
23055,
353,
121,
1499,
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,
1649,
7621,
121,
21680,
953,
834,
3449,
3301,
536,
549,
17444,
427,
96,
667,
102,
9977,
121,
3274,
3,
31,
144,
6761,
9,
12553,
8056,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the storm name and max speed which affected the greatest number of regions? | CREATE TABLE storm (
storm_id number,
name text,
dates_active text,
max_speed number,
damage_millions_usd number,
number_deaths number
)
CREATE TABLE region (
region_id number,
region_code text,
region_name text
)
CREATE TABLE affected_region (
region_id number,
storm_id number,
number_city_affected number
) | SELECT T1.name, T1.max_speed FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id ORDER BY COUNT(*) DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
5536,
41,
5536,
834,
23,
26,
381,
6,
564,
1499,
6,
5128,
834,
6645,
1499,
6,
9858,
834,
9993,
381,
6,
1783,
834,
17030,
7,
834,
302,
26,
381,
6,
381,
834,
221,
9,
189,
7,
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,
332,
5411,
4350,
6,
332,
5411,
9128,
834,
9993,
21680,
5536,
6157,
332,
536,
3,
15355,
3162,
4161,
834,
18145,
6157,
332,
357,
9191,
332,
5411,
21556,
834,
23,
26,
3274,
332,
4416,
21556,
834,
23,
26,
350,
4630,
688... |
what is the name of the last pillow pal on this chart ? | CREATE TABLE table_204_111 (
id number,
"name" text,
"animal type" text,
"introduced" number,
"reintroduced" text,
"retired" number,
"beanie baby resembled" text
) | SELECT "name" FROM table_204_111 ORDER BY id DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
15866,
41,
3,
23,
26,
381,
6,
96,
4350,
121,
1499,
6,
96,
13607,
138,
686,
121,
1499,
6,
96,
20322,
32,
12160,
26,
121,
381,
6,
96,
60,
20322,
32,
12160,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
4350,
121,
21680,
953,
834,
26363,
834,
15866,
4674,
11300,
272,
476,
3,
23,
26,
309,
25067,
8729,
12604,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
count the number of times patient 012-85821's total co2 test has been taken until 04/2102. | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
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 medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime 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 diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
) | SELECT COUNT(*) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '012-85821')) AND lab.labname = 'total co2' AND STRFTIME('%y-%m', lab.labresulttime) <= '2102-04' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7690,
41,
50,
9824,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
7690,
4350,
1499,
6,
50,
1999,
7,
83,
17,
381,
6,
50,
1999,
7,
83,
17,
715,
97,
3,
61,
3,
32102,
32103,
32102,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
7690,
549,
17444,
427,
7690,
5,
10061,
15129,
21545,
23,
26,
3388,
41,
23143,
14196,
1868,
5,
10061,
15129,
21545,
23,
26,
21680,
1868,
549,
17444,
427,
1868,
5,
10061,
15878,
3734,
... |
What is the least 2009 that has 2005 littler than 640, and 2011 of 425, and 2003 littler than 500? | CREATE TABLE table_50456 (
"Country" text,
"2002" real,
"2003" real,
"2004" real,
"2005" real,
"2006" real,
"2007" real,
"2008" real,
"2009" real,
"2010" real,
"2011" real
) | SELECT MIN("2009") FROM table_50456 WHERE "2005" < '640' AND "2011" = '425' AND "2003" < '500' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1752,
2128,
948,
41,
96,
10628,
651,
121,
1499,
6,
96,
24898,
121,
490,
6,
96,
23948,
121,
490,
6,
96,
21653,
121,
490,
6,
96,
22594,
121,
490,
6,
96,
21196,
121,
490,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
121,
16660,
8512,
21680,
953,
834,
1752,
2128,
948,
549,
17444,
427,
96,
22594,
121,
3,
2,
3,
31,
23714,
31,
3430,
96,
13907,
121,
3274,
3,
31,
591,
1828,
31,
3430,
96,
23948,
121,
3,
2,
3,
31,
... |
Which group has a weight (kg) less than 55? | CREATE TABLE table_36715 (
"Result" text,
"Date" text,
"Race" text,
"Venue" text,
"Group" text,
"Distance" text,
"Weight (kg)" real,
"Jockey" text,
"Winner/2nd" text
) | SELECT "Group" FROM table_36715 WHERE "Weight (kg)" < '55' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
519,
3708,
1808,
41,
96,
20119,
121,
1499,
6,
96,
308,
342,
121,
1499,
6,
96,
448,
3302,
121,
1499,
6,
96,
553,
35,
76,
15,
121,
1499,
6,
96,
27247,
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,
27247,
121,
21680,
953,
834,
519,
3708,
1808,
549,
17444,
427,
96,
1326,
2632,
41,
8711,
61,
121,
3,
2,
3,
31,
3769,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the sum of wins after 1999? | CREATE TABLE table_name_47 (wins INTEGER, year INTEGER) | SELECT SUM(wins) FROM table_name_47 WHERE year > 1999 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4177,
41,
3757,
7,
3,
21342,
17966,
6,
215,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
4505,
13,
9204,
227,
5247,
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,
180,
6122,
599,
3757,
7,
61,
21680,
953,
834,
4350,
834,
4177,
549,
17444,
427,
215,
2490,
5247,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
How many date of successor seated is new jersey 2nd in the district? | CREATE TABLE table_225205_4 (
date_successor_seated VARCHAR,
district VARCHAR
) | SELECT COUNT(date_successor_seated) FROM table_225205_4 WHERE district = "New Jersey 2nd" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
20489,
23201,
834,
591,
41,
833,
834,
7,
17431,
24901,
834,
22933,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
833,
13,
22261... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2847,
17161,
599,
5522,
834,
7,
17431,
24901,
834,
22933,
61,
21680,
953,
834,
20489,
23201,
834,
591,
549,
17444,
427,
3939,
3274,
96,
6861,
5092,
204,
727,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
what was the first year the event was held at the pick congress hotel in chicago ? | CREATE TABLE table_204_823 (
id number,
"dates" text,
"location" text,
"attendance" text,
"official guests" text,
"notes" text
) | SELECT MIN("dates") FROM table_204_823 WHERE "location" = 'chicago' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
4613,
519,
41,
3,
23,
26,
381,
6,
96,
5522,
7,
121,
1499,
6,
96,
14836,
121,
1499,
6,
96,
15116,
663,
121,
1499,
6,
96,
20884,
2554,
121,
1499,
6,
96,
7977,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5522,
7,
8512,
21680,
953,
834,
26363,
834,
4613,
519,
549,
17444,
427,
96,
14836,
121,
3274,
3,
31,
1436,
658,
839,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
which us technological university has the top enrollment numbers ? | CREATE TABLE table_203_721 (
id number,
"school" text,
"location" text,
"control" text,
"type" text,
"enrollment" number,
"founded" number
) | SELECT "school" FROM table_203_721 ORDER BY "enrollment" DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
940,
2658,
41,
3,
23,
26,
381,
6,
96,
6646,
121,
1499,
6,
96,
14836,
121,
1499,
6,
96,
15247,
121,
1499,
6,
96,
6137,
121,
1499,
6,
96,
35,
4046,
297,
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,
6646,
121,
21680,
953,
834,
23330,
834,
940,
2658,
4674,
11300,
272,
476,
96,
35,
4046,
297,
121,
309,
25067,
8729,
12604,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
what's the competition where aggregate is 4 7 | CREATE TABLE table_72103 (
"Season" text,
"Competition" text,
"Round" text,
"Opponents" text,
"1st leg" text,
"2nd leg" text,
"Aggregate" text
) | SELECT "Competition" FROM table_72103 WHERE "Aggregate" = '4–7' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
5865,
17864,
41,
96,
134,
15,
9,
739,
121,
1499,
6,
96,
5890,
4995,
4749,
121,
1499,
6,
96,
448,
32,
1106,
121,
1499,
6,
96,
667,
102,
9977,
7,
121,
1499,
6,
96,
536,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
5890,
4995,
4749,
121,
21680,
953,
834,
5865,
17864,
549,
17444,
427,
96,
188,
122,
18301,
342,
121,
3274,
3,
31,
591,
104,
940,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the award type for all Lowe awards? | CREATE TABLE table_name_1 (award VARCHAR, name VARCHAR) | SELECT award FROM table_name_1 WHERE name = "lowe" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
536,
41,
9,
2239,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2760,
686,
21,
66,
5586,
15,
6120,
58,
1,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2760,
21680,
953,
834,
4350,
834,
536,
549,
17444,
427,
564,
3274,
96,
3216,
15,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
How many conflicts started in Afghanistan? | CREATE TABLE table_1921_1 (start_of_conflict VARCHAR, location VARCHAR) | SELECT COUNT(start_of_conflict) FROM table_1921_1 WHERE location = "Afghanistan" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2294,
2658,
834,
536,
41,
10208,
834,
858,
834,
9707,
2176,
17,
584,
4280,
28027,
6,
1128,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
17824,
708,
16,
1354... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
10208,
834,
858,
834,
9707,
2176,
17,
61,
21680,
953,
834,
2294,
2658,
834,
536,
549,
17444,
427,
1128,
3274,
96,
188,
89,
22637,
343,
152,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
On what dates were episodes written by Robert Carlock aired? | CREATE TABLE table_14889988_1 (original_air_date VARCHAR, written_by VARCHAR) | SELECT original_air_date FROM table_14889988_1 WHERE written_by = "Robert Carlock" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2534,
4060,
3264,
4060,
834,
536,
41,
21878,
834,
2256,
834,
5522,
584,
4280,
28027,
6,
1545,
834,
969,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
461,
125,
5128,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
926,
834,
2256,
834,
5522,
21680,
953,
834,
2534,
4060,
3264,
4060,
834,
536,
549,
17444,
427,
1545,
834,
969,
3274,
96,
24372,
49,
17,
1184,
4029,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the day of vacancy for vit ria de guimar es? | CREATE TABLE table_61751 (
"Team" text,
"Outgoing manage" text,
"Manner" text,
"Date of vacancy" text,
"Incoming manager" text,
"Date of appointment" text
) | SELECT "Date of vacancy" FROM table_61751 WHERE "Team" = 'vitória de guimarães' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4241,
3072,
536,
41,
96,
18699,
121,
1499,
6,
96,
15767,
9545,
1865,
121,
1499,
6,
96,
7296,
687,
121,
1499,
6,
96,
308,
342,
13,
3,
29685,
121,
1499,
6,
96,
1570,
10622,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
308,
342,
13,
3,
29685,
121,
21680,
953,
834,
4241,
3072,
536,
549,
17444,
427,
96,
18699,
121,
3274,
3,
31,
5566,
4922,
52,
23,
9,
20,
3,
7938,
1635,
2,
15,
7,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
During which years was the model with the Engine code of m54b25 manufactured? | CREATE TABLE table_name_11 (
years VARCHAR,
engine_code VARCHAR
) | SELECT years FROM table_name_11 WHERE engine_code = "m54b25" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2596,
41,
203,
584,
4280,
28027,
6,
1948,
834,
4978,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
3,
2092,
84,
203,
47,
8,
825,
28,
8,
10612,
1081,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
203,
21680,
953,
834,
4350,
834,
2596,
549,
17444,
427,
1948,
834,
4978,
3274,
96,
51,
5062,
115,
1828,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is Venue, when Against is less than 30, and when Opposing Team is New South Wales? | CREATE TABLE table_name_14 (venue VARCHAR, against VARCHAR, opposing_team VARCHAR) | SELECT venue FROM table_name_14 WHERE against < 30 AND opposing_team = "new south wales" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2534,
41,
15098,
584,
4280,
28027,
6,
581,
584,
4280,
28027,
6,
10720,
53,
834,
11650,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
29940,
6,
116,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
3,
23143,
14196,
5669,
21680,
953,
834,
4350,
834,
2534,
549,
17444,
427,
581,
3,
2,
604,
3430,
10720,
53,
834,
11650,
3274,
96,
5534,
3414,
3,
210,
4529,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
When was the game that was held at the Princes Park? | CREATE TABLE table_name_85 (
date VARCHAR,
venue VARCHAR
) | SELECT date FROM table_name_85 WHERE venue = "princes park" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4433,
41,
833,
584,
4280,
28027,
6,
5669,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
366,
47,
8,
467,
24,
47,
1213,
44,
8,
9027,
7,
1061,
58,
1,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
833,
21680,
953,
834,
4350,
834,
4433,
549,
17444,
427,
5669,
3274,
96,
12298,
2319,
2447,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
When twente came in third place and ajax was the winner what are the seasons? | CREATE TABLE table_73235 (
"Season" text,
"Winner" text,
"Runner Up" text,
"Third Place" text,
"Top scorer" text,
"Goals" real
) | SELECT "Season" FROM table_73235 WHERE "Winner" = 'Ajax' AND "Third Place" = 'Twente' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4552,
25174,
41,
96,
134,
15,
9,
739,
121,
1499,
6,
96,
18455,
687,
121,
1499,
6,
96,
23572,
3234,
121,
1499,
6,
96,
382,
9288,
26,
3399,
121,
1499,
6,
96,
22481,
2604,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
134,
15,
9,
739,
121,
21680,
953,
834,
4552,
25174,
549,
17444,
427,
96,
18455,
687,
121,
3274,
3,
31,
188,
1191,
226,
31,
3430,
96,
382,
9288,
26,
3399,
121,
3274,
3,
31,
382,
16103,
15,
31,
1,
-100,
-100,
... |
what is the number of patients whose admission type is elective and diagnoses short title is b-complex defic nec? | 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 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 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.admission_type = "ELECTIVE" AND diagnoses.short_title = "B-complex defic NEC" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
14798,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
564,
1499,
6,
2774,
1947,
834,
8547,
302,
1499,
6,
1246,
1499,
6,
103,
115,
1499,
6,
7285,
1499,
6,
1612,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
5... |
When was pedro rodr guez the winning driver? | CREATE TABLE table_name_77 (
date VARCHAR,
winning_driver VARCHAR
) | SELECT date FROM table_name_77 WHERE winning_driver = "pedro rodríguez" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4013,
41,
833,
584,
4280,
28027,
6,
3447,
834,
13739,
52,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
366,
47,
3,
3138,
52,
32,
6102,
52,
3,
1744,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
833,
21680,
953,
834,
4350,
834,
4013,
549,
17444,
427,
3447,
834,
13739,
52,
3274,
96,
3138,
52,
32,
6102,
52,
2,
1744,
457,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Who did the Flames play against when Stephen Lee was the man of the match? | CREATE TABLE table_name_6 (
opponent VARCHAR,
man_of_the_match VARCHAR
) | SELECT opponent FROM table_name_6 WHERE man_of_the_match = "stephen lee" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
948,
41,
15264,
584,
4280,
28027,
6,
388,
834,
858,
834,
532,
834,
19515,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
410,
8,
25489,
7,
577,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
15264,
21680,
953,
834,
4350,
834,
948,
549,
17444,
427,
388,
834,
858,
834,
532,
834,
19515,
3274,
96,
849,
19017,
90,
15,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
how many patients whose discharge location is home and days of hospital stay is greater than 14? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "HOME" AND demographic.days_stay > "14" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
26,
159,
7993,
834,
14836,
3274,
96,
6299,
4369,
121,
3430,
14798,
5,
1135,
7,
834,
21545,
2490,
... |
Which method took place against Chris Herring? | CREATE TABLE table_name_73 (method VARCHAR, opponent VARCHAR) | SELECT method FROM table_name_73 WHERE opponent = "chris herring" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4552,
41,
23152,
584,
4280,
28027,
6,
15264,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
1573,
808,
286,
581,
4409,
8816,
53,
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,
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,
1573,
21680,
953,
834,
4350,
834,
4552,
549,
17444,
427,
15264,
3274,
96,
524,
52,
159,
160,
1007,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the College with a Round # that is 290? | CREATE TABLE table_name_20 (
college VARCHAR,
round__number VARCHAR
) | SELECT college FROM table_name_20 WHERE round__number = 290 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1755,
41,
1900,
584,
4280,
28027,
6,
1751,
834,
834,
5525,
1152,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1888,
28,
3,
9,
9609,
1713,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1900,
21680,
953,
834,
4350,
834,
1755,
549,
17444,
427,
1751,
834,
834,
5525,
1152,
3274,
3,
23838,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Show me about the distribution of All_Road and All_Games_Percent in a bar chart, I want to display X in ascending order please. | CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
) | SELECT All_Road, All_Games_Percent FROM basketball_match ORDER BY All_Road | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
8498,
834,
19515,
41,
2271,
834,
4309,
16,
17,
6,
1121,
834,
4309,
16,
17,
6,
2271,
834,
23954,
1499,
6,
3,
14775,
834,
17748,
4885,
834,
134,
15,
9,
739,
1499,
6,
3,
14775,
834,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
432,
834,
448,
32,
9,
26,
6,
432,
834,
23055,
7,
834,
12988,
3728,
21680,
8498,
834,
19515,
4674,
11300,
272,
476,
432,
834,
448,
32,
9,
26,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the result of the Europe/Africa Group I, play-off competition? | CREATE TABLE table_name_23 (result VARCHAR, competition VARCHAR) | SELECT result FROM table_name_23 WHERE competition = "europe/africa group i, play-off" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2773,
41,
60,
7,
83,
17,
584,
4280,
28027,
6,
2259,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
741,
13,
8,
1740,
87,
29596,
1531,
27,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
741,
21680,
953,
834,
4350,
834,
2773,
549,
17444,
427,
2259,
3274,
96,
28188,
87,
9,
89,
2234,
9,
563,
3,
23,
6,
577,
18,
1647,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
In what year was the number of attempts 888? | CREATE TABLE table_name_96 (
year VARCHAR,
attempts VARCHAR
) | SELECT year FROM table_name_96 WHERE attempts = "888" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4314,
41,
215,
584,
4280,
28027,
6,
9048,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
86,
125,
215,
47,
8,
381,
13,
9048,
3,
10927,
58,
1,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
215,
21680,
953,
834,
4350,
834,
4314,
549,
17444,
427,
9048,
3274,
96,
10927,
121,
1,
-100,
-100,
-100,
-100,
-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 gender is f and diagnoses long title is kidney dialysis as the cause of abnormal reaction of patient, or of later complication, without mention of misadventure at time of procedure? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "F" AND diagnoses.long_title = "Kidney dialysis as the cause of abnormal reaction of patient, or of later complication, without mention of misadventure at time of procedure" | [
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... |
Which Frequency is used for WEGP calls? | CREATE TABLE table_10333757_1 (
frequency VARCHAR,
calls VARCHAR
) | SELECT frequency FROM table_10333757_1 WHERE calls = "WEGP" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1714,
4201,
4118,
3436,
834,
536,
41,
7321,
584,
4280,
28027,
6,
3088,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
5532,
835,
11298,
19,
261,
21,
9664,
8049... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7321,
21680,
953,
834,
1714,
4201,
4118,
3436,
834,
536,
549,
17444,
427,
3088,
3274,
96,
15713,
8049,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who was the gorham principal in 2010-2011? | CREATE TABLE table_25037577_1 (gorham_principal VARCHAR, year VARCHAR) | SELECT gorham_principal FROM table_25037577_1 WHERE year = "2010-2011" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
11434,
22954,
4013,
834,
536,
41,
122,
127,
1483,
834,
12298,
3389,
138,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
8,
281,
52,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
281,
52,
1483,
834,
12298,
3389,
138,
21680,
953,
834,
11434,
22954,
4013,
834,
536,
549,
17444,
427,
215,
3274,
96,
14926,
18,
13907,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the competition that took place on October 1, 1994? | CREATE TABLE table_name_45 (
competition VARCHAR,
date VARCHAR
) | SELECT competition FROM table_name_45 WHERE date = "october 1, 1994" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2128,
41,
2259,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2259,
24,
808,
286,
30,
1797,
1914,
7520,
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,
2259,
21680,
953,
834,
4350,
834,
2128,
549,
17444,
427,
833,
3274,
96,
32,
75,
235,
1152,
1914,
7520,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the to par when the tournament involved was the Transitions Championship? | CREATE TABLE table_7732 (
"Date" text,
"Tournament" text,
"Winning score" text,
"To par" text,
"Margin of victory" text,
"Runner(s)-up" text
) | SELECT "To par" FROM table_7732 WHERE "Tournament" = 'transitions championship' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4013,
2668,
41,
96,
308,
342,
121,
1499,
6,
96,
382,
1211,
20205,
17,
121,
1499,
6,
96,
518,
10503,
2604,
121,
1499,
6,
96,
3696,
260,
121,
1499,
6,
96,
7286,
122,
77,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3696,
260,
121,
21680,
953,
834,
4013,
2668,
549,
17444,
427,
96,
382,
1211,
20205,
17,
121,
3274,
3,
31,
7031,
4749,
7,
10183,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Which tournament had a winning score of 67-61-68-67=263? | CREATE TABLE table_name_96 (tournament VARCHAR, winning_score VARCHAR) | SELECT tournament FROM table_name_96 WHERE winning_score = 67 - 61 - 68 - 67 = 263 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4314,
41,
17,
1211,
20205,
17,
584,
4280,
28027,
6,
3447,
834,
7,
9022,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
5892,
141,
3,
9,
3447,
2604,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
5892,
21680,
953,
834,
4350,
834,
4314,
549,
17444,
427,
3447,
834,
7,
9022,
3274,
3,
3708,
3,
18,
3,
4241,
3,
18,
3,
3651,
3,
18,
3,
3708,
3274,
204,
3891,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What was the visitor with a record of 5–8–4? | CREATE TABLE table_name_10 (visitor VARCHAR, record VARCHAR) | SELECT visitor FROM table_name_10 WHERE record = "5–8–4" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1714,
41,
3466,
155,
127,
584,
4280,
28027,
6,
1368,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
7019,
28,
3,
9,
1368,
13,
305,
104,
927,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7019,
21680,
953,
834,
4350,
834,
1714,
549,
17444,
427,
1368,
3274,
96,
755,
104,
927,
104,
20364,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name the average wins outdoor with rank more than 4 and wins less than 3 with outdoor wins more than 0 | CREATE TABLE table_name_61 (
wins__outdoor_ INTEGER,
wins__indoor_ VARCHAR,
rank VARCHAR,
wins__total_ VARCHAR
) | SELECT AVG(wins__outdoor_) FROM table_name_61 WHERE rank > 4 AND wins__total_ < 3 AND wins__indoor_ > 0 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4241,
41,
9204,
834,
834,
670,
11968,
834,
3,
21342,
17966,
6,
9204,
834,
834,
77,
11968,
834,
584,
4280,
28027,
6,
11003,
584,
4280,
28027,
6,
9204,
834,
834,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
3757,
7,
834,
834,
670,
11968,
834,
61,
21680,
953,
834,
4350,
834,
4241,
549,
17444,
427,
11003,
2490,
314,
3430,
9204,
834,
834,
235,
1947,
834,
3,
2,
220,
3430,
9204,
834,
834,
77,
11968,
834,
2... |
In rounds 7-13 what engine was featured? | CREATE TABLE table_52148 (
"Constructor" text,
"Chassis" text,
"Engine" text,
"Tyre" text,
"Driver" text,
"Rounds" text
) | SELECT "Engine" FROM table_52148 WHERE "Rounds" = '7-13' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
5373,
24748,
41,
96,
4302,
7593,
127,
121,
1499,
6,
96,
3541,
6500,
7,
121,
1499,
6,
96,
31477,
121,
1499,
6,
96,
382,
63,
60,
121,
1499,
6,
96,
20982,
52,
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,
31477,
121,
21680,
953,
834,
5373,
24748,
549,
17444,
427,
96,
448,
32,
1106,
7,
121,
3274,
3,
31,
940,
13056,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Name the period for michel llodra | CREATE TABLE table_24565004_13 (
period VARCHAR,
name VARCHAR
) | SELECT period FROM table_24565004_13 WHERE name = "Michel Llodra" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2266,
4834,
2560,
591,
834,
2368,
41,
1059,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
1059,
21,
2278,
15,
40,
3,
195,
32,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1059,
21680,
953,
834,
2266,
4834,
2560,
591,
834,
2368,
549,
17444,
427,
564,
3274,
96,
30123,
301,
40,
32,
3515,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
When the Home team of essendon is playing what is the Away team score? | CREATE TABLE table_name_67 (
away_team VARCHAR,
home_team VARCHAR
) | SELECT away_team AS score FROM table_name_67 WHERE home_team = "essendon" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3708,
41,
550,
834,
11650,
584,
4280,
28027,
6,
234,
834,
11650,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
366,
8,
1210,
372,
13,
3,
8185,
2029,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
550,
834,
11650,
6157,
2604,
21680,
953,
834,
4350,
834,
3708,
549,
17444,
427,
234,
834,
11650,
3274,
96,
8185,
2029,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which election has second member Charles Robert Colvile, a conservative first party, and first member William Mundy? | CREATE TABLE table_59694 (
"Election" text,
"First member" text,
"First party" text,
"Second member" text,
"Second party" text
) | SELECT "Election" FROM table_59694 WHERE "Second member" = 'charles robert colvile' AND "First party" = 'conservative' AND "First member" = 'william mundy' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3390,
3951,
591,
41,
96,
427,
12252,
121,
1499,
6,
96,
25171,
1144,
121,
1499,
6,
96,
25171,
1088,
121,
1499,
6,
96,
134,
15,
1018,
26,
1144,
121,
1499,
6,
96,
134,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
427,
12252,
121,
21680,
953,
834,
3390,
3951,
591,
549,
17444,
427,
96,
134,
15,
1018,
26,
1144,
121,
3274,
3,
31,
4059,
965,
3,
5840,
49,
17,
7632,
6372,
15,
31,
3430,
96,
25171,
1088,
121,
3274,
3,
31,
101... |
What is the engine(s) on the car before 1978 with ensign n177 chassis? | CREATE TABLE table_67039 (
"Year" real,
"Chassis" text,
"Engine(s)" text,
"Tyres" text,
"Points" text
) | SELECT "Engine(s)" FROM table_67039 WHERE "Chassis" = 'ensign n177' AND "Year" < '1978' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3708,
632,
3288,
41,
96,
476,
2741,
121,
490,
6,
96,
3541,
6500,
7,
121,
1499,
6,
96,
31477,
599,
7,
61,
121,
1499,
6,
96,
382,
63,
60,
7,
121,
1499,
6,
96,
22512,
7,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
31477,
599,
7,
61,
121,
21680,
953,
834,
3708,
632,
3288,
549,
17444,
427,
96,
3541,
6500,
7,
121,
3274,
3,
31,
35,
6732,
3,
29,
26793,
31,
3430,
96,
476,
2741,
121,
3,
2,
3,
31,
2294,
3940,
31,
1,
-100,
... |
What consoles was Shenmue released on? | CREATE TABLE table_577 (
"Franchise or Game" text,
"Console" text,
"Main Developer" text,
"Main Genre" text,
"First Release" real,
"Latest Release" real
) | SELECT "Console" FROM table_577 WHERE "Franchise or Game" = 'Shenmue' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
755,
4013,
41,
96,
371,
2002,
1436,
7,
15,
42,
4435,
121,
1499,
6,
96,
4302,
10294,
121,
1499,
6,
96,
21978,
29,
17179,
121,
1499,
6,
96,
21978,
29,
5945,
60,
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,
4302,
10294,
121,
21680,
953,
834,
755,
4013,
549,
17444,
427,
96,
371,
2002,
1436,
7,
15,
42,
4435,
121,
3274,
3,
31,
10499,
35,
51,
76,
15,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many were the US viewers (in millions) of the episode that was written by Gordon C. Lonsdale? | CREATE TABLE table_26826304_1 (
us_viewers__millions_ VARCHAR,
directed_by VARCHAR
) | SELECT us_viewers__millions_ FROM table_26826304_1 WHERE directed_by = "Gordon C. Lonsdale" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
3651,
2688,
23702,
834,
536,
41,
178,
834,
4576,
277,
834,
834,
17030,
7,
834,
584,
4280,
28027,
6,
6640,
834,
969,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
178,
834,
4576,
277,
834,
834,
17030,
7,
834,
21680,
953,
834,
357,
3651,
2688,
23702,
834,
536,
549,
17444,
427,
6640,
834,
969,
3274,
96,
517,
127,
2029,
205,
5,
301,
106,
7,
5437,
121,
1,
-100,
-100,
-100,
-100... |
What date did NY Rangers play at home? | CREATE TABLE table_name_12 (
date VARCHAR,
home VARCHAR
) | SELECT date FROM table_name_12 WHERE home = "ny rangers" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2122,
41,
833,
584,
4280,
28027,
6,
234,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
833,
410,
5825,
12612,
277,
577,
44,
234,
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,
2122,
549,
17444,
427,
234,
3274,
96,
29,
63,
620,
52,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
On what dates was the final score of the game L 14–24? | CREATE TABLE table_25380472_2 (date VARCHAR, final_score VARCHAR) | SELECT date FROM table_25380472_2 WHERE final_score = "L 14–24" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
22671,
4177,
357,
834,
357,
41,
5522,
584,
4280,
28027,
6,
804,
834,
7,
9022,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
461,
125,
5128,
47,
8,
804,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
833,
21680,
953,
834,
1828,
22671,
4177,
357,
834,
357,
549,
17444,
427,
804,
834,
7,
9022,
3274,
96,
434,
968,
104,
2266,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What are the titles and authors or editors that correspond to books made after 1989? | CREATE TABLE movie (
movie_id number,
title text,
year number,
director text,
budget_million number,
gross_worldwide number
)
CREATE TABLE book_club (
book_club_id number,
year number,
author_or_editor text,
book_title text,
publisher text,
category text,
result text
)
CREATE TABLE culture_company (
company_name text,
type text,
incorporated_in text,
group_equity_shareholding number,
book_club_id text,
movie_id text
) | SELECT book_title, author_or_editor FROM book_club WHERE year > 1989 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1974,
41,
1974,
834,
23,
26,
381,
6,
2233,
1499,
6,
215,
381,
6,
2090,
1499,
6,
1487,
834,
17030,
381,
6,
8690,
834,
7276,
6728,
381,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
484,
834,
21869,
6,
2291,
834,
127,
834,
11272,
127,
21680,
484,
834,
13442,
549,
17444,
427,
215,
2490,
9975,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
which has the same prize money as the french super series ? | CREATE TABLE table_204_634 (
id number,
"tour" number,
"official title" text,
"venue" text,
"city" text,
"date\nstart" text,
"date\nfinish" text,
"prize money\nusd" number,
"report" text
) | SELECT "official title" FROM table_204_634 WHERE "official title" <> 'french super series' AND "prize money\nusd" = (SELECT "prize money\nusd" FROM table_204_634 WHERE "official title" = 'french super series') | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
3891,
591,
41,
3,
23,
26,
381,
6,
96,
17,
1211,
121,
381,
6,
96,
20884,
2233,
121,
1499,
6,
96,
15098,
121,
1499,
6,
96,
6726,
121,
1499,
6,
96,
5522,
2,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
20884,
2233,
121,
21680,
953,
834,
26363,
834,
3891,
591,
549,
17444,
427,
96,
20884,
2233,
121,
3,
2,
3155,
3,
31,
89,
60,
5457,
1355,
939,
31,
3430,
96,
2246,
776,
540,
2,
29,
302,
26,
121,
3274,
41,
23143... |
What are all the customer phone numbers under the most popular policy type? | CREATE TABLE customers (
customer_id number,
customer_name text
)
CREATE TABLE customers_policies (
customer_id number,
policy_id number,
date_opened time,
date_closed time
)
CREATE TABLE settlements (
settlement_id number,
claim_id number,
effective_date time,
settlement_amount number
)
CREATE TABLE available_policies (
policy_id number,
policy_type_code text,
customer_phone text
)
CREATE TABLE first_notification_of_loss (
fnol_id number,
customer_id number,
policy_id number,
service_id number
)
CREATE TABLE claims (
claim_id number,
fnol_id number,
effective_date time
)
CREATE TABLE services (
service_id number,
service_name text
) | SELECT customer_phone FROM available_policies WHERE policy_type_code = (SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY COUNT(*) DESC LIMIT 1) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
722,
41,
884,
834,
23,
26,
381,
6,
884,
834,
4350,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
722,
834,
3003,
6267,
7,
41,
884,
834,
23,
26,
381,
6,
1291,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
884,
834,
6399,
21680,
347,
834,
3003,
6267,
7,
549,
17444,
427,
1291,
834,
6137,
834,
4978,
3274,
41,
23143,
14196,
1291,
834,
6137,
834,
4978,
21680,
347,
834,
3003,
6267,
7,
350,
4630,
6880,
272,
476,
1291,
834,
... |
What kind of Prohibition ticket that has a Office of lieutenant governor? | CREATE TABLE table_name_91 (prohibition_ticket VARCHAR, office VARCHAR) | SELECT prohibition_ticket FROM table_name_91 WHERE office = "lieutenant governor" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4729,
41,
1409,
13506,
1575,
834,
26639,
584,
4280,
28027,
6,
828,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
773,
13,
749,
13506,
1575,
4142,
24,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
30693,
834,
26639,
21680,
953,
834,
4350,
834,
4729,
549,
17444,
427,
828,
3274,
96,
1896,
76,
324,
288,
13062,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Who is the winner when the st kilda score is 13.10.88? | CREATE TABLE table_28211103_1 (
winner VARCHAR,
st_kilda_score VARCHAR
) | SELECT winner FROM table_28211103_1 WHERE st_kilda_score = "13.10.88" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2577,
27278,
17864,
834,
536,
41,
4668,
584,
4280,
28027,
6,
3,
7,
17,
834,
157,
173,
26,
9,
834,
7,
9022,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4668,
21680,
953,
834,
2577,
27278,
17864,
834,
536,
549,
17444,
427,
3,
7,
17,
834,
157,
173,
26,
9,
834,
7,
9022,
3274,
96,
2368,
5,
10415,
4060,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Who directed the episode with the production code 10? | CREATE TABLE table_25679312_2 (directed_by VARCHAR, prod_code VARCHAR) | SELECT directed_by FROM table_25679312_2 WHERE prod_code = 10 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
3708,
4271,
2122,
834,
357,
41,
22955,
834,
969,
584,
4280,
28027,
6,
813,
26,
834,
4978,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
6640,
8,
5640,
28,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6640,
834,
969,
21680,
953,
834,
1828,
3708,
4271,
2122,
834,
357,
549,
17444,
427,
813,
26,
834,
4978,
3274,
335,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the region for Catalog amlh 66078 in stereo lp format? | CREATE TABLE table_14779 (
"Region" text,
"Date" text,
"Label" text,
"Format" text,
"Catalog" text
) | SELECT "Region" FROM table_14779 WHERE "Format" = 'stereo lp' AND "Catalog" = 'amlh 66078' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
24719,
4440,
41,
96,
17748,
23,
106,
121,
1499,
6,
96,
308,
342,
121,
1499,
6,
96,
434,
10333,
121,
1499,
6,
96,
3809,
3357,
121,
1499,
6,
96,
18610,
9,
2152,
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,
17748,
23,
106,
121,
21680,
953,
834,
24719,
4440,
549,
17444,
427,
96,
3809,
3357,
121,
3274,
3,
31,
1370,
15,
32,
3,
40,
102,
31,
3430,
96,
18610,
9,
2152,
121,
3274,
3,
31,
265,
40,
107,
3,
27720,
3940,
... |
What is the number of floors for the Citic Square? | CREATE TABLE table_37950 (
"Rank" text,
"Name" text,
"Height m / ft" text,
"Floors" real,
"Year" real
) | SELECT AVG("Floors") FROM table_37950 WHERE "Name" = 'citic square' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4118,
25188,
41,
96,
22557,
121,
1499,
6,
96,
23954,
121,
1499,
6,
96,
3845,
2632,
3,
51,
3,
87,
3,
89,
17,
121,
1499,
6,
96,
11251,
127,
7,
121,
490,
6,
96,
476,
274... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11251,
127,
7,
8512,
21680,
953,
834,
4118,
25188,
549,
17444,
427,
96,
23954,
121,
3274,
3,
31,
75,
23,
1225,
2812,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
When was the location 15km NW of Pol-E Khomri, the circumstaances IED and the casualties of 1 WIA? | CREATE TABLE table_name_66 (date VARCHAR, location VARCHAR, casualties VARCHAR, circumstances VARCHAR) | SELECT date FROM table_name_66 WHERE casualties = "1 wia" AND circumstances = "ied" AND location = "15km nw of pol-e khomri" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3539,
41,
5522,
584,
4280,
28027,
6,
1128,
584,
4280,
28027,
6,
6995,
3010,
584,
4280,
28027,
6,
4616,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
366,
47... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
833,
21680,
953,
834,
4350,
834,
3539,
549,
17444,
427,
6995,
3010,
3274,
96,
536,
11064,
9,
121,
3430,
4616,
3274,
96,
5973,
121,
3430,
1128,
3274,
96,
1808,
5848,
3,
29,
210,
13,
3,
3233,
18,
15,
3,
157,
10207,
... |
What shows for 2013 when the 2008 is 1r? | CREATE TABLE table_49788 (
"Tournament" text,
"2008" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text
) | SELECT "2013" FROM table_49788 WHERE "2008" = '1r' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
4327,
4060,
41,
96,
382,
1211,
20205,
17,
121,
1499,
6,
96,
16128,
121,
1499,
6,
96,
14926,
121,
1499,
6,
96,
13907,
121,
1499,
6,
96,
12172,
121,
1499,
6,
96,
11138... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11138,
121,
21680,
953,
834,
591,
4327,
4060,
549,
17444,
427,
96,
16128,
121,
3274,
3,
31,
536,
52,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
what is the biggest series episode number whose production code is 2t7211? | CREATE TABLE table_21979779_1 (
no INTEGER,
production_code VARCHAR
) | SELECT MAX(no) FROM table_21979779_1 WHERE production_code = "2T7211" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2658,
4327,
4327,
4440,
834,
536,
41,
150,
3,
21342,
17966,
6,
999,
834,
4978,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
125,
19,
8,
2630,
939,
5640,
381,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
29,
32,
61,
21680,
953,
834,
2658,
4327,
4327,
4440,
834,
536,
549,
17444,
427,
999,
834,
4978,
3274,
96,
357,
382,
5865,
2596,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the Rank of Qi Hui? | CREATE TABLE table_66428 (
"Rank" real,
"Lane" real,
"Name" text,
"Nationality" text,
"Time" text
) | SELECT COUNT("Rank") FROM table_66428 WHERE "Name" = 'qi hui' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3539,
591,
2577,
41,
96,
22557,
121,
490,
6,
96,
434,
152,
15,
121,
490,
6,
96,
23954,
121,
1499,
6,
96,
24732,
485,
121,
1499,
6,
96,
13368,
121,
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,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
121,
22557,
8512,
21680,
953,
834,
3539,
591,
2577,
549,
17444,
427,
96,
23954,
121,
3274,
3,
31,
1824,
23,
3,
3464,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
List the name of technicians whose team is not 'NYY', and count them by a bar chart, I want to order from low to high by the y-axis please. | CREATE TABLE repair_assignment (
technician_id int,
repair_ID int,
Machine_ID int
)
CREATE TABLE repair (
repair_ID int,
name text,
Launch_Date text,
Notes text
)
CREATE TABLE technician (
technician_id real,
Name text,
Team text,
Starting_Year real,
Age int
)
CREATE TABLE machine (
Machine_ID int,
Making_Year int,
Class text,
Team text,
Machine_series text,
value_points real,
quality_rank int
) | SELECT Name, COUNT(Name) FROM technician WHERE Team <> "NYY" GROUP BY Name ORDER BY COUNT(Name) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2096,
834,
9,
7,
6732,
297,
41,
17730,
834,
23,
26,
16,
17,
6,
2096,
834,
4309,
16,
17,
6,
5879,
834,
4309,
16,
17,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
5570,
6,
2847,
17161,
599,
23954,
61,
21680,
17730,
549,
17444,
427,
2271,
3,
2,
3155,
96,
12056,
476,
121,
350,
4630,
6880,
272,
476,
5570,
4674,
11300,
272,
476,
2847,
17161,
599,
23954,
61,
1,
-100,
-100,
-100,
-... |
What is the 3-dart average with a high checkout of 112? | CREATE TABLE table_20948329_1 (
high_checkout VARCHAR
) | SELECT 3 AS _dart_average FROM table_20948329_1 WHERE high_checkout = 112 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1755,
4240,
4591,
3166,
834,
536,
41,
306,
834,
10031,
670,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
5354,
26,
1408,
1348,
28,
3,
9,
306,
15912,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
220,
6157,
3,
834,
26,
1408,
834,
28951,
21680,
953,
834,
1755,
4240,
4591,
3166,
834,
536,
549,
17444,
427,
306,
834,
10031,
670,
3274,
850,
357,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which Goals have a Current Club of real madrid, and a Ratio smaller than 1.08, and a Rank smaller than 5? | CREATE TABLE table_59992 (
"Rank" real,
"Name" text,
"Years" text,
"Current Club" text,
"Goals" real,
"Apps" real,
"Ratio" real
) | SELECT MAX("Goals") FROM table_59992 WHERE "Current Club" = 'real madrid' AND "Ratio" < '1.08' AND "Rank" < '5' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3390,
3264,
357,
41,
96,
22557,
121,
490,
6,
96,
23954,
121,
1499,
6,
96,
476,
2741,
7,
121,
1499,
6,
96,
254,
450,
5320,
1949,
121,
1499,
6,
96,
6221,
5405,
121,
490,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
121,
6221,
5405,
8512,
21680,
953,
834,
3390,
3264,
357,
549,
17444,
427,
96,
254,
450,
5320,
1949,
121,
3274,
3,
31,
6644,
11454,
4055,
31,
3430,
96,
448,
144,
23,
32,
121,
3,
2,
3,
31,
12734,
927... |
What was the record when they played game 58? | CREATE TABLE table_name_59 (record VARCHAR, game VARCHAR) | SELECT record FROM table_name_59 WHERE game = 58 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3390,
41,
60,
7621,
584,
4280,
28027,
6,
467,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
1368,
116,
79,
1944,
467,
3,
3449,
58,
1,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1368,
21680,
953,
834,
4350,
834,
3390,
549,
17444,
427,
467,
3274,
3,
3449,
1,
-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 Deliblato village known as in Cyrillic? | CREATE TABLE table_2562572_41 (cyrillic_name_other_names VARCHAR, settlement VARCHAR) | SELECT cyrillic_name_other_names FROM table_2562572_41 WHERE settlement = "Deliblato" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
19337,
1828,
5865,
834,
4853,
41,
75,
63,
52,
173,
2176,
834,
4350,
834,
9269,
834,
4350,
7,
584,
4280,
28027,
6,
7025,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
75,
63,
52,
173,
2176,
834,
4350,
834,
9269,
834,
4350,
7,
21680,
953,
834,
19337,
1828,
5865,
834,
4853,
549,
17444,
427,
7025,
3274,
96,
2962,
6856,
521,
235,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is Name, when Goals is "80", and when Club Source [I ] is "71 [ dead link ]"? | CREATE TABLE table_name_60 (name VARCHAR, goals VARCHAR, club_source_ VARCHAR, i_ VARCHAR) | SELECT name FROM table_name_60 WHERE goals = 80 AND club_source_[i_] = "71 [ dead link ]" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3328,
41,
4350,
584,
4280,
28027,
6,
1766,
584,
4280,
28027,
6,
1886,
834,
7928,
834,
584,
4280,
28027,
6,
3,
23,
834,
584,
4280,
28027,
61,
3,
32102,
32103,
321... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
564,
21680,
953,
834,
4350,
834,
3328,
549,
17444,
427,
1766,
3274,
2775,
3430,
1886,
834,
7928,
834,
6306,
23,
834,
908,
3274,
96,
4450,
784,
3654,
1309,
3,
908,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Which last names are both used by customers and by staff? | CREATE TABLE Customers (last_name VARCHAR); CREATE TABLE Staff (last_name VARCHAR) | SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
16423,
41,
5064,
834,
4350,
584,
4280,
28027,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
10071,
41,
5064,
834,
4350,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
40... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
336,
834,
4350,
21680,
16423,
3,
21342,
5249,
14196,
3,
23143,
14196,
336,
834,
4350,
21680,
10071,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the amount of money that a +5 to par with a score of 76-69-70-70=285? | CREATE TABLE table_name_28 (money___ VARCHAR, to_par VARCHAR, score VARCHAR) | SELECT COUNT(money___) AS $__ FROM table_name_28 WHERE to_par = "+5" AND score = 76 - 69 - 70 - 70 = 285 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2577,
41,
28442,
834,
834,
834,
584,
4280,
28027,
6,
12,
834,
1893,
584,
4280,
28027,
6,
2604,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
28442,
834,
834,
834,
61,
6157,
1514,
834,
834,
21680,
953,
834,
4350,
834,
2577,
549,
17444,
427,
12,
834,
1893,
3274,
96,
1220,
17395,
3430,
2604,
3274,
3,
3959,
3,
18,
3,
3951,
3,
18,
2861,
3,... |
count the number of elective hospital admissions who had clinic referral/premature as their admission location. | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "ELECTIVE" AND demographic.admission_location = "CLINIC REFERRAL/PREMATURE" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
9,
26,
5451,
834,
6137,
3274,
96,
3577,
14196,
8087,
121,
3430,
14798,
5,
9,
26,
5451,
834,
1483... |
Which stage has a mountains classification of Mariano Piccoli and was won by Giuseppe Citterio? | CREATE TABLE table_name_5 (stage VARCHAR, mountains_classification VARCHAR, winner VARCHAR) | SELECT stage FROM table_name_5 WHERE mountains_classification = "mariano piccoli" AND winner = "giuseppe citterio" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
755,
41,
10705,
584,
4280,
28027,
6,
8022,
834,
4057,
2420,
584,
4280,
28027,
6,
4668,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
1726,
65,
3,
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,
0,
0,
0,
0... | [
3,
23143,
14196,
1726,
21680,
953,
834,
4350,
834,
755,
549,
17444,
427,
8022,
834,
4057,
2420,
3274,
96,
1635,
20028,
6686,
9044,
121,
3430,
4668,
3274,
96,
24930,
7,
15,
6811,
6895,
10140,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,... |
Which December has Points of 38, and a Record of 18–6–2? | CREATE TABLE table_name_49 (december INTEGER, points VARCHAR, record VARCHAR) | SELECT AVG(december) FROM table_name_49 WHERE points = 38 AND record = "18–6–2" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3647,
41,
221,
75,
18247,
3,
21342,
17966,
6,
979,
584,
4280,
28027,
6,
1368,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
1882,
65,
4564,
7,
13,
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
71,
17217,
599,
221,
75,
18247,
61,
21680,
953,
834,
4350,
834,
3647,
549,
17444,
427,
979,
3274,
6654,
3430,
1368,
3274,
96,
2606,
104,
948,
104,
357,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the total attendance before week 1? | CREATE TABLE table_name_16 (
attendance INTEGER,
week INTEGER
) | SELECT SUM(attendance) FROM table_name_16 WHERE week < 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2938,
41,
11364,
3,
21342,
17966,
6,
471,
3,
21342,
17966,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
792,
11364,
274,
471,
209,
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,
180,
6122,
599,
15116,
663,
61,
21680,
953,
834,
4350,
834,
2938,
549,
17444,
427,
471,
3,
2,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the least wins for a team with against less than 814? | CREATE TABLE table_name_42 (wins INTEGER, against INTEGER) | SELECT MIN(wins) FROM table_name_42 WHERE against < 814 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4165,
41,
3757,
7,
3,
21342,
17966,
6,
581,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
709,
9204,
21,
3,
9,
372,
28,
581,
705,
145,
505,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
3757,
7,
61,
21680,
953,
834,
4350,
834,
4165,
549,
17444,
427,
581,
3,
2,
505,
2534,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
what opponent is listed in the top of the table ? | CREATE TABLE table_204_774 (
id number,
"#" number,
"date" text,
"venue" text,
"opponent" text,
"score" text,
"result" text,
"competition" text
) | SELECT "opponent" FROM table_204_774 WHERE id = 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
4013,
591,
41,
3,
23,
26,
381,
6,
96,
4663,
121,
381,
6,
96,
5522,
121,
1499,
6,
96,
15098,
121,
1499,
6,
96,
32,
102,
9977,
121,
1499,
6,
96,
7,
9022,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
32,
102,
9977,
121,
21680,
953,
834,
26363,
834,
4013,
591,
549,
17444,
427,
3,
23,
26,
3274,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
provide the number of patients whose admission year is less than 2123 and lab test name is nonsquamous epithelial cell? | 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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2123" AND lab.label = "NonSquamous Epithelial Cell" | [
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 rank is He Yingqin who was born before 1890? | CREATE TABLE table_name_75 (rank INTEGER, name VARCHAR, birth VARCHAR) | SELECT AVG(rank) FROM table_name_75 WHERE name = "he yingqin" AND birth < 1890 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3072,
41,
6254,
3,
21342,
17966,
6,
564,
584,
4280,
28027,
6,
3879,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
11003,
19,
216,
3,
476,
53,
1824,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
71,
17217,
599,
6254,
61,
21680,
953,
834,
4350,
834,
3072,
549,
17444,
427,
564,
3274,
96,
88,
3,
8149,
1824,
77,
121,
3430,
3879,
3,
2,
507,
2394,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
when did patient 006-127563 last get the respiratory rate test in the laboratory? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE 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 cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
) | SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-127563')) AND lab.labname = 'respiratory rate' ORDER BY lab.labresulttime DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2179,
9339,
41,
2179,
521,
9824,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
1543,
3585,
1499,
6,
9329,
1499,
6,
1543,
4914,
29,
715,
97,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
7690,
5,
9339,
60,
7,
83,
17,
715,
21680,
7690,
549,
17444,
427,
7690,
5,
10061,
15129,
21545,
23,
26,
3388,
41,
23143,
14196,
1868,
5,
10061,
15129,
21545,
23,
26,
21680,
1868,
549,
17444,
427,
1868,
5,
10061,
1587... |
What is the lowest Natural Change, when Natural Change (Per 1000) is 19.1, and when Crude Birth Rate (Per 1000) is less than 28.3? | CREATE TABLE table_40967 (
"Average population (x 1000)" real,
"Live births" real,
"Deaths" real,
"Natural change" real,
"Crude birth rate (per 1000)" real,
"Crude death rate (per 1000)" real,
"Natural change (per 1000)" real
) | SELECT MIN("Natural change") FROM table_40967 WHERE "Natural change (per 1000)" = '19.1' AND "Crude birth rate (per 1000)" < '28.3' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
4198,
3708,
41,
96,
188,
624,
545,
2074,
41,
226,
5580,
61,
121,
490,
6,
96,
24179,
3879,
7,
121,
490,
6,
96,
2962,
9,
189,
7,
121,
490,
6,
96,
567,
13149,
40,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
121,
567,
13149,
40,
483,
8512,
21680,
953,
834,
591,
4198,
3708,
549,
17444,
427,
96,
567,
13149,
40,
483,
41,
883,
5580,
61,
121,
3274,
3,
31,
2294,
5,
536,
31,
3430,
96,
254,
17237,
15,
3879,
1... |
How many Games has a Team of cai zaragoza and a Rank smaller than 1? | CREATE TABLE table_name_24 (
games INTEGER,
team VARCHAR,
rank VARCHAR
) | SELECT SUM(games) FROM table_name_24 WHERE team = "cai zaragoza" AND rank < 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2266,
41,
1031,
3,
21342,
17966,
6,
372,
584,
4280,
28027,
6,
11003,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
5880,
65,
3,
9,
2271,
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,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
180,
6122,
599,
7261,
7,
61,
21680,
953,
834,
4350,
834,
2266,
549,
17444,
427,
372,
3274,
96,
658,
23,
3,
1629,
6151,
13277,
121,
3430,
11003,
3,
2,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.