NATURAL_LANG stringlengths 0 446 | SCHEMA stringlengths 27 2.21k | SQL stringlengths 18 453 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|
what is days of hospital stay and diagnoses icd9 code of subject id 7578? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT demographic.days_stay, diagnoses.icd9_code FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "7578" | [
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,
14798,
5,
1135,
7,
834,
21545,
6,
18730,
7,
5,
447,
26,
1298,
834,
4978,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
549,... |
Draw a pie chart for what are the different affiliations, and what is the total enrollment of schools founded after 1850 for each enrollment type? | 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 Affiliation, SUM(Enrollment) FROM university WHERE Founded > 1850 GROUP BY Affiliation | [
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,
71,
89,
8027,
23,
257,
6,
180,
6122,
599,
8532,
4046,
297,
61,
21680,
3819,
549,
17444,
427,
3,
20100,
2490,
507,
1752,
350,
4630,
6880,
272,
476,
71,
89,
8027,
23,
257,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Find the purchase time, age and address of each member, and show the results in the order of purchase time. | CREATE TABLE member (
Time_of_purchase VARCHAR,
age VARCHAR,
address VARCHAR
) | SELECT Time_of_purchase, age, address FROM member ORDER BY Time_of_purchase | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1144,
41,
2900,
834,
858,
834,
29446,
584,
4280,
28027,
6,
1246,
584,
4280,
28027,
6,
1115,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2588,
8,
1242,
97,
6,
1246,
11,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2900,
834,
858,
834,
29446,
6,
1246,
6,
1115,
21680,
1144,
4674,
11300,
272,
476,
2900,
834,
858,
834,
29446,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
How many number of series have a production code of 1.11? | CREATE TABLE table_24862 (
"No. in series" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text
) | SELECT "No. in series" FROM table_24862 WHERE "Production code" = '1.11' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2266,
3840,
357,
41,
96,
4168,
5,
16,
939,
121,
490,
6,
96,
382,
155,
109,
121,
1499,
6,
96,
23620,
15,
26,
57,
121,
1499,
6,
96,
24965,
324,
57,
121,
1499,
6,
96,
66... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
4168,
5,
16,
939,
121,
21680,
953,
834,
2266,
3840,
357,
549,
17444,
427,
96,
3174,
8291,
1081,
121,
3274,
3,
31,
11039,
536,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, give me the comparison about the average of manager_id over the hire_date bin hire_date by time. | CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
) | SELECT HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1652,
41,
262,
5244,
5017,
476,
5080,
834,
4309,
7908,
1982,
599,
11071,
632,
201,
30085,
834,
567,
17683,
3,
4331,
4059,
599,
1755,
201,
301,
12510,
834,
567,
17683,
3,
4331,
4059,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
454,
14132,
834,
308,
6048,
6,
71,
17217,
599,
9312,
188,
17966,
834,
4309,
61,
21680,
1652,
549,
17444,
427,
180,
4090,
24721,
272,
7969,
518,
23394,
3,
25129,
3430,
586,
2313,
3430,
3,
6657,
329,
16994,
9215,
834,
... |
Which Wheels has Built smaller than 1958, a Location of york, and a Railway of nsr? | CREATE TABLE table_name_31 (
wheels VARCHAR,
railway VARCHAR,
built VARCHAR,
location VARCHAR
) | SELECT wheels FROM table_name_31 WHERE built < 1958 AND location = "york" AND railway = "nsr" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3341,
41,
8277,
584,
4280,
28027,
6,
14421,
584,
4280,
28027,
6,
1192,
584,
4280,
28027,
6,
1128,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
8277,
21680,
953,
834,
4350,
834,
3341,
549,
17444,
427,
1192,
3,
2,
22306,
3430,
1128,
3274,
96,
63,
127,
157,
121,
3430,
14421,
3274,
96,
29,
7,
52,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How may assists per game have 7.7 points per game? | CREATE TABLE table_2387461_1 (assists_per_game VARCHAR, points_per_game VARCHAR) | SELECT assists_per_game FROM table_2387461_1 WHERE points_per_game = "7.7" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
3747,
4581,
4241,
834,
536,
41,
6500,
7,
17,
7,
834,
883,
834,
7261,
584,
4280,
28027,
6,
979,
834,
883,
834,
7261,
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
13041,
834,
883,
834,
7261,
21680,
953,
834,
357,
3747,
4581,
4241,
834,
536,
549,
17444,
427,
979,
834,
883,
834,
7261,
3274,
96,
940,
5,
940,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
provide the number of dead patients who were less than 43 years of age. | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.expire_flag = "1" AND demographic.age < "43" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
994,
2388,
15,
834,
89,
5430,
3274,
96,
536,
121,
3430,
14798,
5,
545,
3,
2,
96,
4906,
121,
1,... |
What are the number of the enrollment dates of all the tests that have result 'Pass'? | CREATE TABLE Courses (
course_id INTEGER,
author_id INTEGER,
subject_id INTEGER,
course_name VARCHAR(120),
course_description VARCHAR(255)
)
CREATE TABLE Student_Tests_Taken (
registration_id INTEGER,
date_test_taken DATETIME,
test_result VARCHAR(255)
)
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)
)
CREATE TABLE Subjects (
subject_id INTEGER,
subject_name VARCHAR(120)
)
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 Student_Course_Enrolment (
registration_id INTEGER,
student_id INTEGER,
course_id INTEGER,
date_of_enrolment DATETIME,
date_of_completion DATETIME
) | SELECT date_of_enrolment, COUNT(date_of_enrolment) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Pass" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
8670,
7,
41,
503,
834,
23,
26,
3,
21342,
17966,
6,
2291,
834,
23,
26,
3,
21342,
17966,
6,
1426,
834,
23,
26,
3,
21342,
17966,
6,
503,
834,
4350,
584,
4280,
28027,
599,
15518,
201,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
833,
834,
858,
834,
35,
3491,
297,
6,
2847,
17161,
599,
5522,
834,
858,
834,
35,
3491,
297,
61,
21680,
6341,
834,
3881,
3589,
15,
834,
8532,
3491,
297,
6157,
332,
536,
3,
15355,
3162,
6341,
834,
382,
222,
7,
834,
... |
What was the nickname of the team in the Geelong West Cricket & Football Club? | CREATE TABLE table_60140 (
"Club" text,
"Nickname" text,
"Location" text,
"GFL Premierships" text,
"Years in GFL" text
) | SELECT "Nickname" FROM table_60140 WHERE "Club" = 'geelong west cricket & football club' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3328,
22012,
41,
96,
254,
11158,
121,
1499,
6,
96,
567,
3142,
4350,
121,
1499,
6,
96,
434,
32,
75,
257,
121,
1499,
6,
96,
517,
10765,
6552,
2009,
7,
121,
1499,
6,
96,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
567,
3142,
4350,
121,
21680,
953,
834,
3328,
22012,
549,
17444,
427,
96,
254,
11158,
121,
3274,
3,
31,
397,
15,
2961,
4653,
18096,
3,
184,
3370,
1886,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the Surface of the court against Ivo Klec with a Score of 6 3, 6 3? | CREATE TABLE table_48687 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent" text,
"Score" text
) | SELECT "Surface" FROM table_48687 WHERE "Opponent" = 'ivo klec' AND "Score" = '6–3, 6–3' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
3840,
4225,
41,
96,
15767,
287,
15,
121,
1499,
6,
96,
308,
342,
121,
1499,
6,
96,
382,
1211,
20205,
17,
121,
1499,
6,
96,
134,
450,
4861,
121,
1499,
6,
96,
667,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
134,
450,
4861,
121,
21680,
953,
834,
591,
3840,
4225,
549,
17444,
427,
96,
667,
102,
9977,
121,
3274,
3,
31,
23,
1621,
3,
9434,
75,
31,
3430,
96,
134,
9022,
121,
3274,
3,
31,
948,
104,
6355,
431,
104,
519,
... |
What is the average number of villages with a name of janapada of Punia? | CREATE TABLE table_name_86 (
no_of_villages INTEGER,
name_of_janapada VARCHAR
) | SELECT AVG(no_of_villages) FROM table_name_86 WHERE name_of_janapada = "punia" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3840,
41,
150,
834,
858,
834,
24887,
2897,
3,
21342,
17966,
6,
564,
834,
858,
834,
7066,
9,
5612,
9,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
29,
32,
834,
858,
834,
24887,
2897,
61,
21680,
953,
834,
4350,
834,
3840,
549,
17444,
427,
564,
834,
858,
834,
7066,
9,
5612,
9,
3274,
96,
6225,
23,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Where is shabazz muhammad from? | CREATE TABLE table_57176 (
"Player" text,
"Height" text,
"School" text,
"Hometown" text,
"College" text
) | SELECT "Hometown" FROM table_57176 WHERE "Player" = 'shabazz muhammad' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3436,
26782,
41,
96,
15800,
49,
121,
1499,
6,
96,
3845,
2632,
121,
1499,
6,
96,
29364,
121,
1499,
6,
96,
19040,
3540,
121,
1499,
6,
96,
9939,
7883,
121,
1499,
3,
61,
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,
19040,
3540,
121,
21680,
953,
834,
3436,
26782,
549,
17444,
427,
96,
15800,
49,
121,
3274,
3,
31,
7,
6111,
9,
5271,
4035,
1483,
11374,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Group and count the years played to draw a bar chart, list y axis in descending order. | CREATE TABLE team (
Team_id int,
Name text
)
CREATE TABLE match_season (
Season real,
Player text,
Position text,
Country int,
Team int,
Draft_Pick_Number int,
Draft_Class text,
College text
)
CREATE TABLE player (
Player_ID int,
Player text,
Years_Played text,
Total_WL text,
Singles_WL text,
Doubles_WL text,
Team int
)
CREATE TABLE country (
Country_id int,
Country_name text,
Capital text,
Official_native_language text
) | SELECT Years_Played, COUNT(Years_Played) FROM player GROUP BY Years_Played ORDER BY COUNT(Years_Played) DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
372,
41,
2271,
834,
23,
26,
16,
17,
6,
5570,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
1588,
834,
9476,
41,
7960,
490,
6,
12387,
1499,
6,
14258,
1499,
6,
69... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
13825,
834,
15800,
15,
26,
6,
2847,
17161,
599,
476,
2741,
7,
834,
15800,
15,
26,
61,
21680,
1959,
350,
4630,
6880,
272,
476,
13825,
834,
15800,
15,
26,
4674,
11300,
272,
476,
2847,
17161,
599,
476,
2741,
7,
834,
... |
What team got a draft pick player from McGill? | CREATE TABLE table_27352 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
) | SELECT "CFL Team" FROM table_27352 WHERE "College" = 'McGill' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2555,
2469,
357,
41,
96,
345,
3142,
1713,
121,
490,
6,
96,
254,
10765,
2271,
121,
1499,
6,
96,
15800,
49,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
9939,
78... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
254,
10765,
2271,
121,
21680,
953,
834,
2555,
2469,
357,
549,
17444,
427,
96,
9939,
7883,
121,
3274,
3,
31,
329,
75,
517,
1092,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the highest number drawn when the position was 12? | CREATE TABLE table_name_50 (
drawn INTEGER,
position VARCHAR
) | SELECT MAX(drawn) FROM table_name_50 WHERE position = 12 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1752,
41,
6796,
3,
21342,
17966,
6,
1102,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2030,
381,
6796,
116,
8,
1102,
47,
586,
58,
1,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
19489,
29,
61,
21680,
953,
834,
4350,
834,
1752,
549,
17444,
427,
1102,
3274,
586,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What's the city of license having a D ERP of 100kw? | CREATE TABLE table_63405 (
"Callsign" text,
"Network" text,
"City of License" text,
"D ERP" text,
"Owner / Operator" text
) | SELECT "City of License" FROM table_63405 WHERE "D ERP" = '100kw' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3891,
591,
3076,
41,
96,
254,
1748,
6732,
121,
1499,
6,
96,
9688,
1981,
121,
1499,
6,
96,
254,
485,
13,
16452,
121,
1499,
6,
96,
308,
22568,
121,
1499,
6,
96,
667,
210,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
254,
485,
13,
16452,
121,
21680,
953,
834,
3891,
591,
3076,
549,
17444,
427,
96,
308,
22568,
121,
3274,
3,
31,
2915,
157,
210,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Who was the opponent at the game that had a loss of Caldwell (10-11)? | CREATE TABLE table_name_35 (opponent VARCHAR, loss VARCHAR) | SELECT opponent FROM table_name_35 WHERE loss = "caldwell (10-11)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2469,
41,
32,
102,
9977,
584,
4280,
28027,
6,
1453,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
8,
15264,
44,
8,
467,
24,
141,
3,
9,
1453,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
15264,
21680,
953,
834,
4350,
834,
2469,
549,
17444,
427,
1453,
3274,
96,
1489,
26,
2091,
11704,
9169,
61,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
In what industry was the company that had 89.16 billions of dollars in sales? | CREATE TABLE table_1682026_7 (industry VARCHAR, sales__billion_$_ VARCHAR) | SELECT industry FROM table_1682026_7 WHERE sales__billion_$_ = "89.16" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
24274,
1755,
2688,
834,
940,
41,
13580,
7,
8224,
584,
4280,
28027,
6,
1085,
834,
834,
115,
14916,
834,
3229,
834,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
86,
125... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
681,
21680,
953,
834,
24274,
1755,
2688,
834,
940,
549,
17444,
427,
1085,
834,
834,
115,
14916,
834,
3229,
834,
3274,
96,
3914,
5,
2938,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What team was the away team when the Deportes Savio was the home team? | CREATE TABLE table_name_49 (away VARCHAR, home VARCHAR) | SELECT away FROM table_name_49 WHERE home = "deportes savio" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3647,
41,
8006,
584,
4280,
28027,
6,
234,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
372,
47,
8,
550,
372,
116,
8,
374,
1493,
15,
7,
180,
2960,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
550,
21680,
953,
834,
4350,
834,
3647,
549,
17444,
427,
234,
3274,
96,
221,
1493,
15,
7,
3,
7,
2960,
32,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many rounds were there in Karlskoga Motorstadion with Roger Eriksson at the pole position? | CREATE TABLE table_23525 (
"Round" real,
"Circuit/Location" text,
"Pole Position" text,
"Fastest Lap" text,
"Winning Driver" text,
"Winning Team" text,
"Highest Scoring Team" text,
"Winning Privateer" text
) | SELECT COUNT("Round") FROM table_23525 WHERE "Circuit/Location" = 'Karlskoga Motorstadion' AND "Pole Position" = 'Roger Eriksson' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
25174,
1828,
41,
96,
448,
32,
1106,
121,
490,
6,
96,
254,
23,
52,
21560,
87,
434,
32,
75,
257,
121,
1499,
6,
96,
8931,
15,
14258,
121,
1499,
6,
96,
371,
9,
7,
4377,
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,
2847,
17161,
599,
121,
448,
32,
1106,
8512,
21680,
953,
834,
25174,
1828,
549,
17444,
427,
96,
254,
23,
52,
21560,
87,
434,
32,
75,
257,
121,
3274,
3,
31,
439,
291,
40,
17869,
122,
9,
5083,
2427,
26,
23,
106,
31... |
provide the number of patients whose admission location is clinic referral/premature and procedure long title is endoscopic sphincterotomy and papillotomy? | 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 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
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_location = "CLINIC REFERRAL/PREMATURE" AND procedures.long_title = "Endoscopic sphincterotomy and papillotomy" | [
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,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
Name the opponent in the final for year of 1888 | CREATE TABLE table_name_36 (
opponent_in_the_final VARCHAR,
year VARCHAR
) | SELECT opponent_in_the_final FROM table_name_36 WHERE year = 1888 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3420,
41,
15264,
834,
77,
834,
532,
834,
12406,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
15264,
16,
8,
804,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
15264,
834,
77,
834,
532,
834,
12406,
21680,
953,
834,
4350,
834,
3420,
549,
17444,
427,
215,
3274,
507,
4060,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
How many games have a Score of 1 0, and Points smaller than 66? | CREATE TABLE table_75648 (
"Game" real,
"January" real,
"Opponent" text,
"Score" text,
"Record" text,
"Points" real
) | SELECT COUNT("Game") FROM table_75648 WHERE "Score" = '1–0' AND "Points" < '66' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3072,
948,
3707,
41,
96,
23055,
121,
490,
6,
96,
30404,
121,
490,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
1649,
7621,
121,
1499,
6,
96,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
23055,
8512,
21680,
953,
834,
3072,
948,
3707,
549,
17444,
427,
96,
134,
9022,
121,
3274,
3,
31,
536,
104,
632,
31,
3430,
96,
22512,
7,
121,
3,
2,
3,
31,
3539,
31,
1,
-100,
-100,
-100,
-10... |
What are the 1994 results with a career SR of 0 / 3? | CREATE TABLE table_8780 (
"Tournament" text,
"1987" text,
"1988" text,
"1989" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"Career SR" text
) | SELECT "1994" FROM table_8780 WHERE "Career SR" = '0 / 3' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4225,
2079,
41,
96,
382,
1211,
20205,
17,
121,
1499,
6,
96,
2294,
4225,
121,
1499,
6,
96,
2294,
4060,
121,
1499,
6,
96,
2294,
3914,
121,
1499,
6,
96,
2294,
2394,
121,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
19479,
20364,
21680,
953,
834,
4225,
2079,
549,
17444,
427,
96,
6936,
15,
49,
3,
6857,
121,
3274,
3,
31,
632,
3,
87,
220,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Who was the opponent after week 8 that had 72,190 people in attendance? | CREATE TABLE table_63024 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | SELECT "Opponent" FROM table_63024 WHERE "Week" > '8' AND "Attendance" = '72,190' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26106,
2266,
41,
96,
518,
10266,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
20119,
121,
1499,
6,
96,
188,
17,
324,
26,
663,
121,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
667,
102,
9977,
121,
21680,
953,
834,
26106,
2266,
549,
17444,
427,
96,
518,
10266,
121,
2490,
3,
31,
927,
31,
3430,
96,
188,
17,
324,
26,
663,
121,
3274,
3,
31,
5865,
6,
11776,
31,
1,
-100,
-100,
-100,
-100... |
which player won by the least number of strokes ? | CREATE TABLE table_203_94 (
id number,
"year" number,
"player" text,
"country" text,
"score" text,
"to par" number,
"margin\nof victory" text,
"course" text,
"location" text,
"purse ($)" number,
"winner's\nshare ($)" number
) | SELECT "player" FROM table_203_94 ORDER BY "margin\nof victory" LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
4240,
41,
3,
23,
26,
381,
6,
96,
1201,
121,
381,
6,
96,
20846,
121,
1499,
6,
96,
17529,
121,
1499,
6,
96,
7,
9022,
121,
1499,
6,
96,
235,
260,
121,
381,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
20846,
121,
21680,
953,
834,
23330,
834,
4240,
4674,
11300,
272,
476,
96,
1635,
122,
77,
2,
29,
858,
6224,
121,
8729,
12604,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Score of 2 - 2 had what points? | CREATE TABLE table_name_47 (points VARCHAR, score VARCHAR) | SELECT points FROM table_name_47 WHERE score = "2 - 2" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4177,
41,
2700,
7,
584,
4280,
28027,
6,
2604,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
17763,
13,
204,
3,
18,
204,
141,
125,
979,
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,
979,
21680,
953,
834,
4350,
834,
4177,
549,
17444,
427,
2604,
3274,
96,
357,
3,
18,
204,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the least amount of blank ends for a skip who has 44 PF? | CREATE TABLE table_31206 (
"Skip (Club)" text,
"W" real,
"L" real,
"PF" real,
"PA" real,
"Ends Won" real,
"Ends Lost" real,
"Blank Ends" real,
"Stolen Ends" real
) | SELECT MIN("Blank Ends") FROM table_31206 WHERE "PF" = '44' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3341,
24643,
41,
96,
134,
2168,
102,
41,
254,
11158,
61,
121,
1499,
6,
96,
518,
121,
490,
6,
96,
434,
121,
490,
6,
96,
12017,
121,
490,
6,
96,
3965,
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,
3,
17684,
599,
121,
279,
40,
5979,
3720,
7,
8512,
21680,
953,
834,
3341,
24643,
549,
17444,
427,
96,
12017,
121,
3274,
3,
31,
3628,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
WHich Date has a Record of 2 7 0 1? | CREATE TABLE table_38906 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Record" text
) | SELECT "Date" FROM table_38906 WHERE "Record" = '2–7–0–1' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3747,
2394,
948,
41,
96,
308,
342,
121,
1499,
6,
96,
553,
159,
155,
127,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
19040,
121,
1499,
6,
96,
1649,
7621,
121,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
308,
342,
121,
21680,
953,
834,
3747,
2394,
948,
549,
17444,
427,
96,
1649,
7621,
121,
3274,
3,
31,
357,
104,
940,
104,
632,
104,
536,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the home of the match with a 0:2 result on 21.10.07? | CREATE TABLE table_name_28 (
home VARCHAR,
result VARCHAR,
date VARCHAR
) | SELECT home FROM table_name_28 WHERE result = "0:2" AND date = "21.10.07" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2577,
41,
234,
584,
4280,
28027,
6,
741,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
234,
13,
8,
1588,
28,
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,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
234,
21680,
953,
834,
4350,
834,
2577,
549,
17444,
427,
741,
3274,
96,
632,
10,
357,
121,
3430,
833,
3274,
96,
2658,
5,
10415,
4560,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What was the record in a week less than 13 on November 9, 2003? | CREATE TABLE table_name_69 (record VARCHAR, week VARCHAR, date VARCHAR) | SELECT record FROM table_name_69 WHERE week < 13 AND date = "november 9, 2003" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3951,
41,
60,
7621,
584,
4280,
28027,
6,
471,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
1368,
16,
3,
9,
471,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1368,
21680,
953,
834,
4350,
834,
3951,
549,
17444,
427,
471,
3,
2,
1179,
3430,
833,
3274,
96,
5326,
18247,
9902,
3888,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Give me the comparison about the sum of Team_ID over the All_Home , and group by attribute All_Home by a bar chart, and display from low to high by the x-axis. | CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
) | SELECT All_Home, SUM(Team_ID) FROM basketball_match GROUP BY All_Home ORDER BY All_Home | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3819,
41,
1121,
834,
4309,
16,
17,
6,
1121,
1499,
6,
10450,
1499,
6,
3,
20100,
490,
6,
71,
89,
8027,
23,
257,
1499,
6,
695,
4046,
297,
490,
6,
7486,
4350,
1499,
6,
14542,
834,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
432,
834,
19040,
6,
180,
6122,
599,
18699,
834,
4309,
61,
21680,
8498,
834,
19515,
350,
4630,
6880,
272,
476,
432,
834,
19040,
4674,
11300,
272,
476,
432,
834,
19040,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Who was the visiting team in the game against the Dallas Cowboys? | CREATE TABLE table_52747 (
"Date" text,
"Visiting Team" text,
"Final Score" text,
"Host Team" text,
"Stadium" text
) | SELECT "Visiting Team" FROM table_52747 WHERE "Host Team" = 'dallas cowboys' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
755,
2555,
4177,
41,
96,
308,
342,
121,
1499,
6,
96,
30338,
2271,
121,
1499,
6,
96,
371,
10270,
17763,
121,
1499,
6,
96,
566,
3481,
2271,
121,
1499,
6,
96,
134,
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,
96,
30338,
2271,
121,
21680,
953,
834,
755,
2555,
4177,
549,
17444,
427,
96,
566,
3481,
2271,
121,
3274,
3,
31,
26,
1748,
9,
7,
9321,
7531,
7,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What position did the team new york red bulls pick? | CREATE TABLE table_29626583_3 (
position VARCHAR,
mls_team VARCHAR
) | SELECT position FROM table_29626583_3 WHERE mls_team = "New York Red Bulls" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3166,
4056,
4122,
4591,
834,
519,
41,
1102,
584,
4280,
28027,
6,
3,
51,
40,
7,
834,
11650,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
1102,
410,
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,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1102,
21680,
953,
834,
3166,
4056,
4122,
4591,
834,
519,
549,
17444,
427,
3,
51,
40,
7,
834,
11650,
3274,
96,
6861,
1060,
1624,
10204,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the team 2 with turnovo as team 1? | CREATE TABLE table_60077 (
"Team 1" text,
"Agg." text,
"Team 2" text,
"1st leg" text,
"2nd leg" text
) | SELECT "Team 2" FROM table_60077 WHERE "Team 1" = 'turnovo' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
6007,
4013,
41,
96,
18699,
209,
121,
1499,
6,
96,
188,
4102,
535,
1499,
6,
96,
18699,
204,
121,
1499,
6,
96,
536,
7,
17,
4553,
121,
1499,
6,
96,
357,
727,
4553,
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,
18699,
204,
121,
21680,
953,
834,
6007,
4013,
549,
17444,
427,
96,
18699,
209,
121,
3274,
3,
31,
7535,
32,
1621,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Name the high rebounds for 81 game | CREATE TABLE table_27723228_12 (
high_rebounds VARCHAR,
game VARCHAR
) | SELECT high_rebounds FROM table_27723228_12 WHERE game = 81 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2555,
5865,
2668,
2577,
834,
2122,
41,
306,
834,
23768,
584,
4280,
28027,
6,
467,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
306,
3,
23768,
21,
3,
495... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
306,
834,
23768,
21680,
953,
834,
2555,
5865,
2668,
2577,
834,
2122,
549,
17444,
427,
467,
3274,
3,
4959,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the grid total for jean-pierre beltoise? | CREATE TABLE table_53144 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | SELECT COUNT("Grid") FROM table_53144 WHERE "Driver" = 'jean-pierre beltoise' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4867,
20885,
41,
96,
20982,
52,
121,
1499,
6,
96,
4302,
7593,
127,
121,
1499,
6,
96,
3612,
102,
7,
121,
490,
6,
96,
13368,
87,
1649,
11809,
26,
121,
1499,
6,
96,
13313,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13313,
26,
8512,
21680,
953,
834,
4867,
20885,
549,
17444,
427,
96,
20982,
52,
121,
3274,
3,
31,
26459,
18,
8343,
60,
6782,
32,
159,
15,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the score of Howard Clark from England with a To Par of +1? | CREATE TABLE table_name_55 (
score VARCHAR,
player VARCHAR,
to_par VARCHAR,
country VARCHAR
) | SELECT score FROM table_name_55 WHERE to_par = "+1" AND country = "england" AND player = "howard clark" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3769,
41,
2604,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
6,
12,
834,
1893,
584,
4280,
28027,
6,
684,
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... | [
3,
23143,
14196,
2604,
21680,
953,
834,
4350,
834,
3769,
549,
17444,
427,
12,
834,
1893,
3274,
96,
18446,
121,
3430,
684,
3274,
96,
4606,
40,
232,
121,
3430,
1959,
3274,
96,
4067,
986,
6860,
157,
121,
1,
-100,
-100,
-100,
-100,
-100... |
what is the number of patients whose gender is m and year of birth is less than 2060? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "M" AND demographic.dob_year < "2060" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
122,
3868,
3274,
96,
329,
121,
3430,
14798,
5,
26,
32,
115,
834,
1201,
3,
2,
96,
1755,
3328,
1... |
how many historic sites were listed in 1988 ? | CREATE TABLE table_204_423 (
id number,
"name" text,
"location" text,
"city" text,
"listing date" text
) | SELECT COUNT("name") FROM table_204_423 WHERE "listing date" = 1988 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
591,
2773,
41,
3,
23,
26,
381,
6,
96,
4350,
121,
1499,
6,
96,
14836,
121,
1499,
6,
96,
6726,
121,
1499,
6,
96,
3350,
53,
833,
121,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
121,
4350,
8512,
21680,
953,
834,
26363,
834,
591,
2773,
549,
17444,
427,
96,
3350,
53,
833,
121,
3274,
10414,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
what is the size km when the density hab/km is 8,321? | CREATE TABLE table_10534 (
"Number" real,
"District" text,
"Size km\u00b2" real,
"Population" real,
"Density hab/km" real,
"Councilman" text,
"Party" text
) | SELECT SUM("Size km\u00b2") FROM table_10534 WHERE "Density hab/km" = '8,321' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
12869,
3710,
41,
96,
567,
5937,
49,
121,
490,
6,
96,
308,
23,
20066,
121,
1499,
6,
96,
134,
1737,
2280,
2,
76,
1206,
115,
357,
121,
490,
6,
96,
27773,
7830,
121,
490,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
121,
134,
1737,
2280,
2,
76,
1206,
115,
357,
8512,
21680,
953,
834,
12869,
3710,
549,
17444,
427,
96,
308,
35,
7,
485,
9809,
87,
5848,
121,
3274,
3,
31,
11864,
519,
2658,
31,
1,
-100,
-100,
-100,
... |
how is the most prolific author in ACL ? | CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE field (
fieldid int
)
CREATE TABLE venue (
venueid int,
venuename varchar
)
CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename varchar
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE dataset (
datasetid int,
datasetname varchar
)
CREATE TABLE journal (
journalid int,
journalname varchar
) | SELECT DISTINCT COUNT(DISTINCT paper.paperid), writes.authorid FROM paper, venue, writes WHERE venue.venueid = paper.venueid AND venue.venuename = 'ACL' AND writes.paperid = paper.paperid GROUP BY writes.authorid ORDER BY COUNT(DISTINCT paper.paperid) DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1040,
1846,
41,
1057,
23,
26,
16,
17,
6,
1040,
23,
26,
16,
17,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
1057,
41,
1057,
23,
26,
16,
17,
3,
61,
3,
32102,
32103,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
15438,
25424,
6227,
2847,
17161,
599,
15438,
25424,
6227,
1040,
5,
19587,
23,
26,
201,
11858,
5,
17415,
23,
26,
21680,
1040,
6,
5669,
6,
11858,
549,
17444,
427,
5669,
5,
15098,
23,
26,
3274,
1040,
5,
15098,
23,
... |
Name the average Wins which has a Top 10 smaller than 0? | CREATE TABLE table_name_5 (
wins INTEGER,
top_10 INTEGER
) | SELECT AVG(wins) FROM table_name_5 WHERE top_10 < 0 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
755,
41,
9204,
3,
21342,
17966,
6,
420,
834,
1714,
3,
21342,
17966,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
1348,
4871,
7,
84,
65,
3,
9,
2224,
335,
2755... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
71,
17217,
599,
3757,
7,
61,
21680,
953,
834,
4350,
834,
755,
549,
17444,
427,
420,
834,
1714,
3,
2,
3,
632,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Tell me the Hindu with Jewish of source: uk 2001 census | CREATE TABLE table_52053 (
"Ethnic group" text,
"Christian" text,
"Buddhist" text,
"Hindu" text,
"Jewish" text,
"Muslim" text,
"Sikh" text,
"Other" text,
"No religion" text,
"Not stated" text
) | SELECT "Hindu" FROM table_52053 WHERE "Jewish" = 'source: uk 2001 census' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
25356,
4867,
41,
96,
427,
189,
2532,
563,
121,
1499,
6,
96,
28412,
121,
1499,
6,
96,
7793,
26,
26,
107,
343,
121,
1499,
6,
96,
566,
13580,
121,
1499,
6,
96,
7851,
210,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
566,
13580,
121,
21680,
953,
834,
25356,
4867,
549,
17444,
427,
96,
7851,
210,
1273,
121,
3274,
3,
31,
7928,
10,
3,
1598,
4402,
23087,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Name the title with termination of mission of february 24, 1828 | CREATE TABLE table_name_65 (title VARCHAR, termination_of_mission VARCHAR) | SELECT title FROM table_name_65 WHERE termination_of_mission = "february 24, 1828" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4122,
41,
21869,
584,
4280,
28027,
6,
18739,
834,
858,
834,
5451,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
2233,
28,
18739,
13,
2253,
13,
2997... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2233,
21680,
953,
834,
4350,
834,
4122,
549,
17444,
427,
18739,
834,
858,
834,
5451,
3274,
96,
89,
15,
9052,
1208,
14320,
507,
2577,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Let me know the route of drug administration and short title of the procedure for patient with patient id 2560. | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) | SELECT diagnoses.short_title, prescriptions.route FROM diagnoses INNER JOIN prescriptions ON diagnoses.hadm_id = prescriptions.hadm_id WHERE diagnoses.subject_id = "2560" | [
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,
18730,
7,
5,
7,
14184,
834,
21869,
6,
7744,
7,
5,
20300,
21680,
18730,
7,
3388,
18206,
3,
15355,
3162,
7744,
7,
9191,
18730,
7,
5,
8399,
51,
834,
23,
26,
3274,
7744,
7,
5,
8399,
51,
834,
23,
26,
549,
17444,
42... |
Where is the University of North Carolina at Greensboro located? | CREATE TABLE table_255188_3 (
location VARCHAR,
institution VARCHAR
) | SELECT location FROM table_255188_3 WHERE institution = "University of North Carolina at Greensboro" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
25502,
25794,
834,
519,
41,
1128,
584,
4280,
28027,
6,
6568,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2840,
19,
8,
636,
13,
1117,
5089,
44,
1862,
7,
14901,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1128,
21680,
953,
834,
25502,
25794,
834,
519,
549,
17444,
427,
6568,
3274,
96,
8313,
485,
13,
1117,
5089,
44,
1862,
7,
14901,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Which Year has a Group of c sar awards, and a Result of nominated, and an Award of the best actress, and a Film of 8 women (8 femmes)? | CREATE TABLE table_name_41 (
year INTEGER,
film VARCHAR,
award VARCHAR,
group VARCHAR,
result VARCHAR
) | SELECT AVG(year) FROM table_name_41 WHERE group = "césar awards" AND result = "nominated" AND award = "best actress" AND film = "8 women (8 femmes)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4853,
41,
215,
3,
21342,
17966,
6,
814,
584,
4280,
28027,
6,
2760,
584,
4280,
28027,
6,
563,
584,
4280,
28027,
6,
741,
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,
71,
17217,
599,
1201,
61,
21680,
953,
834,
4350,
834,
4853,
549,
17444,
427,
563,
3274,
96,
75,
899,
291,
6120,
121,
3430,
741,
3274,
96,
3114,
77,
920,
121,
3430,
2760,
3274,
96,
9606,
15676,
121,
3430,
814,
3274,
... |
How many patients admitted before the year 2162 were discharged to SNF? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "SNF" AND demographic.admityear < "2162" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
26,
159,
7993,
834,
14836,
3274,
96,
134,
12619,
121,
3430,
14798,
5,
20466,
17,
1201,
3,
2,
96,... |
What was the location of the bout that lasted 5:00 and led to a 6-2-1 record? | CREATE TABLE table_name_17 (
location VARCHAR,
time VARCHAR,
record VARCHAR
) | SELECT location FROM table_name_17 WHERE time = "5:00" AND record = "6-2-1" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2517,
41,
1128,
584,
4280,
28027,
6,
97,
584,
4280,
28027,
6,
1368,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
1128,
13,
8,
9338,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1128,
21680,
953,
834,
4350,
834,
2517,
549,
17444,
427,
97,
3274,
96,
19870,
121,
3430,
1368,
3274,
96,
25369,
2292,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What was the winning score of the PGA Championship (3)? | CREATE TABLE table_13026799_1 (winning_score VARCHAR, championship VARCHAR) | SELECT winning_score FROM table_13026799_1 WHERE championship = "PGA championship (3)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
21448,
357,
3708,
3264,
834,
536,
41,
8163,
834,
7,
9022,
584,
4280,
28027,
6,
10183,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
3447,
2604,
13,
8,
3,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3447,
834,
7,
9022,
21680,
953,
834,
21448,
357,
3708,
3264,
834,
536,
549,
17444,
427,
10183,
3274,
96,
24127,
10183,
10153,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What NHL team has a player in the position of Left Wing that came from the Toronto Marlboros (omjhl)? | CREATE TABLE table_name_81 (
nhl_team VARCHAR,
position VARCHAR,
college_junior_club_team VARCHAR
) | SELECT nhl_team FROM table_name_81 WHERE position = "left wing" AND college_junior_club_team = "toronto marlboros (omjhl)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4959,
41,
3,
29,
107,
40,
834,
11650,
584,
4280,
28027,
6,
1102,
584,
4280,
28027,
6,
1900,
834,
6959,
23,
127,
834,
13442,
834,
11650,
584,
4280,
28027,
3,
61,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
29,
107,
40,
834,
11650,
21680,
953,
834,
4350,
834,
4959,
549,
17444,
427,
1102,
3274,
96,
17068,
3,
3108,
121,
3430,
1900,
834,
6959,
23,
127,
834,
13442,
834,
11650,
3274,
96,
235,
4438,
32,
3157,
40,
14901,
... |
Name the Programming which has an Aspect of 4:3, and a PSIP Short Name of ibc-tv? | CREATE TABLE table_name_18 (
programming VARCHAR,
aspect VARCHAR,
psip_short_name VARCHAR
) | SELECT programming FROM table_name_18 WHERE aspect = "4:3" AND psip_short_name = "ibc-tv" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2606,
41,
6020,
584,
4280,
28027,
6,
2663,
584,
4280,
28027,
6,
3,
102,
7,
23,
102,
834,
7,
14184,
834,
4350,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
6020,
21680,
953,
834,
4350,
834,
2606,
549,
17444,
427,
2663,
3274,
96,
591,
10,
519,
121,
3430,
3,
102,
7,
23,
102,
834,
7,
14184,
834,
4350,
3274,
96,
23,
115,
75,
18,
17,
208,
121,
1,
-100,
-100,
-100,
-100,... |
What is the nickname with an enrollment (2013/14) of 160? | CREATE TABLE table_name_59 (nickname_s_ VARCHAR, enrollment__2013_14_ VARCHAR) | SELECT nickname_s_ FROM table_name_59 WHERE enrollment__2013_14_ = "160" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3390,
41,
11191,
4350,
834,
7,
834,
584,
4280,
28027,
6,
17938,
834,
834,
11138,
834,
2534,
834,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
24649,
834,
7,
834,
21680,
953,
834,
4350,
834,
3390,
549,
17444,
427,
17938,
834,
834,
11138,
834,
2534,
834,
3274,
96,
19129,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Display a bar chart for what are the names and damage in millions for storms, ordered by their max speeds descending? | CREATE TABLE region (
Region_id int,
Region_code text,
Region_name text
)
CREATE TABLE affected_region (
Region_id int,
Storm_ID int,
Number_city_affected real
)
CREATE TABLE storm (
Storm_ID int,
Name text,
Dates_active text,
Max_speed int,
Damage_millions_USD real,
Number_Deaths int
) | SELECT Name, Damage_millions_USD FROM storm ORDER BY Max_speed DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1719,
41,
6163,
834,
23,
26,
16,
17,
6,
6163,
834,
4978,
1499,
6,
6163,
834,
4350,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
4161,
834,
18145,
41,
6163,
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,
5570,
6,
26135,
834,
17030,
7,
834,
23492,
21680,
5536,
4674,
11300,
272,
476,
5370,
834,
9993,
309,
25067,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many political parties had a %2006 rating of 43.5? | CREATE TABLE table_21132404_1 (
political_parties VARCHAR,
_percentage_2006 VARCHAR
) | SELECT COUNT(political_parties) FROM table_21132404_1 WHERE _percentage_2006 = "43.5" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2658,
23757,
25285,
834,
536,
41,
1827,
834,
25516,
7,
584,
4280,
28027,
6,
3,
834,
883,
3728,
545,
834,
21196,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
3003,
17,
1950,
834,
25516,
7,
61,
21680,
953,
834,
2658,
23757,
25285,
834,
536,
549,
17444,
427,
3,
834,
883,
3728,
545,
834,
21196,
3274,
96,
4906,
5,
17395,
1,
-100,
-100,
-100,
-100,
-100,
-10... |
Who were the candidates when Lamar S. Smith was incumbent? | CREATE TABLE table_1341577_44 (
candidates VARCHAR,
incumbent VARCHAR
) | SELECT candidates FROM table_1341577_44 WHERE incumbent = "Lamar S. Smith" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
1808,
4013,
834,
3628,
41,
4341,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
130,
8,
4341,
116,
325,
1635,
180,
5,
3931,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4341,
21680,
953,
834,
23747,
1808,
4013,
834,
3628,
549,
17444,
427,
28406,
3274,
96,
3612,
1635,
180,
5,
3931,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many points were there when the try bonus was 2? | CREATE TABLE table_name_35 (points VARCHAR, try_bonus VARCHAR) | SELECT points FROM table_name_35 WHERE try_bonus = "2" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2469,
41,
2700,
7,
584,
4280,
28027,
6,
653,
834,
5407,
302,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
979,
130,
132,
116,
8,
653,
4023,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
979,
21680,
953,
834,
4350,
834,
2469,
549,
17444,
427,
653,
834,
5407,
302,
3274,
96,
357,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What competition had more than 40 assists? | CREATE TABLE table_name_19 (
competition VARCHAR,
assists INTEGER
) | SELECT competition FROM table_name_19 WHERE assists > 40 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2294,
41,
2259,
584,
4280,
28027,
6,
13041,
3,
21342,
17966,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
2259,
141,
72,
145,
1283,
13041,
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,
2259,
21680,
953,
834,
4350,
834,
2294,
549,
17444,
427,
13041,
2490,
1283,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Name the total number of wd number for lms number being 7638 | CREATE TABLE table_20236726_2 (
wd_no VARCHAR,
lms_no VARCHAR
) | SELECT COUNT(wd_no) FROM table_20236726_2 WHERE lms_no = 7638 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1755,
2773,
3708,
2688,
834,
357,
41,
3,
210,
26,
834,
29,
32,
584,
4280,
28027,
6,
3,
40,
51,
7,
834,
29,
32,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
210,
26,
834,
29,
32,
61,
21680,
953,
834,
1755,
2773,
3708,
2688,
834,
357,
549,
17444,
427,
3,
40,
51,
7,
834,
29,
32,
3274,
3,
3959,
3747,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the surface tye during the match with the opponent of richard fromberg? | CREATE TABLE table_name_3 (surface VARCHAR, opponent VARCHAR) | SELECT surface FROM table_name_3 WHERE opponent = "richard fromberg" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
519,
41,
26899,
584,
4280,
28027,
6,
15264,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
1774,
3,
17,
63,
15,
383,
8,
1588,
28,
8,
15264,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1774,
21680,
953,
834,
4350,
834,
519,
549,
17444,
427,
15264,
3274,
96,
3723,
986,
45,
2235,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What did Steve Elkington par? | CREATE TABLE table_name_47 (to_par VARCHAR, player VARCHAR) | SELECT to_par FROM table_name_47 WHERE player = "steve elkington" | [
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,
363,
410,
5659,
1289,
157,
6029,
260,
58,
1,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
12,
834,
1893,
21680,
953,
834,
4350,
834,
4177,
549,
17444,
427,
1959,
3274,
96,
849,
162,
3,
15,
40,
157,
6029,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Which Position has Throws of r, and a DOB of 12 february 1983? | CREATE TABLE table_name_59 (position VARCHAR, throws VARCHAR, dob VARCHAR) | SELECT position FROM table_name_59 WHERE throws = "r" AND dob = "12 february 1983" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3390,
41,
4718,
584,
4280,
28027,
6,
3793,
7,
584,
4280,
28027,
6,
103,
115,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
14258,
65,
26191,
7,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1102,
21680,
953,
834,
4350,
834,
3390,
549,
17444,
427,
3793,
7,
3274,
96,
52,
121,
3430,
103,
115,
3274,
96,
2122,
29976,
76,
1208,
15041,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What are the names of the students who took classes in 2009 or 2010? | CREATE TABLE prereq (
course_id text,
prereq_id text
)
CREATE TABLE classroom (
building text,
room_number text,
capacity number
)
CREATE TABLE instructor (
id text,
name text,
dept_name text,
salary number
)
CREATE TABLE department (
dept_name text,
building text,
budget number
)
CREATE TABLE time_slot (
time_slot_id text,
day text,
start_hr number,
start_min number,
end_hr number,
end_min number
)
CREATE TABLE teaches (
id text,
course_id text,
sec_id text,
semester text,
year number
)
CREATE TABLE advisor (
s_id text,
i_id text
)
CREATE TABLE section (
course_id text,
sec_id text,
semester text,
year number,
building text,
room_number text,
time_slot_id text
)
CREATE TABLE student (
id text,
name text,
dept_name text,
tot_cred number
)
CREATE TABLE takes (
id text,
course_id text,
sec_id text,
semester text,
year number,
grade text
)
CREATE TABLE course (
course_id text,
title text,
dept_name text,
credits number
) | SELECT DISTINCT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE year = 2009 OR year = 2010 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
554,
60,
1824,
41,
503,
834,
23,
26,
1499,
6,
554,
60,
1824,
834,
23,
26,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
4858,
41,
740,
1499,
6,
562,
834,
5525,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
332,
5411,
4350,
21680,
1236,
6157,
332,
536,
3,
15355,
3162,
1217,
6157,
332,
357,
9191,
332,
5411,
23,
26,
3274,
332,
4416,
23,
26,
549,
17444,
427,
215,
3274,
2464,
4674,
215,
3274,
2735,
1... |
How much total money does player tommy bolt, who has a to par of 9, have? | CREATE TABLE table_name_76 (money___ VARCHAR, to_par VARCHAR, player VARCHAR) | SELECT COUNT(money___) AS $__ FROM table_name_76 WHERE to_par = 9 AND player = "tommy bolt" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3959,
41,
28442,
834,
834,
834,
584,
4280,
28027,
6,
12,
834,
1893,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
231,
792,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2847,
17161,
599,
28442,
834,
834,
834,
61,
6157,
1514,
834,
834,
21680,
953,
834,
4350,
834,
3959,
549,
17444,
427,
12,
834,
1893,
3274,
668,
3430,
1959,
3274,
96,
235,
635,
63,
12862,
121,
1,
-100,
-100,
-100,
-10... |
When was the game at Collingwood? | CREATE TABLE table_11423 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Date" FROM table_11423 WHERE "Away team" = 'collingwood' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
18959,
2773,
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,
308,
342,
121,
21680,
953,
834,
18959,
2773,
549,
17444,
427,
96,
188,
1343,
372,
121,
3274,
3,
31,
3297,
697,
2037,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the smallest number of wins where goals conceded are below 26, draws are 1 and goals scored are below 74? | CREATE TABLE table_name_88 (wins INTEGER, goals_scored VARCHAR, goals_conceded VARCHAR, draws VARCHAR) | SELECT MIN(wins) FROM table_name_88 WHERE goals_conceded < 26 AND draws = 1 AND goals_scored < 74 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4060,
41,
3757,
7,
3,
21342,
17966,
6,
1766,
834,
3523,
1271,
584,
4280,
28027,
6,
1766,
834,
11620,
221,
26,
584,
4280,
28027,
6,
14924,
584,
4280,
28027,
61,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
3757,
7,
61,
21680,
953,
834,
4350,
834,
4060,
549,
17444,
427,
1766,
834,
11620,
221,
26,
3,
2,
2208,
3430,
14924,
3274,
209,
3430,
1766,
834,
3523,
1271,
3,
2,
3,
4581,
1,
-100,
-100,
-100,
-100,
... |
what is the circuit where the fastest lap is sam lowes and the winning rider is luca scassa? | CREATE TABLE table_31296 (
"Round" real,
"Country" text,
"Circuit" text,
"Date" text,
"Pole Position" text,
"Fastest Lap" text,
"Winning Rider" text,
"Winning Team" text,
"Report" text
) | SELECT "Circuit" FROM table_31296 WHERE "Fastest Lap" = 'Sam Lowes' AND "Winning Rider" = 'Luca Scassa' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
519,
2122,
4314,
41,
96,
448,
32,
1106,
121,
490,
6,
96,
10628,
651,
121,
1499,
6,
96,
254,
23,
52,
21560,
121,
1499,
6,
96,
308,
342,
121,
1499,
6,
96,
8931,
15,
14258... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
254,
23,
52,
21560,
121,
21680,
953,
834,
519,
2122,
4314,
549,
17444,
427,
96,
371,
9,
7,
4377,
325,
102,
121,
3274,
3,
31,
134,
265,
5586,
15,
7,
31,
3430,
96,
518,
10503,
25218,
121,
3274,
3,
31,
11748,
... |
Name the production code for 60 number in series | CREATE TABLE table_26702078_1 (production_code VARCHAR, no_in_series VARCHAR) | SELECT production_code FROM table_26702078_1 WHERE no_in_series = 60 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2688,
2518,
1755,
3940,
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,
5570,
8,
999,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
999,
834,
4978,
21680,
953,
834,
2688,
2518,
1755,
3940,
834,
536,
549,
17444,
427,
150,
834,
77,
834,
10833,
7,
3274,
1640,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Which Name (pinyin) is named fu-ching? | CREATE TABLE table_64823 (
"Name (pinyin)" text,
"Name (Wade Giles)" text,
"Characters" text,
"Type" text,
"Construction" text
) | SELECT "Name (pinyin)" FROM table_64823 WHERE "Name (Wade Giles)" = 'fu-ching' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
948,
3707,
2773,
41,
96,
23954,
41,
3180,
63,
77,
61,
121,
1499,
6,
96,
23954,
41,
518,
9,
221,
3156,
965,
61,
121,
1499,
6,
96,
18947,
2708,
277,
121,
1499,
6,
96,
251... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
23954,
41,
3180,
63,
77,
61,
121,
21680,
953,
834,
948,
3707,
2773,
549,
17444,
427,
96,
23954,
41,
518,
9,
221,
3156,
965,
61,
121,
3274,
3,
31,
89,
76,
18,
8509,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is the difference in senate opposed between john quincy adams and james garfield ? | CREATE TABLE table_203_800 (
id number,
"#" number,
"president" text,
"president's party" text,
"senate with" number,
"senate opposed" number,
"house with" number,
"house opposed" number,
"years served" number,
"elections won" number
) | SELECT ABS((SELECT "senate opposed" FROM table_203_800 WHERE "president" = 'john quincy adams') - (SELECT "senate opposed" FROM table_203_800 WHERE "president" = 'james garfield')) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
6192,
41,
3,
23,
26,
381,
6,
96,
4663,
121,
381,
6,
96,
102,
15704,
121,
1499,
6,
96,
102,
15704,
31,
7,
1088,
121,
1499,
6,
96,
7,
35,
342,
28,
121,
381,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
20798,
599,
599,
23143,
14196,
96,
7,
35,
342,
8560,
121,
21680,
953,
834,
23330,
834,
6192,
549,
17444,
427,
96,
102,
15704,
121,
3274,
3,
31,
27341,
285,
11298,
3,
9,
7812,
7,
31,
61,
3,
18,
41,
23143,
14196,
... |
Count the products that have the color description 'white' or have the characteristic name 'hot'. | CREATE TABLE characteristics (
characteristic_id number,
characteristic_type_code text,
characteristic_data_type text,
characteristic_name text,
other_characteristic_details text
)
CREATE TABLE ref_characteristic_types (
characteristic_type_code text,
characteristic_type_description text
)
CREATE TABLE ref_colors (
color_code text,
color_description text
)
CREATE TABLE products (
product_id number,
color_code text,
product_category_code text,
product_name text,
typical_buying_price text,
typical_selling_price text,
product_description text,
other_product_details text
)
CREATE TABLE product_characteristics (
product_id number,
characteristic_id number,
product_characteristic_value text
)
CREATE TABLE ref_product_categories (
product_category_code text,
product_category_description text,
unit_of_measure text
) | SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN characteristics AS t3 ON t2.characteristic_id = t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code = t4.color_code WHERE t4.color_description = "white" OR t3.characteristic_name = "hot" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
6803,
41,
16115,
834,
23,
26,
381,
6,
16115,
834,
6137,
834,
4978,
1499,
6,
16115,
834,
6757,
834,
6137,
1499,
6,
16115,
834,
4350,
1499,
6,
119,
834,
31886,
3040,
834,
221,
5756,
7,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
494,
6157,
3,
17,
536,
3,
15355,
3162,
556,
834,
31886,
3040,
7,
6157,
3,
17,
357,
9191,
3,
17,
5411,
15892,
834,
23,
26,
3274,
3,
17,
4416,
15892,
834,
23,
26,
3,
15355,
3162,... |
Name the recognised seats for pharmacology | CREATE TABLE table_19304764_2 (
recognised_seats VARCHAR,
discipline VARCHAR
) | SELECT recognised_seats FROM table_19304764_2 WHERE discipline = "Pharmacology" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2294,
1458,
4177,
4389,
834,
357,
41,
14869,
834,
7,
1544,
7,
584,
4280,
28027,
6,
7998,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
14869,
6116,
21,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
14869,
834,
7,
1544,
7,
21680,
953,
834,
2294,
1458,
4177,
4389,
834,
357,
549,
17444,
427,
7998,
3274,
96,
345,
3272,
11101,
1863,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Show sum of budget in each year and bin creation time by year in a line chart, and could you rank from low to high by the X? | CREATE TABLE management (
department_ID int,
head_ID int,
temporary_acting text
)
CREATE TABLE head (
head_ID int,
name text,
born_state text,
age real
)
CREATE TABLE department (
Department_ID int,
Name text,
Creation text,
Ranking int,
Budget_in_Billions real,
Num_Employees real
) | SELECT Creation, SUM(Budget_in_Billions) FROM department ORDER BY Creation | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
758,
41,
3066,
834,
4309,
16,
17,
6,
819,
834,
4309,
16,
17,
6,
7234,
834,
2708,
53,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
819,
41,
819,
834,
4309,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
24589,
6,
180,
6122,
599,
279,
13164,
17,
834,
77,
834,
279,
14916,
7,
61,
21680,
3066,
4674,
11300,
272,
476,
24589,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
For each director, return the director's name together with the title of the movie they directed that received the highest rating among all of their movies, and the value of that rating. Ignore movies whose director is NULL. | CREATE TABLE movie (
mid number,
title text,
year number,
director text
)
CREATE TABLE reviewer (
rid number,
name text
)
CREATE TABLE rating (
rid number,
mid number,
stars number,
ratingdate time
) | SELECT T2.title, T1.stars, T2.director, MAX(T1.stars) FROM rating AS T1 JOIN movie AS T2 ON T1.mid = T2.mid WHERE director <> "null" GROUP BY director | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1974,
41,
2076,
381,
6,
2233,
1499,
6,
215,
381,
6,
2090,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
1132,
49,
41,
5413,
381,
6,
564,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
332,
4416,
21869,
6,
332,
5411,
3624,
7,
6,
332,
4416,
25982,
6,
4800,
4,
599,
382,
5411,
3624,
7,
61,
21680,
5773,
6157,
332,
536,
3,
15355,
3162,
1974,
6157,
332,
357,
9191,
332,
5411,
6983,
3274,
332,
4416,
698... |
What is the average january number when the game number was higher than 39 and the opponent was the Vancouver Canucks? | CREATE TABLE table_name_72 (
january INTEGER,
opponent VARCHAR,
game VARCHAR
) | SELECT AVG(january) FROM table_name_72 WHERE opponent = "vancouver canucks" AND game > 39 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5865,
41,
3,
7066,
76,
1208,
3,
21342,
17966,
6,
15264,
584,
4280,
28027,
6,
467,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1348,
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,
71,
17217,
599,
7066,
76,
1208,
61,
21680,
953,
834,
4350,
834,
5865,
549,
17444,
427,
15264,
3274,
96,
2132,
3422,
624,
54,
4636,
7,
121,
3430,
467,
2490,
6352,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the average Wins, when Against is less than 1786, when Losses is less than 4, and when Byes is less than 2? | CREATE TABLE table_62318 (
"Golden Rivers" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
) | SELECT AVG("Wins") FROM table_62318 WHERE "Against" < '1786' AND "Losses" < '4' AND "Byes" < '2' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4056,
519,
2606,
41,
96,
23576,
35,
2473,
7,
121,
1499,
6,
96,
18455,
7,
121,
490,
6,
96,
279,
10070,
121,
490,
6,
96,
434,
13526,
7,
121,
490,
6,
96,
308,
10936,
7,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
121,
18455,
7,
8512,
21680,
953,
834,
4056,
519,
2606,
549,
17444,
427,
96,
20749,
121,
3,
2,
3,
31,
2517,
3840,
31,
3430,
96,
434,
13526,
7,
121,
3,
2,
3,
31,
591,
31,
3430,
96,
279,
10070,
12... |
What is the sum of Against when the drawn is less than 2, the position is more than 8, and the lost is more than 6. | CREATE TABLE table_name_35 (against INTEGER, lost VARCHAR, drawn VARCHAR, position VARCHAR) | SELECT SUM(against) FROM table_name_35 WHERE drawn < 2 AND position > 8 AND lost > 6 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2469,
41,
9,
16720,
7,
17,
3,
21342,
17966,
6,
1513,
584,
4280,
28027,
6,
6796,
584,
4280,
28027,
6,
1102,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
9,
16720,
7,
17,
61,
21680,
953,
834,
4350,
834,
2469,
549,
17444,
427,
6796,
3,
2,
204,
3430,
1102,
2490,
505,
3430,
1513,
2490,
431,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name the saka era for sign of zodiac being pisces | CREATE TABLE table_169955_1 (
saka_era VARCHAR,
sign_of_zodiac VARCHAR
) | SELECT saka_era FROM table_169955_1 WHERE sign_of_zodiac = "Pisces" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2938,
3264,
3769,
834,
536,
41,
3,
7,
5667,
834,
1498,
584,
4280,
28027,
6,
1320,
834,
858,
834,
172,
23193,
75,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
557... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
7,
5667,
834,
1498,
21680,
953,
834,
2938,
3264,
3769,
834,
536,
549,
17444,
427,
1320,
834,
858,
834,
172,
23193,
75,
3274,
96,
345,
159,
2319,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
How many laps did the rider with a grid larger than 14 and a time of +33.150 have? | CREATE TABLE table_43040 (
"Rider" text,
"Bike" text,
"Laps" real,
"Time" text,
"Grid" real
) | SELECT "Laps" FROM table_43040 WHERE "Grid" > '14' AND "Time" = '+33.150' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
25449,
2445,
41,
96,
448,
23,
588,
121,
1499,
6,
96,
279,
5208,
121,
1499,
6,
96,
3612,
102,
7,
121,
490,
6,
96,
13368,
121,
1499,
6,
96,
13313,
26,
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,
3612,
102,
7,
121,
21680,
953,
834,
25449,
2445,
549,
17444,
427,
96,
13313,
26,
121,
2490,
3,
31,
2534,
31,
3430,
96,
13368,
121,
3274,
3,
31,
1220,
4201,
5,
12278,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Find all reviews for businesses rated 2.5 | CREATE TABLE business (
bid int,
business_id varchar,
name varchar,
full_address varchar,
city varchar,
latitude varchar,
longitude varchar,
review_count bigint,
is_open tinyint,
rating float,
state varchar
)
CREATE TABLE checkin (
cid int,
business_id varchar,
count int,
day varchar
)
CREATE TABLE neighborhood (
id int,
business_id varchar,
neighborhood_name varchar
)
CREATE TABLE category (
id int,
business_id varchar,
category_name varchar
)
CREATE TABLE user (
uid int,
user_id varchar,
name varchar
)
CREATE TABLE review (
rid int,
business_id varchar,
user_id varchar,
rating float,
text longtext,
year int,
month varchar
)
CREATE TABLE tip (
tip_id int,
business_id varchar,
text longtext,
user_id varchar,
likes int,
year int,
month varchar
) | SELECT review.text FROM business, review WHERE business.rating = 2.5 AND review.business_id = business.business_id | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
268,
41,
6894,
16,
17,
6,
268,
834,
23,
26,
3,
4331,
4059,
6,
564,
3,
4331,
4059,
6,
423,
834,
9,
26,
12039,
3,
4331,
4059,
6,
690,
3,
4331,
4059,
6,
50,
6592,
3,
4331,
4059,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
1132,
5,
6327,
21680,
268,
6,
1132,
549,
17444,
427,
268,
5,
52,
1014,
3274,
10603,
3430,
1132,
5,
16394,
834,
23,
26,
3274,
268,
5,
16394,
834,
23,
26,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
what is the position when signed is yes, round is less than 24 and name is charlie hough? | CREATE TABLE table_name_96 (
position VARCHAR,
name VARCHAR,
signed VARCHAR,
round VARCHAR
) | SELECT position FROM table_name_96 WHERE signed = "yes" AND round < 24 AND name = "charlie hough" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4314,
41,
1102,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
6,
3814,
584,
4280,
28027,
6,
1751,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
125,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
1102,
21680,
953,
834,
4350,
834,
4314,
549,
17444,
427,
3814,
3274,
96,
10070,
121,
3430,
1751,
3,
2,
997,
3430,
564,
3274,
96,
4059,
1896,
3,
107,
4607,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Name the fastest lap for piquet sports and silverstone | CREATE TABLE table_25322130_3 (fastest_lap VARCHAR, winning_team VARCHAR, circuit VARCHAR) | SELECT fastest_lap FROM table_25322130_3 WHERE winning_team = "Piquet Sports" AND circuit = "Silverstone" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
2668,
2658,
1458,
834,
519,
41,
11584,
222,
834,
8478,
584,
4280,
28027,
6,
3447,
834,
11650,
584,
4280,
28027,
6,
4558,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
10391,
834,
8478,
21680,
953,
834,
1828,
2668,
2658,
1458,
834,
519,
549,
17444,
427,
3447,
834,
11650,
3274,
96,
345,
1495,
17,
5716,
121,
3430,
4558,
3274,
96,
134,
173,
624,
3009,
121,
1,
-100,
-100,
-100,
-100,
... |
count the number of patients whose primary disease is morbid obesity/sda and drug name is soln.? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.diagnosis = "MORBID OBESITY/SDA" AND prescriptions.drug = "Soln." | [
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 was the leader in Steals when Travis Watson (9) was the leader in Rebounds? | CREATE TABLE table_70771 (
"Year" real,
"Points" text,
"Rebounds" text,
"Assists" text,
"Steals" text,
"Blocks" text
) | SELECT "Steals" FROM table_70771 WHERE "Rebounds" = 'travis watson (9)' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2518,
4013,
536,
41,
96,
476,
2741,
121,
490,
6,
96,
22512,
7,
121,
1499,
6,
96,
1649,
6115,
7,
121,
1499,
6,
96,
188,
7,
7,
343,
7,
121,
1499,
6,
96,
14337,
5405,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
14337,
5405,
121,
21680,
953,
834,
2518,
4013,
536,
549,
17444,
427,
96,
1649,
6115,
7,
121,
3274,
3,
31,
1313,
3466,
8036,
17,
739,
41,
11728,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
which country has their total gdp as 9.5 billion and their gdp per capita as 1,531 ? | CREATE TABLE table_203_296 (
id number,
"country" text,
"total gdp (nominal)\n(billion us$)" text,
"gdp per capita\n(us$, ppp)" text,
"gdp growth,\n2007-2011\n(in %)" number,
"hdi" text
) | SELECT "country" FROM table_203_296 WHERE "total gdp (nominal)\n(billion us$)" = 9.5 AND "gdp per capita\n(us$, ppp)" = 1531 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
357,
4314,
41,
3,
23,
26,
381,
6,
96,
17529,
121,
1499,
6,
96,
235,
1947,
3,
122,
26,
102,
41,
3114,
10270,
61,
2,
29,
599,
115,
14916,
178,
3229,
61,
121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
17529,
121,
21680,
953,
834,
23330,
834,
357,
4314,
549,
17444,
427,
96,
235,
1947,
3,
122,
26,
102,
41,
3114,
10270,
61,
2,
29,
599,
115,
14916,
178,
3229,
61,
121,
3274,
3,
22321,
3430,
96,
122,
26,
102,
3... |
What was the airdate of the episode of production code 214? | CREATE TABLE table_28787871_3 (original_air_date VARCHAR, production_code VARCHAR) | SELECT original_air_date FROM table_28787871_3 WHERE production_code = 214 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2577,
3940,
3940,
4450,
834,
519,
41,
21878,
834,
2256,
834,
5522,
584,
4280,
28027,
6,
999,
834,
4978,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
799,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
926,
834,
2256,
834,
5522,
21680,
953,
834,
2577,
3940,
3940,
4450,
834,
519,
549,
17444,
427,
999,
834,
4978,
3274,
3,
27357,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What was the score when the location attendance was Air Canada Centre 18,067? | CREATE TABLE table_17296 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT "Score" FROM table_17296 WHERE "Location Attendance" = 'Air Canada Centre 18,067' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
27156,
4314,
41,
96,
23055,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
18699,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
21417,
979,
121,
1499,
6,
96,
21417,
3,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
134,
9022,
121,
21680,
953,
834,
27156,
4314,
549,
17444,
427,
96,
434,
32,
75,
257,
22497,
663,
121,
3274,
3,
31,
20162,
1894,
2969,
14985,
632,
3708,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What company constrcuted the vehicle with a circuit of oulton park on 15 april? | CREATE TABLE table_name_17 (
constructor VARCHAR,
circuit VARCHAR,
date VARCHAR
) | SELECT constructor FROM table_name_17 WHERE circuit = "oulton park" AND date = "15 april" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2517,
41,
6774,
127,
584,
4280,
28027,
6,
4558,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
349,
6900,
17,
52,
15835,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6774,
127,
21680,
953,
834,
4350,
834,
2517,
549,
17444,
427,
4558,
3274,
96,
1063,
7377,
2447,
121,
3430,
833,
3274,
96,
1808,
3,
9,
2246,
40,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What's the Elevator that has Elevated: 1378, September 18, an Order of Cardinal-Priest, and an Elector of Poncello Orsini? | CREATE TABLE table_name_25 (elevator VARCHAR, elector VARCHAR, elevated VARCHAR, order VARCHAR) | SELECT elevator FROM table_name_25 WHERE elevated = "1378, september 18" AND order = "cardinal-priest" AND elector = "poncello orsini" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1828,
41,
15,
10912,
1016,
584,
4280,
28027,
6,
11924,
127,
584,
4280,
28027,
6,
15712,
584,
4280,
28027,
6,
455,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
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,
19967,
21680,
953,
834,
4350,
834,
1828,
549,
17444,
427,
15712,
3274,
96,
2368,
3940,
6,
16022,
18247,
507,
121,
3430,
455,
3274,
96,
6043,
10270,
18,
2246,
222,
121,
3430,
11924,
127,
3274,
96,
5041,
8725,
32,
42,
... |
What is the name of the Loser when the winner was new england patriots, and a Location of giants stadium, and a Result of 30–28? | CREATE TABLE table_name_46 (loser VARCHAR, result VARCHAR, winner VARCHAR, location VARCHAR) | SELECT loser FROM table_name_46 WHERE winner = "new england patriots" AND location = "giants stadium" AND result = "30–28" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4448,
41,
2298,
49,
584,
4280,
28027,
6,
741,
584,
4280,
28027,
6,
4668,
584,
4280,
28027,
6,
1128,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2615,
52,
21680,
953,
834,
4350,
834,
4448,
549,
17444,
427,
4668,
3274,
96,
5534,
3,
4606,
40,
232,
6234,
12884,
7,
121,
3430,
1128,
3274,
96,
22898,
17,
7,
14939,
121,
3430,
741,
3274,
96,
1458,
104,
2577,
121,
... |
Who wrote season 23? | CREATE TABLE table_26543 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real
) | SELECT "Written by" FROM table_26543 WHERE "No. in season" = '23' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
4122,
4906,
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,
96,
24965,
324,
57,
121,
21680,
953,
834,
357,
4122,
4906,
549,
17444,
427,
96,
4168,
5,
16,
774,
121,
3274,
3,
31,
2773,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What Actor/Actress a Tenure of 2008 2011 played Stella Dagostino? | CREATE TABLE table_name_88 (
actor_actress VARCHAR,
tenure VARCHAR,
character VARCHAR
) | SELECT actor_actress FROM table_name_88 WHERE tenure = "2008–2011" AND character = "stella dagostino" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4060,
41,
7556,
834,
2708,
9377,
584,
4280,
28027,
6,
20752,
584,
4280,
28027,
6,
1848,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
1983,
127,
87,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
3,
23143,
14196,
7556,
834,
2708,
9377,
21680,
953,
834,
4350,
834,
4060,
549,
17444,
427,
20752,
3274,
96,
16128,
104,
13907,
121,
3430,
1848,
3274,
96,
7,
6714,
9,
836,
122,
3481,
77,
32,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100... |
What is Ben Hogan's Place? | CREATE TABLE table_name_25 (place VARCHAR, player VARCHAR) | SELECT place FROM table_name_25 WHERE player = "ben hogan" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1828,
41,
4687,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
2798,
1546,
2565,
31,
7,
3399,
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,
286,
21680,
953,
834,
4350,
834,
1828,
549,
17444,
427,
1959,
3274,
96,
115,
35,
3534,
2565,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
All high points are team new york. | CREATE TABLE table_17080868_8 (
high_points VARCHAR,
team VARCHAR
) | SELECT high_points FROM table_17080868_8 WHERE team = "New York" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2517,
4018,
4018,
3651,
834,
927,
41,
306,
834,
2700,
7,
584,
4280,
28027,
6,
372,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
432,
306,
979,
33,
372,
126,
2545... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
306,
834,
2700,
7,
21680,
953,
834,
2517,
4018,
4018,
3651,
834,
927,
549,
17444,
427,
372,
3274,
96,
6861,
1060,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
count the number of patients whose language is engl? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.language = "ENGL" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7690,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
2118,
23,
26,
1499,
6,
5059,
715,
1499,
6,
5692,
1499,
6,
701,
834,
15129,
1499,
6,
3783,
1499,
6,
5798,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
24925,
3274,
96,
23182,
434,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
what is age and days of hospital stay of subject name michelle medina? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT demographic.age, demographic.days_stay FROM demographic WHERE demographic.name = "Michelle Medina" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
14798,
5,
545,
6,
14798,
5,
1135,
7,
834,
21545,
21680,
14798,
549,
17444,
427,
14798,
5,
4350,
3274,
96,
30123,
109,
11816,
29,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the to par that has england as the country, with 66 as a score? | CREATE TABLE table_name_95 (
to_par VARCHAR,
country VARCHAR,
score VARCHAR
) | SELECT to_par FROM table_name_95 WHERE country = "england" AND score = 66 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3301,
41,
12,
834,
1893,
584,
4280,
28027,
6,
684,
584,
4280,
28027,
6,
2604,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
12,
260,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
3,
23143,
14196,
12,
834,
1893,
21680,
953,
834,
4350,
834,
3301,
549,
17444,
427,
684,
3274,
96,
4606,
40,
232,
121,
3430,
2604,
3274,
3,
3539,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the average number of losses for teams with under 16 points and under 3 draws? | CREATE TABLE table_name_8 (losses INTEGER, points VARCHAR, draws VARCHAR) | SELECT AVG(losses) FROM table_name_8 WHERE points < 16 AND draws < 3 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
927,
41,
2298,
2260,
3,
21342,
17966,
6,
979,
584,
4280,
28027,
6,
14924,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1348,
381,
13,
8467,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
71,
17217,
599,
2298,
2260,
61,
21680,
953,
834,
4350,
834,
927,
549,
17444,
427,
979,
3,
2,
898,
3430,
14924,
3,
2,
220,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.