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 average number of losses for teams with 0 draws and 0 byes? | CREATE TABLE table_name_78 (losses INTEGER, draws VARCHAR, byes VARCHAR) | SELECT AVG(losses) FROM table_name_78 WHERE draws = 0 AND byes < 0 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3940,
41,
2298,
2260,
3,
21342,
17966,
6,
14924,
584,
4280,
28027,
6,
57,
15,
7,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1348,
381,
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,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
71,
17217,
599,
2298,
2260,
61,
21680,
953,
834,
4350,
834,
3940,
549,
17444,
427,
14924,
3274,
3,
632,
3430,
57,
15,
7,
3,
2,
3,
632,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What position did Rich Manning play? | CREATE TABLE table_44001 (
"Player" text,
"Nationality" text,
"Position" text,
"Years for Grizzlies" text,
"School/Club Team" text
) | SELECT "Position" FROM table_44001 WHERE "Player" = 'rich manning' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3628,
17465,
41,
96,
15800,
49,
121,
1499,
6,
96,
24732,
485,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
476,
2741,
7,
21,
3,
13313,
5271,
4664,
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,
345,
32,
7,
4749,
121,
21680,
953,
834,
3628,
17465,
549,
17444,
427,
96,
15800,
49,
121,
3274,
3,
31,
3723,
3,
2434,
53,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Which Seattle quarterback has more than 81 career wins and less than 70 team wins? | CREATE TABLE table_38682 (
"Rank" real,
"Quarterback" text,
"Seasons" text,
"Teams" text,
"Team Wins" real,
"Team Losses" real,
"Career Wins" real,
"Career Losses" real,
"Ties" real
) | SELECT "Quarterback" FROM table_38682 WHERE "Career Wins" > '81' AND "Teams" = 'seattle' AND "Team Wins" < '70' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3747,
3651,
357,
41,
96,
22557,
121,
490,
6,
96,
5991,
1408,
49,
1549,
121,
1499,
6,
96,
134,
15,
9,
6577,
121,
1499,
6,
96,
18699,
7,
121,
1499,
6,
96,
18699,
4871,
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,
5991,
1408,
49,
1549,
121,
21680,
953,
834,
3747,
3651,
357,
549,
17444,
427,
96,
6936,
15,
49,
4871,
7,
121,
2490,
3,
31,
4959,
31,
3430,
96,
18699,
7,
121,
3274,
3,
31,
7,
15,
9,
8692,
31,
3430,
96,
1869... |
What is the year of the disc with a catalogue number mash02? | CREATE TABLE table_10360 (
"Catalogue Number" text,
"Artist" text,
"Tracks" text,
"Type" text,
"Year" real
) | SELECT "Year" FROM table_10360 WHERE "Catalogue Number" = 'mash02' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1714,
19208,
41,
96,
18610,
9,
10384,
7720,
121,
1499,
6,
96,
7754,
343,
121,
1499,
6,
96,
382,
16729,
7,
121,
1499,
6,
96,
25160,
121,
1499,
6,
96,
476,
2741,
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,
96,
476,
2741,
121,
21680,
953,
834,
1714,
19208,
549,
17444,
427,
96,
18610,
9,
10384,
7720,
121,
3274,
3,
31,
51,
3198,
4305,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
On what date was the record 39–54? | CREATE TABLE table_name_69 (date VARCHAR, record VARCHAR) | SELECT date FROM table_name_69 WHERE record = "39–54" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3951,
41,
5522,
584,
4280,
28027,
6,
1368,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
461,
125,
833,
47,
8,
1368,
6352,
104,
5062,
58,
1,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
833,
21680,
953,
834,
4350,
834,
3951,
549,
17444,
427,
1368,
3274,
96,
3288,
104,
5062,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the league goals when the league cup goals is less than 0 and 16 (1) league apps? | CREATE TABLE table_name_95 (league_goals INTEGER, league_apps VARCHAR, league_cup_goals VARCHAR) | SELECT AVG(league_goals) FROM table_name_95 WHERE league_apps = "16 (1)" AND league_cup_goals < 0 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3301,
41,
29512,
834,
839,
5405,
3,
21342,
17966,
6,
5533,
834,
3096,
7,
584,
4280,
28027,
6,
5533,
834,
4658,
834,
839,
5405,
584,
4280,
28027,
61,
3,
32102,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
29512,
834,
839,
5405,
61,
21680,
953,
834,
4350,
834,
3301,
549,
17444,
427,
5533,
834,
3096,
7,
3274,
96,
2938,
5637,
121,
3430,
5533,
834,
4658,
834,
839,
5405,
3,
2,
3,
632,
1,
-100,
-100,
-100... |
What was the fewest number of viewers for the episode production number of 109 5-22? | CREATE TABLE table_40566 (
"Episode number Production number" text,
"Title" text,
"Original airing" text,
"Rating" real,
"Share" real,
"18-49" real,
"Total viewers (in millions)" real,
"Rank per week" text
) | SELECT MIN("Total viewers (in millions)") FROM table_40566 WHERE "Episode number Production number" = '109 5-22' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
3076,
3539,
41,
96,
427,
102,
159,
32,
221,
381,
11114,
381,
121,
1499,
6,
96,
382,
155,
109,
121,
1499,
6,
96,
667,
3380,
10270,
799,
53,
121,
1499,
6,
96,
448,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
121,
3696,
1947,
13569,
41,
77,
4040,
61,
8512,
21680,
953,
834,
591,
3076,
3539,
549,
17444,
427,
96,
427,
102,
159,
32,
221,
381,
11114,
381,
121,
3274,
3,
31,
17304,
305,
16149,
31,
1,
-100,
-100... |
Which After 1 year has an After 3 years of 80%? | CREATE TABLE table_name_40 (after_1_year VARCHAR, after_3_years VARCHAR) | SELECT after_1_year FROM table_name_40 WHERE after_3_years = "80%" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2445,
41,
10245,
834,
536,
834,
1201,
584,
4280,
28027,
6,
227,
834,
519,
834,
1201,
7,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
621,
209,
215,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
227,
834,
536,
834,
1201,
21680,
953,
834,
4350,
834,
2445,
549,
17444,
427,
227,
834,
519,
834,
1201,
7,
3274,
96,
10370,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which Description has a Year of Issue of 1983, and a Weight of 3.50grams? | CREATE TABLE table_34807 (
"Year of Issue" real,
"Description" text,
"Weight" text,
"Diameter" text,
"Thickness" text,
"Edge" text
) | SELECT "Description" FROM table_34807 WHERE "Year of Issue" = '1983' AND "Weight" = '3.50grams' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3710,
2079,
940,
41,
96,
476,
2741,
13,
13235,
121,
490,
6,
96,
2962,
11830,
121,
1499,
6,
96,
1326,
2632,
121,
1499,
6,
96,
23770,
4401,
121,
1499,
6,
96,
8991,
3142,
65... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2962,
11830,
121,
21680,
953,
834,
3710,
2079,
940,
549,
17444,
427,
96,
476,
2741,
13,
13235,
121,
3274,
3,
31,
2294,
4591,
31,
3430,
96,
1326,
2632,
121,
3274,
3,
31,
9285,
632,
5096,
7,
31,
1,
-100,
-100,
... |
how many patients whose gender is f and lab test name is o2 flow? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE 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
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.gender = "F" AND lab.label = "O2 Flow" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7690,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7690,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
Return a histogram on how many entrepreneurs correspond to each investor? | CREATE TABLE people (
People_ID int,
Name text,
Height real,
Weight real,
Date_of_Birth text
)
CREATE TABLE entrepreneur (
Entrepreneur_ID int,
People_ID int,
Company text,
Money_Requested real,
Investor text
) | SELECT Investor, COUNT(*) FROM entrepreneur GROUP BY Investor | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
151,
41,
2449,
834,
4309,
16,
17,
6,
5570,
1499,
6,
24231,
490,
6,
14230,
490,
6,
7678,
834,
858,
834,
279,
23,
52,
189,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
16873,
6,
2847,
17161,
599,
1935,
61,
21680,
3,
12290,
350,
4630,
6880,
272,
476,
16873,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Visualize a bar chart about the distribution of All_Neutral and ACC_Percent , and sort by the x-axis in asc. | CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
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
) | SELECT All_Neutral, ACC_Percent FROM basketball_match ORDER BY All_Neutral | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3819,
41,
1121,
834,
4309,
16,
17,
6,
1121,
1499,
6,
10450,
1499,
6,
3,
20100,
490,
6,
71,
89,
8027,
23,
257,
1499,
6,
695,
4046,
297,
490,
6,
7486,
4350,
1499,
6,
14542,
834,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
432,
834,
26288,
8792,
6,
3,
14775,
834,
12988,
3728,
21680,
8498,
834,
19515,
4674,
11300,
272,
476,
432,
834,
26288,
8792,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the highest number of points before 1954? | CREATE TABLE table_name_5 (points INTEGER, year INTEGER) | SELECT MAX(points) FROM table_name_5 WHERE year < 1954 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
755,
41,
2700,
7,
3,
21342,
17966,
6,
215,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2030,
381,
13,
979,
274,
24970,
58,
1,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
2700,
7,
61,
21680,
953,
834,
4350,
834,
755,
549,
17444,
427,
215,
3,
2,
24970,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Name the best actor for uncle boonmee who can recall his past lives | CREATE TABLE table_72658 (
"Year" text,
"Best Film" text,
"Best Director" text,
"Best Actor" text,
"Best Actress" text,
"Best Supporting Actor" text,
"Best Supporting Actress" text
) | SELECT "Best Actor" FROM table_72658 WHERE "Best Film" = 'Uncle Boonmee Who Can Recall His Past Lives' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
940,
2688,
3449,
41,
96,
476,
2741,
121,
1499,
6,
96,
17278,
3417,
121,
1499,
6,
96,
17278,
2578,
121,
1499,
6,
96,
17278,
1983,
127,
121,
1499,
6,
96,
17278,
1983,
9377,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
17278,
1983,
127,
121,
21680,
953,
834,
940,
2688,
3449,
549,
17444,
427,
96,
17278,
3417,
121,
3274,
3,
31,
5110,
2482,
1491,
106,
526,
15,
2645,
1072,
419,
16482,
978,
10180,
3306,
7,
31,
1,
-100,
-100,
-100,
... |
How many Drawn have an Against smaller than 5, and a Played smaller than 3? | CREATE TABLE table_name_38 (
drawn VARCHAR,
against VARCHAR,
played VARCHAR
) | SELECT COUNT(drawn) FROM table_name_38 WHERE against < 5 AND played < 3 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3747,
41,
6796,
584,
4280,
28027,
6,
581,
584,
4280,
28027,
6,
1944,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
19183,
29,
43,
46,
3,
2074... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
19489,
29,
61,
21680,
953,
834,
4350,
834,
3747,
549,
17444,
427,
581,
3,
2,
305,
3430,
1944,
3,
2,
220,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Find the major and age of students who do not have a cat pet. | CREATE TABLE student (stuid VARCHAR); CREATE TABLE has_pet (stuid VARCHAR, petid VARCHAR); CREATE TABLE pets (petid VARCHAR, pettype VARCHAR); CREATE TABLE student (major VARCHAR, age VARCHAR, stuid VARCHAR) | SELECT major, age FROM student WHERE NOT stuid IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat') | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1236,
41,
7,
17,
76,
23,
26,
584,
4280,
28027,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
65,
834,
4995,
41,
7,
17,
76,
23,
26,
584,
4280,
28027,
6,
3947,
23,
26,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
779,
6,
1246,
21680,
1236,
549,
17444,
427,
4486,
21341,
23,
26,
3388,
41,
23143,
14196,
332,
5411,
7,
17,
76,
23,
26,
21680,
1236,
6157,
332,
536,
3,
15355,
3162,
65,
834,
4995,
6157,
332,
357,
9191,
332,
5411,
7... |
What is the position of the player who went to college of notre dame? | CREATE TABLE table_53383 (
"Player" text,
"Position" text,
"School" text,
"Hometown" text,
"College" text
) | SELECT "Position" FROM table_53383 WHERE "College" = 'notre dame' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4867,
3747,
519,
41,
96,
15800,
49,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
29364,
121,
1499,
6,
96,
19040,
3540,
121,
1499,
6,
96,
9939,
7883,
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,
345,
32,
7,
4749,
121,
21680,
953,
834,
4867,
3747,
519,
549,
17444,
427,
96,
9939,
7883,
121,
3274,
3,
31,
2264,
60,
10157,
15,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
In which of North Melbourne's away games was there the lowest crowd? | CREATE TABLE table_54314 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT MIN("Crowd") FROM table_54314 WHERE "Away team" = 'north melbourne' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
5062,
519,
2534,
41,
96,
19040,
372,
121,
1499,
6,
96,
19040,
372,
2604,
121,
1499,
6,
96,
188,
1343,
372,
121,
1499,
6,
96,
188,
1343,
372,
2604,
121,
1499,
6,
96,
553,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
121,
254,
3623,
26,
8512,
21680,
953,
834,
5062,
519,
2534,
549,
17444,
427,
96,
188,
1343,
372,
121,
3274,
3,
31,
29,
127,
189,
3,
2341,
26255,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the Week # when the Beatles were the original artist and the theme was The Beatles? | CREATE TABLE table_name_18 (week__number VARCHAR, original_artist VARCHAR, theme VARCHAR) | SELECT week__number FROM table_name_18 WHERE original_artist = "the beatles" AND theme = "the beatles" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2606,
41,
8041,
834,
834,
5525,
1152,
584,
4280,
28027,
6,
926,
834,
1408,
343,
584,
4280,
28027,
6,
3800,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
3,
23143,
14196,
471,
834,
834,
5525,
1152,
21680,
953,
834,
4350,
834,
2606,
549,
17444,
427,
926,
834,
1408,
343,
3274,
96,
532,
3853,
965,
121,
3430,
3800,
3274,
96,
532,
3853,
965,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What are the ids and names of the medicine that can interact with two or more enzymes? | CREATE TABLE medicine_enzyme_interaction (
medicine_id VARCHAR
)
CREATE TABLE medicine (
id VARCHAR,
Name VARCHAR
) | SELECT T1.id, T1.Name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id GROUP BY T1.id HAVING COUNT(*) >= 2 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4404,
834,
35,
4164,
526,
834,
3870,
4787,
41,
4404,
834,
23,
26,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
4404,
41,
3,
23,
26,
584,
4280,
28027,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
23,
26,
6,
332,
5411,
23954,
21680,
4404,
6157,
332,
536,
3,
15355,
3162,
4404,
834,
35,
4164,
526,
834,
3870,
4787,
6157,
332,
357,
9191,
332,
4416,
29368,
834,
23,
26,
3274,
332,
5411,
23,
26,
350,
46... |
I want the displacement for version of db | CREATE TABLE table_name_28 (
displacement VARCHAR,
version VARCHAR
) | SELECT displacement FROM table_name_28 WHERE version = "db" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2577,
41,
27780,
584,
4280,
28027,
6,
988,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
27,
241,
8,
27780,
21,
988,
13,
3,
26,
115,
1,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
27780,
21680,
953,
834,
4350,
834,
2577,
549,
17444,
427,
988,
3274,
96,
26,
115,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
what is the number of patients whose primary disease is morbid obesity/sda and year of death is less than or equal to 2174? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "MORBID OBESITY/SDA" AND demographic.dod_year <= "2174.0" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
14798,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
564,
1499,
6,
2774,
1947,
834,
8547,
302,
1499,
6,
1246,
1499,
6,
103,
115,
1499,
6,
7285,
1499,
6,
1612,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
25930,
4844,
159,
3274,
96,
5365,
12108,
4309,
3,
10539,
3205,
15296,
87,
134,
4296,
121,
3430,
14... |
What was the result of the game in week 4? | CREATE TABLE table_name_32 (
result VARCHAR,
week VARCHAR
) | SELECT result FROM table_name_32 WHERE week = 4 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2668,
41,
741,
584,
4280,
28027,
6,
471,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
741,
13,
8,
467,
16,
471,
314,
58,
1,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
741,
21680,
953,
834,
4350,
834,
2668,
549,
17444,
427,
471,
3274,
314,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
For those records from the products and each product's manufacturer, draw a bar chart about the distribution of name and revenue , and group by attribute name, rank from low to high by the y-axis. | CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) | SELECT T1.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name ORDER BY T2.Revenue | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7554,
41,
3636,
3,
21342,
17966,
6,
5570,
584,
4280,
28027,
599,
25502,
201,
5312,
3396,
254,
26330,
434,
6,
15248,
3,
21342,
17966,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
332,
5411,
23954,
6,
332,
4416,
1649,
15098,
21680,
7554,
6157,
332,
536,
3,
15355,
3162,
15248,
7,
6157,
332,
357,
9191,
332,
5411,
7296,
76,
8717,
450,
49,
3274,
332,
4416,
22737,
350,
4630,
6880,
272,
476,
332,
5... |
What is the lost when the try bonus is 5, and points against is 298? | CREATE TABLE table_name_40 (lost VARCHAR, try_bonus VARCHAR, points_against VARCHAR) | SELECT lost FROM table_name_40 WHERE try_bonus = "5" AND points_against = "298" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2445,
41,
2298,
17,
584,
4280,
28027,
6,
653,
834,
5407,
302,
584,
4280,
28027,
6,
979,
834,
9,
16720,
7,
17,
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,
1,
1,
0,
0,
0... | [
3,
23143,
14196,
1513,
21680,
953,
834,
4350,
834,
2445,
549,
17444,
427,
653,
834,
5407,
302,
3274,
96,
17395,
3430,
979,
834,
9,
16720,
7,
17,
3274,
96,
357,
3916,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
what is the total number of children born after 1675 ? | CREATE TABLE table_204_626 (
id number,
"image" number,
"name" text,
"birth date" text,
"death date" text,
"brief biography" text
) | SELECT COUNT("name") FROM table_204_626 WHERE "death date" > 1675 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
948,
2688,
41,
3,
23,
26,
381,
6,
96,
8221,
121,
381,
6,
96,
4350,
121,
1499,
6,
96,
20663,
833,
121,
1499,
6,
96,
221,
9,
189,
833,
121,
1499,
6,
96,
255... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
4350,
8512,
21680,
953,
834,
26363,
834,
948,
2688,
549,
17444,
427,
96,
221,
9,
189,
833,
121,
2490,
898,
3072,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What Canadian Championship has Ashtone Morgan Category:Articles with hcards as the name? | CREATE TABLE table_42018 (
"Name" text,
"Total" text,
"League" text,
"Canadian Championship" text,
"CONCACAF Champions League" text
) | SELECT "Canadian Championship" FROM table_42018 WHERE "Name" = 'ashtone morgan category:articles with hcards' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
9457,
41,
96,
23954,
121,
1499,
6,
96,
3696,
1947,
121,
1499,
6,
96,
2796,
9,
5398,
121,
1499,
6,
96,
14050,
9,
8603,
7666,
121,
1499,
6,
96,
17752,
254,
22029,
371,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14050,
9,
8603,
7666,
121,
21680,
953,
834,
591,
9457,
549,
17444,
427,
96,
23954,
121,
3274,
3,
31,
3198,
6948,
3,
51,
11127,
3295,
10,
8372,
7,
28,
3,
107,
6043,
7,
31,
1,
-100,
-100,
-100,
-100,
-100,
-10... |
Lowest larger than 288, and a Team of east stirlingshire has what lowest average? | CREATE TABLE table_34735 (
"Team" text,
"Stadium" text,
"Capacity" real,
"Highest" real,
"Lowest" real,
"Average" real
) | SELECT MIN("Average") FROM table_34735 WHERE "Lowest" > '288' AND "Team" = 'east stirlingshire' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
519,
4177,
2469,
41,
96,
18699,
121,
1499,
6,
96,
134,
17,
9,
12925,
121,
1499,
6,
96,
19566,
9,
6726,
121,
490,
6,
96,
21417,
222,
121,
490,
6,
96,
434,
32,
12425,
121... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
121,
188,
624,
545,
8512,
21680,
953,
834,
519,
4177,
2469,
549,
17444,
427,
96,
434,
32,
12425,
121,
2490,
3,
31,
357,
4060,
31,
3430,
96,
18699,
121,
3274,
3,
31,
11535,
7831,
697,
5718,
31,
1,
... |
For those employees who did not have any job in the past, give me the comparison about the sum of department_id over the job_id , and group by attribute job_id, and show by the X-axis in ascending. | CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
) | SELECT JOB_ID, SUM(DEPARTMENT_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY JOB_ID | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
613,
834,
10193,
10972,
41,
262,
5244,
5017,
476,
5080,
834,
4309,
7908,
1982,
599,
11071,
632,
201,
5097,
8241,
834,
308,
6048,
833,
6,
3,
14920,
834,
308,
6048,
833,
6,
446,
10539,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
446,
10539,
834,
4309,
6,
180,
6122,
599,
5596,
19846,
11810,
834,
4309,
61,
21680,
1652,
549,
17444,
427,
4486,
262,
5244,
5017,
476,
5080,
834,
4309,
3388,
41,
23143,
14196,
262,
5244,
5017,
476,
5080,
834,
4309,
21... |
What are the statuses and average populations of each city. Plot them as bar chart. | CREATE TABLE competition_record (
Competition_ID int,
Farm_ID int,
Rank int
)
CREATE TABLE farm (
Farm_ID int,
Year int,
Total_Horses real,
Working_Horses real,
Total_Cattle real,
Oxen real,
Bulls real,
Cows real,
Pigs real,
Sheep_and_Goats real
)
CREATE TABLE city (
City_ID int,
Official_Name text,
Status text,
Area_km_2 real,
Population real,
Census_Ranking text
)
CREATE TABLE farm_competition (
Competition_ID int,
Year int,
Theme text,
Host_city_ID int,
Hosts text
) | SELECT Status, AVG(Population) FROM city GROUP BY Status | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2259,
834,
60,
7621,
41,
15571,
834,
4309,
16,
17,
6,
4990,
834,
4309,
16,
17,
6,
3,
22557,
16,
17,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
3797,
41,
4990,
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,
19318,
6,
71,
17217,
599,
27773,
7830,
61,
21680,
690,
350,
4630,
6880,
272,
476,
19318,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
minors ( less than 18 years of age ) | CREATE TABLE table_train_68 (
"id" int,
"sequential_organ_failure_assessment_sofa" int,
"pregnancy_or_lactation" bool,
"piro_predispose_infection_response_organ_dysfunction_score" int,
"systolic_blood_pressure_sbp" int,
"hypotension" bool,
"age" float,
"lactate" int,
"NOUSE" float
) | SELECT * FROM table_train_68 WHERE age < 18 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
9719,
834,
3651,
41,
96,
23,
26,
121,
16,
17,
6,
96,
7,
15,
2436,
7220,
834,
11127,
834,
89,
9,
173,
1462,
834,
3974,
7,
7,
297,
834,
7,
858,
9,
121,
16,
17,
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,
1429,
21680,
953,
834,
9719,
834,
3651,
549,
17444,
427,
1246,
3,
2,
507,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
count the number of patients whose primary disease is pneumonia? | 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 WHERE demographic.diagnosis = "PNEUMONIA" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
25930,
4844,
159,
3274,
96,
15420,
12062,
5365,
26077,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Show all track names that have had no races. | CREATE TABLE race (
race_id number,
name text,
class text,
date text,
track_id text
)
CREATE TABLE track (
track_id number,
name text,
location text,
seating number,
year_opened number
) | SELECT name FROM track WHERE NOT track_id IN (SELECT track_id FROM race) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1964,
41,
1964,
834,
23,
26,
381,
6,
564,
1499,
6,
853,
1499,
6,
833,
1499,
6,
1463,
834,
23,
26,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
1463,
41,
1463,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1463,
549,
17444,
427,
4486,
1463,
834,
23,
26,
3388,
41,
23143,
14196,
1463,
834,
23,
26,
21680,
1964,
61,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Who, was the coach with an actual adjusted record of 0 19? | CREATE TABLE table_33477 (
"Season" real,
"Coach" text,
"Record as played" text,
"Actual adjusted record" text,
"Regular season Vacated" text
) | SELECT "Coach" FROM table_33477 WHERE "Actual adjusted record" = '0–19' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
519,
3710,
4013,
41,
96,
134,
15,
9,
739,
121,
490,
6,
96,
3881,
1836,
121,
1499,
6,
96,
1649,
7621,
38,
1944,
121,
1499,
6,
96,
23312,
3471,
13108,
1368,
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,
3881,
1836,
121,
21680,
953,
834,
519,
3710,
4013,
549,
17444,
427,
96,
23312,
3471,
13108,
1368,
121,
3274,
3,
31,
632,
104,
2294,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many points occurred with a difference of 2 for position less than 4? | CREATE TABLE table_name_90 (
points VARCHAR,
difference VARCHAR,
position VARCHAR
) | SELECT COUNT(points) FROM table_name_90 WHERE difference = "2" AND position < 4 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2394,
41,
979,
584,
4280,
28027,
6,
1750,
584,
4280,
28027,
6,
1102,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
979,
6935,
28,
3,
9,
1750,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2847,
17161,
599,
2700,
7,
61,
21680,
953,
834,
4350,
834,
2394,
549,
17444,
427,
1750,
3274,
96,
357,
121,
3430,
1102,
3,
2,
314,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the average laps for ralph firman with a grid of over 19? | CREATE TABLE table_55653 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | SELECT AVG("Laps") FROM table_55653 WHERE "Driver" = 'ralph firman' AND "Grid" > '19' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3769,
4122,
519,
41,
96,
20982,
52,
121,
1499,
6,
96,
4302,
7593,
127,
121,
1499,
6,
96,
3612,
102,
7,
121,
490,
6,
96,
13368,
87,
1649,
11809,
26,
121,
1499,
6,
96,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
121,
3612,
102,
7,
8512,
21680,
953,
834,
3769,
4122,
519,
549,
17444,
427,
96,
20982,
52,
121,
3274,
3,
31,
4900,
102,
107,
1669,
152,
31,
3430,
96,
13313,
26,
121,
2490,
3,
31,
2294,
31,
1,
-10... |
What are the first name and major of the students who are able to consume soy? | CREATE TABLE allergy_type (
allergy text,
allergytype text
)
CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
)
CREATE TABLE has_allergy (
stuid number,
allergy text
) | SELECT fname, major FROM student WHERE NOT stuid IN (SELECT stuid FROM has_allergy WHERE allergy = "Soy") | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
23886,
834,
6137,
41,
23886,
1499,
6,
23886,
6137,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
1236,
41,
21341,
23,
26,
381,
6,
3,
40,
4350,
1499,
6,
3,
89,
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,
89,
4350,
6,
779,
21680,
1236,
549,
17444,
427,
4486,
21341,
23,
26,
3388,
41,
23143,
14196,
21341,
23,
26,
21680,
65,
834,
11211,
122,
63,
549,
17444,
427,
23886,
3274,
96,
5231,
63,
8512,
1,
-100,
-100,
-100,
... |
Name the total number of pitcher for 9 overall rank | CREATE TABLE table_26720 (
"Pitcher" text,
"Strikeouts" real,
"Season" real,
"Team" text,
"League" text,
"Overall Rank" real
) | SELECT COUNT("Pitcher") FROM table_26720 WHERE "Overall Rank" = '9' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2688,
18517,
41,
96,
345,
155,
1703,
121,
1499,
6,
96,
11500,
5208,
670,
7,
121,
490,
6,
96,
134,
15,
9,
739,
121,
490,
6,
96,
18699,
121,
1499,
6,
96,
2796,
9,
5398,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
345,
155,
1703,
8512,
21680,
953,
834,
2688,
18517,
549,
17444,
427,
96,
23847,
1748,
3,
22557,
121,
3274,
3,
31,
1298,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who was the candidate in the election in the Tennessee 9 district? | CREATE TABLE table_1342233_42 (candidates VARCHAR, district VARCHAR) | SELECT candidates FROM table_1342233_42 WHERE district = "Tennessee 9" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
20879,
834,
4165,
41,
1608,
12416,
6203,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
8,
4775,
16,
8,
4356,
16,
8,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4341,
21680,
953,
834,
2368,
4165,
20879,
834,
4165,
549,
17444,
427,
3939,
3274,
96,
382,
35,
655,
15,
15,
668,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Find the number and averaged salary of all instructors who are in the department with the highest budget. | CREATE TABLE department (
dept_name VARCHAR,
budget VARCHAR
)
CREATE TABLE instructor (
salary INTEGER,
dept_name VARCHAR
) | SELECT AVG(T1.salary), COUNT(*) FROM instructor AS T1 JOIN department AS T2 ON T1.dept_name = T2.dept_name ORDER BY T2.budget DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3066,
41,
20,
102,
17,
834,
4350,
584,
4280,
28027,
6,
1487,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
10617,
41,
9090,
3,
21342,
17966,
6,
20,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
382,
5411,
7,
138,
1208,
201,
2847,
17161,
599,
1935,
61,
21680,
10617,
6157,
332,
536,
3,
15355,
3162,
3066,
6157,
332,
357,
9191,
332,
5411,
26,
6707,
834,
4350,
3274,
332,
4416,
26,
6707,
834,
435... |
What percent did LINKE get in Tyrol? | CREATE TABLE table_name_99 (linke VARCHAR, state VARCHAR) | SELECT linke FROM table_name_99 WHERE state = "tyrol" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3264,
41,
4907,
15,
584,
4280,
28027,
6,
538,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
1093,
410,
3,
27472,
427,
129,
16,
10352,
3491,
58,
1,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1309,
15,
21680,
953,
834,
4350,
834,
3264,
549,
17444,
427,
538,
3274,
96,
17,
63,
3491,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is Dates Administered, when Democrat: Carl Levin is 61%? | CREATE TABLE table_44561 (
"Poll Source" text,
"Dates administered" text,
"Democrat: Carl Levin" text,
"Republican: Jack Hoogendyk" text,
"Lead Margin" real
) | SELECT "Dates administered" FROM table_44561 WHERE "Democrat: Carl Levin" = '61%' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
2128,
4241,
41,
96,
8931,
40,
9149,
121,
1499,
6,
96,
308,
6203,
19092,
121,
1499,
6,
96,
19679,
10,
7291,
16755,
29,
121,
1499,
6,
96,
1649,
15727,
152,
10,
4496,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6203,
19092,
121,
21680,
953,
834,
591,
2128,
4241,
549,
17444,
427,
96,
19679,
10,
7291,
16755,
29,
121,
3274,
3,
31,
948,
4704,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Which Against has a Peel of waroona, and a Byes larger than 0? | CREATE TABLE table_name_55 (
against INTEGER,
peel VARCHAR,
byes VARCHAR
) | SELECT MAX(against) FROM table_name_55 WHERE peel = "waroona" AND byes > 0 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3769,
41,
581,
3,
21342,
17966,
6,
14517,
584,
4280,
28027,
6,
57,
15,
7,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
3,
20749,
65,
3,
9,
262... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
9,
16720,
7,
17,
61,
21680,
953,
834,
4350,
834,
3769,
549,
17444,
427,
14517,
3274,
96,
2910,
32,
106,
9,
121,
3430,
57,
15,
7,
2490,
3,
632,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Find All_Home and Team_ID , and group by attribute ACC_Road, and visualize them by a bar chart, and I want to show total number from high to low 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_Home, Team_ID FROM basketball_match GROUP BY ACC_Road, All_Home ORDER BY Team_ID DESC | [
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,
19040,
6,
2271,
834,
4309,
21680,
8498,
834,
19515,
350,
4630,
6880,
272,
476,
3,
14775,
834,
448,
32,
9,
26,
6,
432,
834,
19040,
4674,
11300,
272,
476,
2271,
834,
4309,
309,
25067,
1,
-100,
-100,
-100,
... |
What is the Average of bergen, norway? | CREATE TABLE table_name_81 (average INTEGER, city VARCHAR) | SELECT MIN(average) FROM table_name_81 WHERE city = "bergen, norway" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4959,
41,
28951,
3,
21342,
17966,
6,
690,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
23836,
13,
3,
2235,
35,
6,
3701,
1343,
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,
3,
17684,
599,
28951,
61,
21680,
953,
834,
4350,
834,
4959,
549,
17444,
427,
690,
3274,
96,
2235,
35,
6,
3701,
1343,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which round was 2:30? | CREATE TABLE table_38546 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" text,
"Time" text,
"Location" text
) | SELECT "Round" FROM table_38546 WHERE "Time" = '2:30' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
519,
4433,
4448,
41,
96,
1649,
7,
535,
1499,
6,
96,
1649,
7621,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
23351,
107,
32,
26,
121,
1499,
6,
96,
427,
2169,
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,
448,
32,
1106,
121,
21680,
953,
834,
519,
4433,
4448,
549,
17444,
427,
96,
13368,
121,
3274,
3,
31,
21876,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
what is the difference between the number of games won and the number of games lost ? | CREATE TABLE table_204_523 (
id number,
"week" number,
"date" text,
"opponent" text,
"score" text,
"result" text,
"attendance" number,
"record" text
) | SELECT ABS((SELECT COUNT(*) FROM table_204_523 WHERE "result" = 'win') - (SELECT COUNT(*) FROM table_204_523 WHERE "result" = 'loss')) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
755,
2773,
41,
3,
23,
26,
381,
6,
96,
8041,
121,
381,
6,
96,
5522,
121,
1499,
6,
96,
32,
102,
9977,
121,
1499,
6,
96,
7,
9022,
121,
1499,
6,
96,
60,
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,
20798,
599,
599,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
953,
834,
26363,
834,
755,
2773,
549,
17444,
427,
96,
60,
7,
83,
17,
121,
3274,
3,
31,
3757,
31,
61,
3,
18,
41,
23143,
14196,
2847,
17161,
599,
193... |
Who was the First Baseman when the Shortstop was zoilo versalles? | CREATE TABLE table_name_53 (
first_baseman VARCHAR,
shortstop VARCHAR
) | SELECT first_baseman FROM table_name_53 WHERE shortstop = "zoilo versalles" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4867,
41,
166,
834,
10925,
348,
584,
4280,
28027,
6,
710,
7618,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
8,
1485,
8430,
348,
116,
8,
711... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
166,
834,
10925,
348,
21680,
953,
834,
4350,
834,
4867,
549,
17444,
427,
710,
7618,
3274,
96,
172,
32,
173,
32,
2676,
13701,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Which Report is on 1 june? | CREATE TABLE table_name_13 (
report VARCHAR,
date VARCHAR
) | SELECT report FROM table_name_13 WHERE date = "1 june" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2368,
41,
934,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
3750,
19,
30,
209,
3,
6959,
15,
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,
934,
21680,
953,
834,
4350,
834,
2368,
549,
17444,
427,
833,
3274,
96,
536,
3,
6959,
15,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
For all employees who have the letters D or S in their first name, a line chart shows the trend of salary over hire_date , and rank from high to low by the x axis. | CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
) | SELECT HIRE_DATE, SALARY FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY HIRE_DATE DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1652,
41,
262,
5244,
5017,
476,
5080,
834,
4309,
7908,
1982,
599,
11071,
632,
201,
30085,
834,
567,
17683,
3,
4331,
4059,
599,
1755,
201,
301,
12510,
834,
567,
17683,
3,
4331,
4059,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
454,
14132,
834,
308,
6048,
6,
180,
4090,
24721,
21680,
1652,
549,
17444,
427,
30085,
834,
567,
17683,
8729,
9914,
3,
31,
1454,
308,
1454,
31,
4674,
30085,
834,
567,
17683,
8729,
9914,
3,
31,
1454,
134,
1454,
31,
46... |
Which players college was Baylor? | CREATE TABLE table_53331 (
"Player" text,
"Height" text,
"School" text,
"Hometown" text,
"College" text,
"NBA Draft" text
) | SELECT "Player" FROM table_53331 WHERE "College" = 'baylor' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4867,
519,
3341,
41,
96,
15800,
49,
121,
1499,
6,
96,
3845,
2632,
121,
1499,
6,
96,
29364,
121,
1499,
6,
96,
19040,
3540,
121,
1499,
6,
96,
9939,
7883,
121,
1499,
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,
15800,
49,
121,
21680,
953,
834,
4867,
519,
3341,
549,
17444,
427,
96,
9939,
7883,
121,
3274,
3,
31,
11119,
322,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What rank has less than 22 wins | CREATE TABLE table_name_88 (
rank VARCHAR,
wins INTEGER
) | SELECT COUNT(rank) FROM table_name_88 WHERE wins < 22 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4060,
41,
11003,
584,
4280,
28027,
6,
9204,
3,
21342,
17966,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
11003,
65,
705,
145,
1630,
9204,
1,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
6254,
61,
21680,
953,
834,
4350,
834,
4060,
549,
17444,
427,
9204,
3,
2,
1630,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the method when the opponent is Andre Roberts? | CREATE TABLE table_name_34 (
method VARCHAR,
opponent VARCHAR
) | SELECT method FROM table_name_34 WHERE opponent = "andre roberts" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3710,
41,
1573,
584,
4280,
28027,
6,
15264,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1573,
116,
8,
15264,
19,
275,
60,
2715,
7,
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... | [
3,
23143,
14196,
1573,
21680,
953,
834,
4350,
834,
3710,
549,
17444,
427,
15264,
3274,
96,
232,
60,
3,
5840,
49,
17,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
give the number of patients who passed away in or before the year 2154 had femoral artery thrombosis. | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "FEMORAL ARTERY THROMBOSIS" AND demographic.dod_year <= "2154.0" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
25930,
4844,
159,
3274,
96,
6392,
5365,
21415,
11155,
5946,
476,
3,
4611,
13103,
8471,
14408,
121,
... |
What Inclination has Eccentricity of 0.06 +0.06 −0.11? | CREATE TABLE table_name_81 (inclination VARCHAR, eccentricity VARCHAR) | SELECT inclination FROM table_name_81 WHERE eccentricity = "0.06 +0.06 −0.11" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4959,
41,
20246,
257,
584,
4280,
28027,
6,
30409,
485,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
86,
11005,
257,
65,
16208,
17456,
485,
13,
4097,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
20246,
257,
21680,
953,
834,
4350,
834,
4959,
549,
17444,
427,
30409,
485,
3274,
96,
11739,
948,
1768,
11739,
948,
3,
2,
16029,
536,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What original title has a year of 1978? | CREATE TABLE table_68614 (
"Year" text,
"English title" text,
"Original title" text,
"Country" text,
"Director" text
) | SELECT "Original title" FROM table_68614 WHERE "Year" = '1978' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3651,
948,
2534,
41,
96,
476,
2741,
121,
1499,
6,
96,
26749,
2233,
121,
1499,
6,
96,
667,
3380,
10270,
2233,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
23620,
127,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
667,
3380,
10270,
2233,
121,
21680,
953,
834,
3651,
948,
2534,
549,
17444,
427,
96,
476,
2741,
121,
3274,
3,
31,
2294,
3940,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the goal difference when there are fewer than 12 wins, 32 goals against and 8 draws? | CREATE TABLE table_name_3 (
goal_difference INTEGER,
wins VARCHAR,
draws VARCHAR,
goals_against VARCHAR
) | SELECT SUM(goal_difference) FROM table_name_3 WHERE draws = 8 AND goals_against = 32 AND wins < 12 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
519,
41,
1288,
834,
26,
99,
11788,
3,
21342,
17966,
6,
9204,
584,
4280,
28027,
6,
14924,
584,
4280,
28027,
6,
1766,
834,
9,
16720,
7,
17,
584,
4280,
28027,
3,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
839,
138,
834,
26,
99,
11788,
61,
21680,
953,
834,
4350,
834,
519,
549,
17444,
427,
14924,
3274,
505,
3430,
1766,
834,
9,
16720,
7,
17,
3274,
3538,
3430,
9204,
3,
2,
586,
1,
-100,
-100,
-100,
-100,... |
What stadium was the Fiesta Bowl played at? | CREATE TABLE table_name_74 (stadium VARCHAR, bowl_game VARCHAR) | SELECT stadium FROM table_name_74 WHERE bowl_game = "fiesta bowl" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4581,
41,
2427,
12925,
584,
4280,
28027,
6,
3047,
834,
7261,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
14939,
47,
8,
3188,
222,
9,
9713,
1944,
44,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14939,
21680,
953,
834,
4350,
834,
4581,
549,
17444,
427,
3047,
834,
7261,
3274,
96,
8549,
2427,
3047,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What average game was held on february 24 and has an attendance smaller than 16,541? | CREATE TABLE table_name_7 (game INTEGER, date VARCHAR, attendance VARCHAR) | SELECT AVG(game) FROM table_name_7 WHERE date = "february 24" AND attendance < 16 OFFSET 541 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
940,
41,
7261,
3,
21342,
17966,
6,
833,
584,
4280,
28027,
6,
11364,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
1348,
467,
47,
1213,
30,
29976,
76,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
71,
17217,
599,
7261,
61,
21680,
953,
834,
4350,
834,
940,
549,
17444,
427,
833,
3274,
96,
89,
15,
9052,
1208,
997,
121,
3430,
11364,
3,
2,
898,
3,
15316,
20788,
305,
4853,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
How many players named Dean Kirkland were picked | CREATE TABLE table_1227 (
"Round #" real,
"Pick #" real,
"Player" text,
"Position" text,
"College" text
) | SELECT COUNT("Pick #") FROM table_1227 WHERE "Player" = 'Dean Kirkland' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2122,
2555,
41,
96,
448,
32,
1106,
1713,
121,
490,
6,
96,
345,
3142,
1713,
121,
490,
6,
96,
15800,
49,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
9939,
7883,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
345,
3142,
1713,
8512,
21680,
953,
834,
2122,
2555,
549,
17444,
427,
96,
15800,
49,
121,
3274,
3,
31,
2962,
152,
17839,
40,
232,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What was the location when the opposition was East Coast? | CREATE TABLE table_26847237_1 (location VARCHAR, opposition VARCHAR) | SELECT location FROM table_26847237_1 WHERE opposition = "East Coast" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2688,
4608,
5865,
4118,
834,
536,
41,
14836,
584,
4280,
28027,
6,
8263,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
1128,
116,
8,
8263,
47,
1932,
5458,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1128,
21680,
953,
834,
2688,
4608,
5865,
4118,
834,
536,
549,
17444,
427,
8263,
3274,
96,
25235,
5458,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the home team of the game with tie number 34? | CREATE TABLE table_name_76 (home_team VARCHAR, tie_no VARCHAR) | SELECT home_team FROM table_name_76 WHERE tie_no = "34" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3959,
41,
5515,
834,
11650,
584,
4280,
28027,
6,
6177,
834,
29,
32,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
234,
372,
13,
8,
467,
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,
234,
834,
11650,
21680,
953,
834,
4350,
834,
3959,
549,
17444,
427,
6177,
834,
29,
32,
3274,
96,
3710,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
what is the total number of total w l where doubles w l is 11 11 | CREATE TABLE table_30 (
"Player" text,
"Total W\u2013L" text,
"Singles W\u2013L" text,
"Doubles W\u2013L" text,
"Ties played" real,
"Debut" real,
"Years played" real
) | SELECT COUNT("Total W\u2013L") FROM table_30 WHERE "Doubles W\u2013L" = '11–11' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1458,
41,
96,
15800,
49,
121,
1499,
6,
96,
3696,
1947,
549,
2,
76,
11138,
434,
121,
1499,
6,
96,
134,
53,
965,
549,
2,
76,
11138,
434,
121,
1499,
6,
96,
4135,
76,
2296,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
3696,
1947,
549,
2,
76,
11138,
434,
8512,
21680,
953,
834,
1458,
549,
17444,
427,
96,
4135,
76,
2296,
7,
549,
2,
76,
11138,
434,
121,
3274,
3,
31,
2596,
104,
2596,
31,
1,
-100,
-100,
-100,
... |
Who was replaced on 11 July? | CREATE TABLE table_17327458_1 (replaced_by VARCHAR, date_of_appointment VARCHAR) | SELECT replaced_by FROM table_17327458_1 WHERE date_of_appointment = "11 July" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2517,
2668,
4581,
3449,
834,
536,
41,
60,
4687,
26,
834,
969,
584,
4280,
28027,
6,
833,
834,
858,
834,
9,
102,
2700,
297,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
3210... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
5821,
834,
969,
21680,
953,
834,
2517,
2668,
4581,
3449,
834,
536,
549,
17444,
427,
833,
834,
858,
834,
9,
102,
2700,
297,
3274,
96,
2596,
1718,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Which of the second parties has second member Charles Robert Colvile, a conservative first party, and first member William Mundy? | CREATE TABLE table_name_31 (second_party VARCHAR, first_member VARCHAR, second_member VARCHAR, first_party VARCHAR) | SELECT second_party FROM table_name_31 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,
4350,
834,
3341,
41,
12091,
834,
8071,
584,
4280,
28027,
6,
166,
834,
12066,
584,
4280,
28027,
6,
511,
834,
12066,
584,
4280,
28027,
6,
166,
834,
8071,
584,
4280,
28027,
61,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
511,
834,
8071,
21680,
953,
834,
4350,
834,
3341,
549,
17444,
427,
511,
834,
12066,
3274,
96,
4059,
965,
3,
5840,
49,
17,
7632,
6372,
15,
121,
3430,
166,
834,
8071,
3274,
96,
1018,
3473,
1528,
121,
3430,
166,
834,
... |
What is the production code fore the episode titled, life's no fun anymore? | CREATE TABLE table_7465 (
"Ep No" text,
"Prod Code" text,
"Original Air Date" text,
"Episode Title" text,
"Ratings" text
) | SELECT "Prod Code" FROM table_7465 WHERE "Episode Title" = 'life''s no fun anymore' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4581,
4122,
41,
96,
427,
102,
465,
121,
1499,
6,
96,
3174,
26,
3636,
121,
1499,
6,
96,
667,
3380,
10270,
1761,
7678,
121,
1499,
6,
96,
427,
102,
159,
32,
221,
11029,
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,
3174,
26,
3636,
121,
21680,
953,
834,
4581,
4122,
549,
17444,
427,
96,
427,
102,
159,
32,
221,
11029,
121,
3274,
3,
31,
4597,
31,
31,
7,
150,
694,
7595,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is every year born for height of 1.88? | CREATE TABLE table_23670057_7 (
year_born VARCHAR,
height__m_ VARCHAR
) | SELECT year_born FROM table_23670057_7 WHERE height__m_ = "1.88" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
3420,
9295,
3436,
834,
940,
41,
215,
834,
7473,
584,
4280,
28027,
6,
3902,
834,
834,
51,
834,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
334,
215... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
215,
834,
7473,
21680,
953,
834,
357,
3420,
9295,
3436,
834,
940,
549,
17444,
427,
3902,
834,
834,
51,
834,
3274,
96,
16253,
927,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the original air date for the episode with 3.90 u.s. viewers (millions)? | CREATE TABLE table_12722302_2 (
original_air_date VARCHAR,
us_viewers__million_ VARCHAR
) | SELECT original_air_date FROM table_12722302_2 WHERE us_viewers__million_ = "3.90" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
22367,
2884,
1458,
357,
834,
357,
41,
926,
834,
2256,
834,
5522,
584,
4280,
28027,
6,
178,
834,
4576,
277,
834,
834,
17030,
834,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
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,
926,
834,
2256,
834,
5522,
21680,
953,
834,
22367,
2884,
1458,
357,
834,
357,
549,
17444,
427,
178,
834,
4576,
277,
834,
834,
17030,
834,
3274,
96,
5787,
2394,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the crowd size when the home team scored 10.10 (70)? | CREATE TABLE table_32868 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Crowd" FROM table_32868 WHERE "Home team score" = '10.10 (70)' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
28070,
3651,
41,
96,
19040,
372,
121,
1499,
6,
96,
19040,
372,
2604,
121,
1499,
6,
96,
188,
1343,
372,
121,
1499,
6,
96,
188,
1343,
372,
2604,
121,
1499,
6,
96,
553,
35,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
254,
3623,
26,
121,
21680,
953,
834,
28070,
3651,
549,
17444,
427,
96,
19040,
372,
2604,
121,
3274,
3,
31,
10415,
1714,
41,
2518,
61,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Name the date for game site of riverfront stadium | CREATE TABLE table_name_31 (
date VARCHAR,
game_site VARCHAR
) | SELECT date FROM table_name_31 WHERE game_site = "riverfront stadium" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3341,
41,
833,
584,
4280,
28027,
6,
467,
834,
3585,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
833,
21,
467,
353,
13,
4033,
6849,
14939,
1,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3341,
549,
17444,
427,
467,
834,
3585,
3274,
96,
5927,
49,
6849,
14939,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Name the points for games of 16 16 | CREATE TABLE table_name_43 (points VARCHAR, games VARCHAR) | SELECT points FROM table_name_43 WHERE games = "16 16" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4906,
41,
2700,
7,
584,
4280,
28027,
6,
1031,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
979,
21,
1031,
13,
898,
898,
1,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
979,
21680,
953,
834,
4350,
834,
4906,
549,
17444,
427,
1031,
3274,
96,
2938,
898,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who was the home team on January 2 with 23 points? | CREATE TABLE table_name_57 (
home VARCHAR,
points VARCHAR,
date VARCHAR
) | SELECT home FROM table_name_57 WHERE points = 23 AND date = "january 2" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3436,
41,
234,
584,
4280,
28027,
6,
979,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
8,
234,
372,
30,
1762,
204,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
234,
21680,
953,
834,
4350,
834,
3436,
549,
17444,
427,
979,
3274,
1902,
3430,
833,
3274,
96,
7066,
76,
1208,
204,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
how many patients of white ethnicity are diagnosed with hx of bladder malignancy? | 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
)
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.ethnicity = "WHITE" AND diagnoses.short_title = "Hx of bladder malignancy" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
5... |
What is the latest year for first elected with john hostettler as incumbent and a result of lost re-election democratic gain? | CREATE TABLE table_name_40 (first_elected INTEGER, results VARCHAR, incumbent VARCHAR) | SELECT MAX(first_elected) FROM table_name_40 WHERE results = "lost re-election democratic gain" AND incumbent = "john hostettler" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2445,
41,
14672,
834,
19971,
3,
21342,
17966,
6,
772,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1251,
215,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
14672,
834,
19971,
61,
21680,
953,
834,
4350,
834,
2445,
549,
17444,
427,
772,
3274,
96,
2298,
17,
3,
60,
18,
15,
12252,
15053,
2485,
121,
3430,
28406,
3274,
96,
27341,
2290,
15,
17,
14539,
121,
1,
-... |
how many nations won more than one silver medal ? | CREATE TABLE table_204_595 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
) | SELECT COUNT("nation") FROM table_204_595 WHERE "silver" > 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
755,
3301,
41,
3,
23,
26,
381,
6,
96,
6254,
121,
381,
6,
96,
29,
257,
121,
1499,
6,
96,
14910,
121,
381,
6,
96,
7,
173,
624,
121,
381,
6,
96,
13711,
776,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
29,
257,
8512,
21680,
953,
834,
26363,
834,
755,
3301,
549,
17444,
427,
96,
7,
173,
624,
121,
2490,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
For those employees who do not work in departments with managers that have ids between 100 and 200, return a line chart about the change of salary over hire_date , and show in descending by the x axis. | CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
) | SELECT HIRE_DATE, SALARY FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY HIRE_DATE DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1652,
41,
262,
5244,
5017,
476,
5080,
834,
4309,
7908,
1982,
599,
11071,
632,
201,
30085,
834,
567,
17683,
3,
4331,
4059,
599,
1755,
201,
301,
12510,
834,
567,
17683,
3,
4331,
4059,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
454,
14132,
834,
308,
6048,
6,
180,
4090,
24721,
21680,
1652,
549,
17444,
427,
4486,
3396,
19846,
11810,
834,
4309,
3388,
41,
23143,
14196,
3396,
19846,
11810,
834,
4309,
21680,
10521,
549,
17444,
427,
283,
15610,
17966,
... |
what is the maximum lead margin on august 5, 2008? | CREATE TABLE table_16751596_5 (
lead_margin INTEGER,
dates_administered VARCHAR
) | SELECT MAX(lead_margin) FROM table_16751596_5 WHERE dates_administered = "August 5, 2008" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2938,
3072,
1808,
4314,
834,
755,
41,
991,
834,
1635,
122,
77,
3,
21342,
17966,
6,
5128,
834,
9,
26,
17791,
15,
26,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
109,
9,
26,
834,
1635,
122,
77,
61,
21680,
953,
834,
2938,
3072,
1808,
4314,
834,
755,
549,
17444,
427,
5128,
834,
9,
26,
17791,
15,
26,
3274,
96,
26579,
7836,
2628,
121,
1,
-100,
-100,
-100,
-100,
... |
WHAT IS THE SNATCH WITH TOTAL KG SMALLER THAN 318, AND CLEAN JERK LARGER THAN 175? | CREATE TABLE table_name_45 (
snatch INTEGER,
total__kg_ VARCHAR,
clean_ VARCHAR,
_jerk VARCHAR
) | SELECT MIN(snatch) FROM table_name_45 WHERE total__kg_ < 318 AND clean_ & _jerk > 175 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2128,
41,
3,
7,
29,
14547,
3,
21342,
17966,
6,
792,
834,
834,
8711,
834,
584,
4280,
28027,
6,
1349,
834,
584,
4280,
28027,
6,
3,
834,
12488,
157,
584,
4280,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
7,
29,
14547,
61,
21680,
953,
834,
4350,
834,
2128,
549,
17444,
427,
792,
834,
834,
8711,
834,
3,
2,
220,
2606,
3430,
1349,
834,
3,
184,
3,
834,
12488,
157,
2490,
209,
3072,
1,
-100,
-100,
-100,
-... |
Which Bleeding has a Condition of congenital afibrinogenemia? | CREATE TABLE table_76036 (
"Condition" text,
"Prothrombin time" text,
"Partial thromboplastin time" text,
"Bleeding time" text,
"Platelet count" text
) | SELECT "Bleeding time" FROM table_76036 WHERE "Condition" = 'congenital afibrinogenemia' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
28212,
3420,
41,
96,
4302,
10569,
121,
1499,
6,
96,
3174,
8514,
51,
4517,
97,
121,
1499,
6,
96,
13212,
10646,
3,
8514,
6310,
23918,
77,
97,
121,
1499,
6,
96,
279,
40,
695... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
279,
40,
6958,
53,
97,
121,
21680,
953,
834,
28212,
3420,
549,
17444,
427,
96,
4302,
10569,
121,
3274,
3,
31,
1018,
729,
9538,
3,
9,
89,
23,
2160,
29,
5255,
11658,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many places of whatever size have a 2007 population estimation of 7996? | CREATE TABLE table_14325808_1 (area__km²_ VARCHAR, population__2007_estimation_ VARCHAR) | SELECT COUNT(area__km²_) FROM table_14325808_1 WHERE population__2007_estimation_ = 7996 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2534,
2668,
3449,
4018,
834,
536,
41,
498,
834,
834,
5848,
357,
834,
584,
4280,
28027,
6,
2074,
834,
834,
20615,
834,
3340,
51,
257,
834,
584,
4280,
28027,
61,
3,
32102,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
3,
23143,
14196,
2847,
17161,
599,
498,
834,
834,
5848,
357,
834,
61,
21680,
953,
834,
2534,
2668,
3449,
4018,
834,
536,
549,
17444,
427,
2074,
834,
834,
20615,
834,
3340,
51,
257,
834,
3274,
3,
4440,
4314,
1,
-100,
-100,
-100,
-100... |
What is Wayne Grady's total? | CREATE TABLE table_60665 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" real,
"To par" text,
"Finish" text
) | SELECT SUM("Total") FROM table_60665 WHERE "Player" = 'wayne grady' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3328,
3539,
755,
41,
96,
15800,
49,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
476,
2741,
599,
7,
61,
751,
121,
1499,
6,
96,
3696,
1947,
121,
490,
6,
96,
3696,
260... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
121,
3696,
1947,
8512,
21680,
953,
834,
3328,
3539,
755,
549,
17444,
427,
96,
15800,
49,
121,
3274,
3,
31,
1343,
29,
15,
3,
3987,
63,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the host city during the 2012 season? | CREATE TABLE table_name_47 (host_city VARCHAR, season VARCHAR) | SELECT host_city FROM table_name_47 WHERE season = 2012 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4177,
41,
12675,
834,
6726,
584,
4280,
28027,
6,
774,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2290,
690,
383,
8,
1673,
774,
58,
1,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2290,
834,
6726,
21680,
953,
834,
4350,
834,
4177,
549,
17444,
427,
774,
3274,
1673,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Which Poles has a Wins larger than 0, and a Podiums smaller than 17? | CREATE TABLE table_5462 (
"Season" text,
"Races" real,
"Wins" real,
"Podiums" real,
"Poles" real,
"Fastest Laps" real
) | SELECT "Poles" FROM table_5462 WHERE "Wins" > '0' AND "Podiums" < '17' AND "Fastest Laps" = '0' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
5062,
4056,
41,
96,
134,
15,
9,
739,
121,
1499,
6,
96,
448,
9,
2319,
121,
490,
6,
96,
18455,
7,
121,
490,
6,
96,
16665,
2552,
7,
121,
490,
6,
96,
8931,
15,
7,
121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
8931,
15,
7,
121,
21680,
953,
834,
5062,
4056,
549,
17444,
427,
96,
18455,
7,
121,
2490,
3,
31,
632,
31,
3430,
96,
16665,
2552,
7,
121,
3,
2,
3,
31,
2517,
31,
3430,
96,
371,
9,
7,
4377,
325,
102,
7,
121,... |
For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and code , and group by attribute headquarter, show bar from low to high order. | CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) | SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name ORDER BY T1.Name | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7554,
41,
3636,
3,
21342,
17966,
6,
5570,
584,
4280,
28027,
599,
25502,
201,
5312,
3396,
254,
26330,
434,
6,
15248,
3,
21342,
17966,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
332,
5411,
23954,
6,
332,
5411,
22737,
21680,
7554,
6157,
332,
536,
3,
15355,
3162,
15248,
7,
6157,
332,
357,
9191,
332,
5411,
7296,
76,
8717,
450,
49,
3274,
332,
4416,
22737,
350,
4630,
6880,
272,
476,
3642,
19973,
... |
display job Title, the difference between minimum and maximum salaries for those jobs which max salary within the range 12000 to 18000. | CREATE TABLE jobs (
job_title VARCHAR,
max_salary INTEGER,
min_salary VARCHAR
) | SELECT job_title, max_salary - min_salary FROM jobs WHERE max_salary BETWEEN 12000 AND 18000 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2476,
41,
613,
834,
21869,
584,
4280,
28027,
6,
9858,
834,
7,
138,
1208,
3,
21342,
17966,
6,
3519,
834,
7,
138,
1208,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
1831,
61... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
613,
834,
21869,
6,
9858,
834,
7,
138,
1208,
3,
18,
3519,
834,
7,
138,
1208,
21680,
2476,
549,
17444,
427,
9858,
834,
7,
138,
1208,
272,
7969,
518,
23394,
586,
2313,
3430,
507,
2313,
1,
-100,
-100,
-100,
-100,
-10... |
what is the number of patients whose gender is m and diagnoses icd9 code is 25002? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "M" AND diagnoses.icd9_code = "25002" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
5... |
Which venue has a scoreof 2–0? | CREATE TABLE table_name_60 (venue VARCHAR, score VARCHAR) | SELECT venue FROM table_name_60 WHERE score = "2–0" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3328,
41,
15098,
584,
4280,
28027,
6,
2604,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
5669,
65,
3,
9,
2604,
858,
204,
104,
632,
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,
5669,
21680,
953,
834,
4350,
834,
3328,
549,
17444,
427,
2604,
3274,
96,
357,
104,
632,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What nationality is keith carney? | CREATE TABLE table_2897457_5 (
nationality VARCHAR,
player VARCHAR
) | SELECT nationality FROM table_2897457_5 WHERE player = "Keith Carney" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
3914,
4581,
3436,
834,
755,
41,
1157,
485,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
1157,
485,
19,
3,
5754,
107,
15460,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1157,
485,
21680,
953,
834,
357,
3914,
4581,
3436,
834,
755,
549,
17444,
427,
1959,
3274,
96,
439,
15,
23,
189,
1184,
3186,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Show the number of fate from each fate | CREATE TABLE ship (
Ship_ID int,
Name text,
Type text,
Nationality text,
Tonnage int
)
CREATE TABLE mission (
Mission_ID int,
Ship_ID int,
Code text,
Launched_Year int,
Location text,
Speed_knots int,
Fate text
) | SELECT Fate, COUNT(Fate) FROM mission GROUP BY Fate | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4383,
41,
15508,
834,
4309,
16,
17,
6,
5570,
1499,
6,
6632,
1499,
6,
868,
485,
1499,
6,
8475,
9761,
16,
17,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
2253,
41,
89... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
11762,
15,
6,
2847,
17161,
599,
371,
342,
61,
21680,
2253,
350,
4630,
6880,
272,
476,
11762,
15,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
For all employees who have the letters D or S in their first name, find job_id and the average of manager_id , and group by attribute job_id, and visualize them by a bar chart. | CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
) | SELECT JOB_ID, AVG(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1652,
41,
262,
5244,
5017,
476,
5080,
834,
4309,
7908,
1982,
599,
11071,
632,
201,
30085,
834,
567,
17683,
3,
4331,
4059,
599,
1755,
201,
301,
12510,
834,
567,
17683,
3,
4331,
4059,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
446,
10539,
834,
4309,
6,
71,
17217,
599,
9312,
188,
17966,
834,
4309,
61,
21680,
1652,
549,
17444,
427,
30085,
834,
567,
17683,
8729,
9914,
3,
31,
1454,
308,
1454,
31,
4674,
30085,
834,
567,
17683,
8729,
9914,
3,
3... |
What's the highest attendance for a game the Texan's played at Arrowhead Stadium? | CREATE TABLE table_name_87 (
attendance INTEGER,
game_site VARCHAR
) | SELECT MAX(attendance) FROM table_name_87 WHERE game_site = "arrowhead stadium" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4225,
41,
11364,
3,
21342,
17966,
6,
467,
834,
3585,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
31,
7,
8,
2030,
11364,
21,
3,
9,
467,
8,
3,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
15116,
663,
61,
21680,
953,
834,
4350,
834,
4225,
549,
17444,
427,
467,
834,
3585,
3274,
96,
6770,
3313,
14939,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What was the callsign in Zamboanga? | CREATE TABLE table_12547903_3 (callsign VARCHAR, location VARCHAR) | SELECT callsign FROM table_12547903_3 WHERE location = "Zamboanga" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
10124,
4177,
2394,
519,
834,
519,
41,
16482,
6732,
584,
4280,
28027,
6,
1128,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
580,
6732,
16,
4904,
6310,
1468... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
580,
6732,
21680,
953,
834,
10124,
4177,
2394,
519,
834,
519,
549,
17444,
427,
1128,
3274,
96,
956,
9,
6310,
1468,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who is the center position of Years for Jazz, Greg Ostertag? | CREATE TABLE table_52031 (
"Player" text,
"Nationality" text,
"Position" text,
"Years for Jazz" text,
"School/Club Team" text
) | SELECT "Years for Jazz" FROM table_52031 WHERE "Position" = 'center' AND "Player" = 'greg ostertag' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
25356,
3341,
41,
96,
15800,
49,
121,
1499,
6,
96,
24732,
485,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
476,
2741,
7,
21,
12313,
121,
1499,
6,
96,
29364,
87... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
476,
2741,
7,
21,
12313,
121,
21680,
953,
834,
25356,
3341,
549,
17444,
427,
96,
345,
32,
7,
4749,
121,
3274,
3,
31,
13866,
31,
3430,
96,
15800,
49,
121,
3274,
3,
31,
18301,
3,
32,
1370,
2408,
31,
1,
-100,
... |
what is the production in 2010 with rank of 8? | CREATE TABLE table_67332 (
"Rank" text,
"Country" text,
"2009" text,
"2010" text,
"2011" text
) | SELECT "2010" FROM table_67332 WHERE "Rank" = '8' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3708,
519,
2668,
41,
96,
22557,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
16660,
121,
1499,
6,
96,
14926,
121,
1499,
6,
96,
13907,
121,
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,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
96,
14926,
121,
21680,
953,
834,
3708,
519,
2668,
549,
17444,
427,
96,
22557,
121,
3274,
3,
31,
927,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the home record for the Maccabi Tel-Aviv club? | CREATE TABLE table_name_85 (home VARCHAR, club VARCHAR) | SELECT home FROM table_name_85 WHERE club = "maccabi tel-aviv" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4433,
41,
5515,
584,
4280,
28027,
6,
1886,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
234,
1368,
21,
8,
2143,
10891,
23,
10636,
18,
188,
70... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
234,
21680,
953,
834,
4350,
834,
4433,
549,
17444,
427,
1886,
3274,
96,
11101,
10891,
23,
3,
1625,
18,
9,
7003,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
provide the number of patients whose admission location is phys referral/normal deli and lab test item id is 51379. | 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
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND lab.itemid = "51379" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7690,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7690,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
What is the date that has a winning score of 67-70-68-67=272? | CREATE TABLE table_name_84 (
date VARCHAR,
winning_score VARCHAR
) | SELECT date FROM table_name_84 WHERE winning_score = 67 - 70 - 68 - 67 = 272 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4608,
41,
833,
584,
4280,
28027,
6,
3447,
834,
7,
9022,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
833,
24,
65,
3,
9,
3447,
2604,
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,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
833,
21680,
953,
834,
4350,
834,
4608,
549,
17444,
427,
3447,
834,
7,
9022,
3274,
3,
3708,
3,
18,
2861,
3,
18,
3,
3651,
3,
18,
3,
3708,
3274,
2307,
357,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Show all party names and the number of members in each party with a bar chart, and rank in desc by the y-axis. | CREATE TABLE party_events (
Event_ID int,
Event_Name text,
Party_ID int,
Member_in_charge_ID int
)
CREATE TABLE member (
Member_ID int,
Member_Name text,
Party_ID text,
In_office text
)
CREATE TABLE party (
Party_ID int,
Minister text,
Took_office text,
Left_office text,
Region_ID int,
Party_name text
)
CREATE TABLE region (
Region_ID int,
Region_name text,
Date text,
Label text,
Format text,
Catalogue text
) | SELECT Party_name, COUNT(*) FROM member AS T1 JOIN party AS T2 ON T1.Party_ID = T2.Party_ID GROUP BY T1.Party_ID ORDER BY COUNT(*) DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1088,
834,
15,
2169,
7,
41,
8042,
834,
4309,
16,
17,
6,
8042,
834,
23954,
1499,
6,
3450,
834,
4309,
16,
17,
6,
8541,
834,
77,
834,
7993,
834,
4309,
16,
17,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3450,
834,
4350,
6,
2847,
17161,
599,
1935,
61,
21680,
1144,
6157,
332,
536,
3,
15355,
3162,
1088,
6157,
332,
357,
9191,
332,
5411,
13725,
63,
834,
4309,
3274,
332,
4416,
13725,
63,
834,
4309,
350,
4630,
6880,
272,
... |
What is the largest week number for the venue of League Park for the date of November 25, 1920? | CREATE TABLE table_36833 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Venue" text,
"Attendance" text,
"Record" text
) | SELECT MAX("Week") FROM table_36833 WHERE "Venue" = 'league park' AND "Date" = 'november 25, 1920' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
519,
3651,
4201,
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,
553,
35,
76,
15,
121,
1499,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
121,
518,
10266,
8512,
21680,
953,
834,
519,
3651,
4201,
549,
17444,
427,
96,
553,
35,
76,
15,
121,
3274,
3,
31,
29512,
2447,
31,
3430,
96,
308,
342,
121,
3274,
3,
31,
5326,
18247,
14105,
13978,
31,
... |
Name the most goals with losses less than 15 and position more than 8 with points of 42+4 | CREATE TABLE table_71415 (
"Position" real,
"Club" text,
"Played" real,
"Points" text,
"Wins" real,
"Draws" real,
"Losses" real,
"Goals for" real,
"Goals against" real,
"Goal Difference" real
) | SELECT MAX("Goals for") FROM table_71415 WHERE "Losses" < '15' AND "Position" > '8' AND "Points" = '42+4' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
940,
2534,
1808,
41,
96,
345,
32,
7,
4749,
121,
490,
6,
96,
254,
11158,
121,
1499,
6,
96,
15800,
15,
26,
121,
490,
6,
96,
22512,
7,
121,
1499,
6,
96,
18455,
7,
121,
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,
4800,
4,
599,
121,
6221,
5405,
21,
8512,
21680,
953,
834,
940,
2534,
1808,
549,
17444,
427,
96,
434,
13526,
7,
121,
3,
2,
3,
31,
1808,
31,
3430,
96,
345,
32,
7,
4749,
121,
2490,
3,
31,
927,
31,
3430,
96,
22512... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.