NATURAL_LANG stringlengths 0 446 | SCHEMA stringlengths 27 2.21k | SQL stringlengths 18 453 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|
What is the venue where the melbourne tigers play their home games? | CREATE TABLE table_name_26 (
venue VARCHAR,
home_team VARCHAR
) | SELECT venue FROM table_name_26 WHERE home_team = "melbourne tigers" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2688,
41,
5669,
584,
4280,
28027,
6,
234,
834,
11650,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
5669,
213,
8,
3,
2341,
26255,
3,
2880,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
5669,
21680,
953,
834,
4350,
834,
2688,
549,
17444,
427,
234,
834,
11650,
3274,
96,
2341,
26255,
3,
2880,
277,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Which Top 10 is the lowest one that has Winnings of $405,300, and an Avg Start smaller than 30? | CREATE TABLE table_name_86 (top_10 INTEGER, winnings VARCHAR, avg_start VARCHAR) | SELECT MIN(top_10) FROM table_name_86 WHERE winnings = "$405,300" AND avg_start < 30 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3840,
41,
2916,
834,
1714,
3,
21342,
17966,
6,
3447,
7,
584,
4280,
28027,
6,
3,
9,
208,
122,
834,
10208,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
407... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2916,
834,
16968,
21680,
953,
834,
4350,
834,
3840,
549,
17444,
427,
3447,
7,
3274,
96,
3229,
2445,
11116,
5426,
121,
3430,
3,
9,
208,
122,
834,
10208,
3,
2,
604,
1,
-100,
-100,
-100,
-100,
-100,
-1... |
HOW MANY ROUNDS HAD A PICK OF 7? | CREATE TABLE table_name_11 (round VARCHAR, pick VARCHAR) | SELECT COUNT(round) FROM table_name_11 WHERE pick = "7" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2596,
41,
7775,
584,
4280,
28027,
6,
1432,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
25144,
3,
9312,
476,
10264,
13110,
134,
454,
6762,
71,
276,
25286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2847,
17161,
599,
7775,
61,
21680,
953,
834,
4350,
834,
2596,
549,
17444,
427,
1432,
3274,
96,
940,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
For those employees who do not work in departments with managers that have ids between 100 and 200, find last_name and commission_pct , and visualize them by a bar chart, rank by the X in asc. | CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,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 regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
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)
) | SELECT LAST_NAME, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY LAST_NAME | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1440,
41,
2847,
17161,
11824,
834,
4309,
3,
4331,
4059,
16426,
6,
2847,
17161,
11824,
834,
567,
17683,
3,
4331,
4059,
599,
2445,
201,
4083,
517,
9215,
834,
4309,
7908,
1982,
599,
1714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
301,
12510,
834,
567,
17683,
6,
3,
6657,
329,
16994,
9215,
834,
4051,
382,
21680,
1652,
549,
17444,
427,
4486,
3396,
19846,
11810,
834,
4309,
3388,
41,
23143,
14196,
3396,
19846,
11810,
834,
4309,
21680,
10521,
549,
174... |
What is the Adapted by when there is a yes for exists is yes, for episode 101? | CREATE TABLE table_7090 (
"Episode" real,
"Title" text,
"Story" text,
"Adapted by" text,
"Director" text,
"Airdate" text,
"Exists?" text
) | SELECT "Adapted by" FROM table_7090 WHERE "Exists?" = 'yes' AND "Episode" = '101' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2518,
2394,
41,
96,
427,
102,
159,
32,
221,
121,
490,
6,
96,
382,
155,
109,
121,
1499,
6,
96,
134,
10972,
121,
1499,
6,
96,
14808,
15,
26,
57,
121,
1499,
6,
96,
23620,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14808,
15,
26,
57,
121,
21680,
953,
834,
2518,
2394,
549,
17444,
427,
96,
5420,
343,
7,
4609,
3274,
3,
31,
10070,
31,
3430,
96,
427,
102,
159,
32,
221,
121,
3274,
3,
31,
19621,
31,
1,
-100,
-100,
-100,
-100,... |
tell me the number of laps completed by jj lehto . | CREATE TABLE table_204_477 (
id number,
"pos" number,
"no" number,
"driver" text,
"team" text,
"laps" number,
"time/retired" text,
"grid" number,
"points" number
) | SELECT "laps" FROM table_204_477 WHERE "driver" = 'jj lehto' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
591,
4013,
41,
3,
23,
26,
381,
6,
96,
2748,
121,
381,
6,
96,
29,
32,
121,
381,
6,
96,
13739,
52,
121,
1499,
6,
96,
11650,
121,
1499,
6,
96,
8478,
7,
121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
8478,
7,
121,
21680,
953,
834,
26363,
834,
591,
4013,
549,
17444,
427,
96,
13739,
52,
121,
3274,
3,
31,
354,
354,
90,
107,
235,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
On which date did they play Leicester City in Venue A? | CREATE TABLE table_45919 (
"Date" text,
"Opponents" text,
"Venue" text,
"Result" text,
"Score F\u2013A" text
) | SELECT "Date" FROM table_45919 WHERE "Venue" = 'a' AND "Opponents" = 'leicester city' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
3390,
2294,
41,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
7,
121,
1499,
6,
96,
553,
35,
76,
15,
121,
1499,
6,
96,
20119,
121,
1499,
6,
96,
134,
9022,
377,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
591,
3390,
2294,
549,
17444,
427,
96,
553,
35,
76,
15,
121,
3274,
3,
31,
9,
31,
3430,
96,
667,
102,
9977,
7,
121,
3274,
3,
31,
109,
867,
1370,
690,
31,
1,
-100,
-100,
-100,
... |
For those employees who do not work in departments with managers that have ids between 100 and 200, visualize a bar chart about the distribution of last_name and manager_id . | 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 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 departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
) | SELECT LAST_NAME, MANAGER_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) | [
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,
301,
12510,
834,
567,
17683,
6,
283,
15610,
17966,
834,
4309,
21680,
1652,
549,
17444,
427,
4486,
3396,
19846,
11810,
834,
4309,
3388,
41,
23143,
14196,
3396,
19846,
11810,
834,
4309,
21680,
10521,
549,
17444,
427,
283,
... |
Tell me the total number of Grid for Time/Retired of +2 Laps and Laps less than 70 | CREATE TABLE table_name_66 (grid VARCHAR, time_retired VARCHAR, laps VARCHAR) | SELECT COUNT(grid) FROM table_name_66 WHERE time_retired = "+2 laps" AND laps < 70 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3539,
41,
3496,
26,
584,
4280,
28027,
6,
97,
834,
10682,
1271,
584,
4280,
28027,
6,
14941,
7,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
8779,
140,
8,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
3496,
26,
61,
21680,
953,
834,
4350,
834,
3539,
549,
17444,
427,
97,
834,
10682,
1271,
3274,
96,
1220,
357,
14941,
7,
121,
3430,
14941,
7,
3,
2,
2861,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is the number of patients whose marital status is married and lab test name is calculated tbg? | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "MARRIED" AND lab.label = "Calculated TBG" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7690,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
2118,
23,
26,
1499,
6,
5059,
715,
1499,
6,
5692,
1499,
6,
701,
834,
15129,
1499,
6,
3783,
1499,
6,
5798,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7690,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7690,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
How many stations are transmitted on frequency 7 uhf? | CREATE TABLE table_1395 (
"Television Station" text,
"Frequency" text,
"Site" text,
"Transmitted" text,
"Network" text,
"Status" text,
"Country of Region" text
) | SELECT COUNT("Transmitted") FROM table_1395 WHERE "Frequency" = '7 UHF' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
3301,
41,
96,
382,
400,
6610,
5939,
121,
1499,
6,
96,
371,
60,
835,
11298,
121,
1499,
6,
96,
26030,
121,
1499,
6,
96,
18474,
16030,
121,
1499,
6,
96,
9688,
1981,
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,
2847,
17161,
599,
121,
18474,
16030,
8512,
21680,
953,
834,
2368,
3301,
549,
17444,
427,
96,
371,
60,
835,
11298,
121,
3274,
3,
31,
940,
412,
17097,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
give me the number of patients whose admission type is emergency and days of hospital stay is greater than 16? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.days_stay > "16" | [
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,
9,
26,
5451,
834,
6137,
3274,
96,
427,
13098,
18464,
17063,
121,
3430,
14798,
5,
1135,
7,
834,
2... |
pre existing chronic renal insufficiency and need of hemodialysis or peritoneal dialysis | CREATE TABLE table_train_63 (
"id" int,
"immune_suppression" bool,
"leukocyte_count" int,
"need_hemodialysis" bool,
"head_injury" bool,
"periodic_paralysis" bool,
"renal_disease" bool,
"glasgow_come_score_gcs" int,
"sepsis" bool,
"pancreatitis" bool,
"enteral_feeding" bool,
"age" float,
"NOUSE" float
) | SELECT * FROM table_train_63 WHERE renal_disease = 1 AND (need_hemodialysis = 1 OR periodic_paralysis = 1) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
9719,
834,
3891,
41,
96,
23,
26,
121,
16,
17,
6,
96,
23,
635,
444,
834,
7,
413,
8243,
121,
3,
12840,
40,
6,
96,
109,
1598,
24339,
834,
13362,
121,
16,
17,
6,
96,
29,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
1429,
21680,
953,
834,
9719,
834,
3891,
549,
17444,
427,
23328,
834,
26,
159,
14608,
3274,
209,
3430,
41,
29,
6958,
834,
6015,
23193,
21091,
3274,
209,
4674,
16855,
834,
6583,
21091,
3274,
8925,
1,
-100,
-100,
-100,
-... |
What nation has a bronze of 2 with a total less than 5 and rank of 6? | CREATE TABLE table_name_84 (nation VARCHAR, rank VARCHAR, bronze VARCHAR, total VARCHAR) | SELECT nation FROM table_name_84 WHERE bronze = 2 AND total < 5 AND rank = "6" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4608,
41,
29,
257,
584,
4280,
28027,
6,
11003,
584,
4280,
28027,
6,
13467,
584,
4280,
28027,
6,
792,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
2982... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2982,
21680,
953,
834,
4350,
834,
4608,
549,
17444,
427,
13467,
3274,
204,
3430,
792,
3,
2,
305,
3430,
11003,
3274,
96,
948,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How long was Volume:Issue 12:4-6 at the top? | CREATE TABLE table_51023 (
"Volume:Issue" text,
"Issue Date(s)" text,
"Weeks on Top" real,
"Song" text,
"Artist" text
) | SELECT COUNT("Weeks on Top") FROM table_51023 WHERE "Volume:Issue" = '12:4-6' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
25926,
2773,
41,
96,
22803,
440,
15,
10,
196,
7,
7,
76,
15,
121,
1499,
6,
96,
196,
7,
7,
76,
15,
7678,
599,
7,
61,
121,
1499,
6,
96,
1326,
16789,
30,
2224,
121,
490,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
1326,
16789,
30,
2224,
8512,
21680,
953,
834,
25926,
2773,
549,
17444,
427,
96,
22803,
440,
15,
10,
196,
7,
7,
76,
15,
121,
3274,
3,
31,
2122,
10,
20445,
31,
1,
-100,
-100,
-100,
-100,
-100,... |
What are all the results where Robert Bauman is the incumbent politician? | CREATE TABLE table_1341690_20 (
result VARCHAR,
incumbent VARCHAR
) | SELECT result FROM table_1341690_20 WHERE incumbent = "Robert Bauman" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2938,
2394,
834,
1755,
41,
741,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
33,
66,
8,
772,
213,
2715,
3528,
348,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
741,
21680,
953,
834,
23747,
2938,
2394,
834,
1755,
549,
17444,
427,
28406,
3274,
96,
24372,
49,
17,
3528,
348,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the Status with an Author that is colbert? | CREATE TABLE table_name_25 (
status VARCHAR,
authors VARCHAR
) | SELECT status FROM table_name_25 WHERE authors = "colbert" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1828,
41,
2637,
584,
4280,
28027,
6,
5921,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
19318,
28,
46,
10236,
24,
19,
7632,
7041,
58,
1,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2637,
21680,
953,
834,
4350,
834,
1828,
549,
17444,
427,
5921,
3274,
96,
3297,
7041,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the lowest lane with Lorenzo Vismara and a time higher than 49.67? | CREATE TABLE table_name_69 (lane INTEGER, name VARCHAR, time VARCHAR) | SELECT MIN(lane) FROM table_name_69 WHERE name = "lorenzo vismara" AND time > 49.67 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3951,
41,
8102,
3,
21342,
17966,
6,
564,
584,
4280,
28027,
6,
97,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
7402,
3,
8102,
28,
1815,
20276... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3,
17684,
599,
8102,
61,
21680,
953,
834,
4350,
834,
3951,
549,
17444,
427,
564,
3274,
96,
322,
15,
20547,
4642,
1635,
9,
121,
3430,
97,
2490,
9526,
5,
3708,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who was the Actor in the New York production in 2006 for the row with Ramilya Iskander performing in Moscow in 2007? | CREATE TABLE table_77484 (
"Actor in London, 2002" text,
"Actor in New York, 2006" text,
"Actor in Moscow, 2007" text,
"Voyage" text,
"Shipwreck" text
) | SELECT "Actor in New York, 2006" FROM table_77484 WHERE "Actor in Moscow, 2007" = 'ramilya iskander' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4013,
3707,
591,
41,
96,
188,
5317,
16,
1524,
6,
4407,
121,
1499,
6,
96,
188,
5317,
16,
368,
1060,
6,
3581,
121,
1499,
6,
96,
188,
5317,
16,
15363,
6,
4101,
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,
188,
5317,
16,
368,
1060,
6,
3581,
121,
21680,
953,
834,
4013,
3707,
591,
549,
17444,
427,
96,
188,
5317,
16,
15363,
6,
4101,
121,
3274,
3,
31,
2375,
9203,
9,
19,
157,
11849,
31,
1,
-100,
-100,
-100,
-100,
-... |
What is the Date of Catalog 573 194-2? | CREATE TABLE table_name_76 (date VARCHAR, catalog VARCHAR) | SELECT date FROM table_name_76 WHERE catalog = "573 194-2" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3959,
41,
5522,
584,
4280,
28027,
6,
10173,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
7678,
13,
22424,
305,
4552,
957,
591,
4949,
58,
1,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
833,
21680,
953,
834,
4350,
834,
3959,
549,
17444,
427,
10173,
3274,
96,
3436,
519,
957,
591,
4949,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
How many weeks did a game happen on September 17, 2000? | CREATE TABLE table_43478 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Game Site" text,
"Record" text,
"Attendance" text
) | SELECT COUNT("Week") FROM table_43478 WHERE "Date" = 'september 17, 2000' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
3710,
3940,
41,
96,
518,
10266,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
20119,
121,
1499,
6,
96,
23055,
3238,
121,
1499,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
518,
10266,
8512,
21680,
953,
834,
591,
3710,
3940,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
7,
6707,
18247,
12864,
2766,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Name the least tomina for el villar being 4 | CREATE TABLE table_2509350_3 (
tomina_municipality INTEGER,
el_villar_municipality VARCHAR
) | SELECT MIN(tomina_municipality) FROM table_2509350_3 WHERE el_villar_municipality = 4 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
11434,
4271,
1752,
834,
519,
41,
12,
1109,
9,
834,
11760,
3389,
10355,
3,
21342,
17966,
6,
3,
15,
40,
834,
24887,
52,
834,
11760,
3389,
10355,
584,
4280,
28027,
3,
61,
3,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
235,
1109,
9,
834,
11760,
3389,
10355,
61,
21680,
953,
834,
11434,
4271,
1752,
834,
519,
549,
17444,
427,
3,
15,
40,
834,
24887,
52,
834,
11760,
3389,
10355,
3274,
314,
1,
-100,
-100,
-100,
-100,
-100... |
What nationality is the la salle team? | CREATE TABLE table_name_28 (nationality VARCHAR, school_club_team VARCHAR) | SELECT nationality FROM table_name_28 WHERE school_club_team = "la salle" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2577,
41,
16557,
485,
584,
4280,
28027,
6,
496,
834,
13442,
834,
11650,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
1157,
485,
19,
8,
50,
4762,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1157,
485,
21680,
953,
834,
4350,
834,
2577,
549,
17444,
427,
496,
834,
13442,
834,
11650,
3274,
96,
521,
4762,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
When collingwood played as the away team what did they score? | CREATE TABLE table_name_3 (away_team VARCHAR) | SELECT away_team AS score FROM table_name_3 WHERE away_team = "collingwood" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
519,
41,
8006,
834,
11650,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
366,
8029,
53,
2037,
1944,
38,
8,
550,
372,
125,
410,
79,
2604,
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,
550,
834,
11650,
6157,
2604,
21680,
953,
834,
4350,
834,
519,
549,
17444,
427,
550,
834,
11650,
3274,
96,
3297,
697,
2037,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
How many foundeds have sousse as the city, with a capacity greater than 25,000? | CREATE TABLE table_name_25 (
founded VARCHAR,
city VARCHAR,
capacity VARCHAR
) | SELECT COUNT(founded) FROM table_name_25 WHERE city = "sousse" AND capacity > 25 OFFSET 000 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1828,
41,
5710,
584,
4280,
28027,
6,
690,
584,
4280,
28027,
6,
2614,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
5710,
7,
43,
3,
7,
17486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
23329,
61,
21680,
953,
834,
4350,
834,
1828,
549,
17444,
427,
690,
3274,
96,
7,
17486,
121,
3430,
2614,
2490,
944,
3,
15316,
20788,
6078,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Who is the constructor for driver Niki Lauda and a chassis of mp4/1c? | CREATE TABLE table_name_91 (
constructor VARCHAR,
chassis VARCHAR,
driver VARCHAR
) | SELECT constructor FROM table_name_91 WHERE chassis = "mp4/1c" AND driver = "niki lauda" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4729,
41,
6774,
127,
584,
4280,
28027,
6,
22836,
584,
4280,
28027,
6,
2535,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
19,
8,
6774,
127,
21,
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,
0,
0,
0,
0... | [
3,
23143,
14196,
6774,
127,
21680,
953,
834,
4350,
834,
4729,
549,
17444,
427,
22836,
3274,
96,
1167,
591,
14785,
75,
121,
3430,
2535,
3274,
96,
4953,
23,
3,
12513,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
The Position of Centre is what Player? | CREATE TABLE table_name_4 (
player VARCHAR,
position VARCHAR
) | SELECT player FROM table_name_4 WHERE position = "centre" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
591,
41,
1959,
584,
4280,
28027,
6,
1102,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
37,
14258,
13,
2969,
19,
125,
12387,
58,
1,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1959,
21680,
953,
834,
4350,
834,
591,
549,
17444,
427,
1102,
3274,
96,
3728,
60,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
If the Away team scored 18.8 (116), what was the Home team's score? | CREATE TABLE table_54405 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Home team score" FROM table_54405 WHERE "Away team score" = '18.8 (116)' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
755,
3628,
3076,
41,
96,
19040,
372,
121,
1499,
6,
96,
19040,
372,
2604,
121,
1499,
6,
96,
188,
1343,
372,
121,
1499,
6,
96,
188,
1343,
372,
2604,
121,
1499,
6,
96,
553,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
19040,
372,
2604,
121,
21680,
953,
834,
755,
3628,
3076,
549,
17444,
427,
96,
188,
1343,
372,
2604,
121,
3274,
3,
31,
2606,
5,
927,
41,
20159,
61,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What was the record on October 17? | CREATE TABLE table_25947 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Location" text,
"Attendance" real,
"Record" text,
"Points" real
) | SELECT "Record" FROM table_25947 WHERE "Date" = 'October 17' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
3390,
4177,
41,
96,
23055,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
434,
32,
75,
257,
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,
1649,
7621,
121,
21680,
953,
834,
357,
3390,
4177,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
28680,
1003,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the lowest effic with a 58.9 avg/g? | CREATE TABLE table_name_58 (
effic INTEGER,
avg_g VARCHAR
) | SELECT MIN(effic) FROM table_name_58 WHERE avg_g = 58.9 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3449,
41,
13577,
447,
3,
21342,
17966,
6,
3,
9,
208,
122,
834,
122,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
7402,
13577,
447,
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,
3,
17684,
599,
23473,
75,
61,
21680,
953,
834,
4350,
834,
3449,
549,
17444,
427,
3,
9,
208,
122,
834,
122,
3274,
3,
3449,
5,
1298,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What was the result of the game with a record of 2–3–2 before week 8? | CREATE TABLE table_name_38 (result VARCHAR, week VARCHAR, record VARCHAR) | SELECT result FROM table_name_38 WHERE week < 8 AND record = "2–3–2" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3747,
41,
60,
7,
83,
17,
584,
4280,
28027,
6,
471,
584,
4280,
28027,
6,
1368,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
741,
13,
8,
467,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
741,
21680,
953,
834,
4350,
834,
3747,
549,
17444,
427,
471,
3,
2,
505,
3430,
1368,
3274,
96,
357,
104,
519,
104,
357,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Who is the writer of the episode called 'Ambush' (part 1)? | CREATE TABLE table_653 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"U.S. viewers (millions)" text
) | SELECT "Written by" FROM table_653 WHERE "Title" = 'Ambush" (Part 1)' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4122,
519,
41,
96,
4168,
5,
16,
939,
121,
490,
6,
96,
4168,
5,
16,
774,
121,
490,
6,
96,
382,
155,
109,
121,
1499,
6,
96,
23620,
15,
26,
57,
121,
1499,
6,
96,
24965,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
24965,
324,
57,
121,
21680,
953,
834,
4122,
519,
549,
17444,
427,
96,
382,
155,
109,
121,
3274,
3,
31,
8123,
3465,
107,
121,
41,
13725,
8925,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which Barangay has an exit of Sisiman toll barrier? | CREATE TABLE table_51391 (
"Kilometer No. (Rizal Park-basis)" text,
"Kilometer No. (Layac-basis)" text,
"Exit" text,
"Barangay" text,
"Municipality" text
) | SELECT "Barangay" FROM table_51391 WHERE "Exit" = 'sisiman toll barrier' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
755,
2368,
4729,
41,
96,
439,
173,
14148,
465,
5,
41,
448,
5584,
40,
1061,
18,
4883,
159,
61,
121,
1499,
6,
96,
439,
173,
14148,
465,
5,
41,
3612,
63,
9,
75,
18,
4883,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14851,
1468,
9,
63,
121,
21680,
953,
834,
755,
2368,
4729,
549,
17444,
427,
96,
5420,
155,
121,
3274,
3,
31,
7,
159,
23,
348,
12,
195,
12515,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many remaining places in finals when 1 team can still qualify and 0 teams have secured qualification? | CREATE TABLE table_26469 (
"Confederation" text,
"Teams started" text,
"Teams that have secured qualification" text,
"Teams that can still qualify" text,
"Teams that have been eliminated" text,
"Remaining places in finals" text,
"Total places in finals" text,
"Qualifying start date" text,
"Qualifying end date" text
) | SELECT "Remaining places in finals" FROM table_26469 WHERE "Teams that can still qualify" = '1' AND "Teams that have secured qualification" = '0' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26755,
3951,
41,
96,
4302,
16812,
257,
121,
1499,
6,
96,
18699,
7,
708,
121,
1499,
6,
96,
18699,
7,
24,
43,
10774,
15513,
121,
1499,
6,
96,
18699,
7,
24,
54,
341,
9448,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
1649,
7484,
53,
1747,
16,
804,
7,
121,
21680,
953,
834,
26755,
3951,
549,
17444,
427,
96,
18699,
7,
24,
54,
341,
9448,
121,
3274,
3,
31,
536,
31,
3430,
96,
18699,
7,
24,
43,
10774,
15513,
121,
3274,
3,
31,
... |
Name the original title directed by luis bu uel | CREATE TABLE table_name_85 (
original_title VARCHAR,
director VARCHAR
) | SELECT original_title FROM table_name_85 WHERE director = "luis buñuel" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4433,
41,
926,
834,
21869,
584,
4280,
28027,
6,
2090,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
926,
2233,
6640,
57,
759,
7,
8524,
3,
76,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
926,
834,
21869,
21680,
953,
834,
4350,
834,
4433,
549,
17444,
427,
2090,
3274,
96,
2878,
7,
8524,
2,
76,
15,
40,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the Attendance of New Zealand Scores in bold? | CREATE TABLE table_name_6 (
attendance VARCHAR,
date VARCHAR
) | SELECT attendance FROM table_name_6 WHERE date = "new zealand scores in bold" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
948,
41,
11364,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
22497,
663,
13,
368,
5725,
17763,
7,
16,
8197,
58,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
11364,
21680,
953,
834,
4350,
834,
948,
549,
17444,
427,
833,
3274,
96,
5534,
3,
776,
138,
232,
7586,
16,
8197,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which home team played in the matchup with an away team of Liverpool? | CREATE TABLE table_name_27 (
home_team VARCHAR,
away_team VARCHAR
) | SELECT home_team FROM table_name_27 WHERE away_team = "liverpool" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2555,
41,
234,
834,
11650,
584,
4280,
28027,
6,
550,
834,
11650,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
234,
372,
1944,
16,
8,
1588,
413,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
234,
834,
11650,
21680,
953,
834,
4350,
834,
2555,
549,
17444,
427,
550,
834,
11650,
3274,
96,
7591,
52,
13194,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Which exaltation has a detriment of Saturn and Cancer as a sign? | CREATE TABLE table_61792 (
"Sign" text,
"Domicile" text,
"Detriment" text,
"Exaltation" text,
"Fall" text
) | SELECT "Exaltation" FROM table_61792 WHERE "Detriment" = 'saturn' AND "Sign" = 'cancer' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4241,
4440,
357,
41,
96,
134,
3191,
121,
1499,
6,
96,
4135,
3113,
699,
121,
1499,
6,
96,
2962,
1788,
297,
121,
1499,
6,
96,
5420,
2920,
257,
121,
1499,
6,
96,
371,
1748,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5420,
2920,
257,
121,
21680,
953,
834,
4241,
4440,
357,
549,
17444,
427,
96,
2962,
1788,
297,
121,
3274,
3,
31,
7,
9,
7535,
31,
3430,
96,
134,
3191,
121,
3274,
3,
31,
1608,
2110,
31,
1,
-100,
-100,
-100,
-10... |
What Class has a Frequency of 90.1 FM? | CREATE TABLE table_name_8 (class VARCHAR, frequency VARCHAR) | SELECT class FROM table_name_8 WHERE frequency = "90.1 fm" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
927,
41,
4057,
584,
4280,
28027,
6,
7321,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
4501,
65,
3,
9,
5532,
835,
11298,
13,
668,
16029,
13409,
58,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
853,
21680,
953,
834,
4350,
834,
927,
549,
17444,
427,
7321,
3274,
96,
1298,
16029,
3,
89,
51,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is the result for October 14, 1956? | CREATE TABLE table_19766 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text,
"Game Site" text,
"Attendance" real
) | SELECT "Result" FROM table_19766 WHERE "Date" = 'October 14, 1956' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
27181,
3539,
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,
1649,
7621,
121,
1499,
6,
96,
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,
20119,
121,
21680,
953,
834,
27181,
3539,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
28680,
11363,
22951,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Which Last 64 has a Total of £34,600? | CREATE TABLE table_name_65 (last_64 VARCHAR, total VARCHAR) | SELECT last_64 FROM table_name_65 WHERE total = "£34,600" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4122,
41,
5064,
834,
4389,
584,
4280,
28027,
6,
792,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
2506,
6687,
65,
3,
9,
9273,
13,
23395,
8525,
6007,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
336,
834,
4389,
21680,
953,
834,
4350,
834,
4122,
549,
17444,
427,
792,
3274,
96,
19853,
3710,
6,
6007,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Where is Croatian spoken? | CREATE TABLE table_name_41 (
place VARCHAR,
language VARCHAR
) | SELECT place FROM table_name_41 WHERE language = "croatian" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4853,
41,
286,
584,
4280,
28027,
6,
1612,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2840,
19,
19789,
29,
11518,
58,
1,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
286,
21680,
953,
834,
4350,
834,
4853,
549,
17444,
427,
1612,
3274,
96,
2771,
9,
12572,
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 height of the school club team members in clemson? | CREATE TABLE table_17169 (
"Player" text,
"No.(s)" real,
"Height in Ft." text,
"Position" text,
"Years for Rockets" text,
"School/Club Team/Country" text
) | SELECT "Height in Ft." FROM table_17169 WHERE "School/Club Team/Country" = 'Clemson' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2517,
27096,
41,
96,
15800,
49,
121,
1499,
6,
96,
4168,
5,
599,
7,
61,
121,
490,
6,
96,
3845,
2632,
16,
377,
17,
535,
1499,
6,
96,
345,
32,
7,
4749,
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,
3845,
2632,
16,
377,
17,
535,
21680,
953,
834,
2517,
27096,
549,
17444,
427,
96,
29364,
87,
254,
11158,
2271,
87,
10628,
651,
121,
3274,
3,
31,
254,
109,
51,
739,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What episode took place in Belfast Waterfront Hall? | CREATE TABLE table_23122988_1 (
episode VARCHAR,
location VARCHAR
) | SELECT episode FROM table_23122988_1 WHERE location = "Belfast Waterfront Hall" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2773,
2122,
3166,
4060,
834,
536,
41,
5640,
584,
4280,
28027,
6,
1128,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
5640,
808,
286,
16,
27874,
2336,
6849,
250... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
5640,
21680,
953,
834,
2773,
2122,
3166,
4060,
834,
536,
549,
17444,
427,
1128,
3274,
96,
2703,
40,
11584,
2336,
6849,
2501,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who has a position of sg? | CREATE TABLE table_name_86 (
player VARCHAR,
position VARCHAR
) | SELECT player FROM table_name_86 WHERE position = "sg" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3840,
41,
1959,
584,
4280,
28027,
6,
1102,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
65,
3,
9,
1102,
13,
3,
7,
122,
58,
1,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1959,
21680,
953,
834,
4350,
834,
3840,
549,
17444,
427,
1102,
3274,
96,
7,
122,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
provide the number of patients whose admission year is less than 2164 and lab test name is amylase? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
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
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2164" AND lab.label = "Amylase" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7690,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7690,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
What is the greatest first elected for Pennsylvania 10? | CREATE TABLE table_name_56 (
first_elected INTEGER,
district VARCHAR
) | SELECT MAX(first_elected) FROM table_name_56 WHERE district = "pennsylvania 10" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4834,
41,
166,
834,
19971,
3,
21342,
17966,
6,
3939,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
4016,
166,
8160,
21,
8913,
335,
58,
1,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
14672,
834,
19971,
61,
21680,
953,
834,
4350,
834,
4834,
549,
17444,
427,
3939,
3274,
96,
3208,
29,
7,
63,
40,
16658,
9,
335,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was South Melbourne's away team score? | CREATE TABLE table_name_7 (away_team VARCHAR) | SELECT away_team AS score FROM table_name_7 WHERE away_team = "south melbourne" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
940,
41,
8006,
834,
11650,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
1013,
9396,
31,
7,
550,
372,
2604,
58,
1,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
550,
834,
11650,
6157,
2604,
21680,
953,
834,
4350,
834,
940,
549,
17444,
427,
550,
834,
11650,
3274,
96,
7,
670,
107,
3,
2341,
26255,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what circuit is in italy | CREATE TABLE table_name_25 (circuit VARCHAR, round VARCHAR) | SELECT circuit FROM table_name_25 WHERE round = "italy" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1828,
41,
15357,
21560,
584,
4280,
28027,
6,
1751,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
125,
4558,
19,
16,
34,
9,
120,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4558,
21680,
953,
834,
4350,
834,
1828,
549,
17444,
427,
1751,
3274,
96,
9538,
63,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What stadium did the Denver Broncos visit? | CREATE TABLE table_name_60 (
stadium VARCHAR,
visiting_team VARCHAR
) | SELECT stadium FROM table_name_60 WHERE visiting_team = "denver broncos" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3328,
41,
14939,
584,
4280,
28027,
6,
3644,
834,
11650,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
14939,
410,
8,
12154,
4027,
29,
509,
7,
719,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
14939,
21680,
953,
834,
4350,
834,
3328,
549,
17444,
427,
3644,
834,
11650,
3274,
96,
537,
624,
3,
13711,
509,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the name of the player with a pick # less than 5 and an overall of 284? | CREATE TABLE table_name_17 (
name VARCHAR,
pick__number VARCHAR,
overall VARCHAR
) | SELECT name FROM table_name_17 WHERE pick__number < 5 AND overall = 284 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2517,
41,
564,
584,
4280,
28027,
6,
1432,
834,
834,
5525,
1152,
584,
4280,
28027,
6,
1879,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
56... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
3,
23143,
14196,
564,
21680,
953,
834,
4350,
834,
2517,
549,
17444,
427,
1432,
834,
834,
5525,
1152,
3,
2,
305,
3430,
1879,
3274,
204,
4608,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
count the number of patients whose lab test status was abnormal and had got tropnin i lab test done.. | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.flag = "abnormal" AND lab.label = "Troponin I" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7690,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7690,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
For those employees who did not have any job in the past, draw a bar chart about the distribution of hire_date and the average of employee_id bin hire_date by time, and sort total number from low to high order. | 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 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 regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE 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)
) | SELECT HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY AVG(EMPLOYEE_ID) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3248,
41,
301,
5618,
8015,
834,
4309,
7908,
1982,
599,
8525,
632,
201,
3,
13733,
26418,
834,
24604,
12200,
134,
3,
4331,
4059,
599,
2445,
201,
3,
16034,
16359,
834,
5911,
5596,
3,
4331... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
454,
14132,
834,
308,
6048,
6,
71,
17217,
599,
6037,
345,
5017,
476,
5080,
834,
4309,
61,
21680,
1652,
549,
17444,
427,
4486,
262,
5244,
5017,
476,
5080,
834,
4309,
3388,
41,
23143,
14196,
262,
5244,
5017,
476,
5080,
... |
What is the number of movies for each year, ordered by budget in millions? Visualize in a bar chart. | CREATE TABLE book_club (
book_club_id int,
Year int,
Author_or_Editor text,
Book_Title text,
Publisher text,
Category text,
Result text
)
CREATE TABLE culture_company (
Company_name text,
Type text,
Incorporated_in text,
Group_Equity_Shareholding real,
book_club_id text,
movie_id text
)
CREATE TABLE movie (
movie_id int,
Title text,
Year int,
Director text,
Budget_million real,
Gross_worldwide int
) | SELECT Year, COUNT(Year) FROM movie GROUP BY Year ORDER BY Budget_million | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
484,
834,
13442,
41,
484,
834,
13442,
834,
23,
26,
16,
17,
6,
2929,
16,
17,
6,
10236,
834,
127,
834,
26527,
127,
1499,
6,
3086,
834,
382,
155,
109,
1499,
6,
19816,
1499,
6,
17459,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2929,
6,
2847,
17161,
599,
476,
2741,
61,
21680,
1974,
350,
4630,
6880,
272,
476,
2929,
4674,
11300,
272,
476,
12532,
834,
17030,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which tournament included the round played on 14 May? | CREATE TABLE table_name_70 (tournament VARCHAR, date VARCHAR) | SELECT tournament FROM table_name_70 WHERE date = "14 may" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2518,
41,
17,
1211,
20205,
17,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
5892,
1285,
8,
1751,
1944,
30,
968,
932,
58,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
5892,
21680,
953,
834,
4350,
834,
2518,
549,
17444,
427,
833,
3274,
96,
2534,
164,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the date of the game that had a goal of 4? | CREATE TABLE table_name_58 (date VARCHAR, goal VARCHAR) | SELECT date FROM table_name_58 WHERE goal = 4 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3449,
41,
5522,
584,
4280,
28027,
6,
1288,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
833,
13,
8,
467,
24,
141,
3,
9,
1288,
13,
314,
58,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
833,
21680,
953,
834,
4350,
834,
3449,
549,
17444,
427,
1288,
3274,
314,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the score of the home team aginst Essendon? | CREATE TABLE table_name_89 (home_team VARCHAR, away_team VARCHAR) | SELECT home_team AS score FROM table_name_89 WHERE away_team = "essendon" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3914,
41,
5515,
834,
11650,
584,
4280,
28027,
6,
550,
834,
11650,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2604,
13,
8,
234,
372,
3,
9,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
234,
834,
11650,
6157,
2604,
21680,
953,
834,
4350,
834,
3914,
549,
17444,
427,
550,
834,
11650,
3274,
96,
8185,
2029,
121,
1,
-100,
-100,
-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 sum of employee_id over the job_id , and group by attribute job_id, and could you show in desc by the names? | CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE 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 jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
) | SELECT JOB_ID, SUM(EMPLOYEE_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY JOB_ID DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1440,
41,
2847,
17161,
11824,
834,
4309,
3,
4331,
4059,
16426,
6,
2847,
17161,
11824,
834,
567,
17683,
3,
4331,
4059,
599,
2445,
201,
4083,
517,
9215,
834,
4309,
7908,
1982,
599,
1714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
446,
10539,
834,
4309,
6,
180,
6122,
599,
6037,
345,
5017,
476,
5080,
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,
... |
What university is kwaku nyamekye affiliated with? | CREATE TABLE table_3286 (
"Pick #" real,
"MLS Team" text,
"Player" text,
"Position" text,
"Affiliation" text
) | SELECT "Affiliation" FROM table_3286 WHERE "Player" = 'Kwaku Nyamekye' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2668,
3840,
41,
96,
345,
3142,
1713,
121,
490,
6,
96,
17976,
2271,
121,
1499,
6,
96,
15800,
49,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
188,
89,
8027,
23,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
188,
89,
8027,
23,
257,
121,
21680,
953,
834,
2668,
3840,
549,
17444,
427,
96,
15800,
49,
121,
3274,
3,
31,
439,
18603,
76,
16663,
265,
15,
3781,
15,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the team for 1976? | CREATE TABLE table_name_67 (team VARCHAR, year VARCHAR) | SELECT team FROM table_name_67 WHERE year = "1976" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3708,
41,
11650,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
372,
21,
16164,
58,
1,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
372,
21680,
953,
834,
4350,
834,
3708,
549,
17444,
427,
215,
3274,
96,
2294,
3959,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which episode had a share 16-19 of 23,22%? | CREATE TABLE table_29773532_21 (
episode INTEGER,
share_16_39 VARCHAR
) | SELECT MAX(episode) FROM table_29773532_21 WHERE share_16_39 = "23,22%" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3166,
4013,
2469,
2668,
834,
2658,
41,
5640,
3,
21342,
17966,
6,
698,
834,
2938,
834,
3288,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
5640,
141,
3,
9,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
15,
102,
159,
32,
221,
61,
21680,
953,
834,
3166,
4013,
2469,
2668,
834,
2658,
549,
17444,
427,
698,
834,
2938,
834,
3288,
3274,
96,
2773,
6,
357,
5406,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
what number of patients whose religion is jehovah's witness were diagnosed for lumbago? | 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 INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.religion = "JEHOVAH'S WITNESS" AND diagnoses.short_title = "Lumbago" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
5... |
How much did the Hydra team from Bronx, New York raise? | CREATE TABLE table_name_35 (
raised VARCHAR,
original_team VARCHAR,
hometown VARCHAR
) | SELECT raised FROM table_name_35 WHERE original_team = "hydra" AND hometown = "bronx, new york" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2469,
41,
3279,
584,
4280,
28027,
6,
926,
834,
11650,
584,
4280,
28027,
6,
22295,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
231,
410,
8,
21531,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3279,
21680,
953,
834,
4350,
834,
2469,
549,
17444,
427,
926,
834,
11650,
3274,
96,
10656,
9,
121,
3430,
22295,
3274,
96,
13711,
226,
6,
126,
25453,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
The year 1974 has what listed as the Height? | CREATE TABLE table_name_38 (height VARCHAR, year VARCHAR) | SELECT height FROM table_name_38 WHERE year = 1974 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3747,
41,
88,
2632,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
37,
215,
17184,
65,
125,
2616,
38,
8,
24231,
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,
3902,
21680,
953,
834,
4350,
834,
3747,
549,
17444,
427,
215,
3274,
17184,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
How many times was the womens doubles in china? | CREATE TABLE table_30320 (
"Year Location" text,
"Mens Singles" text,
"Womens Singles" text,
"Mens Doubles" text,
"Womens Doubles" text
) | SELECT COUNT("Mens Singles") FROM table_30320 WHERE "Womens Doubles" = 'China' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1458,
15003,
41,
96,
476,
2741,
10450,
121,
1499,
6,
96,
329,
35,
7,
7871,
7,
121,
1499,
6,
96,
518,
32,
904,
7,
7871,
7,
121,
1499,
6,
96,
329,
35,
7,
8405,
7,
121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
329,
35,
7,
7871,
7,
8512,
21680,
953,
834,
1458,
15003,
549,
17444,
427,
96,
518,
32,
904,
7,
8405,
7,
121,
3274,
3,
31,
26154,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the home team's score at Windy Hill? | CREATE TABLE table_55172 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Home team score" FROM table_55172 WHERE "Venue" = 'windy hill' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3769,
27156,
41,
96,
19040,
372,
121,
1499,
6,
96,
19040,
372,
2604,
121,
1499,
6,
96,
188,
1343,
372,
121,
1499,
6,
96,
188,
1343,
372,
2604,
121,
1499,
6,
96,
553,
35,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
19040,
372,
2604,
121,
21680,
953,
834,
3769,
27156,
549,
17444,
427,
96,
553,
35,
76,
15,
121,
3274,
3,
31,
5165,
63,
9956,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
When the 8th is Marcos Hernandez who was the 6th? | CREATE TABLE table_17111812_1 (
sixth VARCHAR,
eighth VARCHAR
) | SELECT sixth FROM table_17111812_1 WHERE eighth = "Marcos Hernandez" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2517,
2596,
2606,
2122,
834,
536,
41,
13305,
584,
4280,
28027,
6,
21227,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
366,
8,
505,
189,
19,
16902,
7,
31765,
113,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13305,
21680,
953,
834,
2517,
2596,
2606,
2122,
834,
536,
549,
17444,
427,
21227,
3274,
96,
7286,
509,
7,
31765,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the nationality of player Cliff Abrecht? | CREATE TABLE table_2679061_9 (nationality VARCHAR, player VARCHAR) | SELECT nationality FROM table_2679061_9 WHERE player = "Cliff Abrecht" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
3708,
2394,
4241,
834,
1298,
41,
16557,
485,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
1157,
485,
13,
1959,
22352,
891,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1157,
485,
21680,
953,
834,
357,
3708,
2394,
4241,
834,
1298,
549,
17444,
427,
1959,
3274,
96,
254,
40,
5982,
891,
2819,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
who is the player when the school is spring hs (spring, texas)? | CREATE TABLE table_name_24 (
player VARCHAR,
school VARCHAR
) | SELECT player FROM table_name_24 WHERE school = "spring hs (spring, texas)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2266,
41,
1959,
584,
4280,
28027,
6,
496,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
113,
19,
8,
1959,
116,
8,
496,
19,
2141,
3,
107,
7,
41,
14662... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1959,
21680,
953,
834,
4350,
834,
2266,
549,
17444,
427,
496,
3274,
96,
14662,
3,
107,
7,
41,
14662,
6,
3,
10354,
9,
7,
61,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
How many Inhabitants were in the democratic party for an election before 2009 for Mayor of stefano cimatti? | CREATE TABLE table_name_3 (inhabitants VARCHAR, election VARCHAR, party VARCHAR, mayor VARCHAR) | SELECT COUNT(inhabitants) FROM table_name_3 WHERE party = "democratic party" AND mayor = "stefano cimatti" AND election < 2009 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
519,
41,
77,
29884,
7,
584,
4280,
28027,
6,
4356,
584,
4280,
28027,
6,
1088,
584,
4280,
28027,
6,
18176,
584,
4280,
28027,
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,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
77,
29884,
7,
61,
21680,
953,
834,
4350,
834,
519,
549,
17444,
427,
1088,
3274,
96,
23319,
447,
1088,
121,
3430,
18176,
3274,
96,
7,
24018,
32,
3,
75,
603,
15817,
121,
3430,
4356,
3,
2,
2464,
1,
... |
how many patients whose age is less than 49 and admission year is less than 2163? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
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.age < "49" AND demographic.admityear < "2163" | [
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,
545,
3,
2,
96,
3647,
121,
3430,
14798,
5,
20466,
17,
1201,
3,
2,
96,
2658,
3891,
121,
1,
-100,... |
Before the year 2012, what award was given to the artist in the category of revelación pop del año? | CREATE TABLE table_name_49 (award VARCHAR, year VARCHAR, category VARCHAR) | SELECT award FROM table_name_49 WHERE year < 2012 AND category = "revelación pop del año" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3647,
41,
9,
2239,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
6,
3295,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
3103,
8,
215,
1673,
6,
125,
2760,
47... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
3,
23143,
14196,
2760,
21680,
953,
834,
4350,
834,
3647,
549,
17444,
427,
215,
3,
2,
1673,
3430,
3295,
3274,
96,
60,
4911,
9,
12765,
2783,
20,
40,
3,
9,
2,
32,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What are all the approved treatments for the target CD30? | CREATE TABLE table_1661124_1 (
approved_treatment_s_ VARCHAR,
target VARCHAR
) | SELECT approved_treatment_s_ FROM table_1661124_1 WHERE target = "CD30" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26811,
2596,
2266,
834,
536,
41,
3754,
834,
26889,
834,
7,
834,
584,
4280,
28027,
6,
2387,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
33,
66,
8,
3754,
587... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3754,
834,
26889,
834,
7,
834,
21680,
953,
834,
26811,
2596,
2266,
834,
536,
549,
17444,
427,
2387,
3274,
96,
6931,
1458,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
who is the tuf competitor when the method id decision (unanimous)? | CREATE TABLE table_43574 (
"Result" text,
"TUF Competitor" text,
"Opponent" text,
"Method" text,
"Event" text,
"Date" text
) | SELECT "TUF Competitor" FROM table_43574 WHERE "Method" = 'decision (unanimous)' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
2469,
4581,
41,
96,
20119,
121,
1499,
6,
96,
9968,
371,
24797,
155,
127,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
23351,
107,
32,
26,
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,
9968,
371,
24797,
155,
127,
121,
21680,
953,
834,
591,
2469,
4581,
549,
17444,
427,
96,
23351,
107,
32,
26,
121,
3274,
3,
31,
221,
18901,
41,
202,
13607,
1162,
61,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
what's the record with result being w 21 7 | CREATE TABLE table_1141 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text,
"Game Site" text,
"Attendance" real
) | SELECT "Record" FROM table_1141 WHERE "Result" = 'W 21–7' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2596,
4853,
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,
1649,
7621,
121,
1499,
6,
96,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
1649,
7621,
121,
21680,
953,
834,
2596,
4853,
549,
17444,
427,
96,
20119,
121,
3274,
3,
31,
518,
1401,
104,
940,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Display a bar chart for what is the code of each location and the number of documents in that location?, list by the total number in ascending. | CREATE TABLE Ref_Locations (
Location_Code CHAR(15),
Location_Name VARCHAR(255),
Location_Description VARCHAR(255)
)
CREATE TABLE Document_Locations (
Document_ID INTEGER,
Location_Code CHAR(15),
Date_in_Location_From DATETIME,
Date_in_Locaton_To DATETIME
)
CREATE TABLE Documents_to_be_Destroyed (
Document_ID INTEGER,
Destruction_Authorised_by_Employee_ID INTEGER,
Destroyed_by_Employee_ID INTEGER,
Planned_Destruction_Date DATETIME,
Actual_Destruction_Date DATETIME,
Other_Details VARCHAR(255)
)
CREATE TABLE Ref_Calendar (
Calendar_Date DATETIME,
Day_Number INTEGER
)
CREATE TABLE All_Documents (
Document_ID INTEGER,
Date_Stored DATETIME,
Document_Type_Code CHAR(15),
Document_Name CHAR(255),
Document_Description CHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_Type_Name VARCHAR(255),
Document_Type_Description VARCHAR(255)
)
CREATE TABLE Roles (
Role_Code CHAR(15),
Role_Name VARCHAR(255),
Role_Description VARCHAR(255)
)
CREATE TABLE Employees (
Employee_ID INTEGER,
Role_Code CHAR(15),
Employee_Name VARCHAR(255),
Gender_MFU CHAR(1),
Date_of_Birth DATETIME,
Other_Details VARCHAR(255)
) | SELECT Location_Code, COUNT(*) FROM Document_Locations GROUP BY Location_Code ORDER BY COUNT(*) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
419,
89,
834,
434,
32,
75,
1628,
41,
10450,
834,
22737,
3,
28027,
599,
1808,
201,
10450,
834,
23954,
584,
4280,
28027,
599,
25502,
201,
10450,
834,
2962,
11830,
584,
4280,
28027,
599,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
10450,
834,
22737,
6,
2847,
17161,
599,
1935,
61,
21680,
11167,
834,
434,
32,
75,
1628,
350,
4630,
6880,
272,
476,
10450,
834,
22737,
4674,
11300,
272,
476,
2847,
17161,
599,
1935,
61,
1,
-100,
-100,
-100,
-100,
-100,... |
How many artists are from Bangladesh? | CREATE TABLE artist (
country VARCHAR
) | SELECT COUNT(*) FROM artist WHERE country = "Bangladesh" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2377,
41,
684,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
3153,
33,
45,
19039,
58,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
2377,
549,
17444,
427,
684,
3274,
96,
279,
1468,
14712,
7,
107,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What type has a date of 1 june? | CREATE TABLE table_57195 (
"Date" text,
"Course" text,
"Distance" text,
"Type" text,
"Winner" text
) | SELECT "Type" FROM table_57195 WHERE "Date" = '1 june' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3436,
22464,
41,
96,
308,
342,
121,
1499,
6,
96,
3881,
3589,
15,
121,
1499,
6,
96,
308,
23,
8389,
121,
1499,
6,
96,
25160,
121,
1499,
6,
96,
18455,
687,
121,
1499,
3,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
3,
23143,
14196,
96,
25160,
121,
21680,
953,
834,
3436,
22464,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
536,
3,
6959,
15,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What was the market share of the operator whose technology is CDMA EVDO GSM EDGE HSPA+? | CREATE TABLE table_23801721_1 (market_share VARCHAR, technology VARCHAR) | SELECT market_share FROM table_23801721_1 WHERE technology = "CDMA EVDO GSM EDGE HSPA+" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2773,
2079,
2517,
2658,
834,
536,
41,
8809,
834,
12484,
584,
4280,
28027,
6,
748,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
512,
698,
13,
8,
7221,
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,
512,
834,
12484,
21680,
953,
834,
2773,
2079,
2517,
2658,
834,
536,
549,
17444,
427,
748,
3274,
96,
6931,
4148,
3,
8878,
9857,
350,
4212,
3,
2326,
5042,
454,
21215,
1220,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What number in the series episode was titled 'Puppy Love'? | CREATE TABLE table_3484 (
"Episode #" real,
"Series #" real,
"Title" text,
"Director" text,
"Writer" text,
"Original airdate" text,
"Viewers (in millions)" text
) | SELECT "Series #" FROM table_3484 WHERE "Title" = 'Puppy Love' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3710,
4608,
41,
96,
427,
102,
159,
32,
221,
1713,
121,
490,
6,
96,
12106,
7,
1713,
121,
490,
6,
96,
382,
155,
109,
121,
1499,
6,
96,
23620,
127,
121,
1499,
6,
96,
24965... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
12106,
7,
1713,
121,
21680,
953,
834,
3710,
4608,
549,
17444,
427,
96,
382,
155,
109,
121,
3274,
3,
31,
345,
76,
9632,
2129,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
provide the number of patients whose ethnicity is black/haitian and age is less than 85? | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/HAITIAN" AND demographic.age < "85" | [
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,
15,
189,
2532,
485,
3274,
96,
8775,
15339,
87,
5478,
3177,
21758,
121,
3430,
14798,
5,
545,
3,
2... |
What is Country, when To par is '1', and when Player is 'Seve Ballesteros'? | CREATE TABLE table_name_20 (
country VARCHAR,
to_par VARCHAR,
player VARCHAR
) | SELECT country FROM table_name_20 WHERE to_par = 1 AND player = "seve ballesteros" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1755,
41,
684,
584,
4280,
28027,
6,
12,
834,
1893,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
6993,
6,
116,
304,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
684,
21680,
953,
834,
4350,
834,
1755,
549,
17444,
427,
12,
834,
1893,
3274,
209,
3430,
1959,
3274,
96,
7,
15,
162,
1996,
2613,
1859,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
How many games did Robert Peare play? | CREATE TABLE table_4080 (
"Player" text,
"Games" real,
"Field goals" real,
"Free throws" real,
"Points" real,
"Points per game" text
) | SELECT MAX("Games") FROM table_4080 WHERE "Player" = 'Robert Peare' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2445,
2079,
41,
96,
15800,
49,
121,
1499,
6,
96,
23055,
7,
121,
490,
6,
96,
3183,
8804,
1766,
121,
490,
6,
96,
16393,
3793,
7,
121,
490,
6,
96,
22512,
7,
121,
490,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
121,
23055,
7,
8512,
21680,
953,
834,
2445,
2079,
549,
17444,
427,
96,
15800,
49,
121,
3274,
3,
31,
24372,
49,
17,
1276,
355,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
When is every date that control site condition or owner is machine shop on Martin Dr.? | CREATE TABLE table_24899 (
"Code & location" text,
"Missile Type" text,
"Defense Area" text,
"Dates" text,
"Control Site condition/owner" text,
"Launch Site condition/owner" text
) | SELECT "Dates" FROM table_24899 WHERE "Control Site condition/owner" = 'machine shop on Martin Dr.' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
3707,
3264,
41,
96,
22737,
3,
184,
1128,
121,
1499,
6,
96,
329,
159,
7,
699,
6632,
121,
1499,
6,
96,
16196,
5167,
5690,
121,
1499,
6,
96,
308,
6203,
121,
1499,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
308,
6203,
121,
21680,
953,
834,
357,
3707,
3264,
549,
17444,
427,
96,
25716,
3238,
1706,
87,
13238,
121,
3274,
3,
31,
8276,
630,
1814,
30,
3394,
707,
5,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
provide the short title of diagnosis along with the time of admission for the patient with patient id 30011. | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT demographic.admittime, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "30011" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
14798,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
564,
1499,
6,
2774,
1947,
834,
8547,
302,
1499,
6,
1246,
1499,
6,
103,
115,
1499,
6,
7285,
1499,
6,
1612,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
14798,
5,
20466,
17,
715,
6,
18730,
7,
5,
7,
14184,
834,
21869,
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,
17444,
4... |
What was the result of the game when the raptors played @ cleveland? | CREATE TABLE table_17291 (
"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_17291 WHERE "Team" = '@ Cleveland' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
27156,
4729,
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,
4729,
549,
17444,
427,
96,
18699,
121,
3274,
3,
31,
1741,
13160,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Which opponent has 36102 is the attendance? | CREATE TABLE table_23466021_4 (opponent VARCHAR, attendance VARCHAR) | SELECT opponent FROM table_23466021_4 WHERE attendance = 36102 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2773,
4448,
3328,
2658,
834,
591,
41,
32,
102,
9977,
584,
4280,
28027,
6,
11364,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
15264,
65,
4475,
14388,
19,
8,
113... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
15264,
21680,
953,
834,
2773,
4448,
3328,
2658,
834,
591,
549,
17444,
427,
11364,
3274,
4475,
14388,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What was the average losses for team with points larger than 3 and played larger thna 14? | CREATE TABLE table_name_65 (
lost INTEGER,
points VARCHAR,
played VARCHAR
) | SELECT AVG(lost) FROM table_name_65 WHERE points > 3 AND played > 14 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4122,
41,
1513,
3,
21342,
17966,
6,
979,
584,
4280,
28027,
6,
1944,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
1348,
8467,
21,
372,
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,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
71,
17217,
599,
2298,
17,
61,
21680,
953,
834,
4350,
834,
4122,
549,
17444,
427,
979,
2490,
220,
3430,
1944,
2490,
968,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Get the number of patients with chest pain as their primary disease who were born before 2112. | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "CHEST PAIN" AND demographic.dob_year < "2112" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
25930,
4844,
159,
3274,
96,
8360,
6038,
276,
13570,
121,
3430,
14798,
5,
26,
32,
115,
834,
1201,
... |
Find the names of all stores in Khanewal District. | CREATE TABLE district (district_id VARCHAR, district_name VARCHAR); CREATE TABLE store_district (store_id VARCHAR, district_id VARCHAR); CREATE TABLE store (store_name VARCHAR, store_id VARCHAR) | SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t3.district_name = "Khanewal District" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3939,
41,
26,
23,
20066,
834,
23,
26,
584,
4280,
28027,
6,
3939,
834,
4350,
584,
4280,
28027,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
1078,
834,
26,
23,
20066,
41,
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,
3,
17,
5411,
7154,
834,
4350,
21680,
1078,
6157,
3,
17,
536,
3,
15355,
3162,
1078,
834,
26,
23,
20066,
6157,
3,
17,
357,
9191,
3,
17,
5411,
7154,
834,
23,
26,
3274,
3,
17,
4416,
7154,
834,
23,
26,
3,
15355,
31... |
For all employees who have the letters D or S in their first name, visualize a bar chart about the distribution of hire_date and the average of salary bin hire_date by time, sort by the Y from low to high. | 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 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 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 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(SALARY) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY AVG(SALARY) | [
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,
134,
4090,
24721,
61,
21680,
1652,
549,
17444,
427,
30085,
834,
567,
17683,
8729,
9914,
3,
31,
1454,
308,
1454,
31,
4674,
30085,
834,
567,
17683,
8729,
9914,
3,
31,
145... |
what is the highest frequency mhz with the call sign w292cu? | CREATE TABLE table_name_77 (frequency_mhz INTEGER, call_sign VARCHAR) | SELECT MAX(frequency_mhz) FROM table_name_77 WHERE call_sign = "w292cu" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4013,
41,
30989,
834,
51,
107,
172,
3,
21342,
17966,
6,
580,
834,
6732,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
125,
19,
8,
2030,
7321,
3,
51,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
30989,
834,
51,
107,
172,
61,
21680,
953,
834,
4350,
834,
4013,
549,
17444,
427,
580,
834,
6732,
3274,
96,
210,
3166,
357,
1071,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
count the number of patients who have stayed in the hospital for more than 23 days with a drug name phenylephrine hcl. | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "DOBUTamine" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7744,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7744,
7,
5,
8399,
51,
834,
23,
26,
549... |
count the number of patients who have diagnoses icd9 code 32723 and are less than 50 years of age. | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "50" AND diagnoses.icd9_code = "32723" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
5... |
How many carries for the RB averaging 4.7, and a long of over 30 yards? | CREATE TABLE table_57990 (
"Player" text,
"Car." real,
"Yards" real,
"Avg." real,
"TD's" real,
"Long" real
) | SELECT SUM("Car.") FROM table_57990 WHERE "Avg." = '4.7' AND "Long" > '30' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3436,
26901,
41,
96,
15800,
49,
121,
1499,
6,
96,
6936,
535,
490,
6,
96,
476,
986,
7,
121,
490,
6,
96,
188,
208,
122,
535,
490,
6,
96,
10494,
31,
7,
121,
490,
6,
96,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
121,
6936,
5,
8512,
21680,
953,
834,
3436,
26901,
549,
17444,
427,
96,
188,
208,
122,
535,
3274,
3,
31,
25211,
31,
3430,
96,
434,
2444,
121,
2490,
3,
31,
1458,
31,
1,
-100,
-100,
-100,
-100,
-100,
... |
What Car Model has the Engine of Ford 6.0 V8? | CREATE TABLE table_name_19 (
car_model VARCHAR,
engine VARCHAR
) | SELECT car_model FROM table_name_19 WHERE engine = "ford 6.0 v8" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2294,
41,
443,
834,
21770,
584,
4280,
28027,
6,
1948,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
1184,
5154,
65,
8,
10612,
13,
5222,
3,
22642,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
443,
834,
21770,
21680,
953,
834,
4350,
834,
2294,
549,
17444,
427,
1948,
3274,
96,
2590,
3,
22642,
3,
208,
927,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which ministers are not a part of the Progress Party, and count them by a bar chart | CREATE TABLE party (
Party_ID int,
Minister text,
Took_office text,
Left_office text,
Region_ID int,
Party_name text
)
CREATE TABLE party_events (
Event_ID int,
Event_Name text,
Party_ID int,
Member_in_charge_ID int
)
CREATE TABLE region (
Region_ID int,
Region_name text,
Date text,
Label text,
Format text,
Catalogue text
)
CREATE TABLE member (
Member_ID int,
Member_Name text,
Party_ID text,
In_office text
) | SELECT Minister, COUNT(Minister) FROM party WHERE Party_name <> 'Progress Party' GROUP BY Minister | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1088,
41,
3450,
834,
4309,
16,
17,
6,
3271,
1499,
6,
304,
1825,
834,
19632,
1499,
6,
14298,
834,
19632,
1499,
6,
6163,
834,
4309,
16,
17,
6,
3450,
834,
4350,
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,
3271,
6,
2847,
17161,
599,
12858,
5805,
61,
21680,
1088,
549,
17444,
427,
3450,
834,
4350,
3,
2,
3155,
3,
31,
3174,
10292,
3450,
31,
350,
4630,
6880,
272,
476,
3271,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Which Name has a Tonnage (GRT) larger than 4,071, and a Nationality of united kingdom, and a Fate of damaged? | CREATE TABLE table_9861 (
"Date" text,
"Name" text,
"Nationality" text,
"Tonnage (GRT)" real,
"Fate" text
) | SELECT "Name" FROM table_9861 WHERE "Tonnage (GRT)" > '4,071' AND "Nationality" = 'united kingdom' AND "Fate" = 'damaged' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3916,
4241,
41,
96,
308,
342,
121,
1499,
6,
96,
23954,
121,
1499,
6,
96,
24732,
485,
121,
1499,
6,
96,
382,
106,
9761,
41,
517,
5934,
61,
121,
490,
6,
96,
371,
342,
121... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
23954,
121,
21680,
953,
834,
3916,
4241,
549,
17444,
427,
96,
382,
106,
9761,
41,
517,
5934,
61,
121,
2490,
3,
31,
8525,
4560,
536,
31,
3430,
96,
24732,
485,
121,
3274,
3,
31,
15129,
15,
26,
14740,
31,
3430,
... |
What was the location and it's corresponding attendance during the game against Los Angeles? | CREATE TABLE table_31455 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT "Location Attendance" FROM table_31455 WHERE "Team" = 'Los Angeles' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
519,
2534,
3769,
41,
96,
23055,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
18699,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
21417,
979,
121,
1499,
6,
96,
21417,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
434,
32,
75,
257,
22497,
663,
121,
21680,
953,
834,
519,
2534,
3769,
549,
17444,
427,
96,
18699,
121,
3274,
3,
31,
434,
32,
7,
4975,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Where was South Melbourne played? | CREATE TABLE table_55951 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Venue" FROM table_55951 WHERE "Home team" = 'south melbourne' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3769,
3301,
536,
41,
96,
19040,
372,
121,
1499,
6,
96,
19040,
372,
2604,
121,
1499,
6,
96,
188,
1343,
372,
121,
1499,
6,
96,
188,
1343,
372,
2604,
121,
1499,
6,
96,
553,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
553,
35,
76,
15,
121,
21680,
953,
834,
3769,
3301,
536,
549,
17444,
427,
96,
19040,
372,
121,
3274,
3,
31,
7,
670,
107,
3,
2341,
26255,
31,
1,
-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.