NATURAL_LANG stringlengths 0 446 | SCHEMA stringlengths 27 2.21k | SQL stringlengths 18 453 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|
When the Track is ESO, the peak is smaller than 25, and the year is larger than 2004, what is the total number of Weeks on Chart? | CREATE TABLE table_40733 (
"Year" real,
"Chart" text,
"Track" text,
"Peak" real,
"Weeks on Chart" real
) | SELECT COUNT("Weeks on Chart") FROM table_40733 WHERE "Track" = 'eso' AND "Peak" < '25' AND "Year" > '2004' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2445,
4552,
519,
41,
96,
476,
2741,
121,
490,
6,
96,
18947,
17,
121,
1499,
6,
96,
382,
16729,
121,
1499,
6,
96,
345,
15,
1639,
121,
490,
6,
96,
1326,
16789,
30,
15054,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1326,
16789,
30,
15054,
8512,
21680,
953,
834,
2445,
4552,
519,
549,
17444,
427,
96,
382,
16729,
121,
3274,
3,
31,
15,
7,
32,
31,
3430,
96,
345,
15,
1639,
121,
3,
2,
3,
31,
1828,
31,
3430,... |
What are the numbers of the shortest flights? | CREATE TABLE certificate (
eid number,
aid number
)
CREATE TABLE employee (
eid number,
name text,
salary number
)
CREATE TABLE flight (
flno number,
origin text,
destination text,
distance number,
departure_date time,
arrival_date time,
price number,
aid number
)
CREATE TABLE aircraft (
aid number,
name text,
distance number
) | SELECT flno FROM flight ORDER BY distance LIMIT 3 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
6017,
41,
3,
15,
23,
26,
381,
6,
3052,
381,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
3490,
41,
3,
15,
23,
26,
381,
6,
564,
1499,
6,
9090,
381,
3,
61,
3,
3210... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
89,
40,
29,
32,
21680,
3777,
4674,
11300,
272,
476,
2357,
8729,
12604,
220,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the highest Byes by Anakie who has an Against smaller than 2275? | CREATE TABLE table_12408 (
"Geelong DFL" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
) | SELECT MAX("Byes") FROM table_12408 WHERE "Geelong DFL" = 'anakie' AND "Against" < '2275' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
22504,
4018,
41,
96,
517,
15,
15,
2961,
309,
10765,
121,
1499,
6,
96,
18455,
7,
121,
490,
6,
96,
279,
10070,
121,
490,
6,
96,
434,
13526,
7,
121,
490,
6,
96,
308,
10936... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
279,
10070,
8512,
21680,
953,
834,
22504,
4018,
549,
17444,
427,
96,
517,
15,
15,
2961,
309,
10765,
121,
3274,
3,
31,
152,
9,
11390,
31,
3430,
96,
20749,
121,
3,
2,
3,
31,
2884,
3072,
31,
1,
... |
what was the difference in average attendance between 2010 and 2001 ? | CREATE TABLE table_204_590 (
id number,
"year" number,
"division" number,
"league" text,
"regular season" text,
"playoffs" text,
"open cup" text,
"avg. attendance" number
) | SELECT ABS((SELECT "avg. attendance" FROM table_204_590 WHERE "year" = 2010) - (SELECT "avg. attendance" FROM table_204_590 WHERE "year" = 2001)) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
755,
2394,
41,
3,
23,
26,
381,
6,
96,
1201,
121,
381,
6,
96,
26,
23,
6610,
121,
381,
6,
96,
29512,
121,
1499,
6,
96,
60,
122,
4885,
774,
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,
20798,
599,
599,
23143,
14196,
96,
9,
208,
122,
5,
11364,
121,
21680,
953,
834,
26363,
834,
755,
2394,
549,
17444,
427,
96,
1201,
121,
3274,
2735,
61,
3,
18,
41,
23143,
14196,
96,
9,
208,
122,
5,
11364,
121,
21680... |
Who was the opponent in the round of R2? | CREATE TABLE table_9998 (
"Date" text,
"Round" text,
"Opponent" text,
"Venue" text,
"Result" text,
"Attendance" real
) | SELECT "Opponent" FROM table_9998 WHERE "Round" = 'r2' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3264,
3916,
41,
96,
308,
342,
121,
1499,
6,
96,
448,
32,
1106,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
553,
35,
76,
15,
121,
1499,
6,
96,
20119,
121,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
667,
102,
9977,
121,
21680,
953,
834,
3264,
3916,
549,
17444,
427,
96,
448,
32,
1106,
121,
3274,
3,
31,
52,
357,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which province has muju as the capital? | CREATE TABLE table_name_82 (
province VARCHAR,
capital VARCHAR
) | SELECT province FROM table_name_82 WHERE capital = "muju" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4613,
41,
7985,
584,
4280,
28027,
6,
1784,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
7985,
65,
4035,
2047,
38,
8,
1784,
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,
7985,
21680,
953,
834,
4350,
834,
4613,
549,
17444,
427,
1784,
3274,
96,
51,
76,
2047,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Find the number of female students (with F sex) living in Smith Hall | CREATE TABLE lives_in (stuid VARCHAR, dormid VARCHAR); CREATE TABLE student (stuid VARCHAR, sex VARCHAR); CREATE TABLE dorm (dormid VARCHAR, dorm_name VARCHAR) | SELECT COUNT(*) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall' AND T1.sex = 'F' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1342,
834,
77,
41,
7,
17,
76,
23,
26,
584,
4280,
28027,
6,
103,
52,
6983,
584,
4280,
28027,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
1236,
41,
7,
17,
76,
23,
26,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
1236,
6157,
332,
536,
3,
15355,
3162,
1342,
834,
77,
6157,
332,
357,
9191,
332,
5411,
7,
17,
76,
23,
26,
3274,
332,
4416,
7,
17,
76,
23,
26,
3,
15355,
3162,
103,
52,
51,
6157,
... |
How many heights does chad henne have? | CREATE TABLE table_15017024_2 (height VARCHAR, player_name VARCHAR) | SELECT COUNT(height) FROM table_15017024_2 WHERE player_name = "Chad Henne" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
12278,
536,
2518,
2266,
834,
357,
41,
88,
2632,
584,
4280,
28027,
6,
1959,
834,
4350,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
3902,
7,
405,
3,
3441,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
88,
2632,
61,
21680,
953,
834,
12278,
536,
2518,
2266,
834,
357,
549,
17444,
427,
1959,
834,
4350,
3274,
96,
254,
8399,
454,
5990,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the date of the k-league cup, which has less than 28 goals, at the jeonju venue? | CREATE TABLE table_name_93 (
date VARCHAR,
competition VARCHAR,
venue VARCHAR,
goals VARCHAR
) | SELECT date FROM table_name_93 WHERE venue = "jeonju" AND goals < 28 AND competition = "k-league cup" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4271,
41,
833,
584,
4280,
28027,
6,
2259,
584,
4280,
28027,
6,
5669,
584,
4280,
28027,
6,
1766,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
833,
21680,
953,
834,
4350,
834,
4271,
549,
17444,
427,
5669,
3274,
96,
1924,
106,
2047,
121,
3430,
1766,
3,
2,
2059,
3430,
2259,
3274,
96,
157,
18,
29512,
4119,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the 1994 finish associated with a 1995 finish of 3R and 1997 of QF? | CREATE TABLE table_name_92 (Id VARCHAR) | SELECT 1994 FROM table_name_92 WHERE 1997 = "qf" AND 1995 = "3r" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4508,
41,
196,
26,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
7520,
1992,
1968,
28,
3,
9,
7273,
1992,
13,
220,
448,
11,
6622,
13,
1593,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
7520,
21680,
953,
834,
4350,
834,
4508,
549,
17444,
427,
6622,
3274,
96,
1824,
89,
121,
3430,
7273,
3274,
96,
519,
52,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
give me the number of patients whose primary disease is sternal wound infection and year of death is less than or equal to 2173? | 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 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
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "STERNAL WOUND INFECTION" AND demographic.dod_year <= "2173.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,
20727,
567,
4090,
3,
16733,
13110,
27,
12619,
3073,
9562,
121,
3430,
1... |
Who was No. 3 when No. 5 James and No. 6 Mason? | CREATE TABLE table_9100 (
"Region (year)" text,
"No. 1" text,
"No. 2" text,
"No. 3" text,
"No. 4" text,
"No. 5" text,
"No. 6" text,
"No. 7" text,
"No. 8" text,
"No. 9" text,
"No. 10" text
) | SELECT "No. 3" FROM table_9100 WHERE "No. 5" = 'james' AND "No. 6" = 'mason' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1298,
2915,
41,
96,
17748,
23,
106,
41,
1201,
61,
121,
1499,
6,
96,
4168,
5,
209,
121,
1499,
6,
96,
4168,
5,
204,
121,
1499,
6,
96,
4168,
5,
220,
121,
1499,
6,
96,
41... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
4168,
5,
220,
121,
21680,
953,
834,
1298,
2915,
549,
17444,
427,
96,
4168,
5,
3,
17395,
3274,
3,
31,
1191,
2687,
31,
3430,
96,
4168,
5,
431,
121,
3274,
3,
31,
2754,
106,
31,
1,
-100,
-100,
-100,
-100,
-100,
... |
What year did the Nashville Metros have the Regular Season 2nd, central? | CREATE TABLE table_name_74 (year VARCHAR, regular_season VARCHAR) | SELECT year FROM table_name_74 WHERE regular_season = "2nd, central" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4581,
41,
1201,
584,
4280,
28027,
6,
1646,
834,
9476,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
215,
410,
8,
17659,
10730,
7,
43,
8,
17116,
7960,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
215,
21680,
953,
834,
4350,
834,
4581,
549,
17444,
427,
1646,
834,
9476,
3274,
96,
357,
727,
6,
2069,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the episode number in the season titled '65 million years off'? | CREATE TABLE table_3570 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real,
"U.S. viewers (millions)" text
) | SELECT "No. in season" FROM table_3570 WHERE "Title" = '65 Million Years Off' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2469,
2518,
41,
96,
4168,
5,
16,
939,
121,
490,
6,
96,
4168,
5,
16,
774,
121,
490,
6,
96,
382,
155,
109,
121,
1499,
6,
96,
23620,
15,
26,
57,
121,
1499,
6,
96,
24965,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4168,
5,
16,
774,
121,
21680,
953,
834,
2469,
2518,
549,
17444,
427,
96,
382,
155,
109,
121,
3274,
3,
31,
4122,
14625,
13825,
4395,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What place did Jerry Barber of the United States come in at? | CREATE TABLE table_48605 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" real
) | SELECT "Place" FROM table_48605 WHERE "Country" = 'united states' AND "Player" = 'jerry barber' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
3840,
3076,
41,
96,
345,
11706,
121,
1499,
6,
96,
15800,
49,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
3696,
260,
121,
490,
3,
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,
11706,
121,
21680,
953,
834,
591,
3840,
3076,
549,
17444,
427,
96,
10628,
651,
121,
3274,
3,
31,
15129,
15,
26,
2315,
31,
3430,
96,
15800,
49,
121,
3274,
3,
31,
12488,
651,
9935,
49,
31,
1,
-100,
-100,
... |
A line chart for returning the number of the date of birth for all the guests with gender code 'Male'. | CREATE TABLE Apartment_Buildings (
building_id INTEGER,
building_short_name CHAR(15),
building_full_name VARCHAR(80),
building_description VARCHAR(255),
building_address VARCHAR(255),
building_manager VARCHAR(50),
building_phone VARCHAR(80)
)
CREATE TABLE Apartment_Facilities (
apt_id INTEGER,
facility_code CHAR(15)
)
CREATE TABLE Guests (
guest_id INTEGER,
gender_code CHAR(1),
guest_first_name VARCHAR(80),
guest_last_name VARCHAR(80),
date_of_birth DATETIME
)
CREATE TABLE Apartments (
apt_id INTEGER,
building_id INTEGER,
apt_type_code CHAR(15),
apt_number CHAR(10),
bathroom_count INTEGER,
bedroom_count INTEGER,
room_count CHAR(5)
)
CREATE TABLE View_Unit_Status (
apt_id INTEGER,
apt_booking_id INTEGER,
status_date DATETIME,
available_yn BIT
)
CREATE TABLE Apartment_Bookings (
apt_booking_id INTEGER,
apt_id INTEGER,
guest_id INTEGER,
booking_status_code CHAR(15),
booking_start_date DATETIME,
booking_end_date DATETIME
) | SELECT date_of_birth, COUNT(date_of_birth) FROM Guests WHERE gender_code = "Male" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
15970,
834,
24752,
53,
7,
41,
740,
834,
23,
26,
3,
21342,
17966,
6,
740,
834,
7,
14184,
834,
4350,
3,
28027,
599,
1808,
201,
740,
834,
1329,
40,
834,
4350,
584,
4280,
28027,
599,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
833,
834,
858,
834,
20663,
6,
2847,
17161,
599,
5522,
834,
858,
834,
20663,
61,
21680,
3,
22360,
549,
17444,
427,
7285,
834,
4978,
3274,
96,
329,
9,
109,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Which artist has a Spoofed title in June 1992? | CREATE TABLE table_name_32 (
artist VARCHAR,
date VARCHAR
) | SELECT artist FROM table_name_32 WHERE date = "june 1992" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2668,
41,
2377,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
2377,
65,
3,
9,
8927,
32,
19565,
2233,
16,
1515,
9047,
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,
2377,
21680,
953,
834,
4350,
834,
2668,
549,
17444,
427,
833,
3274,
96,
6959,
15,
9047,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Which tournament has a hard surface and final opponents rohan bopanna & mustafa ghouse? | CREATE TABLE table_name_19 (tournament VARCHAR, surface VARCHAR, opponents_in_the_final VARCHAR) | SELECT tournament FROM table_name_19 WHERE surface = "hard" AND opponents_in_the_final = "rohan bopanna & mustafa ghouse" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2294,
41,
17,
1211,
20205,
17,
584,
4280,
28027,
6,
1774,
584,
4280,
28027,
6,
16383,
834,
77,
834,
532,
834,
12406,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
5892,
21680,
953,
834,
4350,
834,
2294,
549,
17444,
427,
1774,
3274,
96,
5651,
121,
3430,
16383,
834,
77,
834,
532,
834,
12406,
3274,
96,
52,
32,
2618,
3005,
102,
10878,
3,
184,
398,
9,
89,
9,
3,
122,
1840,
121,
... |
How many years of introduction does the Neal Submachine Gun have? | CREATE TABLE table_29474407_11 (
year_of_intro VARCHAR,
name__designation VARCHAR
) | SELECT COUNT(year_of_intro) FROM table_29474407_11 WHERE name__designation = "Neal submachine gun" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3166,
4177,
3628,
4560,
834,
2596,
41,
215,
834,
858,
834,
20322,
32,
584,
4280,
28027,
6,
564,
834,
834,
9124,
257,
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,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
1201,
834,
858,
834,
20322,
32,
61,
21680,
953,
834,
3166,
4177,
3628,
4560,
834,
2596,
549,
17444,
427,
564,
834,
834,
9124,
257,
3274,
96,
567,
15,
138,
769,
8276,
630,
4740,
121,
1,
-100,
-100,
... |
what was the title of the episode 21a? | CREATE TABLE table_21928 (
"Episode #" text,
"Season #" real,
"Title" text,
"Writer(s)" text,
"Director" text,
"Originalairdate" text
) | SELECT "Title" FROM table_21928 WHERE "Episode #" = '21a' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
2294,
2577,
41,
96,
427,
102,
159,
32,
221,
1713,
121,
1499,
6,
96,
134,
15,
9,
739,
1713,
121,
490,
6,
96,
382,
155,
109,
121,
1499,
6,
96,
24965,
49,
599,
7,
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,
382,
155,
109,
121,
21680,
953,
834,
357,
2294,
2577,
549,
17444,
427,
96,
427,
102,
159,
32,
221,
1713,
121,
3274,
3,
31,
2658,
9,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
when was the first time that , patient 030-10407 had the maximum of rdw? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
) | SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-10407')) AND lab.labname = 'rdw' ORDER BY lab.labresult DESC, lab.labresulttime LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2179,
9339,
41,
2179,
521,
9824,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
1543,
3585,
1499,
6,
9329,
1499,
6,
1543,
4914,
29,
715,
97,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
7690,
5,
9339,
60,
7,
83,
17,
715,
21680,
7690,
549,
17444,
427,
7690,
5,
10061,
15129,
21545,
23,
26,
3388,
41,
23143,
14196,
1868,
5,
10061,
15129,
21545,
23,
26,
21680,
1868,
549,
17444,
427,
1868,
5,
10061,
1587... |
in 1953, which of the institutions joined? | CREATE TABLE table_261895_1 (
institution VARCHAR,
joined VARCHAR
) | SELECT institution FROM table_261895_1 WHERE joined = "1953" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2688,
2606,
3301,
834,
536,
41,
6568,
584,
4280,
28027,
6,
3311,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
16,
23726,
6,
84,
13,
8,
4222,
3311,
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,
6568,
21680,
953,
834,
2688,
2606,
3301,
834,
536,
549,
17444,
427,
3311,
3274,
96,
2294,
4867,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is the date for the tournament joué-lès-tours? | CREATE TABLE table_name_52 (date VARCHAR, tournament VARCHAR) | SELECT date FROM table_name_52 WHERE tournament = "joué-lès-tours" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5373,
41,
5522,
584,
4280,
28027,
6,
5892,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
125,
19,
8,
833,
21,
8,
5892,
3,
8921,
154,
18,
40,
7372,
18,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5373,
549,
17444,
427,
5892,
3274,
96,
8921,
154,
18,
40,
7372,
18,
17,
1211,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
How many losses occurred when the club team was ekranas-2 panev ys | CREATE TABLE table_22078 (
"Position" real,
"Club" text,
"Games played" real,
"Wins" real,
"Draws" real,
"Loses" real,
"Goals scored" real,
"Goals conceded" real,
"Points" real
) | SELECT MAX("Loses") FROM table_22078 WHERE "Club" = 'Ekranas-2 Panevėžys' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
1755,
3940,
41,
96,
345,
32,
7,
4749,
121,
490,
6,
96,
254,
11158,
121,
1499,
6,
96,
23055,
7,
1944,
121,
490,
6,
96,
18455,
7,
121,
490,
6,
96,
308,
10936,
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,
1... | [
3,
23143,
14196,
4800,
4,
599,
121,
434,
32,
2260,
8512,
21680,
953,
834,
357,
1755,
3940,
549,
17444,
427,
96,
254,
11158,
121,
3274,
3,
31,
427,
9669,
29,
9,
7,
4949,
2709,
15482,
2,
63,
7,
31,
1,
-100,
-100,
-100,
-100,
-100,... |
how many patients have diagnoses icd9 code 1418? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.icd9_code = "1418" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
5... |
what was the score on june 16? | CREATE TABLE table_78104 (
"Date" text,
"Winning Team" text,
"Losing Team" text,
"Score" text,
"Venue" text
) | SELECT "Score" FROM table_78104 WHERE "Date" = 'june 16' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3940,
15442,
41,
96,
308,
342,
121,
1499,
6,
96,
518,
10503,
2271,
121,
1499,
6,
96,
434,
32,
7,
53,
2271,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
553,
35,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
134,
9022,
121,
21680,
953,
834,
3940,
15442,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
6959,
15,
898,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the home team score for the game with the away team Carlton? | CREATE TABLE table_4910 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Home team score" FROM table_4910 WHERE "Away team" = 'carlton' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3647,
1714,
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,
19040,
372,
2604,
121,
21680,
953,
834,
3647,
1714,
549,
17444,
427,
96,
188,
1343,
372,
121,
3274,
3,
31,
1720,
7377,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
rosen _ modified hachinski ischemia score >= 4 | CREATE TABLE table_train_106 (
"id" int,
"gender" string,
"pregnancy_or_lactation" bool,
"mini_mental_state_examination_mmse" int,
"uncontrolled_diabetes" bool,
"blood_glucose" int,
"rosen_modified_hachinski_ischemic_score" int,
"body_mass_index_bmi" float,
"age" float,
"NOUSE" float
) | SELECT * FROM table_train_106 WHERE rosen_modified_hachinski_ischemic_score >= 4 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
9719,
834,
16431,
41,
96,
23,
26,
121,
16,
17,
6,
96,
122,
3868,
121,
6108,
6,
96,
2026,
11260,
11298,
834,
127,
834,
9700,
6821,
121,
3,
12840,
40,
6,
96,
7619,
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,
1... | [
3,
23143,
14196,
1429,
21680,
953,
834,
9719,
834,
16431,
549,
17444,
427,
4659,
29,
834,
7360,
3676,
834,
1024,
5675,
4009,
834,
2014,
3113,
834,
7,
9022,
2490,
2423,
314,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
what is the most gold when the total is 7? | CREATE TABLE table_name_33 (
gold INTEGER,
total VARCHAR
) | SELECT MAX(gold) FROM table_name_33 WHERE total = 7 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4201,
41,
2045,
3,
21342,
17966,
6,
792,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
125,
19,
8,
167,
2045,
116,
8,
792,
19,
489,
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,
4800,
4,
599,
14910,
61,
21680,
953,
834,
4350,
834,
4201,
549,
17444,
427,
792,
3274,
489,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Who was No. 9 when Ava was No. 4 and Addison was No. 6? | CREATE TABLE table_49911 (
"Region (year)" text,
"No. 1" text,
"No. 2" text,
"No. 3" text,
"No. 4" text,
"No. 5" text,
"No. 6" text,
"No. 7" text,
"No. 8" text,
"No. 9" text
) | SELECT "No. 9" FROM table_49911 WHERE "No. 4" = 'ava' AND "No. 6" = 'addison' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
3264,
2596,
41,
96,
17748,
23,
106,
41,
1201,
61,
121,
1499,
6,
96,
4168,
5,
209,
121,
1499,
6,
96,
4168,
5,
204,
121,
1499,
6,
96,
4168,
5,
220,
121,
1499,
6,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
4168,
5,
668,
121,
21680,
953,
834,
591,
3264,
2596,
549,
17444,
427,
96,
4168,
5,
3,
20364,
3274,
3,
31,
8644,
31,
3430,
96,
4168,
5,
431,
121,
3274,
3,
31,
13039,
23,
739,
31,
1,
-100,
-100,
-100,
-100,
... |
What is the country with a 70-74-69=213 score? | CREATE TABLE table_name_65 (
country VARCHAR,
score VARCHAR
) | SELECT country FROM table_name_65 WHERE score = 70 - 74 - 69 = 213 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4122,
41,
684,
584,
4280,
28027,
6,
2604,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
684,
28,
3,
9,
2861,
18,
4581,
18,
3951,
2423,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
684,
21680,
953,
834,
4350,
834,
4122,
549,
17444,
427,
2604,
3274,
2861,
3,
18,
3,
4581,
3,
18,
3,
3951,
3274,
204,
2368,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the report for races where Will Power had both pole position and fastest lap? | CREATE TABLE table_16099880_5 (
report VARCHAR,
pole_position VARCHAR,
fastest_lap VARCHAR
) | SELECT report FROM table_16099880_5 WHERE pole_position = "Will Power" AND fastest_lap = "Will Power" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2938,
4198,
3916,
2079,
834,
755,
41,
934,
584,
4280,
28027,
6,
11148,
834,
4718,
584,
4280,
28027,
6,
10391,
834,
8478,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
3210... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
3,
23143,
14196,
934,
21680,
953,
834,
2938,
4198,
3916,
2079,
834,
755,
549,
17444,
427,
11148,
834,
4718,
3274,
96,
518,
1092,
2621,
121,
3430,
10391,
834,
8478,
3274,
96,
518,
1092,
2621,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,... |
What opening date has a capacity of 100? | CREATE TABLE table_name_53 (opening_date VARCHAR, capacity VARCHAR) | SELECT opening_date FROM table_name_53 WHERE capacity = 100 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4867,
41,
8751,
53,
834,
5522,
584,
4280,
28027,
6,
2614,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
2101,
833,
65,
3,
9,
2614,
13,
910,
58,
1,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2101,
834,
5522,
21680,
953,
834,
4350,
834,
4867,
549,
17444,
427,
2614,
3274,
910,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Show codes and fates of missions, and names of ships involved. | CREATE TABLE ship (
Name VARCHAR,
Ship_ID VARCHAR
)
CREATE TABLE mission (
Code VARCHAR,
Fate VARCHAR,
Ship_ID VARCHAR
) | SELECT T1.Code, T1.Fate, T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4383,
41,
5570,
584,
4280,
28027,
6,
15508,
834,
4309,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
2253,
41,
3636,
584,
4280,
28027,
6,
11762,
15,
584... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
22737,
6,
332,
5411,
371,
342,
6,
332,
4416,
23954,
21680,
2253,
6157,
332,
536,
3,
15355,
3162,
4383,
6157,
332,
357,
9191,
332,
5411,
134,
10462,
834,
4309,
3274,
332,
4416,
134,
10462,
834,
4309,
1,
-1... |
How many laps for s bastien bourdais, and a Grid smaller than 1? | CREATE TABLE table_68452 (
"Name" text,
"Team" text,
"Laps" real,
"Time/Retired" text,
"Grid" real,
"Points" real
) | SELECT SUM("Laps") FROM table_68452 WHERE "Name" = 'sébastien bourdais' AND "Grid" < '1' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3651,
2128,
357,
41,
96,
23954,
121,
1499,
6,
96,
18699,
121,
1499,
6,
96,
3612,
102,
7,
121,
490,
6,
96,
13368,
87,
1649,
11809,
26,
121,
1499,
6,
96,
13313,
26,
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,
180,
6122,
599,
121,
3612,
102,
7,
8512,
21680,
953,
834,
3651,
2128,
357,
549,
17444,
427,
96,
23954,
121,
3274,
3,
31,
7,
154,
4883,
15945,
3,
115,
1211,
26,
9,
159,
31,
3430,
96,
13313,
26,
121,
3,
2,
3,
31... |
Name the most gdp per capita latvian | CREATE TABLE table_21133193_1 (
gdp_per_capita__us INTEGER,
languages VARCHAR
) | SELECT MAX(gdp_per_capita__us) AS $_ FROM table_21133193_1 WHERE languages = "Latvian" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2658,
2368,
3341,
4271,
834,
536,
41,
3,
122,
26,
102,
834,
883,
834,
4010,
155,
9,
834,
834,
302,
3,
21342,
17966,
6,
8024,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
321... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
122,
26,
102,
834,
883,
834,
4010,
155,
9,
834,
834,
302,
61,
6157,
1514,
834,
21680,
953,
834,
2658,
2368,
3341,
4271,
834,
536,
549,
17444,
427,
8024,
3274,
96,
3612,
17,
5907,
29,
121,
1,
-100,
... |
Return a bar chart on how many eliminations did each team have?, and rank by the y-axis in ascending. | CREATE TABLE wrestler (
Wrestler_ID int,
Name text,
Reign text,
Days_held text,
Location text,
Event text
)
CREATE TABLE Elimination (
Elimination_ID text,
Wrestler_ID text,
Team text,
Eliminated_By text,
Elimination_Move text,
Time text
) | SELECT Team, COUNT(*) FROM Elimination GROUP BY Team ORDER BY COUNT(*) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
26033,
52,
41,
549,
6216,
1171,
834,
4309,
16,
17,
6,
5570,
1499,
6,
419,
3191,
1499,
6,
13992,
834,
14796,
1499,
6,
10450,
1499,
6,
8042,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2271,
6,
2847,
17161,
599,
1935,
61,
21680,
7495,
14484,
350,
4630,
6880,
272,
476,
2271,
4674,
11300,
272,
476,
2847,
17161,
599,
1935,
61,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
How many wins for team mv agusta, over 10 points, and after 1957? | CREATE TABLE table_name_59 (wins INTEGER, year VARCHAR, team VARCHAR, points VARCHAR) | SELECT SUM(wins) FROM table_name_59 WHERE team = "mv agusta" AND points > 10 AND year > 1957 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3390,
41,
3757,
7,
3,
21342,
17966,
6,
215,
584,
4280,
28027,
6,
372,
584,
4280,
28027,
6,
979,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
92... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
180,
6122,
599,
3757,
7,
61,
21680,
953,
834,
4350,
834,
3390,
549,
17444,
427,
372,
3274,
96,
51,
208,
3,
9,
17198,
9,
121,
3430,
979,
2490,
335,
3430,
215,
2490,
24011,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
return me the authors who have more than 10 papers in the VLDB conference . | CREATE TABLE domain_publication (
did int,
pid int
)
CREATE TABLE journal (
homepage varchar,
jid int,
name varchar
)
CREATE TABLE organization (
continent varchar,
homepage varchar,
name varchar,
oid int
)
CREATE TABLE publication (
abstract varchar,
cid int,
citation_num int,
jid int,
pid int,
reference_num int,
title varchar,
year int
)
CREATE TABLE keyword (
keyword varchar,
kid int
)
CREATE TABLE cite (
cited int,
citing int
)
CREATE TABLE domain_author (
aid int,
did int
)
CREATE TABLE author (
aid int,
homepage varchar,
name varchar,
oid int
)
CREATE TABLE publication_keyword (
kid int,
pid int
)
CREATE TABLE domain_keyword (
did int,
kid int
)
CREATE TABLE domain_conference (
cid int,
did int
)
CREATE TABLE conference (
cid int,
homepage varchar,
name varchar
)
CREATE TABLE domain (
did int,
name varchar
)
CREATE TABLE domain_journal (
did int,
jid int
)
CREATE TABLE writes (
aid int,
pid int
) | SELECT author.name FROM author, conference, publication, writes WHERE conference.name = 'VLDB' AND publication.cid = conference.cid AND writes.aid = author.aid AND writes.pid = publication.pid GROUP BY author.name HAVING COUNT(DISTINCT (publication.title)) > 10 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3303,
834,
15727,
257,
41,
410,
16,
17,
6,
3,
12417,
16,
17,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
6378,
41,
22844,
3,
4331,
4059,
6,
3,
354,
23,
26,
16,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2291,
5,
4350,
21680,
2291,
6,
2542,
6,
5707,
6,
11858,
549,
17444,
427,
2542,
5,
4350,
3274,
3,
31,
553,
9815,
279,
31,
3430,
5707,
5,
10812,
3274,
2542,
5,
10812,
3430,
11858,
5,
6146,
3274,
2291,
5,
6146,
3430,... |
provide the number of patients whose admission type is elective and drug name is heparin (iabp)? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND prescriptions.drug = "Heparin (IABP)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7744,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7744,
7,
5,
8399,
51,
834,
23,
26,
549... |
Show names of shops that have more than one kind of device in stock. | CREATE TABLE stock (
shop_id number,
device_id number,
quantity number
)
CREATE TABLE device (
device_id number,
device text,
carrier text,
package_version text,
applications text,
software_platform text
)
CREATE TABLE shop (
shop_id number,
shop_name text,
location text,
open_date text,
open_year number
) | SELECT T2.shop_name FROM stock AS T1 JOIN shop AS T2 ON T1.shop_id = T2.shop_id GROUP BY T1.shop_id HAVING COUNT(*) > 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1519,
41,
1814,
834,
23,
26,
381,
6,
1407,
834,
23,
26,
381,
6,
8708,
381,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
1407,
41,
1407,
834,
23,
26,
381,
6,
1407,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
332,
4416,
6921,
834,
4350,
21680,
1519,
6157,
332,
536,
3,
15355,
3162,
1814,
6157,
332,
357,
9191,
332,
5411,
6921,
834,
23,
26,
3274,
332,
4416,
6921,
834,
23,
26,
350,
4630,
6880,
272,
476,
332,
5411,
6921,
834,... |
what is the number of patients whose admission year is less than 2145 and diagnoses icd9 code is 591? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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.admityear < "2145" AND diagnoses.icd9_code = "591" | [
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 was the result for the team with 3 draws? | CREATE TABLE table_name_42 (
result VARCHAR,
draws VARCHAR
) | SELECT result FROM table_name_42 WHERE draws = "3" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4165,
41,
741,
584,
4280,
28027,
6,
14924,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
741,
21,
8,
372,
28,
220,
14924,
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,
741,
21680,
953,
834,
4350,
834,
4165,
549,
17444,
427,
14924,
3274,
96,
519,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name the average popular votes in years after 1990 with percentage of 4.94% | CREATE TABLE table_name_35 (popular_votes INTEGER, percentage VARCHAR, year VARCHAR) | SELECT AVG(popular_votes) FROM table_name_35 WHERE percentage = "4.94%" AND year > 1990 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2469,
41,
27302,
834,
1621,
1422,
3,
21342,
17966,
6,
5294,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
1348,
1012,
118... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
71,
17217,
599,
27302,
834,
1621,
1422,
61,
21680,
953,
834,
4350,
834,
2469,
549,
17444,
427,
5294,
3274,
96,
27336,
5988,
121,
3430,
215,
2490,
5541,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the highest year that has no more than 0 points? | CREATE TABLE table_name_85 (year INTEGER, points INTEGER) | SELECT MAX(year) FROM table_name_85 WHERE points < 0 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4433,
41,
1201,
3,
21342,
17966,
6,
979,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2030,
215,
24,
65,
150,
72,
145,
3,
632,
979,
58,
1,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
1201,
61,
21680,
953,
834,
4350,
834,
4433,
549,
17444,
427,
979,
3,
2,
3,
632,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
When the United Kingdom had a time of 1:30.51.2, what was the lowest that they ranked? | CREATE TABLE table_name_8 (
place INTEGER,
country VARCHAR,
time VARCHAR
) | SELECT MIN(place) FROM table_name_8 WHERE country = "united kingdom" AND time = "1:30.51.2" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
927,
41,
286,
3,
21342,
17966,
6,
684,
584,
4280,
28027,
6,
97,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
366,
8,
907,
6524,
141,
3,
9,
97,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
4687,
61,
21680,
953,
834,
4350,
834,
927,
549,
17444,
427,
684,
3274,
96,
15129,
15,
26,
14740,
121,
3430,
97,
3274,
96,
20120,
5,
755,
10917,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What Poles have Races smaller than 4? | CREATE TABLE table_name_59 (poles INTEGER, races INTEGER) | SELECT AVG(poles) FROM table_name_59 WHERE races < 4 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3390,
41,
14332,
7,
3,
21342,
17966,
6,
10879,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
363,
19418,
7,
43,
10949,
7,
2755,
145,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
71,
17217,
599,
14332,
7,
61,
21680,
953,
834,
4350,
834,
3390,
549,
17444,
427,
10879,
3,
2,
314,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
WHAT IS THE 2011 PERFORMANCE WITH A 2007 OF Q3? | CREATE TABLE table_name_90 (
Id VARCHAR
) | SELECT 2011 FROM table_name_90 WHERE 2007 = "q3" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2394,
41,
27,
26,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
21665,
6827,
1853,
2722,
3,
8742,
24030,
15083,
11951,
71,
4101,
3347,
1593,
519,
58,
1,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2722,
21680,
953,
834,
4350,
834,
2394,
549,
17444,
427,
4101,
3274,
96,
1824,
519,
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 iata for malta international airport? | CREATE TABLE table_49754 (
"City" text,
"Country" text,
"IATA" text,
"ICAO" text,
"Airport" text
) | SELECT "IATA" FROM table_49754 WHERE "Airport" = 'malta international airport' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3647,
3072,
591,
41,
96,
254,
485,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
196,
19282,
121,
1499,
6,
96,
15038,
667,
121,
1499,
6,
96,
20162,
1493,
121,
1499,
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,
0... | [
3,
23143,
14196,
96,
196,
19282,
121,
21680,
953,
834,
3647,
3072,
591,
549,
17444,
427,
96,
20162,
1493,
121,
3274,
3,
31,
1982,
17,
9,
1038,
3761,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Who was the jockey in 7th position? | CREATE TABLE table_2584 (
"Position" text,
"Horse" text,
"Jockey" text,
"Age" real,
"Handicap (st-lb)" text,
"SP" text,
"Distance" text,
"Prize money" text
) | SELECT "Jockey" FROM table_2584 WHERE "Position" = '7th' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
4608,
41,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
566,
127,
7,
15,
121,
1499,
6,
96,
683,
3961,
15,
63,
121,
1499,
6,
96,
188,
397,
121,
490,
6,
96,
566,
232,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
683,
3961,
15,
63,
121,
21680,
953,
834,
1828,
4608,
549,
17444,
427,
96,
345,
32,
7,
4749,
121,
3274,
3,
31,
940,
189,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
How many stories were done in 2008 with a 16 rank? | CREATE TABLE table_name_85 (
stories VARCHAR,
completed VARCHAR,
rank VARCHAR
) | SELECT COUNT(stories) FROM table_name_85 WHERE completed = 2008 AND rank = "16" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4433,
41,
1937,
584,
4280,
28027,
6,
2012,
584,
4280,
28027,
6,
11003,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
1937,
130,
612,
16,
2628,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
7279,
725,
61,
21680,
953,
834,
4350,
834,
4433,
549,
17444,
427,
2012,
3274,
2628,
3430,
11003,
3274,
96,
2938,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What country has a score of 73-72-67=212? | CREATE TABLE table_50672 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To Par" text
) | SELECT "Country" FROM table_50672 WHERE "Score" = '73-72-67=212' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1752,
3708,
357,
41,
96,
345,
11706,
121,
1499,
6,
96,
15800,
49,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
3696,
2180,
121,
1499,
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,
96,
10628,
651,
121,
21680,
953,
834,
1752,
3708,
357,
549,
17444,
427,
96,
134,
9022,
121,
3274,
3,
31,
4552,
18,
5865,
18,
3708,
2423,
24837,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the agg when the seconf leg is 58-75? | CREATE TABLE table_64687 (
"Team #1" text,
"Agg." text,
"Team #2" text,
"1st leg" text,
"2nd leg" text
) | SELECT "Agg." FROM table_64687 WHERE "2nd leg" = '58-75' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4389,
3651,
940,
41,
96,
18699,
7172,
121,
1499,
6,
96,
188,
4102,
535,
1499,
6,
96,
18699,
15493,
121,
1499,
6,
96,
536,
7,
17,
4553,
121,
1499,
6,
96,
357,
727,
4553,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
188,
4102,
535,
21680,
953,
834,
4389,
3651,
940,
549,
17444,
427,
96,
357,
727,
4553,
121,
3274,
3,
31,
3449,
18,
3072,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What network is the Korean title of mbc - on? | CREATE TABLE table_11597 (
"Year" real,
"English title" text,
"Korean title" text,
"Role" text,
"Network" text
) | SELECT "Network" FROM table_11597 WHERE "Korean title" = 'mbc 베스트극장 - 작은 도둑' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
15660,
4327,
41,
96,
476,
2741,
121,
490,
6,
96,
26749,
2233,
121,
1499,
6,
96,
439,
127,
15,
152,
2233,
121,
1499,
6,
96,
448,
32,
109,
121,
1499,
6,
96,
9688,
1981,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9688,
1981,
121,
21680,
953,
834,
15660,
4327,
549,
17444,
427,
96,
439,
127,
15,
152,
2233,
121,
3274,
3,
31,
51,
115,
75,
3,
2,
3,
18,
3,
2,
3,
2,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the value for 2010 when the value for 2006 is A and the value for 2009 is 1R? | CREATE TABLE table_name_59 (
Id VARCHAR
) | SELECT 2010 FROM table_name_59 WHERE 2006 = "a" AND 2009 = "1r" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3390,
41,
27,
26,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
701,
21,
2735,
116,
8,
701,
21,
3581,
19,
71,
11,
8,
701,
21,
2464,
19,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2735,
21680,
953,
834,
4350,
834,
3390,
549,
17444,
427,
3581,
3274,
96,
9,
121,
3430,
2464,
3274,
96,
536,
52,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
I want the team for date of vacancy being 28 february | CREATE TABLE table_name_52 (
team VARCHAR,
date_of_vacancy VARCHAR
) | SELECT team FROM table_name_52 WHERE date_of_vacancy = "28 february" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5373,
41,
372,
584,
4280,
28027,
6,
833,
834,
858,
834,
29685,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
27,
241,
8,
372,
21,
833,
13,
3,
29685,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
372,
21680,
953,
834,
4350,
834,
5373,
549,
17444,
427,
833,
834,
858,
834,
29685,
3274,
96,
2577,
29976,
76,
1208,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Who was the away team when the attendance was 206? | CREATE TABLE table_51008 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Attendance" text
) | SELECT "Away team" FROM table_51008 WHERE "Attendance" = '206' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
25926,
4018,
41,
96,
382,
23,
15,
150,
121,
1499,
6,
96,
19040,
372,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
188,
1343,
372,
121,
1499,
6,
96,
188,
17,
324,
26,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
188,
1343,
372,
121,
21680,
953,
834,
25926,
4018,
549,
17444,
427,
96,
188,
17,
324,
26,
663,
121,
3274,
3,
31,
24643,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the release date of The Blow Out? | CREATE TABLE table_name_59 (
release_date VARCHAR,
title VARCHAR
) | SELECT release_date FROM table_name_59 WHERE title = "the blow out" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3390,
41,
1576,
834,
5522,
584,
4280,
28027,
6,
2233,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1576,
833,
13,
37,
272,
3216,
3387,
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,
1576,
834,
5522,
21680,
953,
834,
4350,
834,
3390,
549,
17444,
427,
2233,
3274,
96,
532,
6019,
91,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
List the top 5 genres by number of tracks. List genres name and total tracks. | CREATE TABLE genres (
name VARCHAR,
id VARCHAR
)
CREATE TABLE tracks (
genre_id VARCHAR
) | SELECT T1.name, COUNT(*) FROM genres AS T1 JOIN tracks AS T2 ON T2.genre_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 5 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
5349,
7,
41,
564,
584,
4280,
28027,
6,
3,
23,
26,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
6542,
41,
5349,
834,
23,
26,
584,
4280,
28027,
3,
61... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
332,
5411,
4350,
6,
2847,
17161,
599,
1935,
61,
21680,
5349,
7,
6157,
332,
536,
3,
15355,
3162,
6542,
6157,
332,
357,
9191,
332,
4416,
729,
60,
834,
23,
26,
3274,
332,
5411,
23,
26,
350,
4630,
6880,
272,
476,
332,... |
Name the height for demetrius jemison | CREATE TABLE table_27603 (
"#" real,
"Name" text,
"Position" text,
"Height" text,
"Weight" real,
"Year" text,
"Home Town" text,
"Last School" text
) | SELECT "Height" FROM table_27603 WHERE "Name" = 'Demetrius Jemison' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2555,
3328,
519,
41,
96,
4663,
121,
490,
6,
96,
23954,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
3845,
2632,
121,
1499,
6,
96,
1326,
2632,
121,
490,
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,
3845,
2632,
121,
21680,
953,
834,
2555,
3328,
519,
549,
17444,
427,
96,
23954,
121,
3274,
3,
31,
2962,
8180,
302,
446,
12641,
106,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Attendance of 36,796 had what score? | CREATE TABLE table_name_46 (
score VARCHAR,
attendance VARCHAR
) | SELECT score FROM table_name_46 WHERE attendance = "36,796" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4448,
41,
2604,
584,
4280,
28027,
6,
11364,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
22497,
663,
13,
4475,
6,
940,
4314,
141,
125,
2604,
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,
2604,
21680,
953,
834,
4350,
834,
4448,
549,
17444,
427,
11364,
3274,
96,
3420,
6,
940,
4314,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What type of school has the nickname the Oilers? | CREATE TABLE table_262560_2 (
type VARCHAR,
nickname VARCHAR
) | SELECT type FROM table_262560_2 WHERE nickname = "Oilers" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2688,
1828,
3328,
834,
357,
41,
686,
584,
4280,
28027,
6,
24649,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
686,
13,
496,
65,
8,
24649,
8,
6067,
277,
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,
686,
21680,
953,
834,
2688,
1828,
3328,
834,
357,
549,
17444,
427,
24649,
3274,
96,
667,
173,
277,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the home team against the away team Norwich City? | CREATE TABLE table_48549 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
) | SELECT "Home team" FROM table_48549 WHERE "Away team" = 'norwich city' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
4433,
3647,
41,
96,
382,
23,
15,
150,
121,
1499,
6,
96,
19040,
372,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
188,
1343,
372,
121,
1499,
6,
96,
308,
342,
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,
19040,
372,
121,
21680,
953,
834,
591,
4433,
3647,
549,
17444,
427,
96,
188,
1343,
372,
121,
3274,
3,
31,
29,
127,
210,
362,
690,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who wrote season 23? | CREATE TABLE table_2409041_3 (
written_by VARCHAR,
no_in_season VARCHAR
) | SELECT written_by FROM table_2409041_3 WHERE no_in_season = 23 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
11944,
2394,
4853,
834,
519,
41,
1545,
834,
969,
584,
4280,
28027,
6,
150,
834,
77,
834,
9476,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
2832,
774,
1902,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1545,
834,
969,
21680,
953,
834,
11944,
2394,
4853,
834,
519,
549,
17444,
427,
150,
834,
77,
834,
9476,
3274,
1902,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is Part 4, when Part 2 is "batt"? | CREATE TABLE table_name_51 (part_4 VARCHAR, part_2 VARCHAR) | SELECT part_4 FROM table_name_51 WHERE part_2 = "batt" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5553,
41,
2274,
834,
591,
584,
4280,
28027,
6,
294,
834,
357,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
2733,
6464,
116,
2733,
204,
19,
96,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
294,
834,
591,
21680,
953,
834,
4350,
834,
5553,
549,
17444,
427,
294,
834,
357,
3274,
96,
3697,
17,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Count the patients less than 72 years old who have been prescribed aluminum-magnesium hydrox-simethicone. | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
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 INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "72" AND prescriptions.drug = "Aluminum-Magnesium Hydrox.-Simethicone" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7744,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7744,
7,
5,
8399,
51,
834,
23,
26,
549... |
Who had all of the blocks in 2012? | CREATE TABLE table_17961 (
"Year" real,
"Points" text,
"Rebounds" text,
"Assists" text,
"Steals" text,
"Blocks" text
) | SELECT "Blocks" FROM table_17961 WHERE "Year" = '2012' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26593,
4241,
41,
96,
476,
2741,
121,
490,
6,
96,
22512,
7,
121,
1499,
6,
96,
1649,
6115,
7,
121,
1499,
6,
96,
188,
7,
7,
343,
7,
121,
1499,
6,
96,
14337,
5405,
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,
1... | [
3,
23143,
14196,
96,
279,
4029,
7,
121,
21680,
953,
834,
26593,
4241,
549,
17444,
427,
96,
476,
2741,
121,
3274,
3,
31,
12172,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
who is the the high rebounds with high assbeingts being scottie pippen (9) | CREATE TABLE table_13480122_5 (
high_rebounds VARCHAR,
high_assists VARCHAR
) | SELECT high_rebounds FROM table_13480122_5 WHERE high_assists = "Scottie Pippen (9)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
20579,
20889,
834,
755,
41,
306,
834,
23768,
584,
4280,
28027,
6,
306,
834,
6500,
7,
17,
7,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
113,
19,
8,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
306,
834,
23768,
21680,
953,
834,
2368,
20579,
20889,
834,
755,
549,
17444,
427,
306,
834,
6500,
7,
17,
7,
3274,
96,
134,
10405,
23,
15,
2745,
1572,
35,
41,
11728,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who does the lap-by-lap in 2011? | CREATE TABLE table_16267 (
"Year" real,
"Network" text,
"Host" text,
"Pre-race analyst" text,
"Lap-by-lap" text,
"Color commentator(s)" text,
"Pit reporters" text
) | SELECT "Lap-by-lap" FROM table_16267 WHERE "Year" = '2011' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2938,
357,
3708,
41,
96,
476,
2741,
121,
490,
6,
96,
9688,
1981,
121,
1499,
6,
96,
566,
3481,
121,
1499,
6,
96,
10572,
18,
12614,
15649,
121,
1499,
6,
96,
3612,
102,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
3612,
102,
18,
969,
18,
8478,
121,
21680,
953,
834,
2938,
357,
3708,
549,
17444,
427,
96,
476,
2741,
121,
3274,
3,
31,
13907,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the score on April 20? | CREATE TABLE table_52578 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT "Score" FROM table_52578 WHERE "Date" = 'april 20' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
755,
1828,
3940,
41,
96,
23055,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
18699,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
21417,
979,
121,
1499,
6,
96,
21417,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
134,
9022,
121,
21680,
953,
834,
755,
1828,
3940,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
9,
2246,
40,
460,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What was the overall record of Oral Roberts college? | CREATE TABLE table_72769 (
"School" text,
"Record" text,
"Conference" text,
"Conf. record" text,
"Regular season finish" text,
"Regular season second place" text
) | SELECT "Record" FROM table_72769 WHERE "School" = 'Oral Roberts' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
940,
2555,
3951,
41,
96,
29364,
121,
1499,
6,
96,
1649,
7621,
121,
1499,
6,
96,
4302,
11788,
121,
1499,
6,
96,
4302,
89,
5,
1368,
121,
1499,
6,
96,
17748,
4885,
774,
1992... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
1649,
7621,
121,
21680,
953,
834,
940,
2555,
3951,
549,
17444,
427,
96,
29364,
121,
3274,
3,
31,
7395,
138,
2715,
7,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the Apparent magnitude of a Declination (J2000) of 39 45 ? | CREATE TABLE table_name_67 (
apparent_magnitude INTEGER,
declination___j2000__ VARCHAR
) | SELECT MIN(apparent_magnitude) FROM table_name_67 WHERE declination___j2000__ = "°39′45″" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3708,
41,
10320,
834,
7493,
29,
20341,
3,
21342,
17966,
6,
20,
11005,
257,
834,
834,
834,
354,
13527,
834,
834,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
10198,
295,
834,
7493,
29,
20341,
61,
21680,
953,
834,
4350,
834,
3708,
549,
17444,
427,
20,
11005,
257,
834,
834,
834,
354,
13527,
834,
834,
3274,
96,
1956,
3288,
17774,
2128,
7079,
121,
1,
-100,
-10... |
For those products with a price between 60 and 120, give me a pie chart to reflect the proportion of name and code. | CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | SELECT Name, Code FROM Products WHERE Price BETWEEN 60 AND 120 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
15248,
7,
41,
3636,
3,
21342,
17966,
6,
5570,
584,
4280,
28027,
599,
25502,
201,
3642,
19973,
584,
4280,
28027,
599,
25502,
201,
3,
19145,
584,
4280,
28027,
599,
25502,
201,
19764,
17833... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
5570,
6,
3636,
21680,
7554,
549,
17444,
427,
5312,
272,
7969,
518,
23394,
1640,
3430,
5864,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Bin the Year into weekday interval, then group and count by Year, display Y-axis in desc order. | CREATE TABLE exhibition (
Exhibition_ID int,
Year int,
Theme text,
Artist_ID int,
Ticket_Price real
)
CREATE TABLE artist (
Artist_ID int,
Name text,
Country text,
Year_Join int,
Age int
)
CREATE TABLE exhibition_record (
Exhibition_ID int,
Date text,
Attendance int
) | SELECT Year, COUNT(Year) FROM exhibition ORDER BY COUNT(Year) DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4473,
41,
22371,
834,
4309,
16,
17,
6,
2929,
16,
17,
6,
37,
526,
1499,
6,
9152,
834,
4309,
16,
17,
6,
3,
15569,
834,
345,
4920,
490,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
604... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2929,
6,
2847,
17161,
599,
476,
2741,
61,
21680,
4473,
4674,
11300,
272,
476,
2847,
17161,
599,
476,
2741,
61,
309,
25067,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What was Craig Stadler's lowest score for United states? | CREATE TABLE table_name_35 (
score INTEGER,
country VARCHAR,
player VARCHAR
) | SELECT MIN(score) FROM table_name_35 WHERE country = "united states" AND player = "craig stadler" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2469,
41,
2604,
3,
21342,
17966,
6,
684,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
12870,
472,
9,
12807,
31,
7,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
7,
9022,
61,
21680,
953,
834,
4350,
834,
2469,
549,
17444,
427,
684,
3274,
96,
15129,
15,
26,
2315,
121,
3430,
1959,
3274,
96,
2935,
23,
122,
3342,
12807,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
... |
When the Away team is fitzroy on the Date of 15 july 1967, what was the Home team playing? | CREATE TABLE table_56829 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Home team" FROM table_56829 WHERE "Date" = '15 july 1967' AND "Away team" = 'fitzroy' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
755,
3651,
3166,
41,
96,
19040,
372,
121,
1499,
6,
96,
19040,
372,
2604,
121,
1499,
6,
96,
188,
1343,
372,
121,
1499,
6,
96,
188,
1343,
372,
2604,
121,
1499,
6,
96,
553,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
19040,
372,
121,
21680,
953,
834,
755,
3651,
3166,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
1808,
3,
2047,
120,
18148,
31,
3430,
96,
188,
1343,
372,
121,
3274,
3,
31,
89,
5615,
8170,
31,
1,
-100,
-10... |
For those employees who do not work in departments with managers that have ids between 100 and 200, give me the trend about department_id over hire_date , sort by the x-axis in descending please. | CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE 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)
) | SELECT HIRE_DATE, DEPARTMENT_ID 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,
3248,
41,
301,
5618,
8015,
834,
4309,
7908,
1982,
599,
8525,
632,
201,
3,
13733,
26418,
834,
24604,
12200,
134,
3,
4331,
4059,
599,
2445,
201,
3,
16034,
16359,
834,
5911,
5596,
3,
4331... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
454,
14132,
834,
308,
6048,
6,
3396,
19846,
11810,
834,
4309,
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,
... |
what is the position when the year [A} is after 2011 and the pick is 28? | CREATE TABLE table_63560 (
"Year [A ]" real,
"Pick" text,
"Player name" text,
"Position" text,
"College" text
) | SELECT "Position" FROM table_63560 WHERE "Year [A ]" > '2011' AND "Pick" = '28' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
948,
2469,
3328,
41,
96,
476,
2741,
784,
188,
3,
908,
121,
490,
6,
96,
345,
3142,
121,
1499,
6,
96,
15800,
49,
564,
121,
1499,
6,
96,
345,
32,
7,
4749,
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,
948,
2469,
3328,
549,
17444,
427,
96,
476,
2741,
784,
188,
3,
908,
121,
2490,
3,
31,
13907,
31,
3430,
96,
345,
3142,
121,
3274,
3,
31,
2577,
31,
1,
-100,
-100,
-100,
... |
What is the name when weight shows head coach: Aleksandr Kabanov? | CREATE TABLE table_name_70 (
name VARCHAR,
weight VARCHAR
) | SELECT name FROM table_name_70 WHERE weight = "head coach: aleksandr kabanov" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2518,
41,
564,
584,
4280,
28027,
6,
1293,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
564,
116,
1293,
1267,
819,
3763,
10,
901,
16789,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
564,
21680,
953,
834,
4350,
834,
2518,
549,
17444,
427,
1293,
3274,
96,
3313,
3763,
10,
491,
16789,
232,
52,
3,
157,
8699,
5326,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is airing at 9:30 on the channel that airs Heroes at 9:00? | CREATE TABLE table_7513 (
"8:00" text,
"8:30" text,
"9:00" text,
"9:30" text,
"10:00" text
) | SELECT "9:30" FROM table_7513 WHERE "9:00" = 'heroes' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3072,
2368,
41,
96,
15692,
121,
1499,
6,
96,
927,
10,
1458,
121,
1499,
6,
96,
1298,
10,
1206,
121,
1499,
6,
96,
21150,
121,
1499,
6,
96,
536,
25713,
121,
1499,
3,
61,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
21150,
121,
21680,
953,
834,
3072,
2368,
549,
17444,
427,
96,
1298,
10,
1206,
121,
3274,
3,
31,
760,
32,
15,
7,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many dates are shown for the home team of orlando pirates and result of 1 3? | CREATE TABLE table_3718 (
"season" text,
"division" text,
"date" text,
"home team" text,
"result" text,
"away team" text
) | SELECT COUNT("date") FROM table_3718 WHERE "home team" = 'Orlando Pirates' AND "result" = '1–3' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4118,
2606,
41,
96,
9476,
121,
1499,
6,
96,
26,
23,
6610,
121,
1499,
6,
96,
5522,
121,
1499,
6,
96,
5515,
372,
121,
1499,
6,
96,
60,
7,
83,
17,
121,
1499,
6,
96,
8006... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5522,
8512,
21680,
953,
834,
4118,
2606,
549,
17444,
427,
96,
5515,
372,
121,
3274,
3,
31,
667,
7721,
32,
18667,
7,
31,
3430,
96,
60,
7,
83,
17,
121,
3274,
3,
31,
536,
104,
519,
31,
1,
-... |
How many results where given for the vote percentage 3.1%? | CREATE TABLE table_26375386_17 (
result VARCHAR,
vote_percentage VARCHAR
) | SELECT COUNT(result) FROM table_26375386_17 WHERE vote_percentage = "3.1%" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2688,
22954,
519,
3840,
834,
2517,
41,
741,
584,
4280,
28027,
6,
2902,
834,
883,
3728,
545,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
772,
213,
787,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
60,
7,
83,
17,
61,
21680,
953,
834,
2688,
22954,
519,
3840,
834,
2517,
549,
17444,
427,
2902,
834,
883,
3728,
545,
3274,
96,
5787,
4704,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What dates did they play Miami? | CREATE TABLE table_17323092_8 (date VARCHAR, team VARCHAR) | SELECT date FROM table_17323092_8 WHERE team = "Miami" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2517,
2668,
1458,
4508,
834,
927,
41,
5522,
584,
4280,
28027,
6,
372,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
5128,
410,
79,
577,
8327,
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,
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,
2517,
2668,
1458,
4508,
834,
927,
549,
17444,
427,
372,
3274,
96,
329,
23,
3690,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What was the kickoff time for week 11's game? | CREATE TABLE table_name_64 (
kickoff_time VARCHAR,
week VARCHAR
) | SELECT kickoff_time FROM table_name_64 WHERE week = 11 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4389,
41,
4583,
1647,
834,
715,
584,
4280,
28027,
6,
471,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
4583,
1647,
97,
21,
471,
850,
31,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4583,
1647,
834,
715,
21680,
953,
834,
4350,
834,
4389,
549,
17444,
427,
471,
3274,
850,
1,
-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, show me about the correlation between code and code , and group by attribute headquarter in a scatter chart. | 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.Code, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter | [
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,
22737,
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,
... |
Who was the successor that was formally installed on March 30, 1870? | CREATE TABLE table_26647 (
"State (class)" text,
"Vacator" text,
"Reason for change" text,
"Successor" text,
"Date of successors formal installation" text
) | SELECT "Successor" FROM table_26647 WHERE "Date of successors formal installation" = 'March 30, 1870' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
3539,
4177,
41,
96,
134,
4748,
41,
4057,
61,
121,
1499,
6,
96,
25203,
1016,
121,
1499,
6,
96,
1649,
9,
739,
21,
483,
121,
1499,
6,
96,
134,
17431,
24901,
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,
134,
17431,
24901,
121,
21680,
953,
834,
357,
3539,
4177,
549,
17444,
427,
96,
308,
342,
13,
22261,
7,
4727,
2545,
121,
3274,
3,
31,
25019,
11558,
507,
2518,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
what is the total number of awards dec has won ? | CREATE TABLE table_204_948 (
id number,
"year" number,
"award" text,
"category" text,
"film" text,
"result" text
) | SELECT COUNT("award") FROM table_204_948 WHERE "result" = 'won' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
4240,
927,
41,
3,
23,
26,
381,
6,
96,
1201,
121,
381,
6,
96,
9,
2239,
121,
1499,
6,
96,
8367,
839,
651,
121,
1499,
6,
96,
9988,
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,
2847,
17161,
599,
121,
9,
2239,
8512,
21680,
953,
834,
26363,
834,
4240,
927,
549,
17444,
427,
96,
60,
7,
83,
17,
121,
3274,
3,
31,
210,
106,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What Round against Aleksander Emelianenko had a time of 5:00? | CREATE TABLE table_name_98 (
round VARCHAR,
time VARCHAR,
opponent VARCHAR
) | SELECT round FROM table_name_98 WHERE time = "5:00" AND opponent = "aleksander emelianenko" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3916,
41,
1751,
584,
4280,
28027,
6,
97,
584,
4280,
28027,
6,
15264,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
9609,
581,
901,
16789,
11849,
396... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1751,
21680,
953,
834,
4350,
834,
3916,
549,
17444,
427,
97,
3274,
96,
19870,
121,
3430,
15264,
3274,
96,
138,
16789,
11849,
3,
15,
526,
9928,
18994,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the Record of the game with a Score of 107 108? | CREATE TABLE table_name_85 (
record VARCHAR,
score VARCHAR
) | SELECT record FROM table_name_85 WHERE score = "107–108" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4433,
41,
1368,
584,
4280,
28027,
6,
2604,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
11392,
13,
8,
467,
28,
3,
9,
17763,
13,
3,
18057... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1368,
21680,
953,
834,
4350,
834,
4433,
549,
17444,
427,
2604,
3274,
96,
18057,
104,
16169,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
How many gold when silver is less than 32, bronze is 25, and overall is less than 67? | CREATE TABLE table_name_17 (gold INTEGER, overall VARCHAR, silver VARCHAR, bronze VARCHAR) | SELECT SUM(gold) FROM table_name_17 WHERE silver < 32 AND bronze = 25 AND overall < 67 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2517,
41,
14910,
3,
21342,
17966,
6,
1879,
584,
4280,
28027,
6,
4294,
584,
4280,
28027,
6,
13467,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
3,
23143,
14196,
180,
6122,
599,
14910,
61,
21680,
953,
834,
4350,
834,
2517,
549,
17444,
427,
4294,
3,
2,
3538,
3430,
13467,
3274,
944,
3430,
1879,
3,
2,
3,
3708,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What notes have a rank greater than 2, with mexico as the country? | CREATE TABLE table_name_64 (notes VARCHAR, rank VARCHAR, country VARCHAR) | SELECT notes FROM table_name_64 WHERE rank > 2 AND country = "mexico" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4389,
41,
7977,
7,
584,
4280,
28027,
6,
11003,
584,
4280,
28027,
6,
684,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
3358,
43,
3,
9,
11003,
2123,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3358,
21680,
953,
834,
4350,
834,
4389,
549,
17444,
427,
11003,
2490,
204,
3430,
684,
3274,
96,
51,
994,
5807,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
For those employees who do not work in departments with managers that have ids between 100 and 200, visualize a bar chart about the distribution of phone_number and salary , show by the X-axis in descending. | CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE 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 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 PHONE_NUMBER, SALARY FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY PHONE_NUMBER DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
10521,
41,
3396,
19846,
11810,
834,
4309,
7908,
1982,
599,
8525,
632,
201,
3396,
19846,
11810,
834,
567,
17683,
3,
4331,
4059,
599,
1458,
201,
283,
15610,
17966,
834,
4309,
7908,
1982,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
8023,
7894,
834,
567,
6122,
12920,
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,
15... |
A pie chart for finding the number of the name of all students who were in the tryout sorted in alphabetic order. | CREATE TABLE College (
cName varchar(20),
state varchar(2),
enr numeric(5,0)
)
CREATE TABLE Player (
pID numeric(5,0),
pName varchar(20),
yCard varchar(3),
HS numeric(5,0)
)
CREATE TABLE Tryout (
pID numeric(5,0),
cName varchar(20),
pPos varchar(8),
decision varchar(3)
) | SELECT pName, COUNT(pName) FROM Player AS T1 JOIN Tryout AS T2 ON T1.pID = T2.pID GROUP BY pName ORDER BY T1.pName | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1888,
41,
3,
75,
23954,
3,
4331,
4059,
599,
1755,
201,
538,
3,
4331,
4059,
16426,
6,
3,
35,
52,
206,
17552,
599,
11116,
632,
61,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
102,
23954,
6,
2847,
17161,
599,
102,
23954,
61,
21680,
12387,
6157,
332,
536,
3,
15355,
3162,
5263,
670,
6157,
332,
357,
9191,
332,
5411,
102,
4309,
3274,
332,
4416,
102,
4309,
350,
4630,
6880,
272,
476,
3,
102,... |
What is the result of the game with 68,436 attending? | CREATE TABLE table_name_98 (result VARCHAR, attendance VARCHAR) | SELECT result FROM table_name_98 WHERE attendance = "68,436" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3916,
41,
60,
7,
83,
17,
584,
4280,
28027,
6,
11364,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
741,
13,
8,
467,
28,
3,
3651,
6,
591,
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,
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,
3916,
549,
17444,
427,
11364,
3274,
96,
3651,
6,
591,
3420,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Use a group line chart to show how many competitions are held in each year, group by official name and bin by year, and display from low to high by the X. | 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 competition_record (
Competition_ID int,
Farm_ID int,
Rank int
)
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 Year, COUNT(Year) FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY Official_Name ORDER BY Year | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3797,
41,
4990,
834,
4309,
16,
17,
6,
2929,
16,
17,
6,
9273,
834,
566,
127,
2260,
490,
6,
7301,
834,
566,
127,
2260,
490,
6,
9273,
834,
254,
9,
8692,
490,
6,
20919,
35,
490,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2929,
6,
2847,
17161,
599,
476,
2741,
61,
21680,
690,
6157,
332,
536,
3,
15355,
3162,
3797,
834,
287,
4995,
4749,
6157,
332,
357,
9191,
332,
5411,
254,
485,
834,
4309,
3274,
332,
4416,
566,
3481,
834,
6726,
834,
430... |
Which author is located in Mexico? | CREATE TABLE table_40087 (
"Name" text,
"Status" text,
"Authors" text,
"Unit" text,
"Location" text
) | SELECT "Authors" FROM table_40087 WHERE "Location" = 'mexico' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
5548,
4225,
41,
96,
23954,
121,
1499,
6,
96,
134,
17,
144,
302,
121,
1499,
6,
96,
23602,
127,
7,
121,
1499,
6,
96,
5110,
155,
121,
1499,
6,
96,
434,
32,
75,
257,
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,
0,
0,
0... | [
3,
23143,
14196,
96,
23602,
127,
7,
121,
21680,
953,
834,
5548,
4225,
549,
17444,
427,
96,
434,
32,
75,
257,
121,
3274,
3,
31,
51,
994,
5807,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What was the 1st round result that had US Valenciennes (d1) as Team 2? | CREATE TABLE table_60064 (
"Team 1" text,
"Score" text,
"Team 2" text,
"1st round" text,
"2nd round" text
) | SELECT "1st round" FROM table_60064 WHERE "Team 2" = 'us valenciennes (d1)' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
6007,
4389,
41,
96,
18699,
209,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
18699,
204,
121,
1499,
6,
96,
536,
7,
17,
1751,
121,
1499,
6,
96,
357,
727,
1751,
121,
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,
96,
536,
7,
17,
1751,
121,
21680,
953,
834,
6007,
4389,
549,
17444,
427,
96,
18699,
204,
121,
3274,
3,
31,
302,
3,
2165,
35,
75,
4731,
7,
41,
26,
6982,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
retrieve the patients ids who had been diagnosed with hyperglycemia. | CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
) | SELECT patient.uniquepid FROM patient WHERE patient.patientunitstayid IN (SELECT diagnosis.patientunitstayid FROM diagnosis WHERE diagnosis.diagnosisname = 'hyperglycemia') | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3362,
4267,
32,
4370,
41,
3362,
4267,
32,
26,
1294,
26,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
2912,
381,
6,
3,
7,
9,
32,
357,
381,
6,
842,
2206,
381,
6,
14114,
257,
381,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
1868,
5,
202,
1495,
12417,
21680,
1868,
549,
17444,
427,
1868,
5,
10061,
15129,
21545,
23,
26,
3388,
41,
23143,
14196,
8209,
5,
10061,
15129,
21545,
23,
26,
21680,
8209,
549,
17444,
427,
8209,
5,
25930,
4844,
159,
435... |
What is the Venue of the 2002 World Cup Qualification? | CREATE TABLE table_name_48 (
venue VARCHAR,
competition VARCHAR
) | SELECT venue FROM table_name_48 WHERE competition = "2002 world cup qualification" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3707,
41,
5669,
584,
4280,
28027,
6,
2259,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
29940,
13,
8,
4407,
1150,
3802,
31270,
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,
5669,
21680,
953,
834,
4350,
834,
3707,
549,
17444,
427,
2259,
3274,
96,
24898,
296,
4119,
15513,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the sum of the cereals of the governorate with 20,753 vegetables and less than 123,304 fruit trees? | CREATE TABLE table_12851 (
"Governorate" text,
"Cereals" real,
"Fruit Trees" real,
"Olives" real,
"Industrial crops" real,
"Vegetables" real
) | SELECT SUM("Cereals") FROM table_12851 WHERE "Vegetables" = '20,753' AND "Fruit Trees" < '123,304' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2122,
4433,
536,
41,
96,
27304,
127,
342,
121,
1499,
6,
96,
254,
15,
6644,
7,
121,
490,
6,
96,
371,
52,
76,
155,
7552,
7,
121,
490,
6,
96,
667,
7591,
7,
121,
490,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
121,
254,
15,
6644,
7,
8512,
21680,
953,
834,
2122,
4433,
536,
549,
17444,
427,
96,
22979,
15,
3869,
7,
121,
3274,
3,
31,
1755,
6,
3072,
519,
31,
3430,
96,
371,
52,
76,
155,
7552,
7,
121,
3,
2,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.