NATURAL_LANG stringlengths 0 446 | SCHEMA stringlengths 27 2.21k | SQL stringlengths 18 453 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|
What is the nationality of the C? | CREATE TABLE table_name_79 (nationality VARCHAR, position VARCHAR) | SELECT nationality FROM table_name_79 WHERE position = "c" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4440,
41,
16557,
485,
584,
4280,
28027,
6,
1102,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1157,
485,
13,
8,
205,
58,
1,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1157,
485,
21680,
953,
834,
4350,
834,
4440,
549,
17444,
427,
1102,
3274,
96,
75,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What was the location when the opponent was Seattle Supersonics? | CREATE TABLE table_79061 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Location/Attendance" text,
"Record" text,
"Streak" text
) | SELECT "Location/Attendance" FROM table_79061 WHERE "Opponent" = 'seattle supersonics' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
940,
2394,
4241,
41,
96,
23055,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
434,
32,
75,
257,
87,
188,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
434,
32,
75,
257,
87,
188,
17,
324,
26,
663,
121,
21680,
953,
834,
940,
2394,
4241,
549,
17444,
427,
96,
667,
102,
9977,
121,
3274,
3,
31,
7,
15,
9,
8692,
1355,
7,
4554,
7,
31,
1,
-100,
-100,
-100,
-100,
... |
How many values for a win by 2 or more goals correspond to a difference of 2, more than 9 points, and the America-RJ team when more than 7 are played? | CREATE TABLE table_35490 (
"Position" real,
"Team" text,
"Points" real,
"Played" real,
"Won by 2 or more goals difference" real,
"Drawn" real,
"Lost" real,
"Against" real,
"Difference" text
) | SELECT COUNT("Won by 2 or more goals difference") FROM table_35490 WHERE "Difference" = '2' AND "Points" > '9' AND "Team" = 'america-rj' AND "Played" > '7' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2469,
591,
2394,
41,
96,
345,
32,
7,
4749,
121,
490,
6,
96,
18699,
121,
1499,
6,
96,
22512,
7,
121,
490,
6,
96,
15800,
15,
26,
121,
490,
6,
96,
518,
106,
57,
204,
42,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
518,
106,
57,
204,
42,
72,
1766,
1750,
8512,
21680,
953,
834,
2469,
591,
2394,
549,
17444,
427,
96,
308,
99,
11788,
121,
3274,
3,
31,
357,
31,
3430,
96,
22512,
7,
121,
2490,
3,
31,
1298,
3... |
provide the number of patients whose procedure short title is aortocor bypas-2 cor art? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.short_title = "Aortocor bypas-2 cor art" | [
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,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
How many teams have been in Topperserien for 8 seasons? | CREATE TABLE table_2522473_1 (
team VARCHAR,
seasons VARCHAR
) | SELECT COUNT(team) FROM table_2522473_1 WHERE seasons = 8 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
24622,
4552,
834,
536,
41,
372,
584,
4280,
28027,
6,
9385,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
2323,
43,
118,
16,
2224,
4660,
15,
3483,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2847,
17161,
599,
11650,
61,
21680,
953,
834,
1828,
24622,
4552,
834,
536,
549,
17444,
427,
9385,
3274,
505,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Which prefecture is in Hubei province and Enshi county? | CREATE TABLE table_36941 (
"Province" text,
"Prefecture" text,
"County" text,
"Tujia Population" real,
"% of China's Tujia Population" text
) | SELECT "Prefecture" FROM table_36941 WHERE "Province" = 'hubei' AND "County" = 'enshi' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3420,
4240,
536,
41,
96,
3174,
2494,
565,
121,
1499,
6,
96,
10572,
4075,
1462,
121,
1499,
6,
96,
10628,
63,
121,
1499,
6,
96,
382,
76,
354,
23,
9,
29659,
121,
490,
6,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
10572,
4075,
1462,
121,
21680,
953,
834,
3420,
4240,
536,
549,
17444,
427,
96,
3174,
2494,
565,
121,
3274,
3,
31,
16420,
15,
23,
31,
3430,
96,
10628,
63,
121,
3274,
3,
31,
35,
5605,
31,
1,
-100,
-100,
-100,
... |
When 1-1 is the series who is the team? | CREATE TABLE table_22883210_11 (
team VARCHAR,
series VARCHAR
) | SELECT team FROM table_22883210_11 WHERE series = "1-1" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2884,
4060,
2668,
1714,
834,
2596,
41,
372,
584,
4280,
28027,
6,
939,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
366,
209,
2292,
19,
8,
939,
113,
19,
8,
372,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
372,
21680,
953,
834,
2884,
4060,
2668,
1714,
834,
2596,
549,
17444,
427,
939,
3274,
96,
536,
2292,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the average number of wins of drivers from Sweden? | CREATE TABLE table_name_51 (driver_wins INTEGER, nation VARCHAR) | SELECT AVG(driver_wins) FROM table_name_51 WHERE nation = "sweden" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5553,
41,
13739,
52,
834,
3757,
7,
3,
21342,
17966,
6,
2982,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1348,
381,
13,
9204,
13,
3863,
45,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
71,
17217,
599,
13739,
52,
834,
3757,
7,
61,
21680,
953,
834,
4350,
834,
5553,
549,
17444,
427,
2982,
3274,
96,
7,
1123,
537,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
what are the student IDs and middle names of the students enrolled in at most two courses?, display in desc by the Y. | CREATE TABLE Course_Authors_and_Tutors (
author_id INTEGER,
author_tutor_ATB VARCHAR(3),
login_name VARCHAR(40),
password VARCHAR(40),
personal_name VARCHAR(80),
middle_name VARCHAR(80),
family_name VARCHAR(80),
gender_mf VARCHAR(1),
address_line_1 VARCHAR(80)
)
CREATE TABLE Courses (
course_id INTEGER,
author_id INTEGER,
subject_id INTEGER,
course_name VARCHAR(120),
course_description VARCHAR(255)
)
CREATE TABLE Student_Course_Enrolment (
registration_id INTEGER,
student_id INTEGER,
course_id INTEGER,
date_of_enrolment DATETIME,
date_of_completion DATETIME
)
CREATE TABLE Student_Tests_Taken (
registration_id INTEGER,
date_test_taken DATETIME,
test_result VARCHAR(255)
)
CREATE TABLE Subjects (
subject_id INTEGER,
subject_name VARCHAR(120)
)
CREATE TABLE Students (
student_id INTEGER,
date_of_registration DATETIME,
date_of_latest_logon DATETIME,
login_name VARCHAR(40),
password VARCHAR(10),
personal_name VARCHAR(40),
middle_name VARCHAR(40),
family_name VARCHAR(40)
) | SELECT T2.middle_name, T1.student_id FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id ORDER BY T1.student_id DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
8670,
834,
23602,
127,
7,
834,
232,
834,
28676,
7,
41,
2291,
834,
23,
26,
3,
21342,
17966,
6,
2291,
834,
17,
76,
17,
127,
834,
5767,
279,
584,
4280,
28027,
17867,
6,
11255,
834,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
51,
23,
8437,
834,
4350,
6,
332,
5411,
8637,
295,
834,
23,
26,
21680,
6341,
834,
3881,
3589,
15,
834,
8532,
3491,
297,
6157,
332,
536,
3,
15355,
3162,
4375,
6157,
332,
357,
9191,
332,
5411,
8637,
295,
8... |
What album was recorded by the rca label? | CREATE TABLE table_name_83 (album VARCHAR, record_label VARCHAR) | SELECT album FROM table_name_83 WHERE record_label = "rca" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4591,
41,
23703,
584,
4280,
28027,
6,
1368,
834,
40,
10333,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
2306,
47,
4381,
57,
8,
3,
52,
658,
3783,
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,
2306,
21680,
953,
834,
4350,
834,
4591,
549,
17444,
427,
1368,
834,
40,
10333,
3274,
96,
52,
658,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
which schools have the largest number of shared titles ? | CREATE TABLE table_203_362 (
id number,
"school" text,
"location" text,
"outright titles" number,
"shared titles" number,
"runners-up" number,
"total finals" number,
"last title" number,
"last final" number
) | SELECT "school" FROM table_203_362 WHERE "shared titles" = (SELECT MAX("shared titles") FROM table_203_362) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
3420,
357,
41,
3,
23,
26,
381,
6,
96,
6646,
121,
1499,
6,
96,
14836,
121,
1499,
6,
96,
670,
3535,
8342,
121,
381,
6,
96,
12484,
26,
8342,
121,
381,
6,
96,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
6646,
121,
21680,
953,
834,
23330,
834,
3420,
357,
549,
17444,
427,
96,
12484,
26,
8342,
121,
3274,
41,
23143,
14196,
4800,
4,
599,
121,
12484,
26,
8342,
8512,
21680,
953,
834,
23330,
834,
3420,
7318,
1,
-100,
-... |
What year was class of undine? | CREATE TABLE table_56209 (
"Class" text,
"Wheel arrangement" text,
"Manufacturer" text,
"Year made" text,
"Quantity made" text,
"Quantity preserved" text,
"Year(s) withdrawn" text
) | SELECT "Year made" FROM table_56209 WHERE "Class" = 'undine' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4834,
357,
4198,
41,
96,
21486,
121,
1499,
6,
96,
518,
88,
15,
40,
8641,
121,
1499,
6,
96,
7296,
76,
8717,
450,
49,
121,
1499,
6,
96,
476,
2741,
263,
121,
1499,
6,
96,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
476,
2741,
263,
121,
21680,
953,
834,
4834,
357,
4198,
549,
17444,
427,
96,
21486,
121,
3274,
3,
31,
1106,
630,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Which paper should I read about dependent types ? | CREATE TABLE field (
fieldid int
)
CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename varchar
)
CREATE TABLE venue (
venueid int,
venuename varchar
)
CREATE TABLE dataset (
datasetid int,
datasetname varchar
)
CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE journal (
journalid int,
journalname varchar
) | SELECT DISTINCT paper.paperid FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'dependent types' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1057,
41,
1057,
23,
26,
16,
17,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
11858,
41,
1040,
23,
26,
16,
17,
6,
2291,
23,
26,
16,
17,
3,
61,
3,
32102,
32103,
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,
15438,
25424,
6227,
1040,
5,
19587,
23,
26,
21680,
843,
27111,
6,
1040,
6,
1040,
4397,
27111,
549,
17444,
427,
843,
27111,
5,
4397,
27111,
4350,
3274,
3,
31,
17631,
1308,
31,
3430,
1040,
4397,
27111,
5,
4397,
271... |
what was the first chloride value for patient 021-83942? | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE 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 allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime 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 diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
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
) | SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-83942')) AND lab.labname = 'chloride' ORDER BY lab.labresulttime LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1058,
41,
1058,
23,
26,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
1058,
4350,
1499,
6,
1058,
715,
97,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
3362,
4267,
32,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
7690,
5,
9339,
60,
7,
83,
17,
21680,
7690,
549,
17444,
427,
7690,
5,
10061,
15129,
21545,
23,
26,
3388,
41,
23143,
14196,
1868,
5,
10061,
15129,
21545,
23,
26,
21680,
1868,
549,
17444,
427,
1868,
5,
10061,
15878,
37... |
Where is the ballpark of the Twins? | CREATE TABLE table_23383 (
"Ballpark" text,
"Location" text,
"Team" text,
"Opened" real,
"Closed" real,
"Demod" real,
"Current Status" text
) | SELECT "Location" FROM table_23383 WHERE "Team" = 'Twins' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
20879,
4591,
41,
96,
279,
1748,
6334,
121,
1499,
6,
96,
434,
32,
75,
257,
121,
1499,
6,
96,
18699,
121,
1499,
6,
96,
22696,
15,
26,
121,
490,
6,
96,
254,
10227,
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,
96,
434,
32,
75,
257,
121,
21680,
953,
834,
20879,
4591,
549,
17444,
427,
96,
18699,
121,
3274,
3,
31,
382,
3757,
7,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many places have more than 33 points? | CREATE TABLE table_11270 (
"Draw" real,
"Artist" text,
"Song" text,
"Points" real,
"Place" real
) | SELECT COUNT("Place") FROM table_11270 WHERE "Points" = '33' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2596,
17485,
41,
96,
308,
10936,
121,
490,
6,
96,
7754,
343,
121,
1499,
6,
96,
134,
2444,
121,
1499,
6,
96,
22512,
7,
121,
490,
6,
96,
345,
11706,
121,
490,
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,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
121,
345,
11706,
8512,
21680,
953,
834,
2596,
17485,
549,
17444,
427,
96,
22512,
7,
121,
3274,
3,
31,
4201,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What Venue has more than 1 Championship and was Established after 1957? | CREATE TABLE table_name_4 (
venue VARCHAR,
championships VARCHAR,
established VARCHAR
) | SELECT venue FROM table_name_4 WHERE championships = 1 AND established > 1957 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
591,
41,
5669,
584,
4280,
28027,
6,
10183,
7,
584,
4280,
28027,
6,
2127,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
29940,
65,
72,
145,
209,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
5669,
21680,
953,
834,
4350,
834,
591,
549,
17444,
427,
10183,
7,
3274,
209,
3430,
2127,
2490,
24011,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Plot the binning year and count their total number as a trend line, list x axis in ascending order. | CREATE TABLE classroom (
building varchar(15),
room_number varchar(7),
capacity numeric(4,0)
)
CREATE TABLE teaches (
ID varchar(5),
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0)
)
CREATE TABLE instructor (
ID varchar(5),
name varchar(20),
dept_name varchar(20),
salary numeric(8,2)
)
CREATE TABLE prereq (
course_id varchar(8),
prereq_id varchar(8)
)
CREATE TABLE section (
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0),
building varchar(15),
room_number varchar(7),
time_slot_id varchar(4)
)
CREATE TABLE department (
dept_name varchar(20),
building varchar(15),
budget numeric(12,2)
)
CREATE TABLE time_slot (
time_slot_id varchar(4),
day varchar(1),
start_hr numeric(2),
start_min numeric(2),
end_hr numeric(2),
end_min numeric(2)
)
CREATE TABLE student (
ID varchar(5),
name varchar(20),
dept_name varchar(20),
tot_cred numeric(3,0)
)
CREATE TABLE advisor (
s_ID varchar(5),
i_ID varchar(5)
)
CREATE TABLE takes (
ID varchar(5),
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0),
grade varchar(2)
)
CREATE TABLE course (
course_id varchar(8),
title varchar(50),
dept_name varchar(20),
credits numeric(2,0)
) | SELECT year, COUNT(*) FROM section ORDER BY year | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4858,
41,
740,
3,
4331,
4059,
599,
1808,
201,
562,
834,
5525,
1152,
3,
4331,
4059,
24358,
6,
2614,
206,
17552,
599,
8525,
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,
215,
6,
2847,
17161,
599,
1935,
61,
21680,
1375,
4674,
11300,
272,
476,
215,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Give me a bar chart to show the theme and their sales of the journal which did not have any of the listed editors serving on the committee, and list x-axis from low to high order. | CREATE TABLE journal_committee (
Editor_ID int,
Journal_ID int,
Work_Type text
)
CREATE TABLE journal (
Journal_ID int,
Date text,
Theme text,
Sales int
)
CREATE TABLE editor (
Editor_ID int,
Name text,
Age real
) | SELECT T1.Theme, T1.Sales FROM journal EXCEPT SELECT T1.Date, T1.Theme, T1.Sales FROM journal AS T1 JOIN journal_committee AS T2 ON T1.Journal_ID = T2.Journal_ID ORDER BY T1.Theme | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
6378,
834,
287,
1538,
17,
15,
15,
41,
11953,
834,
4309,
16,
17,
6,
3559,
834,
4309,
16,
17,
6,
3118,
834,
25160,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
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,
332,
5411,
634,
526,
6,
332,
5411,
134,
4529,
21680,
6378,
262,
4,
30416,
3,
23143,
14196,
332,
5411,
308,
342,
6,
332,
5411,
634,
526,
6,
332,
5411,
134,
4529,
21680,
6378,
6157,
332,
536,
3,
15355,
3162,
6378,
8... |
Show the fleet series of the aircrafts flied by pilots younger than 34 | CREATE TABLE pilot (
Pilot_ID VARCHAR,
Age INTEGER
)
CREATE TABLE pilot_record (
Aircraft_ID VARCHAR,
Pilot_ID VARCHAR
)
CREATE TABLE aircraft (
Fleet_Series VARCHAR,
Aircraft_ID VARCHAR
) | SELECT T2.Fleet_Series FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID = T3.Pilot_ID WHERE T3.Age < 34 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4487,
41,
17777,
834,
4309,
584,
4280,
28027,
6,
7526,
3,
21342,
17966,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
4487,
834,
60,
7621,
41,
1761,
6696,
834,
4309,
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,
4416,
371,
109,
15,
17,
834,
12106,
7,
21680,
4487,
834,
60,
7621,
6157,
332,
536,
3,
15355,
3162,
6442,
6157,
332,
357,
9191,
332,
5411,
20162,
6696,
834,
4309,
3274,
332,
4416,
20162,
6696,
834,
4309,
3,
1535... |
Which Attendance has a Record of 34–51? | CREATE TABLE table_name_63 (attendance INTEGER, record VARCHAR) | SELECT MIN(attendance) FROM table_name_63 WHERE record = "34–51" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3891,
41,
15116,
663,
3,
21342,
17966,
6,
1368,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
22497,
663,
65,
3,
9,
11392,
13,
6154,
104,
5553,
58,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
15116,
663,
61,
21680,
953,
834,
4350,
834,
3891,
549,
17444,
427,
1368,
3274,
96,
3710,
104,
5553,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Name the least tied | CREATE TABLE table_20328 (
"Year" real,
"Matches" real,
"Wins" real,
"Losses" real,
"No Result" real,
"Tied" real,
"Success Rate" text,
"Position" text,
"Summary" text
) | SELECT MIN("Tied") FROM table_20328 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
2577,
41,
96,
476,
2741,
121,
490,
6,
96,
329,
144,
2951,
121,
490,
6,
96,
18455,
7,
121,
490,
6,
96,
434,
13526,
7,
121,
490,
6,
96,
4168,
3,
20119,
121,
490,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
121,
382,
5973,
8512,
21680,
953,
834,
23330,
2577,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
who was the next transfer after maico on may 30 , 2009 ? | CREATE TABLE table_204_539 (
id number,
"date" text,
"name" text,
"moving from" text,
"moving to" text,
"fee" text
) | SELECT "name" FROM table_204_539 WHERE "date" > (SELECT "date" FROM table_204_539 WHERE "name" = 'maicon') ORDER BY "date" LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
755,
3288,
41,
3,
23,
26,
381,
6,
96,
5522,
121,
1499,
6,
96,
4350,
121,
1499,
6,
96,
7168,
53,
45,
121,
1499,
6,
96,
7168,
53,
12,
121,
1499,
6,
96,
89,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
4350,
121,
21680,
953,
834,
26363,
834,
755,
3288,
549,
17444,
427,
96,
5522,
121,
2490,
41,
23143,
14196,
96,
5522,
121,
21680,
953,
834,
26363,
834,
755,
3288,
549,
17444,
427,
96,
4350,
121,
3274,
3,
31,
6840... |
How many people attended when the record was broken with 47–63? | CREATE TABLE table_name_38 (attendance VARCHAR, record VARCHAR) | SELECT attendance FROM table_name_38 WHERE record = "47–63" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3747,
41,
15116,
663,
584,
4280,
28027,
6,
1368,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
151,
5526,
116,
8,
1368,
47,
4335,
28,
10635,
104,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
11364,
21680,
953,
834,
4350,
834,
3747,
549,
17444,
427,
1368,
3274,
96,
4177,
104,
3891,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which Constructor has Rounds, All and Driver, Bruno Giacomelli? | CREATE TABLE table_name_50 (
constructor VARCHAR,
rounds VARCHAR,
driver VARCHAR
) | SELECT constructor FROM table_name_50 WHERE rounds = "all" AND driver = "bruno giacomelli" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1752,
41,
6774,
127,
584,
4280,
28027,
6,
14419,
584,
4280,
28027,
6,
2535,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
1193,
7593,
127,
65,
9609... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
6774,
127,
21680,
953,
834,
4350,
834,
1752,
549,
17444,
427,
14419,
3274,
96,
1748,
121,
3430,
2535,
3274,
96,
9052,
29,
32,
3,
122,
23,
9,
287,
7999,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Tell me the highest wins for year less than 2000 and best finish of 4 and tournaments played less than 3 | CREATE TABLE table_name_42 (
wins INTEGER,
tournaments_played VARCHAR,
year VARCHAR,
best_finish VARCHAR
) | SELECT MAX(wins) FROM table_name_42 WHERE year < 2000 AND best_finish = "4" AND tournaments_played < 3 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4165,
41,
9204,
3,
21342,
17966,
6,
5892,
7,
834,
4895,
15,
26,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
6,
200,
834,
25535,
584,
4280,
28027,
3,
61,
3,
321... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
3757,
7,
61,
21680,
953,
834,
4350,
834,
4165,
549,
17444,
427,
215,
3,
2,
2766,
3430,
200,
834,
25535,
3274,
96,
20364,
3430,
5892,
7,
834,
4895,
15,
26,
3,
2,
220,
1,
-100,
-100,
-100,
-100,
-100... |
how many lands with longitude of -100.895783 are? | CREATE TABLE table_18600760_19 (
land___sqmi__ VARCHAR,
longitude VARCHAR
) | SELECT COUNT(land___sqmi__) FROM table_18600760_19 WHERE longitude = "-100.895783" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
24700,
4560,
3328,
834,
2294,
41,
1322,
834,
834,
834,
7,
1824,
51,
23,
834,
834,
584,
4280,
28027,
6,
307,
20341,
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,
1,
1,
1,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
40,
232,
834,
834,
834,
7,
1824,
51,
23,
834,
834,
61,
21680,
953,
834,
24700,
4560,
3328,
834,
2294,
549,
17444,
427,
307,
20341,
3274,
96,
18,
2915,
5,
3914,
3436,
4591,
121,
1,
-100,
-100,
-10... |
Name the nominating festival for director of 2004 | CREATE TABLE table_name_1 (nominating_festival VARCHAR, director_s_ VARCHAR) | SELECT nominating_festival FROM table_name_1 WHERE director_s_ = "2004" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
536,
41,
3114,
77,
1014,
834,
89,
24742,
584,
4280,
28027,
6,
2090,
834,
7,
834,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
150,
1109,
1014,
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,
150,
1109,
1014,
834,
89,
24742,
21680,
953,
834,
4350,
834,
536,
549,
17444,
427,
2090,
834,
7,
834,
3274,
96,
21653,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who was the trainer when Mckaymackenna won? | CREATE TABLE table_name_3 (
trainer VARCHAR,
winner VARCHAR
) | SELECT trainer FROM table_name_3 WHERE winner = "mckaymackenna" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
519,
41,
8813,
584,
4280,
28027,
6,
4668,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
8,
8813,
116,
3038,
18075,
11101,
9376,
9,
751,
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,
8813,
21680,
953,
834,
4350,
834,
519,
549,
17444,
427,
4668,
3274,
96,
51,
75,
18075,
11101,
9376,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Return a pie chart about the proportion of All_Games and All_Games_Percent. | CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
) | SELECT All_Games, All_Games_Percent FROM basketball_match | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
8498,
834,
19515,
41,
2271,
834,
4309,
16,
17,
6,
1121,
834,
4309,
16,
17,
6,
2271,
834,
23954,
1499,
6,
3,
14775,
834,
17748,
4885,
834,
134,
15,
9,
739,
1499,
6,
3,
14775,
834,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
432,
834,
23055,
7,
6,
432,
834,
23055,
7,
834,
12988,
3728,
21680,
8498,
834,
19515,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Who are all the candidates vying for Henry B. Gonzalez' seat? | CREATE TABLE table_1341586_44 (candidates VARCHAR, incumbent VARCHAR) | SELECT candidates FROM table_1341586_44 WHERE incumbent = "Henry B. Gonzalez" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
1808,
3840,
834,
3628,
41,
1608,
12416,
6203,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
33,
66,
8,
4341,
3,
208,
8149,
21,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4341,
21680,
953,
834,
23747,
1808,
3840,
834,
3628,
549,
17444,
427,
28406,
3274,
96,
566,
35,
651,
272,
5,
31403,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the slovenian name for the village that in german is known as st.margarethen? | CREATE TABLE table_10797463_1 (
village__slovenian_ VARCHAR,
village__german_ VARCHAR
) | SELECT village__slovenian_ FROM table_10797463_1 WHERE village__german_ = "St.Margarethen" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1714,
4440,
4581,
3891,
834,
536,
41,
3309,
834,
834,
7,
5850,
15,
15710,
834,
584,
4280,
28027,
6,
3309,
834,
834,
1304,
348,
834,
584,
4280,
28027,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3309,
834,
834,
7,
5850,
15,
15710,
834,
21680,
953,
834,
1714,
4440,
4581,
3891,
834,
536,
549,
17444,
427,
3309,
834,
834,
1304,
348,
834,
3274,
96,
134,
17,
5,
7286,
1478,
15,
189,
35,
121,
1,
-100,
-100,
-100,... |
What year was the version with a remixes album? | CREATE TABLE table_name_76 (
year VARCHAR,
album VARCHAR
) | SELECT year FROM table_name_76 WHERE album = "remixes" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3959,
41,
215,
584,
4280,
28027,
6,
2306,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
215,
47,
8,
988,
28,
3,
9,
26063,
15,
7,
2306,
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,
215,
21680,
953,
834,
4350,
834,
3959,
549,
17444,
427,
2306,
3274,
96,
60,
13682,
15,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
For team ascoli please mention all the appointment date. | CREATE TABLE table_3702 (
"Team" text,
"Outgoing manager" text,
"Manner of departure" text,
"Date of vacancy" text,
"Replaced by" text,
"Date of appointment" text
) | SELECT "Date of appointment" FROM table_3702 WHERE "Team" = 'Ascoli' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
22520,
357,
41,
96,
18699,
121,
1499,
6,
96,
15767,
9545,
2743,
121,
1499,
6,
96,
7296,
687,
13,
12028,
121,
1499,
6,
96,
308,
342,
13,
3,
29685,
121,
1499,
6,
96,
1649,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
308,
342,
13,
4141,
121,
21680,
953,
834,
22520,
357,
549,
17444,
427,
96,
18699,
121,
3274,
3,
31,
188,
7,
9044,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which country has less than 4 votes? | CREATE TABLE table_11187 (
"State" text,
"Population" real,
"GDP per cap. (PPP)" real,
"Currency" text,
"Gini" real,
"Council votes" real,
"EP seats" real
) | SELECT "State" FROM table_11187 WHERE "Council votes" < '4' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
15866,
4225,
41,
96,
134,
4748,
121,
1499,
6,
96,
27773,
7830,
121,
490,
6,
96,
517,
7410,
399,
2468,
5,
41,
345,
6158,
61,
121,
490,
6,
96,
254,
450,
52,
4392,
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,
134,
4748,
121,
21680,
953,
834,
15866,
4225,
549,
17444,
427,
96,
3881,
15254,
40,
11839,
121,
3,
2,
3,
31,
591,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who was the leader in Steals when Travis Watson (9) was the leader in Rebounds? | CREATE TABLE table_name_87 (
steals VARCHAR,
rebounds VARCHAR
) | SELECT steals FROM table_name_87 WHERE rebounds = "travis watson (9)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4225,
41,
11332,
7,
584,
4280,
28027,
6,
3,
23768,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
8,
2488,
16,
3557,
5405,
116,
25811,
18763,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11332,
7,
21680,
953,
834,
4350,
834,
4225,
549,
17444,
427,
3,
23768,
3274,
96,
1313,
3466,
8036,
17,
739,
41,
11728,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
which club had the most losses ? | CREATE TABLE table_203_322 (
id number,
"club" text,
"played" number,
"won" number,
"drawn" number,
"lost" number,
"points for" number,
"points against" number,
"bonus points" number,
"points" number
) | SELECT "club" FROM table_203_322 ORDER BY "lost" DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
2668,
357,
41,
3,
23,
26,
381,
6,
96,
13442,
121,
1499,
6,
96,
4895,
15,
26,
121,
381,
6,
96,
210,
106,
121,
381,
6,
96,
19489,
29,
121,
381,
6,
96,
2298,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13442,
121,
21680,
953,
834,
23330,
834,
2668,
357,
4674,
11300,
272,
476,
96,
2298,
17,
121,
309,
25067,
8729,
12604,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Phil Mickelson has what To par? | CREATE TABLE table_name_47 (to_par VARCHAR, player VARCHAR) | SELECT to_par FROM table_name_47 WHERE player = "phil mickelson" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4177,
41,
235,
834,
1893,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
8188,
25665,
3573,
106,
65,
125,
304,
260,
58,
1,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
12,
834,
1893,
21680,
953,
834,
4350,
834,
4177,
549,
17444,
427,
1959,
3274,
96,
18118,
1337,
15259,
739,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Show the number of companies whose headquarters are not from USA fpr each main industry in a bar chart, and display y axis from low to high order please. | CREATE TABLE station_company (
Station_ID int,
Company_ID int,
Rank_of_the_Year int
)
CREATE TABLE company (
Company_ID int,
Rank int,
Company text,
Headquarters text,
Main_Industry text,
Sales_billion real,
Profits_billion real,
Assets_billion real,
Market_Value real
)
CREATE TABLE gas_station (
Station_ID int,
Open_Year int,
Location text,
Manager_Name text,
Vice_Manager_Name text,
Representative_Name text
) | SELECT Main_Industry, COUNT(Main_Industry) FROM company WHERE Headquarters <> 'USA' GROUP BY Main_Industry ORDER BY COUNT(Main_Industry) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2478,
834,
29179,
41,
5939,
834,
4309,
16,
17,
6,
1958,
834,
4309,
16,
17,
6,
3,
22557,
834,
858,
834,
532,
834,
476,
2741,
16,
17,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
5140,
834,
1570,
8655,
8224,
6,
2847,
17161,
599,
21978,
29,
834,
1570,
8655,
8224,
61,
21680,
349,
549,
17444,
427,
31282,
3,
2,
3155,
3,
31,
17663,
31,
350,
4630,
6880,
272,
476,
5140,
834,
1570,
8655,
8224,
4674,... |
what is admission type and procedure short title of subject name dawn cooper? | 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 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 demographic.admission_type, procedures.short_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Dawn Cooper" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
14798,
5,
9,
26,
5451,
834,
6137,
6,
4293,
5,
7,
14184,
834,
21869,
21680,
14798,
3388,
18206,
3,
15355,
3162,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
549,
17444,
427,
... |
Which player is from the College of Alabama? | CREATE TABLE table_name_97 (player VARCHAR, college VARCHAR) | SELECT player FROM table_name_97 WHERE college = "alabama" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4327,
41,
20846,
584,
4280,
28027,
6,
1900,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
1959,
19,
45,
8,
1888,
13,
13050,
58,
1,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1959,
21680,
953,
834,
4350,
834,
4327,
549,
17444,
427,
1900,
3274,
96,
9,
9339,
265,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
How many races have less than 2 podiums and 19th position before 2009? | CREATE TABLE table_68129 (
"Season" real,
"Series" text,
"Team" text,
"Races" real,
"Wins" real,
"Poles" real,
"F/Laps" real,
"Podiums" real,
"Points" text,
"Position" text
) | SELECT AVG("Races") FROM table_68129 WHERE "Podiums" < '2' AND "Position" = '19th' AND "Season" < '2009' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3651,
22174,
41,
96,
134,
15,
9,
739,
121,
490,
6,
96,
12106,
7,
121,
1499,
6,
96,
18699,
121,
1499,
6,
96,
448,
9,
2319,
121,
490,
6,
96,
18455,
7,
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,
71,
17217,
599,
121,
448,
9,
2319,
8512,
21680,
953,
834,
3651,
22174,
549,
17444,
427,
96,
16665,
2552,
7,
121,
3,
2,
3,
31,
357,
31,
3430,
96,
345,
32,
7,
4749,
121,
3274,
3,
31,
2294,
189,
31,
3430,
96,
134... |
For those records from the products and each product's manufacturer, draw a bar chart about the distribution of name and the sum of code , and group by attribute name, and display in desc by the y-axis please. | 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 T2.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T1.Code DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
15248,
7,
41,
3636,
3,
21342,
17966,
6,
5570,
584,
4280,
28027,
599,
25502,
201,
3642,
19973,
584,
4280,
28027,
599,
25502,
201,
3,
19145,
584,
4280,
28027,
599,
25502,
201,
19764,
17833... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
332,
4416,
23954,
6,
332,
5411,
22737,
21680,
7554,
6157,
332,
536,
3,
15355,
3162,
15248,
7,
6157,
332,
357,
9191,
332,
5411,
7296,
76,
8717,
450,
49,
3274,
332,
4416,
22737,
350,
4630,
6880,
272,
476,
332,
4416,
2... |
Which Affiliation has a Nickname of cougars? | CREATE TABLE table_47949 (
"Institution" text,
"Location" text,
"Founded" real,
"Affiliation" text,
"Nickname" text
) | SELECT "Affiliation" FROM table_47949 WHERE "Nickname" = 'cougars' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
4440,
3647,
41,
96,
1570,
17448,
121,
1499,
6,
96,
434,
32,
75,
257,
121,
1499,
6,
96,
20100,
121,
490,
6,
96,
188,
89,
8027,
23,
257,
121,
1499,
6,
96,
567,
3142,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
89,
8027,
23,
257,
121,
21680,
953,
834,
591,
4440,
3647,
549,
17444,
427,
96,
567,
3142,
4350,
121,
3274,
3,
31,
3422,
1478,
7,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
on how many days did the episode written by harold hayes jr. & craig s. phillips originally air | CREATE TABLE table_30992 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original Air date" text
) | SELECT COUNT("Original Air date") FROM table_30992 WHERE "Written by" = 'Harold Hayes Jr. & Craig S. Phillips' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1458,
3264,
357,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
667,
3380,
10270,
1761,
833,
8512,
21680,
953,
834,
1458,
3264,
357,
549,
17444,
427,
96,
24965,
324,
57,
121,
3274,
3,
31,
15537,
1490,
8567,
15,
7,
8206,
5,
3,
184,
12870,
180,
5,
16202,
7... |
What is the number eliminated for the person with a time of 12:38? | CREATE TABLE table_name_15 (
eliminated VARCHAR,
time VARCHAR
) | SELECT eliminated AS by FROM table_name_15 WHERE time = "12:38" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1808,
41,
17809,
584,
4280,
28027,
6,
97,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
381,
17809,
21,
8,
568,
28,
3,
9,
97,
13,
586,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
17809,
6157,
57,
21680,
953,
834,
4350,
834,
1808,
549,
17444,
427,
97,
3274,
96,
2122,
10,
3747,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Which race ended with a time of 01:46:59.69? | CREATE TABLE table_14538 (
"Race" text,
"Position" text,
"Time" text,
"Speed" text,
"Replica" text
) | SELECT "Race" FROM table_14538 WHERE "Time" = '01:46:59.69' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
20987,
3747,
41,
96,
448,
3302,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
13368,
121,
1499,
6,
96,
28328,
121,
1499,
6,
96,
1649,
10435,
9,
121,
1499,
3,
61... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
448,
3302,
121,
21680,
953,
834,
20987,
3747,
549,
17444,
427,
96,
13368,
121,
3274,
3,
31,
4542,
10,
4448,
10,
3390,
5,
3951,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Which game does the quentyn martell have? | CREATE TABLE table_name_54 (
game VARCHAR,
pov_character VARCHAR
) | SELECT game FROM table_name_54 WHERE pov_character = "quentyn martell" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5062,
41,
467,
584,
4280,
28027,
6,
3,
26981,
834,
31886,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
467,
405,
8,
3,
19404,
63,
29,
3157,
6714... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
467,
21680,
953,
834,
4350,
834,
5062,
549,
17444,
427,
3,
26981,
834,
31886,
3274,
96,
19404,
63,
29,
3157,
6714,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
what is the attendance when the date is october 22, 2000? | CREATE TABLE table_name_12 (
attendance VARCHAR,
date VARCHAR
) | SELECT attendance FROM table_name_12 WHERE date = "october 22, 2000" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2122,
41,
11364,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
125,
19,
8,
11364,
116,
8,
833,
19,
3,
32,
75,
235,
1152,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
11364,
21680,
953,
834,
4350,
834,
2122,
549,
17444,
427,
833,
3274,
96,
32,
75,
235,
1152,
12889,
2766,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What year did Culver leave? | CREATE TABLE table_name_71 (
year_left INTEGER,
location VARCHAR
) | SELECT SUM(year_left) FROM table_name_71 WHERE location = "culver" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4450,
41,
215,
834,
17068,
3,
21342,
17966,
6,
1128,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
215,
410,
205,
83,
624,
1175,
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,
180,
6122,
599,
1201,
834,
17068,
61,
21680,
953,
834,
4350,
834,
4450,
549,
17444,
427,
1128,
3274,
96,
1497,
624,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What area did Julius Boros play at? | CREATE TABLE table_71135 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | SELECT "Place" FROM table_71135 WHERE "Player" = 'julius boros' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4450,
536,
2469,
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,
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,
0,
0,
0... | [
3,
23143,
14196,
96,
345,
11706,
121,
21680,
953,
834,
4450,
536,
2469,
549,
17444,
427,
96,
15800,
49,
121,
3274,
3,
31,
2047,
29705,
3,
14901,
7,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
When yakup şener is the athlete what is the round of 32? | CREATE TABLE table_27294107_11 (round_of_32 VARCHAR, athlete VARCHAR) | SELECT round_of_32 FROM table_27294107_11 WHERE athlete = "Yakup Şener" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2555,
357,
4240,
18057,
834,
2596,
41,
7775,
834,
858,
834,
2668,
584,
4280,
28027,
6,
17893,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
366,
3,
20856,
413,
3,
1314... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1751,
834,
858,
834,
2668,
21680,
953,
834,
2555,
357,
4240,
18057,
834,
2596,
549,
17444,
427,
17893,
3274,
96,
476,
1639,
413,
3,
2,
35,
49,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What are the details for Marisa Ferretti Barth? | CREATE TABLE table_name_55 (details VARCHAR, name VARCHAR) | SELECT details FROM table_name_55 WHERE name = "marisa ferretti barth" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3769,
41,
221,
5756,
7,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
33,
8,
1030,
21,
10149,
7,
9,
12762,
10652,
1386,
189... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1030,
21680,
953,
834,
4350,
834,
3769,
549,
17444,
427,
564,
3274,
96,
17289,
7,
9,
25007,
10652,
1207,
189,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the average agricultural panel of the composition with a labour panel less than 6, more than 0 nominations by Taoiseach, and a total less than 4? | CREATE TABLE table_name_62 (
agricultural_panel INTEGER,
total VARCHAR,
labour_panel VARCHAR,
nominated_by_the_taoiseach VARCHAR
) | SELECT AVG(agricultural_panel) FROM table_name_62 WHERE labour_panel < 6 AND nominated_by_the_taoiseach > 0 AND total < 4 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4056,
41,
10687,
834,
28726,
3,
21342,
17966,
6,
792,
584,
4280,
28027,
6,
12568,
834,
28726,
584,
4280,
28027,
6,
150,
1109,
920,
834,
969,
834,
532,
834,
17,
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,
71,
17217,
599,
9,
3496,
14700,
834,
28726,
61,
21680,
953,
834,
4350,
834,
4056,
549,
17444,
427,
12568,
834,
28726,
3,
2,
431,
3430,
150,
1109,
920,
834,
969,
834,
532,
834,
17,
9,
32,
159,
15,
1836,
2490,
3,
... |
what's the torque where performance is 0–100km/h: 7.5s auto, vmax: km/h (mph) | CREATE TABLE table_11167610_1 (torque VARCHAR, performance VARCHAR) | SELECT torque FROM table_11167610_1 WHERE performance = "0–100km/h: 7.5s auto, VMax: km/h (mph)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
15866,
3708,
27097,
834,
536,
41,
17,
127,
835,
584,
4280,
28027,
6,
821,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
125,
31,
7,
8,
19527,
213,
821,
19,
3,
632,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
19527,
21680,
953,
834,
15866,
3708,
27097,
834,
536,
549,
17444,
427,
821,
3274,
96,
632,
104,
2915,
5848,
87,
107,
10,
3,
15731,
7,
1510,
6,
584,
21298,
10,
2280,
87,
107,
41,
7656,
61,
121,
1,
-100,
-100,
-100,... |
What is the date when the document 'Marry CV' was stored? | CREATE TABLE document_locations (
document_id number,
location_code text,
date_in_location_from time,
date_in_locaton_to time
)
CREATE TABLE documents_to_be_destroyed (
document_id number,
destruction_authorised_by_employee_id number,
destroyed_by_employee_id number,
planned_destruction_date time,
actual_destruction_date time,
other_details text
)
CREATE TABLE employees (
employee_id number,
role_code text,
employee_name text,
gender_mfu text,
date_of_birth time,
other_details text
)
CREATE TABLE ref_calendar (
calendar_date time,
day_number number
)
CREATE TABLE roles (
role_code text,
role_name text,
role_description text
)
CREATE TABLE ref_locations (
location_code text,
location_name text,
location_description text
)
CREATE TABLE ref_document_types (
document_type_code text,
document_type_name text,
document_type_description text
)
CREATE TABLE all_documents (
document_id number,
date_stored time,
document_type_code text,
document_name text,
document_description text,
other_details text
) | SELECT date_stored FROM all_documents WHERE document_name = "Marry CV" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1708,
834,
14836,
7,
41,
1708,
834,
23,
26,
381,
6,
1128,
834,
4978,
1499,
6,
833,
834,
77,
834,
14836,
834,
7152,
97,
6,
833,
834,
77,
834,
5133,
144,
106,
834,
235,
97,
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,
833,
834,
7154,
26,
21680,
66,
834,
28244,
7,
549,
17444,
427,
1708,
834,
4350,
3274,
96,
7286,
651,
10430,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
If the arrival date is January 2059, what is the total amount of signal power? | CREATE TABLE table_1820752_1 (
signal_power___kw__ VARCHAR,
arrival_date VARCHAR
) | SELECT COUNT(signal_power___kw__) FROM table_1820752_1 WHERE arrival_date = "January 2059" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2606,
26426,
5373,
834,
536,
41,
3240,
834,
6740,
834,
834,
834,
157,
210,
834,
834,
584,
4280,
28027,
6,
6870,
834,
5522,
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,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
6732,
138,
834,
6740,
834,
834,
834,
157,
210,
834,
834,
61,
21680,
953,
834,
2606,
26426,
5373,
834,
536,
549,
17444,
427,
6870,
834,
5522,
3274,
96,
30404,
460,
3390,
121,
1,
-100,
-100,
-100,
-1... |
Who was firest elected in 2002 in a district larger than 41? | CREATE TABLE table_name_4 (member_senator VARCHAR, first_elected VARCHAR, district VARCHAR) | SELECT member_senator FROM table_name_4 WHERE first_elected = 2002 AND district > 41 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
591,
41,
12066,
834,
7,
35,
1016,
584,
4280,
28027,
6,
166,
834,
19971,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1144,
834,
7,
35,
1016,
21680,
953,
834,
4350,
834,
591,
549,
17444,
427,
166,
834,
19971,
3274,
4407,
3430,
3939,
2490,
8798,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What team was the home team at the venue junction oval? | CREATE TABLE table_4732 (
"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_4732 WHERE "Venue" = 'junction oval' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4177,
2668,
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,
121,
21680,
953,
834,
4177,
2668,
549,
17444,
427,
96,
553,
35,
76,
15,
121,
3274,
3,
31,
6959,
4985,
17986,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
give the number of patients aged below 41 years whose lab test fluid is other body fluid. | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "41" AND lab.fluid = "Other Body Fluid" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7690,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
2118,
23,
26,
1499,
6,
5059,
715,
1499,
6,
5692,
1499,
6,
701,
834,
15129,
1499,
6,
3783,
1499,
6,
5798,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7690,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7690,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
What is the average number of casualties for the convoy with a number of U-844? | CREATE TABLE table_name_5 (casualties INTEGER, number VARCHAR) | SELECT AVG(casualties) FROM table_name_5 WHERE number = "u-844" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
755,
41,
6769,
3471,
3010,
3,
21342,
17966,
6,
381,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1348,
381,
13,
6995,
3010,
21,
8,
21362,
63,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
71,
17217,
599,
6769,
3471,
3010,
61,
21680,
953,
834,
4350,
834,
755,
549,
17444,
427,
381,
3274,
96,
76,
18,
4608,
20364,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
return me the number of papers after 2000 . | CREATE TABLE domain_keyword (
did int,
kid int
)
CREATE TABLE cite (
cited int,
citing int
)
CREATE TABLE publication (
abstract varchar,
cid int,
citation_num int,
jid int,
pid int,
reference_num int,
title varchar,
year int
)
CREATE TABLE domain (
did int,
name varchar
)
CREATE TABLE writes (
aid int,
pid int
)
CREATE TABLE author (
aid int,
homepage varchar,
name varchar,
oid int
)
CREATE TABLE organization (
continent varchar,
homepage varchar,
name varchar,
oid int
)
CREATE TABLE domain_author (
aid int,
did int
)
CREATE TABLE domain_journal (
did int,
jid int
)
CREATE TABLE domain_conference (
cid int,
did int
)
CREATE TABLE publication_keyword (
kid int,
pid int
)
CREATE TABLE conference (
cid int,
homepage varchar,
name varchar
)
CREATE TABLE journal (
homepage varchar,
jid int,
name varchar
)
CREATE TABLE domain_publication (
did int,
pid int
)
CREATE TABLE keyword (
keyword varchar,
kid int
) | SELECT COUNT(DISTINCT (title)) FROM publication WHERE year > 2000 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3303,
834,
4397,
6051,
41,
410,
16,
17,
6,
4984,
16,
17,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
3,
8464,
41,
3,
11675,
16,
17,
6,
3,
17994,
16,
17,
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,
2847,
17161,
599,
15438,
25424,
6227,
41,
21869,
61,
61,
21680,
5707,
549,
17444,
427,
215,
2490,
2766,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What record has a Score of 9 6? | CREATE TABLE table_52846 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text
) | SELECT "Record" FROM table_52846 WHERE "Score" = '9–6' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
755,
2577,
4448,
41,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
434,
32,
7,
7,
121,
1499,
6,
96,
188,
17,
324,
26,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
755,
2577,
4448,
549,
17444,
427,
96,
134,
9022,
121,
3274,
3,
31,
1298,
104,
948,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the lowest Game, when Opponent is "Boston Bruins"? | CREATE TABLE table_name_35 (game INTEGER, opponent VARCHAR) | SELECT MIN(game) FROM table_name_35 WHERE opponent = "boston bruins" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2469,
41,
7261,
3,
21342,
17966,
6,
15264,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
7402,
4435,
6,
116,
4495,
9977,
19,
96,
279,
32,
4411... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3,
17684,
599,
7261,
61,
21680,
953,
834,
4350,
834,
2469,
549,
17444,
427,
15264,
3274,
96,
115,
32,
4411,
3,
115,
23162,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
how many patients were born before year 2146 with the procedure icd9 code 9755? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dob_year < "2146" AND procedures.icd9_code = "9755" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7690,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
2118,
23,
26,
1499,
6,
5059,
715,
1499,
6,
5692,
1499,
6,
701,
834,
15129,
1499,
6,
3783,
1499,
6,
5798,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
Which 1996-00 is the lowest one that has a State of maharashtra, and a 2006 10 smaller than 0.26? | CREATE TABLE table_35638 (
"State" text,
"1990\u201395" real,
"1996-00" real,
"2001\u201305" real,
"2006\u201310" real
) | SELECT MIN("1996-00") FROM table_35638 WHERE "State" = 'maharashtra' AND "2006\u201310" < '0.26' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2469,
948,
3747,
41,
96,
134,
4748,
121,
1499,
6,
96,
2294,
2394,
2,
76,
11138,
3301,
121,
490,
6,
96,
19479,
28625,
632,
121,
490,
6,
96,
23658,
2,
76,
11138,
3076,
121,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
121,
19479,
28625,
632,
8512,
21680,
953,
834,
2469,
948,
3747,
549,
17444,
427,
96,
134,
4748,
121,
3274,
3,
31,
51,
9,
3272,
3198,
1313,
31,
3430,
96,
21196,
2,
76,
11138,
1714,
121,
3,
2,
3,
31... |
What is the maximum age of patients that survived and had a primary disease of squamous cell carcinoma oral tongue/sda? | 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 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 MAX(demographic.age) FROM demographic WHERE demographic.expire_flag = "0" AND demographic.diagnosis = "SQUAMOUS CELL CARCINOMA ORAL TONGUE/SDA" | [
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,
4800,
4,
599,
1778,
16587,
5,
545,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
994,
2388,
15,
834,
89,
5430,
3274,
96,
632,
121,
3430,
14798,
5,
25930,
4844,
159,
3274,
96,
134,
16892,
4815,
17854,
205,
12735,
205,... |
Which Tie is from birmingham city? | CREATE TABLE table_name_97 (tie_no VARCHAR, home_team VARCHAR) | SELECT tie_no FROM table_name_97 WHERE home_team = "birmingham city" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4327,
41,
17,
23,
15,
834,
29,
32,
584,
4280,
28027,
6,
234,
834,
11650,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
2262,
15,
19,
45,
3,
8781,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6177,
834,
29,
32,
21680,
953,
834,
4350,
834,
4327,
549,
17444,
427,
234,
834,
11650,
3274,
96,
8781,
51,
14799,
690,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the height of the EMC Insurance Building in Des Moines? | CREATE TABLE table_name_25 (height VARCHAR, city VARCHAR, name VARCHAR) | SELECT height FROM table_name_25 WHERE city = "des moines" AND name = "emc insurance building" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1828,
41,
88,
2632,
584,
4280,
28027,
6,
690,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
3902,
13,
8,
262,
3698,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3902,
21680,
953,
834,
4350,
834,
1828,
549,
17444,
427,
690,
3274,
96,
1395,
5387,
1496,
121,
3430,
564,
3274,
96,
15,
51,
75,
958,
740,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What school has south bend as the location, with indians as the mascot? | CREATE TABLE table_name_32 (school VARCHAR, location VARCHAR, mascot VARCHAR) | SELECT school FROM table_name_32 WHERE location = "south bend" AND mascot = "indians" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2668,
41,
6646,
584,
4280,
28027,
6,
1128,
584,
4280,
28027,
6,
3,
2754,
4310,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
496,
65,
3414,
17995,
38,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
496,
21680,
953,
834,
4350,
834,
2668,
549,
17444,
427,
1128,
3274,
96,
7,
670,
107,
17995,
121,
3430,
3,
2754,
4310,
3274,
96,
8482,
3247,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
who is the the incumbent with district being ohio 2 | CREATE TABLE table_1342013_34 (
incumbent VARCHAR,
district VARCHAR
) | SELECT incumbent FROM table_1342013_34 WHERE district = "Ohio 2" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
11138,
834,
3710,
41,
28406,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
113,
19,
8,
8,
28406,
28,
3939,
271,
3,
32,
107,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
28406,
21680,
953,
834,
23747,
11138,
834,
3710,
549,
17444,
427,
3939,
3274,
96,
15046,
23,
32,
204,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
When did the term begin that ended January 3, 1995? | CREATE TABLE table_224672_2 (term_began VARCHAR, term_ended VARCHAR) | SELECT term_began FROM table_224672_2 WHERE term_ended = "January 3, 1995" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
24622,
3708,
357,
834,
357,
41,
1987,
834,
346,
2565,
584,
4280,
28027,
6,
1657,
834,
14550,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
366,
410,
8,
1657,
1731,
24,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1657,
834,
346,
2565,
21680,
953,
834,
24622,
3708,
357,
834,
357,
549,
17444,
427,
1657,
834,
14550,
3274,
96,
30404,
6180,
7273,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the score for the away team southport? | CREATE TABLE table_name_13 (
score VARCHAR,
away_team VARCHAR
) | SELECT score FROM table_name_13 WHERE away_team = "southport" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2368,
41,
2604,
584,
4280,
28027,
6,
550,
834,
11650,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
2604,
21,
8,
550,
372,
3414,
1493,
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,
2604,
21680,
953,
834,
4350,
834,
2368,
549,
17444,
427,
550,
834,
11650,
3274,
96,
7,
670,
107,
1493,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Provide the number of patients under the age of 80 whose drug route is ng. | 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
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "80" AND prescriptions.route = "NG" | [
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... |
Who won the FIS Nordic World Ski Championships in 1972? | CREATE TABLE table_name_4 (
winner VARCHAR,
fis_nordic_world_ski_championships VARCHAR
) | SELECT winner FROM table_name_4 WHERE fis_nordic_world_ski_championships = "1972" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
591,
41,
4668,
584,
4280,
28027,
6,
361,
7,
834,
29,
127,
4370,
834,
7276,
834,
4009,
834,
17788,
12364,
2009,
7,
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,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4668,
21680,
953,
834,
4350,
834,
591,
549,
17444,
427,
361,
7,
834,
29,
127,
4370,
834,
7276,
834,
4009,
834,
17788,
12364,
2009,
7,
3274,
96,
2294,
5865,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the reviewer id of Daniel Lewis? | CREATE TABLE Reviewer (rID VARCHAR, name VARCHAR) | SELECT rID FROM Reviewer WHERE name = "Daniel Lewis" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4543,
49,
41,
52,
4309,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1132,
49,
3,
23,
26,
13,
4173,
9765,
58,
1,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
52,
4309,
21680,
4543,
49,
549,
17444,
427,
564,
3274,
96,
308,
2738,
15,
40,
9765,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the score for the game with FK Bratstvo as home team? | CREATE TABLE table_name_7 (score VARCHAR, home VARCHAR) | SELECT score FROM table_name_7 WHERE home = "fk bratstvo" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
940,
41,
7,
9022,
584,
4280,
28027,
6,
234,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
2604,
21,
8,
467,
28,
377,
439,
3497,
17,
7,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2604,
21680,
953,
834,
4350,
834,
940,
549,
17444,
427,
234,
3274,
96,
89,
157,
3858,
17,
7,
17,
1621,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What model number uses standard voltage socket? | CREATE TABLE table_name_48 (model_number VARCHAR, socket VARCHAR) | SELECT model_number FROM table_name_48 WHERE socket = "standard voltage" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3707,
41,
21770,
834,
5525,
1152,
584,
4280,
28027,
6,
16197,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
825,
381,
2284,
1068,
10594,
16197,
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,
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,
825,
834,
5525,
1152,
21680,
953,
834,
4350,
834,
3707,
549,
17444,
427,
16197,
3274,
96,
16020,
10594,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Can you tell me the Matches that has the Rank of 1? | CREATE TABLE table_40895 (
"Rank" real,
"Name" text,
"Years" text,
"Matches" text,
"Goals" real
) | SELECT "Matches" FROM table_40895 WHERE "Rank" = '1' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2445,
3914,
755,
41,
96,
22557,
121,
490,
6,
96,
23954,
121,
1499,
6,
96,
476,
2741,
7,
121,
1499,
6,
96,
329,
144,
2951,
121,
1499,
6,
96,
6221,
5405,
121,
490,
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,
96,
329,
144,
2951,
121,
21680,
953,
834,
2445,
3914,
755,
549,
17444,
427,
96,
22557,
121,
3274,
3,
31,
536,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the wins when there are 5 losses, and against is more than 1205? | CREATE TABLE table_name_33 (wins INTEGER, losses VARCHAR, against VARCHAR) | SELECT MAX(wins) FROM table_name_33 WHERE losses = 5 AND against > 1205 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4201,
41,
3757,
7,
3,
21342,
17966,
6,
8467,
584,
4280,
28027,
6,
581,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
9204,
116,
132,
33,
305,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4800,
4,
599,
3757,
7,
61,
21680,
953,
834,
4350,
834,
4201,
549,
17444,
427,
8467,
3274,
305,
3430,
581,
2490,
586,
3076,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which outcome has a partner named Mark Dickson, with the opponents of Hans Gildemeister Belus Prajoux? | CREATE TABLE table_name_66 (outcome VARCHAR, partner VARCHAR, opponents_in_the_final VARCHAR) | SELECT outcome FROM table_name_66 WHERE partner = "mark dickson" AND opponents_in_the_final = "hans gildemeister belus prajoux" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3539,
41,
670,
287,
15,
584,
4280,
28027,
6,
2397,
584,
4280,
28027,
6,
16383,
834,
77,
834,
532,
834,
12406,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
6138,
21680,
953,
834,
4350,
834,
3539,
549,
17444,
427,
2397,
3274,
96,
3920,
3,
26,
3142,
739,
121,
3430,
16383,
834,
77,
834,
532,
834,
12406,
3274,
96,
2618,
7,
3,
122,
173,
221,
13186,
36,
7650,
3,
5319,
8921... |
What is the amount of match points for a club that lost 18 and has 11 bonus points? | CREATE TABLE table_name_6 (
match_points VARCHAR,
lost VARCHAR,
bonus_points VARCHAR
) | SELECT match_points FROM table_name_6 WHERE lost = "18" AND bonus_points = "11" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
948,
41,
1588,
834,
2700,
7,
584,
4280,
28027,
6,
1513,
584,
4280,
28027,
6,
4023,
834,
2700,
7,
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,
0,
0... | [
3,
23143,
14196,
1588,
834,
2700,
7,
21680,
953,
834,
4350,
834,
948,
549,
17444,
427,
1513,
3274,
96,
2606,
121,
3430,
4023,
834,
2700,
7,
3274,
96,
2596,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
how many tracks in word ... life were produced by buckwild ? | CREATE TABLE table_203_228 (
id number,
"#" number,
"title" text,
"songwriters" text,
"producer(s)" text,
"performer (s)" text
) | SELECT COUNT("title") FROM table_203_228 WHERE "producer(s)" = 'buckwild' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
357,
2577,
41,
3,
23,
26,
381,
6,
96,
4663,
121,
381,
6,
96,
21869,
121,
1499,
6,
96,
21101,
7,
121,
1499,
6,
96,
1409,
4817,
49,
599,
7,
61,
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,
2847,
17161,
599,
121,
21869,
8512,
21680,
953,
834,
23330,
834,
357,
2577,
549,
17444,
427,
96,
1409,
4817,
49,
599,
7,
61,
121,
3274,
3,
31,
13863,
23282,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
How many seats became avaliable in Massachusetts 3rd district? | CREATE TABLE table_224840_4 (
vacator VARCHAR,
district VARCHAR
) | SELECT COUNT(vacator) FROM table_224840_4 WHERE district = "Massachusetts 3rd" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
24622,
26311,
834,
591,
41,
3,
8938,
1016,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
6116,
1632,
3,
8644,
8860,
16,
9777,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2847,
17161,
599,
8938,
1016,
61,
21680,
953,
834,
24622,
26311,
834,
591,
549,
17444,
427,
3939,
3274,
96,
27189,
1836,
1074,
17,
17,
7,
220,
52,
26,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
who has the high points on june 16? | CREATE TABLE table_64611 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location/Attendance" text,
"Record" text
) | SELECT "High points" FROM table_64611 WHERE "Date" = 'june 16' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4389,
4241,
536,
41,
96,
23055,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
21417,
979,
121,
1499,
6,
96... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
21417,
979,
121,
21680,
953,
834,
4389,
4241,
536,
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,... |
What is Province, when 2006 is less than 153748, when Date of Official Foundation of Municipality is after 1958, and when City is "Pakdasht"? | CREATE TABLE table_name_46 (province VARCHAR, city VARCHAR, date_of_official_foundation_of_municipality VARCHAR) | SELECT province FROM table_name_46 WHERE 2006 < 153748 AND date_of_official_foundation_of_municipality > 1958 AND city = "pakdasht" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4448,
41,
1409,
2494,
565,
584,
4280,
28027,
6,
690,
584,
4280,
28027,
6,
833,
834,
858,
834,
20884,
834,
19732,
257,
834,
858,
834,
11760,
3389,
10355,
584,
4280,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
7985,
21680,
953,
834,
4350,
834,
4448,
549,
17444,
427,
3581,
3,
2,
627,
4118,
3707,
3430,
833,
834,
858,
834,
20884,
834,
19732,
257,
834,
858,
834,
11760,
3389,
10355,
2490,
22306,
3430,
690,
3274,
96,
16864,
26,
... |
what is procedure short title of procedure icd9 code 3891? | 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 prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) | SELECT procedures.short_title FROM procedures WHERE procedures.icd9_code = "3891" | [
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,
4293,
5,
7,
14184,
834,
21869,
21680,
4293,
549,
17444,
427,
4293,
5,
447,
26,
1298,
834,
4978,
3274,
96,
3747,
4729,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name the most ending with | CREATE TABLE table_1852650_1 (
ending_with INTEGER
) | SELECT MAX(ending_with) FROM table_1852650_1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
21594,
2688,
1752,
834,
536,
41,
7784,
834,
4065,
3,
21342,
17966,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
167,
7784,
28,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
9303,
834,
4065,
61,
21680,
953,
834,
21594,
2688,
1752,
834,
536,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Visualize a bar chart, group by name and compute each group's total number, could you show by the the number of name in ascending? | CREATE TABLE station (
Station_ID int,
Name text,
Annual_entry_exit real,
Annual_interchanges real,
Total_Passengers real,
Location text,
Main_Services text,
Number_of_Platforms int
)
CREATE TABLE train (
Train_ID int,
Name text,
Time text,
Service text
)
CREATE TABLE train_station (
Train_ID int,
Station_ID int
) | SELECT Name, COUNT(Name) FROM train GROUP BY Name ORDER BY COUNT(Name) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2478,
41,
5939,
834,
4309,
16,
17,
6,
5570,
1499,
6,
7389,
834,
295,
651,
834,
994,
155,
490,
6,
7389,
834,
3870,
13073,
7,
490,
6,
9273,
834,
20192,
4606,
277,
490,
6,
10450,
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,
5570,
6,
2847,
17161,
599,
23954,
61,
21680,
2412,
350,
4630,
6880,
272,
476,
5570,
4674,
11300,
272,
476,
2847,
17161,
599,
23954,
61,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name the region before 2008 when name of best 1200 | CREATE TABLE table_52169 (
"Region" text,
"Year" real,
"Name" text,
"Format(s)" text,
"Label" text
) | SELECT "Region" FROM table_52169 WHERE "Year" < '2008' AND "Name" = 'best 1200' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
5373,
27096,
41,
96,
17748,
23,
106,
121,
1499,
6,
96,
476,
2741,
121,
490,
6,
96,
23954,
121,
1499,
6,
96,
3809,
3357,
599,
7,
61,
121,
1499,
6,
96,
434,
10333,
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,
17748,
23,
106,
121,
21680,
953,
834,
5373,
27096,
549,
17444,
427,
96,
476,
2741,
121,
3,
2,
3,
31,
16128,
31,
3430,
96,
23954,
121,
3274,
3,
31,
9606,
209,
3632,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What are Wells Fargo's assets? | CREATE TABLE table_1540 (
"Rank" real,
"Company" text,
"Headquarters" text,
"Industry" text,
"Sales (billion $)" text,
"Profits (billion $)" text,
"Assets (billion $)" text,
"Market Value (billion $)" text
) | SELECT "Assets (billion $)" FROM table_1540 WHERE "Company" = 'Wells Fargo' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1808,
2445,
41,
96,
22557,
121,
490,
6,
96,
5890,
2837,
63,
121,
1499,
6,
96,
3845,
9,
26,
19973,
7,
121,
1499,
6,
96,
1570,
8655,
8224,
121,
1499,
6,
96,
134,
4529,
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,
188,
7,
2244,
7,
41,
115,
14916,
1514,
61,
121,
21680,
953,
834,
1808,
2445,
549,
17444,
427,
96,
5890,
2837,
63,
121,
3274,
3,
31,
18741,
7,
5186,
839,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What number pick did the CFL team bc lions (via hamilton via winnipeg ) have? | CREATE TABLE table_20170644_1 (pick__number INTEGER, cfl_team VARCHAR) | SELECT MAX(pick__number) FROM table_20170644_1 WHERE cfl_team = "BC Lions (via Hamilton via Winnipeg )" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
9887,
5176,
3628,
834,
536,
41,
17967,
834,
834,
5525,
1152,
3,
21342,
17966,
6,
3,
75,
89,
40,
834,
11650,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
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,
1... | [
3,
23143,
14196,
4800,
4,
599,
17967,
834,
834,
5525,
1152,
61,
21680,
953,
834,
9887,
5176,
3628,
834,
536,
549,
17444,
427,
3,
75,
89,
40,
834,
11650,
3274,
96,
7645,
10371,
7,
41,
5907,
13450,
1009,
28517,
3,
61,
121,
1,
-100,
... |
What is the Home team at the Blackburn Rovers Away game? | CREATE TABLE table_name_70 (
home_team VARCHAR,
away_team VARCHAR
) | SELECT home_team FROM table_name_70 WHERE away_team = "blackburn rovers" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2518,
41,
234,
834,
11650,
584,
4280,
28027,
6,
550,
834,
11650,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1210,
372,
44,
8,
1589,
7223... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
234,
834,
11650,
21680,
953,
834,
4350,
834,
2518,
549,
17444,
427,
550,
834,
11650,
3274,
96,
19699,
7223,
3,
8843,
277,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What was the chassis when the points were greater than 0 and the entrant was March Engineering? | CREATE TABLE table_name_74 (
chassis VARCHAR,
points VARCHAR,
entrant VARCHAR
) | SELECT chassis FROM table_name_74 WHERE points > 0 AND entrant = "march engineering" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4581,
41,
22836,
584,
4280,
28027,
6,
979,
584,
4280,
28027,
6,
3,
295,
3569,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
22836,
116,
8,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
22836,
21680,
953,
834,
4350,
834,
4581,
549,
17444,
427,
979,
2490,
3,
632,
3430,
3,
295,
3569,
3274,
96,
51,
7064,
3867,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Whats the status of the trains at location Museum | CREATE TABLE table_951 (
"No." text,
"Name" text,
"Livery" text,
"Arrival" real,
"Type" text,
"Configuration" text,
"Builder" text,
"Built" real,
"Status" text,
"Location" text
) | SELECT "Status" FROM table_951 WHERE "Location" = 'Museum' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3301,
536,
41,
96,
4168,
535,
1499,
6,
96,
23954,
121,
1499,
6,
96,
24179,
651,
121,
1499,
6,
96,
188,
52,
25295,
121,
490,
6,
96,
25160,
121,
1499,
6,
96,
4302,
26703,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
17,
144,
302,
121,
21680,
953,
834,
3301,
536,
549,
17444,
427,
96,
434,
32,
75,
257,
121,
3274,
3,
31,
329,
1074,
440,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
what was the last year where connors won ? | CREATE TABLE table_204_638 (
id number,
"year" number,
"tournament" text,
"surface" text,
"round" text,
"winner" text,
"score" text
) | SELECT MAX("year") FROM table_204_638 WHERE "winner" = 'jimmy connors' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
948,
3747,
41,
3,
23,
26,
381,
6,
96,
1201,
121,
381,
6,
96,
17,
1211,
20205,
17,
121,
1499,
6,
96,
26899,
121,
1499,
6,
96,
7775,
121,
1499,
6,
96,
3757,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1201,
8512,
21680,
953,
834,
26363,
834,
948,
3747,
549,
17444,
427,
96,
3757,
687,
121,
3274,
3,
31,
354,
603,
2258,
975,
29,
127,
7,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
For those employees who did not have any job in the past, a bar chart shows the distribution of hire_date and the average of employee_id bin hire_date by time, rank in desc by the total number. | 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 departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
) | SELECT HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY AVG(EMPLOYEE_ID) 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,
71,
17217,
599,
6037,
345,
5017,
476,
5080,
834,
4309,
61,
21680,
1652,
549,
17444,
427,
4486,
262,
5244,
5017,
476,
5080,
834,
4309,
3388,
41,
23143,
14196,
262,
5244,
5017,
476,
5080,
... |
What is the production code for the number 5 series ? | CREATE TABLE table_26801821_1 (production_code VARCHAR, no_in_series VARCHAR) | SELECT production_code FROM table_26801821_1 WHERE no_in_series = 5 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2688,
2079,
2606,
2658,
834,
536,
41,
20762,
834,
4978,
584,
4280,
28027,
6,
150,
834,
77,
834,
10833,
7,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
999,
834,
4978,
21680,
953,
834,
2688,
2079,
2606,
2658,
834,
536,
549,
17444,
427,
150,
834,
77,
834,
10833,
7,
3274,
305,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Show team_id from each team name, and display y axis in desc order. | CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
) | SELECT Team_Name, Team_ID FROM basketball_match ORDER BY Team_ID DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3819,
41,
1121,
834,
4309,
16,
17,
6,
1121,
1499,
6,
10450,
1499,
6,
3,
20100,
490,
6,
71,
89,
8027,
23,
257,
1499,
6,
695,
4046,
297,
490,
6,
7486,
4350,
1499,
6,
14542,
834,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2271,
834,
23954,
6,
2271,
834,
4309,
21680,
8498,
834,
19515,
4674,
11300,
272,
476,
2271,
834,
4309,
309,
25067,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the highest league cup with more than 0 FA cups, a premier league less than 34 and a total of 11? | CREATE TABLE table_name_77 (
league_cup INTEGER,
total VARCHAR,
fa_cup VARCHAR,
premier_league VARCHAR
) | SELECT MAX(league_cup) FROM table_name_77 WHERE fa_cup > 0 AND premier_league < 34 AND total = 11 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4013,
41,
5533,
834,
4658,
3,
21342,
17966,
6,
792,
584,
4280,
28027,
6,
3,
89,
9,
834,
4658,
584,
4280,
28027,
6,
2761,
834,
29512,
584,
4280,
28027,
3,
61,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
29512,
834,
4658,
61,
21680,
953,
834,
4350,
834,
4013,
549,
17444,
427,
3,
89,
9,
834,
4658,
2490,
3,
632,
3430,
2761,
834,
29512,
3,
2,
6154,
3430,
792,
3274,
850,
1,
-100,
-100,
-100,
-100,
-100,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.