NATURAL_LANG stringlengths 0 446 | SCHEMA stringlengths 27 2.21k | SQL stringlengths 18 453 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|
count the number of patients whose diagnosis long title is morbid obesity and the lab test category is chemistry. | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Morbid obesity" AND lab."CATEGORY" = "Chemistry" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
3... |
What document status codes do we have? | CREATE TABLE circulation_history (
document_id number,
draft_number number,
copy_number number,
employee_id number
)
CREATE TABLE ref_shipping_agents (
shipping_agent_code text,
shipping_agent_name text,
shipping_agent_description text
)
CREATE TABLE addresses (
address_id number,
address_details text
)
CREATE TABLE draft_copies (
document_id number,
draft_number number,
copy_number number
)
CREATE TABLE employees (
employee_id number,
role_code text,
employee_name text,
other_details text
)
CREATE TABLE ref_document_types (
document_type_code text,
document_type_description text
)
CREATE TABLE ref_document_status (
document_status_code text,
document_status_description text
)
CREATE TABLE roles (
role_code text,
role_description text
)
CREATE TABLE documents_mailed (
document_id number,
mailed_to_address_id number,
mailing_date time
)
CREATE TABLE documents (
document_id number,
document_status_code text,
document_type_code text,
shipping_agent_code text,
receipt_date time,
receipt_number text,
other_details text
)
CREATE TABLE document_drafts (
document_id number,
draft_number number,
draft_details text
) | SELECT document_status_code FROM ref_document_status | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
11027,
834,
10193,
10972,
41,
1708,
834,
23,
26,
381,
6,
6488,
834,
5525,
1152,
381,
6,
2405,
834,
5525,
1152,
381,
6,
3490,
834,
23,
26,
381,
3,
61,
3,
32102,
32103,
32102,
205,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
1708,
834,
8547,
302,
834,
4978,
21680,
6273,
834,
28244,
834,
8547,
302,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
For those records from the products and each product's manufacturer, show me about the distribution of name and manufacturer , and group by attribute founder in a bar chart. | CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
15248,
7,
41,
3636,
3,
21342,
17966,
6,
5570,
584,
4280,
28027,
599,
25502,
201,
3642,
19973,
584,
4280,
28027,
599,
25502,
201,
3,
19145,
584,
4280,
28027,
599,
25502,
201,
19764,
17833... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
332,
5411,
23954,
6,
332,
5411,
7296,
76,
8717,
450,
49,
21680,
7554,
6157,
332,
536,
3,
15355,
3162,
15248,
7,
6157,
332,
357,
9191,
332,
5411,
7296,
76,
8717,
450,
49,
3274,
332,
4416,
22737,
350,
4630,
6880,
272,... |
Which Administrative district has a Pre-1009 province of gwannae -do and a Post-1009 province of seohae -do? | CREATE TABLE table_name_76 (administrative_district VARCHAR, pre_1009_province VARCHAR, post_1009_province VARCHAR) | SELECT administrative_district FROM table_name_76 WHERE pre_1009_province = "gwannae -do" AND post_1009_province = "seohae -do" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3959,
41,
9571,
1528,
834,
26,
23,
20066,
584,
4280,
28027,
6,
554,
834,
2915,
1298,
834,
1409,
2494,
565,
584,
4280,
28027,
6,
442,
834,
2915,
1298,
834,
1409,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
6601,
834,
26,
23,
20066,
21680,
953,
834,
4350,
834,
3959,
549,
17444,
427,
554,
834,
2915,
1298,
834,
1409,
2494,
565,
3274,
96,
122,
210,
10878,
15,
3,
18,
26,
32,
121,
3430,
442,
834,
2915,
1298,
834,
1409,
24... |
what is the number of married patients who are females? | 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
)
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.marital_status = "MARRIED" AND demographic.gender = "F" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
1635,
9538,
834,
8547,
302,
3274,
96,
13845,
25858,
308,
121,
3430,
14798,
5,
122,
3868,
3274,
96,... |
What were the Lyrics (l) and Music (m) for the Artist who was in a Position higher than 3 and who earned 1st Place? | CREATE TABLE table_name_16 (
lyrics__l____music__m_ VARCHAR,
position VARCHAR,
place VARCHAR
) | SELECT lyrics__l____music__m_ FROM table_name_16 WHERE position > 3 AND place = "1st" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2938,
41,
13475,
834,
834,
40,
834,
834,
834,
834,
22170,
834,
834,
51,
834,
584,
4280,
28027,
6,
1102,
584,
4280,
28027,
6,
286,
584,
4280,
28027,
3,
61,
3,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
13475,
834,
834,
40,
834,
834,
834,
834,
22170,
834,
834,
51,
834,
21680,
953,
834,
4350,
834,
2938,
549,
17444,
427,
1102,
2490,
220,
3430,
286,
3274,
96,
536,
7,
17,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What was the away team score when the home team essendon was playing? | CREATE TABLE table_name_63 (away_team VARCHAR, home_team VARCHAR) | SELECT away_team AS score FROM table_name_63 WHERE home_team = "essendon" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3891,
41,
8006,
834,
11650,
584,
4280,
28027,
6,
234,
834,
11650,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
550,
372,
2604,
116,
8,
234,
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,
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,
3891,
549,
17444,
427,
234,
834,
11650,
3274,
96,
8185,
2029,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the lowest number of games Jack Gaudion, who debut in 1936, played? | CREATE TABLE table_77669 (
"Debut year" real,
"Player" text,
"Date of birth" text,
"Games" real,
"Goals" real,
"Years at club" text
) | SELECT MIN("Games") FROM table_77669 WHERE "Debut year" = '1936' AND "Player" = 'jack gaudion' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
940,
3959,
3951,
41,
96,
2962,
2780,
215,
121,
490,
6,
96,
15800,
49,
121,
1499,
6,
96,
308,
342,
13,
3879,
121,
1499,
6,
96,
23055,
7,
121,
490,
6,
96,
6221,
5405,
121... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
121,
23055,
7,
8512,
21680,
953,
834,
940,
3959,
3951,
549,
17444,
427,
96,
2962,
2780,
215,
121,
3274,
3,
31,
2294,
3420,
31,
3430,
96,
15800,
49,
121,
3274,
3,
31,
9325,
3,
122,
28696,
29,
31,
1... |
What is Agg., when Team 1 is "Tirana"? | CREATE TABLE table_name_48 (agg VARCHAR, team_1 VARCHAR) | SELECT agg FROM table_name_48 WHERE team_1 = "tirana" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3707,
41,
9,
4102,
584,
4280,
28027,
6,
372,
834,
536,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
71,
4102,
5,
6,
116,
2271,
209,
19,
96,
38... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
9,
4102,
21680,
953,
834,
4350,
834,
3707,
549,
17444,
427,
372,
834,
536,
3274,
96,
17,
23,
2002,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Find the name of instructors who didn't teach any courses? | CREATE TABLE instructor (
id text,
name text,
dept_name text,
salary number
)
CREATE TABLE department (
dept_name text,
building text,
budget number
)
CREATE TABLE prereq (
course_id text,
prereq_id text
)
CREATE TABLE classroom (
building text,
room_number text,
capacity number
)
CREATE TABLE student (
id text,
name text,
dept_name text,
tot_cred number
)
CREATE TABLE section (
course_id text,
sec_id text,
semester text,
year number,
building text,
room_number text,
time_slot_id text
)
CREATE TABLE advisor (
s_id text,
i_id text
)
CREATE TABLE course (
course_id text,
title text,
dept_name text,
credits number
)
CREATE TABLE takes (
id text,
course_id text,
sec_id text,
semester text,
year number,
grade text
)
CREATE TABLE time_slot (
time_slot_id text,
day text,
start_hr number,
start_min number,
end_hr number,
end_min number
)
CREATE TABLE teaches (
id text,
course_id text,
sec_id text,
semester text,
year number
) | SELECT name FROM instructor WHERE NOT id IN (SELECT id FROM teaches) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
10617,
41,
3,
23,
26,
1499,
6,
564,
1499,
6,
20,
102,
17,
834,
4350,
1499,
6,
9090,
381,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
3066,
41,
20,
102,
17,
834,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
564,
21680,
10617,
549,
17444,
427,
4486,
3,
23,
26,
3388,
41,
23143,
14196,
3,
23,
26,
21680,
3,
11749,
61,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
how many hours have it been since patient 017-88691 was admitted into the hospital? | CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
) | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.hospitaladmittime)) FROM patient WHERE patient.uniquepid = '017-88691' AND patient.hospitaldischargetime IS NULL | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1868,
41,
775,
12417,
1499,
6,
1868,
15878,
3734,
21545,
23,
26,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
7285,
1499,
6,
1246,
1499,
6,
11655,
485,
1499,
6,
2833,
23,
26,
381,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
997,
1429,
41,
13733,
6245,
15382,
599,
31,
1454,
354,
31,
6,
3,
5211,
12224,
6431,
834,
382,
15382,
9960,
61,
3,
18,
3,
13733,
6245,
15382,
599,
31,
1454,
354,
31,
6,
1868,
5,
31386,
20466,
17,
715,
61,
61,
216... |
What is the lowest pick that has arizona cardinals as the NFL club? | CREATE TABLE table_name_43 (
pick INTEGER,
nfl_club VARCHAR
) | SELECT MIN(pick) FROM table_name_43 WHERE nfl_club = "arizona cardinals" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4906,
41,
1432,
3,
21342,
17966,
6,
3,
29,
89,
40,
834,
13442,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
7402,
1432,
24,
65,
3,
1665,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3,
17684,
599,
17967,
61,
21680,
953,
834,
4350,
834,
4906,
549,
17444,
427,
3,
29,
89,
40,
834,
13442,
3274,
96,
1665,
8892,
9,
895,
10270,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
How many goals for the player with 2 caps at degerfors if? | CREATE TABLE table_32940 (
"name" text,
"pos." text,
"caps" real,
"goals" real,
"club" text
) | SELECT "goals" FROM table_32940 WHERE "caps" = '2' AND "club" = 'degerfors if' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
519,
3166,
2445,
41,
96,
4350,
121,
1499,
6,
96,
2748,
535,
1499,
6,
96,
4010,
7,
121,
490,
6,
96,
839,
5405,
121,
490,
6,
96,
13442,
121,
1499,
3,
61,
3,
32102,
32103,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
839,
5405,
121,
21680,
953,
834,
519,
3166,
2445,
549,
17444,
427,
96,
4010,
7,
121,
3274,
3,
31,
357,
31,
3430,
96,
13442,
121,
3274,
3,
31,
221,
1304,
1161,
7,
3,
99,
31,
1,
-100,
-100,
-100,
-100,
-100,
... |
modified hachinski ischemia score >= 4 | CREATE TABLE table_train_84 (
"id" int,
"gender" string,
"mini_mental_state_examination_mmse" int,
"modified_hachinski_ischemia_scale" int,
"post_menopausal" bool,
"allergy_to_rifaximin" bool,
"surgically_sterilized" bool,
"body_mass_index_bmi" float,
"age" float,
"NOUSE" float
) | SELECT * FROM table_train_84 WHERE modified_hachinski_ischemia_scale >= 4 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
9719,
834,
4608,
41,
96,
23,
26,
121,
16,
17,
6,
96,
122,
3868,
121,
6108,
6,
96,
7619,
834,
13974,
834,
5540,
834,
994,
9,
14484,
834,
635,
7,
15,
121,
16,
17,
6,
96... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
1429,
21680,
953,
834,
9719,
834,
4608,
549,
17444,
427,
8473,
834,
1024,
5675,
4009,
834,
2499,
11658,
834,
6649,
2490,
2423,
314,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What score did Jack Nicklaus have when he placed t6? | CREATE TABLE table_name_92 (
score VARCHAR,
place VARCHAR,
player VARCHAR
) | SELECT score FROM table_name_92 WHERE place = "t6" AND player = "jack nicklaus" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4508,
41,
2604,
584,
4280,
28027,
6,
286,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
2604,
410,
4496,
7486,
40,
2064,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2604,
21680,
953,
834,
4350,
834,
4508,
549,
17444,
427,
286,
3274,
96,
17,
948,
121,
3430,
1959,
3274,
96,
9325,
3,
11191,
40,
2064,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
who guest starred on the episode with a 1.44m rating | CREATE TABLE table_29135051_3 (
guest_s_ VARCHAR,
ratings VARCHAR
) | SELECT guest_s_ FROM table_29135051_3 WHERE ratings = "1.44m" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3166,
2368,
1752,
5553,
834,
519,
41,
3886,
834,
7,
834,
584,
4280,
28027,
6,
9712,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
113,
3886,
3,
29029,
30,
8,
5640... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3886,
834,
7,
834,
21680,
953,
834,
3166,
2368,
1752,
5553,
834,
519,
549,
17444,
427,
9712,
3274,
96,
14912,
591,
51,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What's the greek designation of the city riverside? | CREATE TABLE table_name_28 (
greek_designation VARCHAR,
city VARCHAR
) | SELECT greek_designation FROM table_name_28 WHERE city = "riverside" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2577,
41,
3542,
10266,
834,
9124,
257,
584,
4280,
28027,
6,
690,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
31,
7,
8,
3542,
10266,
21767,
13,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3542,
10266,
834,
9124,
257,
21680,
953,
834,
4350,
834,
2577,
549,
17444,
427,
690,
3274,
96,
5927,
49,
1583,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the record that has the Rose Garden 20,126 as the attendance? | CREATE TABLE table_name_44 (
record VARCHAR,
attendance VARCHAR
) | SELECT record FROM table_name_44 WHERE attendance = "rose garden 20,126" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3628,
41,
1368,
584,
4280,
28027,
6,
11364,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1368,
24,
65,
8,
5088,
5072,
16047,
21976,
38,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1368,
21680,
953,
834,
4350,
834,
3628,
549,
17444,
427,
11364,
3274,
96,
8115,
2004,
16047,
21976,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
how many patients were staying at ward 1004? | CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
) | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.wardid = 1004 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
11963,
670,
2562,
41,
11963,
670,
2562,
23,
26,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
2358,
8292,
1499,
6,
2358,
40,
10333,
1499,
6,
2358,
7480,
35,
76,
17552,
381,
6,
11963,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1868,
5,
202,
1495,
12417,
61,
21680,
1868,
549,
17444,
427,
1868,
5,
2239,
23,
26,
3274,
910,
591,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the Rank of the Nation of Germany when the Total is more than 2? | CREATE TABLE table_name_63 (
rank VARCHAR,
nation VARCHAR,
total VARCHAR
) | SELECT COUNT(rank) FROM table_name_63 WHERE nation = "germany" AND total > 2 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3891,
41,
11003,
584,
4280,
28027,
6,
2982,
584,
4280,
28027,
6,
792,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
3,
22557,
13,
8,
11046,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2847,
17161,
599,
6254,
61,
21680,
953,
834,
4350,
834,
3891,
549,
17444,
427,
2982,
3274,
96,
1304,
348,
63,
121,
3430,
792,
2490,
204,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What years was Lebanon the nationality? | CREATE TABLE table_name_82 (years_in_orlando VARCHAR, nationality VARCHAR) | SELECT years_in_orlando FROM table_name_82 WHERE nationality = "lebanon" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4613,
41,
1201,
7,
834,
77,
834,
32,
7721,
32,
584,
4280,
28027,
6,
1157,
485,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
203,
47,
21502,
8,
1157,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
203,
834,
77,
834,
32,
7721,
32,
21680,
953,
834,
4350,
834,
4613,
549,
17444,
427,
1157,
485,
3274,
96,
109,
3478,
106,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Which team had 7 losses and 55 goals? | CREATE TABLE table_52805 (
"Team" text,
"Games Played" real,
"Wins" real,
"Losses" text,
"Ties" real,
"Goals For" real,
"Goals Against" real
) | SELECT "Team" FROM table_52805 WHERE "Losses" = '7' AND "Goals For" = '55' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
755,
2577,
3076,
41,
96,
18699,
121,
1499,
6,
96,
23055,
7,
2911,
15,
26,
121,
490,
6,
96,
18455,
7,
121,
490,
6,
96,
434,
13526,
7,
121,
1499,
6,
96,
382,
725,
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,
18699,
121,
21680,
953,
834,
755,
2577,
3076,
549,
17444,
427,
96,
434,
13526,
7,
121,
3274,
3,
31,
940,
31,
3430,
96,
6221,
5405,
242,
121,
3274,
3,
31,
3769,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Show the locations of schools that have more than 1 player. | CREATE TABLE player (School_ID VARCHAR); CREATE TABLE school (Location VARCHAR, School_ID VARCHAR) | SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*) > 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1959,
41,
29364,
834,
4309,
584,
4280,
28027,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
496,
41,
434,
32,
75,
257,
584,
4280,
28027,
6,
1121,
834,
4309,
584,
4280,
28027... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
3,
23143,
14196,
332,
4416,
434,
32,
75,
257,
21680,
1959,
6157,
332,
536,
3,
15355,
3162,
496,
6157,
332,
357,
9191,
332,
5411,
29364,
834,
4309,
3274,
332,
4416,
29364,
834,
4309,
350,
4630,
6880,
272,
476,
332,
5411,
29364,
834,
... |
count the number of patients whose marital status is married and drug route is iv bolus? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.marital_status = "MARRIED" AND prescriptions.route = "IV BOLUS" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7744,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7744,
7,
5,
8399,
51,
834,
23,
26,
549... |
What is the highest attendance for the game after week 1 on November 12, 1961? | CREATE TABLE table_36560 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) | SELECT MAX("Attendance") FROM table_36560 WHERE "Week" > '1' AND "Date" = 'november 12, 1961' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
10402,
3328,
41,
96,
518,
10266,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
20119,
121,
1499,
6,
96,
188,
17,
324,
26,
663,
121,
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,
4800,
4,
599,
121,
188,
17,
324,
26,
663,
8512,
21680,
953,
834,
10402,
3328,
549,
17444,
427,
96,
518,
10266,
121,
2490,
3,
31,
536,
31,
3430,
96,
308,
342,
121,
3274,
3,
31,
5326,
18247,
10440,
21018,
31,
1,
-... |
What is the Catalog number of the CD Single? | CREATE TABLE table_name_13 (catalog VARCHAR, format VARCHAR) | SELECT catalog FROM table_name_13 WHERE format = "cd single" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2368,
41,
2138,
9,
2152,
584,
4280,
28027,
6,
1910,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
22424,
381,
13,
8,
3190,
7871,
58,
1,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
10173,
21680,
953,
834,
4350,
834,
2368,
549,
17444,
427,
1910,
3274,
96,
75,
26,
712,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What type of local government area is Yalata? | CREATE TABLE table_26268 (
"Local Government Area" text,
"Type" text,
"Major Town" text,
"Land Area (km\u00b2)" text,
"Pop. 2006" real,
"Density km \u22122" real,
"Towns" real,
"Est." real
) | SELECT "Type" FROM table_26268 WHERE "Local Government Area" = 'Yalata' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2688,
357,
3651,
41,
96,
434,
32,
1489,
3141,
5690,
121,
1499,
6,
96,
25160,
121,
1499,
6,
96,
329,
9,
12775,
4463,
121,
1499,
6,
96,
434,
232,
5690,
41,
5848,
2,
76,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
25160,
121,
21680,
953,
834,
2688,
357,
3651,
549,
17444,
427,
96,
434,
32,
1489,
3141,
5690,
121,
3274,
3,
31,
476,
138,
144,
9,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
how many years did the first three presidents serve combined ? | CREATE TABLE table_203_800 (
id number,
"#" number,
"president" text,
"president's party" text,
"senate with" number,
"senate opposed" number,
"house with" number,
"house opposed" number,
"years served" number,
"elections won" number
) | SELECT SUM("years served") FROM table_203_800 WHERE "#" <= 3 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
6192,
41,
3,
23,
26,
381,
6,
96,
4663,
121,
381,
6,
96,
102,
15704,
121,
1499,
6,
96,
102,
15704,
31,
7,
1088,
121,
1499,
6,
96,
7,
35,
342,
28,
121,
381,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
121,
1201,
7,
2098,
8512,
21680,
953,
834,
23330,
834,
6192,
549,
17444,
427,
96,
4663,
121,
3,
2,
2423,
220,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Who won the Women's doubles in the year that David Eddy Eddy Sutton won the Men's doubles, and that David Eddy won the Men's singles? | CREATE TABLE table_80383 (
"Year" text,
"Men's singles" text,
"Women's singles" text,
"Men's doubles" text,
"Women's doubles" text,
"Mixed doubles" text
) | SELECT "Women's doubles" FROM table_80383 WHERE "Men's doubles" = 'david eddy eddy sutton' AND "Men's singles" = 'david eddy' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2079,
3747,
519,
41,
96,
476,
2741,
121,
1499,
6,
96,
329,
35,
31,
7,
712,
7,
121,
1499,
6,
96,
518,
32,
904,
31,
7,
712,
7,
121,
1499,
6,
96,
329,
35,
31,
7,
1486,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
518,
32,
904,
31,
7,
1486,
7,
121,
21680,
953,
834,
2079,
3747,
519,
549,
17444,
427,
96,
329,
35,
31,
7,
1486,
7,
121,
3274,
3,
31,
26,
9,
6961,
3,
15,
8155,
3,
15,
8155,
3,
7,
12499,
31,
3430,
96,
32... |
What time contains the owner of maine chance farm? | CREATE TABLE table_name_55 (
time VARCHAR,
owner VARCHAR
) | SELECT time FROM table_name_55 WHERE owner = "maine chance farm" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3769,
41,
97,
584,
4280,
28027,
6,
2527,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
97,
2579,
8,
2527,
13,
711,
15,
1253,
3797,
58,
1,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
97,
21680,
953,
834,
4350,
834,
3769,
549,
17444,
427,
2527,
3274,
96,
7484,
15,
1253,
3797,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the highest rank of a player from Ethiopia? | CREATE TABLE table_name_8 (
rank INTEGER,
country VARCHAR
) | SELECT MAX(rank) FROM table_name_8 WHERE country = "ethiopia" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
927,
41,
11003,
3,
21342,
17966,
6,
684,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2030,
11003,
13,
3,
9,
1959,
45,
22138,
58,
1,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
6254,
61,
21680,
953,
834,
4350,
834,
927,
549,
17444,
427,
684,
3274,
96,
15,
7436,
18916,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Tell me the sum of the grid with alfa romeo and toulo de graffenried | CREATE TABLE table_10283 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/retired" text,
"Grid" real
) | SELECT SUM("Grid") FROM table_10283 WHERE "Constructor" = 'alfa romeo' AND "Driver" = 'toulo de graffenried' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
14388,
4591,
41,
96,
20982,
52,
121,
1499,
6,
96,
4302,
7593,
127,
121,
1499,
6,
96,
3612,
102,
7,
121,
490,
6,
96,
13368,
87,
10682,
1271,
121,
1499,
6,
96,
13313,
26,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
121,
13313,
26,
8512,
21680,
953,
834,
14388,
4591,
549,
17444,
427,
96,
4302,
7593,
127,
121,
3274,
3,
31,
138,
89,
9,
3,
11956,
32,
31,
3430,
96,
20982,
52,
121,
3274,
3,
31,
235,
83,
32,
20,
... |
what's the regionalliga west/südwest with regionalliga süd being stuttgarter kickers | CREATE TABLE table_14242137_11 (regionalliga_west_südwest VARCHAR, regionalliga_süd VARCHAR) | SELECT regionalliga_west_südwest FROM table_14242137_11 WHERE regionalliga_süd = "Stuttgarter Kickers" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
24978,
4165,
24636,
834,
2596,
41,
18145,
138,
17140,
834,
12425,
834,
7,
1272,
26,
12425,
584,
4280,
28027,
6,
3518,
17140,
834,
7,
1272,
26,
584,
4280,
28027,
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,
3518,
17140,
834,
12425,
834,
7,
1272,
26,
12425,
21680,
953,
834,
24978,
4165,
24636,
834,
2596,
549,
17444,
427,
3518,
17140,
834,
7,
1272,
26,
3274,
96,
13076,
17,
17,
1478,
449,
20759,
277,
121,
1,
-100,
-100,
-... |
how many of the games were the illini ranked ? | CREATE TABLE table_204_22 (
id number,
"date" text,
"opponent#" text,
"rank#" text,
"site" text,
"result" text,
"attendance" number,
"record" text
) | SELECT COUNT(*) FROM table_204_22 WHERE NOT "rank#" IS NULL | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
2884,
41,
3,
23,
26,
381,
6,
96,
5522,
121,
1499,
6,
96,
32,
102,
9977,
4663,
121,
1499,
6,
96,
6254,
4663,
121,
1499,
6,
96,
3585,
121,
1499,
6,
96,
60,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
953,
834,
26363,
834,
2884,
549,
17444,
427,
4486,
96,
6254,
4663,
121,
6827,
13046,
10376,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
How many people attended the game with a Tie no of 30? | CREATE TABLE table_name_88 (
attendance VARCHAR,
tie_no VARCHAR
) | SELECT attendance FROM table_name_88 WHERE tie_no = "30" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4060,
41,
11364,
584,
4280,
28027,
6,
6177,
834,
29,
32,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
151,
5526,
8,
467,
28,
3,
9,
2262,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11364,
21680,
953,
834,
4350,
834,
4060,
549,
17444,
427,
6177,
834,
29,
32,
3274,
96,
1458,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Who is h.l birkett if w.h. archer is r. cochrane? | CREATE TABLE table_637 (
"W.H. Archer" text,
"J.E. Armstrong" text,
"H.L. Birkett" text,
"F.A. Brill" text,
"H.T. Brewer" text
) | SELECT "H.L. Birkett" FROM table_637 WHERE "W.H. Archer" = 'R. Cochrane' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3891,
940,
41,
96,
518,
5,
566,
5,
9318,
49,
121,
1499,
6,
96,
683,
5,
427,
5,
26044,
121,
1499,
6,
96,
566,
5,
434,
5,
10158,
12922,
121,
1499,
6,
96,
371,
5,
188,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
566,
5,
434,
5,
10158,
12922,
121,
21680,
953,
834,
3891,
940,
549,
17444,
427,
96,
518,
5,
566,
5,
9318,
49,
121,
3274,
3,
31,
448,
5,
638,
524,
2002,
15,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the CHI (Carvill Hurricane Index) when the NHC advisory number is equal to 49b? | CREATE TABLE table_15416002_1 (chi VARCHAR, nhc_advisory_number VARCHAR) | SELECT chi FROM table_15416002_1 WHERE nhc_advisory_number = "49B" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
27308,
19129,
4305,
834,
536,
41,
1436,
584,
4280,
28027,
6,
3,
29,
107,
75,
834,
9,
26,
24680,
63,
834,
5525,
1152,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1436,
21680,
953,
834,
27308,
19129,
4305,
834,
536,
549,
17444,
427,
3,
29,
107,
75,
834,
9,
26,
24680,
63,
834,
5525,
1152,
3274,
96,
3647,
279,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Find all information about student addresses, and sort by monthly rental in descending order. | CREATE TABLE Student_Addresses (
monthly_rental VARCHAR
) | SELECT * FROM Student_Addresses ORDER BY monthly_rental DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
6341,
834,
20773,
9377,
15,
7,
41,
3718,
834,
5320,
138,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2588,
66,
251,
81,
1236,
7181,
6,
11,
1843,
57,
3718,
3571,
16,
3,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1429,
21680,
6341,
834,
20773,
9377,
15,
7,
4674,
11300,
272,
476,
3718,
834,
5320,
138,
309,
25067,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Display a bar chart for how many students participated in tryouts for each college by descennding count? | CREATE TABLE Player (
pID numeric(5,0),
pName varchar(20),
yCard varchar(3),
HS numeric(5,0)
)
CREATE TABLE College (
cName varchar(20),
state varchar(2),
enr numeric(5,0)
)
CREATE TABLE Tryout (
pID numeric(5,0),
cName varchar(20),
pPos varchar(8),
decision varchar(3)
) | SELECT cName, COUNT(*) FROM Tryout GROUP BY cName ORDER BY COUNT(*) DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
12387,
41,
3,
102,
4309,
206,
17552,
599,
11116,
632,
201,
3,
102,
23954,
3,
4331,
4059,
599,
1755,
201,
3,
63,
6936,
26,
3,
4331,
4059,
17867,
6,
3,
4950,
206,
17552,
599,
11116,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
75,
23954,
6,
2847,
17161,
599,
1935,
61,
21680,
5263,
670,
350,
4630,
6880,
272,
476,
3,
75,
23954,
4674,
11300,
272,
476,
2847,
17161,
599,
1935,
61,
309,
25067,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the full amount of averages when the sellouts are less than 14, the season is 2011-12, and attendance is less than 162,474? | CREATE TABLE table_35154 (
"Season" text,
"Record" text,
"Pct." real,
"Games" real,
"Attendance" real,
"Average" real,
"Sellouts" real
) | SELECT COUNT("Average") FROM table_35154 WHERE "Sellouts" < '14' AND "Season" = '2011-12' AND "Attendance" < '162,474' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2469,
27308,
41,
96,
134,
15,
9,
739,
121,
1499,
6,
96,
1649,
7621,
121,
1499,
6,
96,
345,
75,
17,
535,
490,
6,
96,
23055,
7,
121,
490,
6,
96,
188,
17,
324,
26,
663,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
188,
624,
545,
8512,
21680,
953,
834,
2469,
27308,
549,
17444,
427,
96,
134,
3820,
670,
7,
121,
3,
2,
3,
31,
2534,
31,
3430,
96,
134,
15,
9,
739,
121,
3274,
3,
31,
13907,
5947,
31,
3430,
... |
How many schools have some students playing in goalie and mid positions. | CREATE TABLE tryout (
cName VARCHAR,
pPos VARCHAR
) | SELECT COUNT(*) FROM (SELECT cName FROM tryout WHERE pPos = 'goalie' INTERSECT SELECT cName FROM tryout WHERE pPos = 'mid') | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
653,
670,
41,
3,
75,
23954,
584,
4280,
28027,
6,
3,
102,
345,
32,
7,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
2061,
43,
128,
481,
1556,
16,
1288,
23,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
41,
23143,
14196,
3,
75,
23954,
21680,
653,
670,
549,
17444,
427,
3,
102,
345,
32,
7,
3274,
3,
31,
839,
9,
1896,
31,
3,
21342,
5249,
14196,
3,
23143,
14196,
3,
75,
23954,
21680,
... |
Caculate the number of newborn patients who remained admitted in the hospital for more than 9 days. | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "NEWBORN" AND demographic.days_stay > "9" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
14798,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
564,
1499,
6,
2774,
1947,
834,
8547,
302,
1499,
6,
1246,
1499,
6,
103,
115,
1499,
6,
7285,
1499,
6,
1612,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
9,
26,
5451,
834,
6137,
3274,
96,
4171,
518,
8471,
14151,
121,
3430,
14798,
5,
1135,
7,
834,
215... |
how many patients whose admission location is transfer from hosp/extram and admission year is less than 2167? | 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
)
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_location = "TRANSFER FROM HOSP/EXTRAM" AND demographic.admityear < "2167" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
9,
26,
5451,
834,
14836,
3274,
96,
11359,
7369,
20805,
21680,
3,
6299,
4274,
87,
427,
4,
11359,
... |
How many races had the pole position Alain Prost and the race winner Keke Rosberg? | CREATE TABLE table_16730 (
"Rnd" real,
"Race" text,
"Date" text,
"Location" text,
"Pole Position" text,
"Fastest Lap" text,
"Race Winner" text,
"Constructor" text,
"Report" text
) | SELECT COUNT("Race") FROM table_16730 WHERE "Pole Position" = 'Alain Prost' AND "Race Winner" = 'Keke Rosberg' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
27650,
1458,
41,
96,
448,
727,
121,
490,
6,
96,
448,
3302,
121,
1499,
6,
96,
308,
342,
121,
1499,
6,
96,
434,
32,
75,
257,
121,
1499,
6,
96,
8931,
15,
14258,
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,
2847,
17161,
599,
121,
448,
3302,
8512,
21680,
953,
834,
27650,
1458,
549,
17444,
427,
96,
8931,
15,
14258,
121,
3274,
3,
31,
188,
521,
77,
749,
7,
17,
31,
3430,
96,
448,
3302,
18125,
121,
3274,
3,
31,
439,
15,
... |
What's the gold medal count for Total Nation with a bronze count more than 0 and a total less than 54? | CREATE TABLE table_name_13 (
gold INTEGER,
bronze VARCHAR,
nation VARCHAR
) | SELECT MAX(gold) FROM table_name_13 WHERE bronze > 0 AND nation = "total" AND "total" < 54 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2368,
41,
2045,
3,
21342,
17966,
6,
13467,
584,
4280,
28027,
6,
2982,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
31,
7,
8,
2045,
9365,
3476,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
3,
23143,
14196,
4800,
4,
599,
14910,
61,
21680,
953,
834,
4350,
834,
2368,
549,
17444,
427,
13467,
2490,
3,
632,
3430,
2982,
3274,
96,
235,
1947,
121,
3430,
96,
235,
1947,
121,
3,
2,
10630,
1,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the largest events number for more than 2 wins and less than $446,893 in earnings? | CREATE TABLE table_name_65 (
events INTEGER,
wins VARCHAR,
earnings___$__ VARCHAR
) | SELECT MAX(events) FROM table_name_65 WHERE wins > 2 AND earnings___$__ < 446 OFFSET 893 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4122,
41,
984,
3,
21342,
17966,
6,
9204,
584,
4280,
28027,
6,
8783,
834,
834,
834,
3229,
834,
834,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
15,
2169,
7,
61,
21680,
953,
834,
4350,
834,
4122,
549,
17444,
427,
9204,
2490,
204,
3430,
8783,
834,
834,
834,
3229,
834,
834,
3,
2,
314,
4448,
3,
15316,
20788,
505,
4271,
1,
-100,
-100,
-100,
-100,... |
Show me about the distribution of Date_of_Birth and Height in a bar chart, and list by the bar in ascending. | CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight real
)
CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate real
) | SELECT Date_of_Birth, Height FROM people ORDER BY Date_of_Birth | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
151,
41,
2449,
834,
4309,
16,
17,
6,
679,
226,
1499,
6,
5570,
1499,
6,
7678,
834,
858,
834,
279,
23,
52,
189,
1499,
6,
24231,
490,
6,
14230,
490,
3,
61,
3,
32102,
32103,
32102,
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,
7678,
834,
858,
834,
279,
23,
52,
189,
6,
24231,
21680,
151,
4674,
11300,
272,
476,
7678,
834,
858,
834,
279,
23,
52,
189,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Who replaced when the position in table is 5th? | CREATE TABLE table_name_58 (
replaced_by VARCHAR,
position_in_table VARCHAR
) | SELECT replaced_by FROM table_name_58 WHERE position_in_table = "5th" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3449,
41,
5821,
834,
969,
584,
4280,
28027,
6,
1102,
834,
77,
834,
3869,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
5821,
116,
8,
1102,
16,
95... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5821,
834,
969,
21680,
953,
834,
4350,
834,
3449,
549,
17444,
427,
1102,
834,
77,
834,
3869,
3274,
96,
755,
189,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which High points have High rebounds of lamar odom (15), and a Date of april 27? | CREATE TABLE table_name_80 (high_points VARCHAR, high_rebounds VARCHAR, date VARCHAR) | SELECT high_points FROM table_name_80 WHERE high_rebounds = "lamar odom (15)" AND date = "april 27" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2079,
41,
6739,
834,
2700,
7,
584,
4280,
28027,
6,
306,
834,
23768,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
1592,
979,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
306,
834,
2700,
7,
21680,
953,
834,
4350,
834,
2079,
549,
17444,
427,
306,
834,
23768,
3274,
96,
521,
1635,
3,
32,
5012,
17251,
61,
121,
3430,
833,
3274,
96,
9,
2246,
40,
2307,
121,
1,
-100,
-100,
-100,
-100,
-100... |
What is the highest number of wins for Tom Watson who earns less than $4,974,845? | CREATE TABLE table_36913 (
"Rank" real,
"Player" text,
"Country" text,
"Earnings ( $ )" real,
"Wins" real
) | SELECT MAX("Wins") FROM table_36913 WHERE "Player" = 'tom watson' AND "Earnings ( $ )" < '4,974,845' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
519,
3951,
2368,
41,
96,
22557,
121,
490,
6,
96,
15800,
49,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
427,
291,
29,
53,
7,
41,
1514,
3,
61,
121,
490,
6,
96,
184... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
18455,
7,
8512,
21680,
953,
834,
519,
3951,
2368,
549,
17444,
427,
96,
15800,
49,
121,
3274,
3,
31,
235,
51,
8036,
17,
739,
31,
3430,
96,
427,
291,
29,
53,
7,
41,
1514,
3,
61,
121,
3,
2,
3... |
Compare the distribution of the players' gender using a bar chart, rank by the total number in ascending. | CREATE TABLE match_result (
Rank int,
Club_ID int,
Gold int,
Big_Silver int,
Small_Silver int,
Bronze int,
Points int
)
CREATE TABLE club (
Club_ID int,
Club_name text,
Region text,
Start_year int
)
CREATE TABLE player (
Player_ID int,
Sponsor_name text,
Player_name text,
Gender text,
Residence text,
Occupation text,
Votes int,
Rank text
)
CREATE TABLE coach (
Coach_ID int,
Coach_name text,
Gender text,
Club_ID int,
Rank int
)
CREATE TABLE player_coach (
Player_ID int,
Coach_ID int,
Starting_year int
) | SELECT Gender, COUNT(Gender) FROM player GROUP BY Gender ORDER BY COUNT(Gender) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1588,
834,
60,
7,
83,
17,
41,
3,
22557,
16,
17,
6,
1949,
834,
4309,
16,
17,
6,
2540,
16,
17,
6,
2734,
834,
134,
173,
624,
16,
17,
6,
4872,
834,
134,
173,
624,
16,
17,
6,
2084... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
350,
3868,
6,
2847,
17161,
599,
517,
3868,
61,
21680,
1959,
350,
4630,
6880,
272,
476,
350,
3868,
4674,
11300,
272,
476,
2847,
17161,
599,
517,
3868,
61,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the other is the city is Los Gatos? | CREATE TABLE table_25200461_9 (
other VARCHAR,
city VARCHAR
) | SELECT other FROM table_25200461_9 WHERE city = "Los Gatos" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
21653,
4241,
834,
1298,
41,
119,
584,
4280,
28027,
6,
690,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
119,
19,
8,
690,
19,
3144,
2776,
235,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
119,
21680,
953,
834,
1828,
21653,
4241,
834,
1298,
549,
17444,
427,
690,
3274,
96,
434,
32,
7,
2776,
235,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
how many albums garnered chart positions ? | CREATE TABLE table_203_77 (
id number,
"album title" text,
"format" text,
"year" number,
"original label" text,
"chart positions" text
) | SELECT COUNT("album title") FROM table_203_77 WHERE NOT "chart positions" IS NULL | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
4013,
41,
3,
23,
26,
381,
6,
96,
23703,
2233,
121,
1499,
6,
96,
8995,
121,
1499,
6,
96,
1201,
121,
381,
6,
96,
21878,
3783,
121,
1499,
6,
96,
4059,
17,
4655... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
23703,
2233,
8512,
21680,
953,
834,
23330,
834,
4013,
549,
17444,
427,
4486,
96,
4059,
17,
4655,
121,
6827,
13046,
10376,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What kind of Week 2 that has a Week 1 of mandy ashford? | CREATE TABLE table_name_91 (
week_2 VARCHAR,
week_1 VARCHAR
) | SELECT week_2 FROM table_name_91 WHERE week_1 = "mandy ashford" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4729,
41,
471,
834,
357,
584,
4280,
28027,
6,
471,
834,
536,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
773,
13,
6551,
204,
24,
65,
3,
9,
655... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
471,
834,
357,
21680,
953,
834,
4350,
834,
4729,
549,
17444,
427,
471,
834,
536,
3274,
96,
348,
26,
63,
3,
3198,
2590,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
niji iro no sneaker was released on march 5 , 1991 ; which single was released the previous year ? | CREATE TABLE table_203_512 (
id number,
"release date" text,
"album" text,
"catalog number" text,
"chart position" number,
"notes" text
) | SELECT "album" FROM table_203_512 WHERE "release date" = (SELECT "release date" FROM table_203_512 WHERE "album" = 'niji-iro no sneaker') - 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
24163,
41,
3,
23,
26,
381,
6,
96,
21019,
833,
121,
1499,
6,
96,
23703,
121,
1499,
6,
96,
2138,
9,
2152,
381,
121,
1499,
6,
96,
4059,
17,
1102,
121,
381,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
23703,
121,
21680,
953,
834,
23330,
834,
24163,
549,
17444,
427,
96,
21019,
833,
121,
3274,
41,
23143,
14196,
96,
21019,
833,
121,
21680,
953,
834,
23330,
834,
24163,
549,
17444,
427,
96,
23703,
121,
3274,
3,
31,
... |
What is the quantity made of the locomotive with a Waterford class? | CREATE TABLE table_name_67 (
quantity_made VARCHAR,
class VARCHAR
) | SELECT quantity_made FROM table_name_67 WHERE class = "waterford" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3708,
41,
8708,
834,
4725,
584,
4280,
28027,
6,
853,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
8708,
263,
13,
8,
31301,
28,
3,
9,
233... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8708,
834,
4725,
21680,
953,
834,
4350,
834,
3708,
549,
17444,
427,
853,
3274,
96,
3552,
2590,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the mountain range at 37.3934 n 104.9201 w? | CREATE TABLE table_52709 (
"Rank" real,
"Mountain Peak" text,
"State" text,
"Mountain Range" text,
"Location" text
) | SELECT "Mountain Range" FROM table_52709 WHERE "Location" = '37.3934°n 104.9201°w' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
755,
2555,
4198,
41,
96,
22557,
121,
490,
6,
96,
329,
32,
14016,
77,
18996,
121,
1499,
6,
96,
134,
4748,
121,
1499,
6,
96,
329,
32,
14016,
77,
10971,
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,
329,
32,
14016,
77,
10971,
121,
21680,
953,
834,
755,
2555,
4198,
549,
17444,
427,
96,
434,
32,
75,
257,
121,
3274,
3,
31,
4118,
5,
3288,
3710,
1956,
29,
335,
27336,
22772,
1956,
210,
31,
1,
-100,
-100,
-100,
... |
Which Award has a Result of nominated, and a Year of 2003? | CREATE TABLE table_name_85 (award VARCHAR, result VARCHAR, year VARCHAR) | SELECT award FROM table_name_85 WHERE result = "nominated" AND year = 2003 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4433,
41,
9,
2239,
584,
4280,
28027,
6,
741,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
3677,
65,
3,
9,
3,
20119,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2760,
21680,
953,
834,
4350,
834,
4433,
549,
17444,
427,
741,
3274,
96,
3114,
77,
920,
121,
3430,
215,
3274,
3888,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Which nominees won before year 2005? | CREATE TABLE table_14080 (
"Year" real,
"Category" text,
"Nominee(s)" text,
"Episode" text,
"Result" text
) | SELECT "Nominee(s)" FROM table_14080 WHERE "Year" < '2005' AND "Result" = 'won' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
22012,
2079,
41,
96,
476,
2741,
121,
490,
6,
96,
18610,
6066,
651,
121,
1499,
6,
96,
4168,
8695,
15,
599,
7,
61,
121,
1499,
6,
96,
427,
102,
159,
32,
221,
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,
4168,
8695,
15,
599,
7,
61,
121,
21680,
953,
834,
22012,
2079,
549,
17444,
427,
96,
476,
2741,
121,
3,
2,
3,
31,
22594,
31,
3430,
96,
20119,
121,
3274,
3,
31,
210,
106,
31,
1,
-100,
-100,
-100,
-100,
-100,
... |
What is the col (m) of the Bewani Mountains High Point peak? | CREATE TABLE table_18946749_2 (col__m_ INTEGER, peak VARCHAR) | SELECT MIN(col__m_) FROM table_18946749_2 WHERE peak = "Bewani Mountains High Point" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2606,
4240,
3708,
3647,
834,
357,
41,
3297,
834,
834,
51,
834,
3,
21342,
17966,
6,
6734,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
7632,
41,
51,
61,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
3297,
834,
834,
51,
834,
61,
21680,
953,
834,
2606,
4240,
3708,
3647,
834,
357,
549,
17444,
427,
6734,
3274,
96,
2703,
3877,
23,
18183,
1592,
4564,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What college has Lance Moore Category:articles with hcards? | CREATE TABLE table_name_94 (
college VARCHAR,
player VARCHAR
) | SELECT college FROM table_name_94 WHERE player = "lance moore category:articles with hcards" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4240,
41,
1900,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
1900,
65,
22207,
11103,
17459,
10,
8372,
7,
28,
3,
107,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1900,
21680,
953,
834,
4350,
834,
4240,
549,
17444,
427,
1959,
3274,
96,
40,
663,
3,
21477,
15,
3295,
10,
8372,
7,
28,
3,
107,
6043,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the rank of the Riverpark Place Tower 2 with under 62 floors, and a construction date of 2008? | CREATE TABLE table_9309 (
"Rank" real,
"Name" text,
"Floors*" real,
"Year* (est.)" text,
"Status" text
) | SELECT "Rank" FROM table_9309 WHERE "Floors*" < '62' AND "Year* (est.)" = '2008' AND "Name" = 'riverpark place tower 2' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4271,
4198,
41,
96,
22557,
121,
490,
6,
96,
23954,
121,
1499,
6,
96,
11251,
127,
7,
1935,
121,
490,
6,
96,
476,
2741,
1935,
41,
222,
5,
61,
121,
1499,
6,
96,
134,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
22557,
121,
21680,
953,
834,
4271,
4198,
549,
17444,
427,
96,
11251,
127,
7,
1935,
121,
3,
2,
3,
31,
4056,
31,
3430,
96,
476,
2741,
1935,
41,
222,
5,
61,
121,
3274,
3,
31,
16128,
31,
3430,
96,
23954,
121,
... |
provide the number of patients whose admission year is less than 2162 and diagnoses icd9 code is 56722? | 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 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 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2162" AND diagnoses.icd9_code = "56722" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
5... |
What is the average number lost when the PCT is more than 0.7334 and the total number of games is larger than 48? | CREATE TABLE table_10468 (
"Independent" text,
"Lost" real,
"Tied" real,
"Pct." real,
"Years" real,
"Total Games" real
) | SELECT AVG("Lost") FROM table_10468 WHERE "Pct." > '0.7334' AND "Total Games" > '48' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
15442,
3651,
41,
96,
1570,
17631,
121,
1499,
6,
96,
434,
3481,
121,
490,
6,
96,
382,
5973,
121,
490,
6,
96,
345,
75,
17,
535,
490,
6,
96,
476,
2741,
7,
121,
490,
6,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
121,
434,
3481,
8512,
21680,
953,
834,
15442,
3651,
549,
17444,
427,
96,
345,
75,
17,
535,
2490,
3,
31,
22426,
519,
3710,
31,
3430,
96,
3696,
1947,
5880,
121,
2490,
3,
31,
3707,
31,
1,
-100,
-100,
... |
how many total titles were published by walker ? | CREATE TABLE table_203_788 (
id number,
"year" number,
"author" text,
"illustrator" text,
"title" text,
"publisher" text
) | SELECT COUNT("author") FROM table_203_788 WHERE "publisher" = 'walker' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
3940,
927,
41,
3,
23,
26,
381,
6,
96,
1201,
121,
381,
6,
96,
17415,
121,
1499,
6,
96,
173,
10008,
52,
1016,
121,
1499,
6,
96,
21869,
121,
1499,
6,
96,
29337... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
17415,
8512,
21680,
953,
834,
23330,
834,
3940,
927,
549,
17444,
427,
96,
29337,
49,
121,
3274,
3,
31,
24063,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
how many of the patients with portal hypertension had iv drip administered? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Portal hypertension" AND prescriptions.route = "IV DRIP" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
3... |
How many proteins are associated with an institution in a building with at least 20 floors? | CREATE TABLE building (
building_id text,
name text,
street_address text,
years_as_tallest text,
height_feet number,
floors number
)
CREATE TABLE protein (
common_name text,
protein_name text,
divergence_from_human_lineage number,
accession_number text,
sequence_length number,
sequence_identity_to_human_protein text,
institution_id text
)
CREATE TABLE institution (
institution_id text,
institution text,
location text,
founded number,
type text,
enrollment number,
team text,
primary_conference text,
building_id text
) | SELECT COUNT(*) FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id = T2.institution_id JOIN building AS T3 ON T3.building_id = T1.building_id WHERE T3.floors >= 20 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
740,
41,
740,
834,
23,
26,
1499,
6,
564,
1499,
6,
2815,
834,
9,
26,
12039,
1499,
6,
203,
834,
9,
7,
834,
17,
1748,
222,
1499,
6,
3902,
834,
89,
15,
15,
17,
381,
6,
8242,
381,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
6568,
6157,
332,
536,
3,
15355,
3162,
3619,
6157,
332,
357,
9191,
332,
5411,
77,
17448,
834,
23,
26,
3274,
332,
4416,
77,
17448,
834,
23,
26,
3,
15355,
3162,
740,
6157,
332,
519,
... |
Give me the comparison about School_ID over the All_Neutral by a bar chart. | CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
) | SELECT All_Neutral, School_ID FROM basketball_match | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
8498,
834,
19515,
41,
2271,
834,
4309,
16,
17,
6,
1121,
834,
4309,
16,
17,
6,
2271,
834,
23954,
1499,
6,
3,
14775,
834,
17748,
4885,
834,
134,
15,
9,
739,
1499,
6,
3,
14775,
834,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
432,
834,
26288,
8792,
6,
1121,
834,
4309,
21680,
8498,
834,
19515,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
On what dates were employees without the letter M in their first names hired, and count them by a bar chart, I want to list total number in descending order. | 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 countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE 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 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, COUNT(HIRE_DATE) FROM employees WHERE NOT FIRST_NAME LIKE '%M%' ORDER BY COUNT(HIRE_DATE) DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
10521,
41,
3396,
19846,
11810,
834,
4309,
7908,
1982,
599,
8525,
632,
201,
3396,
19846,
11810,
834,
567,
17683,
3,
4331,
4059,
599,
1458,
201,
283,
15610,
17966,
834,
4309,
7908,
1982,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
454,
14132,
834,
308,
6048,
6,
2847,
17161,
599,
566,
14132,
834,
308,
6048,
61,
21680,
1652,
549,
17444,
427,
4486,
30085,
834,
567,
17683,
8729,
9914,
3,
31,
1454,
329,
1454,
31,
4674,
11300,
272,
476,
2847,
17161,
... |
Name the sum of gross tonnage for wood on date more tahn 1846 for comissioned and ship of esk | CREATE TABLE table_name_75 (gross_tonnage INTEGER, ship VARCHAR, material VARCHAR, date_commissioned VARCHAR) | SELECT SUM(gross_tonnage) FROM table_name_75 WHERE material = "wood" AND date_commissioned > 1846 AND ship = "esk" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3072,
41,
3844,
7,
7,
834,
17,
106,
9761,
3,
21342,
17966,
6,
4383,
584,
4280,
28027,
6,
1037,
584,
4280,
28027,
6,
833,
834,
17183,
584,
4280,
28027,
61,
3,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
3844,
7,
7,
834,
17,
106,
9761,
61,
21680,
953,
834,
4350,
834,
3072,
549,
17444,
427,
1037,
3274,
96,
2037,
121,
3430,
833,
834,
17183,
2490,
507,
4448,
3430,
4383,
3274,
96,
15,
7,
157,
121,
1,
... |
What is the maximum renewable energy (gw h) for the state of Delaware? | CREATE TABLE table_25244412_1 (
renewable_electricity__gw INTEGER,
state VARCHAR
) | SELECT MAX(renewable_electricity__gw) AS •h_ FROM table_25244412_1 WHERE state = "Delaware" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
2266,
3628,
2122,
834,
536,
41,
12475,
834,
17470,
485,
834,
834,
122,
210,
3,
21342,
17966,
6,
538,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
60,
5534,
179,
834,
17470,
485,
834,
834,
122,
210,
61,
6157,
1697,
107,
834,
21680,
953,
834,
1828,
2266,
3628,
2122,
834,
536,
549,
17444,
427,
538,
3274,
96,
2962,
4207,
355,
121,
1,
-100,
-100,
-... |
How many locomotives have a name of City of Birmingham | CREATE TABLE table_15827397_1 (
no VARCHAR,
name VARCHAR
) | SELECT COUNT(no) FROM table_15827397_1 WHERE name = "City of Birmingham" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1808,
4613,
4552,
4327,
834,
536,
41,
150,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
31301,
7,
43,
3,
9,
564,
13,
896,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2847,
17161,
599,
29,
32,
61,
21680,
953,
834,
1808,
4613,
4552,
4327,
834,
536,
549,
17444,
427,
564,
3274,
96,
254,
485,
13,
15922,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What was the Result in Green Lane with Kirkburton as the Runner-up? | CREATE TABLE table_38563 (
"Season" text,
"Winner" text,
"Result" text,
"Runner-up" text,
"Final venue" text
) | SELECT "Result" FROM table_38563 WHERE "Runner-up" = 'kirkburton' AND "Final venue" = 'green lane' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
519,
4433,
3891,
41,
96,
134,
15,
9,
739,
121,
1499,
6,
96,
18455,
687,
121,
1499,
6,
96,
20119,
121,
1499,
6,
96,
23572,
18,
413,
121,
1499,
6,
96,
371,
10270,
5669,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
519,
4433,
3891,
549,
17444,
427,
96,
23572,
18,
413,
121,
3274,
3,
31,
157,
12546,
3007,
17330,
31,
3430,
96,
371,
10270,
5669,
121,
3274,
3,
31,
9423,
3,
8102,
31,
1,
-100,
-100,... |
provide the number of patients whose ethnicity is black/haitian and year of birth is less than 2085? | 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 WHERE demographic.ethnicity = "BLACK/HAITIAN" AND demographic.dob_year < "2085" | [
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,
15,
189,
2532,
485,
3274,
96,
8775,
15339,
87,
5478,
3177,
21758,
121,
3430,
14798,
5,
26,
32,
1... |
What is the date of entered service for the locomotive with a broad gauge and a serial no of 83-1018? | CREATE TABLE table_name_76 (entered_service VARCHAR, gauge VARCHAR, serial_no VARCHAR) | SELECT entered_service FROM table_name_76 WHERE gauge = "broad" AND serial_no = "83-1018" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3959,
41,
35,
11196,
834,
5114,
584,
4280,
28027,
6,
13596,
584,
4280,
28027,
6,
10501,
834,
29,
32,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
5136,
834,
5114,
21680,
953,
834,
4350,
834,
3959,
549,
17444,
427,
13596,
3274,
96,
115,
8635,
121,
3430,
10501,
834,
29,
32,
3274,
96,
4591,
4536,
2606,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
count the number of patients who are alive and have diagnosis icd9 code v4986. | 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 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.expire_flag = "0" AND diagnoses.icd9_code = "V4986" | [
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,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
5... |
What is the name of the superfund that was proposed on 06/24/1988? | CREATE TABLE table_name_99 (name VARCHAR, proposed VARCHAR) | SELECT name FROM table_name_99 WHERE proposed = "06/24/1988" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3264,
41,
4350,
584,
4280,
28027,
6,
4382,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
564,
13,
8,
1355,
7610,
24,
47,
4382,
30,
13574,
87,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
564,
21680,
953,
834,
4350,
834,
3264,
549,
17444,
427,
4382,
3274,
96,
5176,
87,
2266,
13523,
4060,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is the minimum district with incumbent being tom reynolds | CREATE TABLE table_891 (
"District" real,
"Incumbent" text,
"Party" text,
"Elected" real,
"Status" text,
"Opponent" text
) | SELECT MIN("District") FROM table_891 WHERE "Incumbent" = 'Tom Reynolds' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3914,
536,
41,
96,
308,
23,
20066,
121,
490,
6,
96,
1570,
75,
5937,
295,
121,
1499,
6,
96,
13725,
63,
121,
1499,
6,
96,
21543,
15,
26,
121,
490,
6,
96,
134,
17,
144,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
121,
308,
23,
20066,
8512,
21680,
953,
834,
3914,
536,
549,
17444,
427,
96,
1570,
75,
5937,
295,
121,
3274,
3,
31,
3696,
51,
27815,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which 1977 is the lowest one that has a County of zzz bucharest, and a 2011 smaller than 1883425? | CREATE TABLE table_39348 (
"County" text,
"1948" real,
"1956" real,
"1966" real,
"1977" real,
"1992" real,
"2002" real,
"2011" real
) | SELECT MIN("1977") FROM table_39348 WHERE "County" = 'zzz bucharest' AND "2011" < '1883425' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3288,
519,
3707,
41,
96,
10628,
63,
121,
1499,
6,
96,
2294,
3707,
121,
490,
6,
96,
2294,
4834,
121,
490,
6,
96,
2294,
3539,
121,
490,
6,
96,
2294,
4013,
121,
490,
6,
96... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
121,
2294,
4013,
8512,
21680,
953,
834,
3288,
519,
3707,
549,
17444,
427,
96,
10628,
63,
121,
3274,
3,
31,
172,
5271,
3,
5671,
9,
6216,
31,
3430,
96,
13907,
121,
3,
2,
3,
31,
25794,
3710,
1828,
31... |
What's the Total (kg) of a Snatch of 132.5? | CREATE TABLE table_11158 (
"Name" text,
"Bodyweight" real,
"Snatch" real,
"Clean & jerk" text,
"Total (kg)" text
) | SELECT "Total (kg)" FROM table_11158 WHERE "Snatch" = '132.5' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
15866,
3449,
41,
96,
23954,
121,
1499,
6,
96,
279,
9666,
9378,
121,
490,
6,
96,
134,
29,
14547,
121,
490,
6,
96,
254,
109,
152,
3,
184,
3,
12488,
157,
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,
3696,
1947,
41,
8711,
61,
121,
21680,
953,
834,
15866,
3449,
549,
17444,
427,
96,
134,
29,
14547,
121,
3274,
3,
31,
2368,
15967,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Who was eliminated that entered after number 3 and lasted 35:55? | CREATE TABLE table_name_74 (
eliminated VARCHAR,
entered VARCHAR,
time VARCHAR
) | SELECT eliminated FROM table_name_74 WHERE entered > 3 AND time = "35:55" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4581,
41,
17809,
584,
4280,
28027,
6,
5136,
584,
4280,
28027,
6,
97,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
17809,
24,
5136,
227,
381,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
17809,
21680,
953,
834,
4350,
834,
4581,
549,
17444,
427,
5136,
2490,
220,
3430,
97,
3274,
96,
2469,
10,
3769,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
How many different variants are there for Northern Counties bodybuilder? | CREATE TABLE table_28035004_1 (
variant VARCHAR,
bodybuilder VARCHAR
) | SELECT COUNT(variant) FROM table_28035004_1 WHERE bodybuilder = "Northern Counties" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
17518,
16975,
6348,
834,
536,
41,
6826,
584,
4280,
28027,
6,
643,
16422,
49,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
315,
6826,
7,
33,
132,
21,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
9504,
288,
61,
21680,
953,
834,
17518,
16975,
6348,
834,
536,
549,
17444,
427,
643,
16422,
49,
3274,
96,
22969,
49,
29,
3,
10628,
725,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the first appearance of the character played by Obdul Reid? | CREATE TABLE table_28476 (
"Character" text,
"Played by" text,
"Season 1" real,
"Season 2" real,
"Season 3" real,
"Season 4" real,
"First Appearance" text
) | SELECT "First Appearance" FROM table_28476 WHERE "Played by" = 'Obdul Reid' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
4608,
3959,
41,
96,
18947,
2708,
49,
121,
1499,
6,
96,
15800,
15,
26,
57,
121,
1499,
6,
96,
134,
15,
9,
739,
209,
121,
490,
6,
96,
134,
15,
9,
739,
204,
121,
490... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
25171,
2276,
2741,
663,
121,
21680,
953,
834,
357,
4608,
3959,
549,
17444,
427,
96,
15800,
15,
26,
57,
121,
3274,
3,
31,
667,
115,
26,
83,
25219,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
what is the number of patients whose admission location is phys referral/normal deli and lab test fluid is ascites? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND lab.fluid = "Ascites" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7690,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7690,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
What was the founding university of the organization Tau Epsilon Phi 1? | CREATE TABLE table_27642 (
"Letters" text,
"Organization" text,
"Nickname" text,
"Founding Date" text,
"Founding University" text,
"Type" text
) | SELECT "Founding University" FROM table_27642 WHERE "Organization" = 'Tau Epsilon Phi 1' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2555,
4389,
357,
41,
96,
434,
15583,
7,
121,
1499,
6,
96,
14878,
257,
121,
1499,
6,
96,
567,
3142,
4350,
121,
1499,
6,
96,
371,
32,
1106,
53,
7678,
121,
1499,
6,
96,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
371,
32,
1106,
53,
636,
121,
21680,
953,
834,
2555,
4389,
357,
549,
17444,
427,
96,
14878,
257,
121,
3274,
3,
31,
382,
402,
10395,
7,
173,
106,
3657,
23,
209,
31,
1,
-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, return a bar chart about the distribution of job_id and the sum of department_id , and group by attribute job_id, and display from high to low by the y axis. | CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE 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 job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
) | SELECT JOB_ID, SUM(DEPARTMENT_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY SUM(DEPARTMENT_ID) DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1652,
41,
262,
5244,
5017,
476,
5080,
834,
4309,
7908,
1982,
599,
11071,
632,
201,
30085,
834,
567,
17683,
3,
4331,
4059,
599,
1755,
201,
301,
12510,
834,
567,
17683,
3,
4331,
4059,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
446,
10539,
834,
4309,
6,
180,
6122,
599,
5596,
19846,
11810,
834,
4309,
61,
21680,
1652,
549,
17444,
427,
180,
4090,
24721,
272,
7969,
518,
23394,
3,
25129,
3430,
586,
2313,
3430,
3,
6657,
329,
16994,
9215,
834,
4051... |
Return a bar chart about the distribution of middle_name and author_id . | CREATE TABLE Courses (
course_id INTEGER,
author_id INTEGER,
subject_id INTEGER,
course_name VARCHAR(120),
course_description VARCHAR(255)
)
CREATE TABLE Student_Course_Enrolment (
registration_id INTEGER,
student_id INTEGER,
course_id INTEGER,
date_of_enrolment DATETIME,
date_of_completion DATETIME
)
CREATE TABLE Course_Authors_and_Tutors (
author_id INTEGER,
author_tutor_ATB VARCHAR(3),
login_name VARCHAR(40),
password VARCHAR(40),
personal_name VARCHAR(80),
middle_name VARCHAR(80),
family_name VARCHAR(80),
gender_mf VARCHAR(1),
address_line_1 VARCHAR(80)
)
CREATE TABLE Student_Tests_Taken (
registration_id INTEGER,
date_test_taken DATETIME,
test_result VARCHAR(255)
)
CREATE TABLE Students (
student_id INTEGER,
date_of_registration DATETIME,
date_of_latest_logon DATETIME,
login_name VARCHAR(40),
password VARCHAR(10),
personal_name VARCHAR(40),
middle_name VARCHAR(40),
family_name VARCHAR(40)
)
CREATE TABLE Subjects (
subject_id INTEGER,
subject_name VARCHAR(120)
) | SELECT middle_name, author_id FROM Course_Authors_and_Tutors ORDER BY personal_name | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
8670,
7,
41,
503,
834,
23,
26,
3,
21342,
17966,
6,
2291,
834,
23,
26,
3,
21342,
17966,
6,
1426,
834,
23,
26,
3,
21342,
17966,
6,
503,
834,
4350,
584,
4280,
28027,
599,
15518,
201,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2214,
834,
4350,
6,
2291,
834,
23,
26,
21680,
8670,
834,
23602,
127,
7,
834,
232,
834,
28676,
7,
4674,
11300,
272,
476,
525,
834,
4350,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the best top 10 when there are fewer than 0 wins? | CREATE TABLE table_name_30 (top_10s INTEGER, wins INTEGER) | SELECT MAX(top_10s) FROM table_name_30 WHERE wins < 0 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1458,
41,
2916,
834,
1714,
7,
3,
21342,
17966,
6,
9204,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
200,
420,
335,
116,
132,
33,
3,
10643,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4800,
4,
599,
2916,
834,
1714,
7,
61,
21680,
953,
834,
4350,
834,
1458,
549,
17444,
427,
9204,
3,
2,
3,
632,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Count the average age of patients who are still living with a known history of st elevation myocardial infarction/cardiac catheterization as the primary disease. | 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
)
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 AVG(demographic.age) FROM demographic WHERE demographic.expire_flag = "0" AND demographic.diagnosis = "ST ELEVATED MYOCARDIAL INFARCTION\CARDIAC CATH" | [
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,
71,
17217,
599,
1778,
16587,
5,
545,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
994,
2388,
15,
834,
89,
5430,
3274,
96,
632,
121,
3430,
14798,
5,
25930,
4844,
159,
3274,
96,
4209,
3,
16479,
8230,
11430,
283,
476,
... |
When 1872-10-10 is the founding date what are the canadian chapters? | CREATE TABLE table_30522 (
"Letters" text,
"Organization" text,
"Nickname" text,
"Founding Date" text,
"Founding University" text,
"Type" text,
"Canadian Chapters" text
) | SELECT "Canadian Chapters" FROM table_30522 WHERE "Founding Date" = '1872-10-10' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26724,
2884,
41,
96,
434,
15583,
7,
121,
1499,
6,
96,
14878,
257,
121,
1499,
6,
96,
567,
3142,
4350,
121,
1499,
6,
96,
371,
32,
1106,
53,
7678,
121,
1499,
6,
96,
371,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
14050,
9,
8603,
8647,
7,
121,
21680,
953,
834,
26724,
2884,
549,
17444,
427,
96,
371,
32,
1106,
53,
7678,
121,
3274,
3,
31,
25828,
357,
4536,
4536,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Find the id and number of shops for the company that produces the most expensive furniture. | CREATE TABLE manufacturer (
manufacturer_id VARCHAR,
num_of_shops VARCHAR
)
CREATE TABLE furniture_manufacte (
manufacturer_id VARCHAR,
Price_in_Dollar VARCHAR
) | SELECT t1.manufacturer_id, t1.num_of_shops FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id ORDER BY t2.Price_in_Dollar DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4818,
41,
4818,
834,
23,
26,
584,
4280,
28027,
6,
3,
5525,
834,
858,
834,
6921,
7,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
1991,
834,
348,
76,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17,
5411,
348,
76,
8717,
450,
49,
834,
23,
26,
6,
3,
17,
5411,
5525,
834,
858,
834,
6921,
7,
21680,
4818,
6157,
3,
17,
536,
3,
15355,
3162,
1991,
834,
348,
76,
8717,
15,
6157,
3,
17,
357,
9191,
3,
17,
541... |
What is the total silver with a Rank larger than 9, and a Total larger than 1? | CREATE TABLE table_name_94 (
silver INTEGER,
rank VARCHAR,
total VARCHAR
) | SELECT SUM(silver) FROM table_name_94 WHERE rank > 9 AND total > 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4240,
41,
4294,
3,
21342,
17966,
6,
11003,
584,
4280,
28027,
6,
792,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
792,
4294,
28,
3,
9,
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,
180,
6122,
599,
7,
173,
624,
61,
21680,
953,
834,
4350,
834,
4240,
549,
17444,
427,
11003,
2490,
668,
3430,
792,
2490,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is the diagnosis icd9 code and diagnosis long title of the patient wtih patient id 53707? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE 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 diagnoses.icd9_code, diagnoses.long_title FROM diagnoses WHERE diagnoses.subject_id = "53707" | [
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,
18730,
7,
5,
447,
26,
1298,
834,
4978,
6,
18730,
7,
5,
2961,
834,
21869,
21680,
18730,
7,
549,
17444,
427,
18730,
7,
5,
7304,
11827,
834,
23,
26,
3274,
96,
4867,
2518,
940,
121,
1,
-100,
-100,
-100,
-100,
-100,
... |
What is the title of the album that has Popup has the original label? | CREATE TABLE table_41703 (
"Album title" text,
"Format" text,
"Year" real,
"Original label" text,
"Chart positions" text
) | SELECT "Album title" FROM table_41703 WHERE "Original label" = 'popup' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4853,
2518,
519,
41,
96,
25691,
440,
2233,
121,
1499,
6,
96,
3809,
3357,
121,
1499,
6,
96,
476,
2741,
121,
490,
6,
96,
667,
3380,
10270,
3783,
121,
1499,
6,
96,
18947,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
25691,
440,
2233,
121,
21680,
953,
834,
4853,
2518,
519,
549,
17444,
427,
96,
667,
3380,
10270,
3783,
121,
3274,
3,
31,
9791,
413,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What year ranked larger than 5? | CREATE TABLE table_55621 (
"Year" real,
"Rank" real,
"Games" real,
"Win%" real,
"Postseason" text
) | SELECT "Year" FROM table_55621 WHERE "Rank" > '5' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3769,
4056,
536,
41,
96,
476,
2741,
121,
490,
6,
96,
22557,
121,
490,
6,
96,
23055,
7,
121,
490,
6,
96,
18455,
1454,
121,
490,
6,
96,
22507,
9476,
121,
1499,
3,
61,
3,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
96,
476,
2741,
121,
21680,
953,
834,
3769,
4056,
536,
549,
17444,
427,
96,
22557,
121,
2490,
3,
31,
755,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What was the final score of Game 1? | CREATE TABLE table_name_28 (
score VARCHAR,
game VARCHAR
) | SELECT score FROM table_name_28 WHERE game = 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2577,
41,
2604,
584,
4280,
28027,
6,
467,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
804,
2604,
13,
4435,
209,
58,
1,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2604,
21680,
953,
834,
4350,
834,
2577,
549,
17444,
427,
467,
3274,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
For those records from the products and each product's manufacturer, draw a bar chart about the distribution of name and the sum of code , and group by attribute name, rank by the y axis in ascending. | CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | SELECT T2.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T1.Code | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
15248,
7,
41,
3636,
3,
21342,
17966,
6,
5570,
584,
4280,
28027,
599,
25502,
201,
3642,
19973,
584,
4280,
28027,
599,
25502,
201,
3,
19145,
584,
4280,
28027,
599,
25502,
201,
19764,
17833... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
332,
4416,
23954,
6,
332,
5411,
22737,
21680,
7554,
6157,
332,
536,
3,
15355,
3162,
15248,
7,
6157,
332,
357,
9191,
332,
5411,
7296,
76,
8717,
450,
49,
3274,
332,
4416,
22737,
350,
4630,
6880,
272,
476,
332,
4416,
2... |
Show all majors. | CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
)
CREATE TABLE allergy_type (
allergy text,
allergytype text
)
CREATE TABLE has_allergy (
stuid number,
allergy text
) | SELECT DISTINCT major FROM student | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1236,
41,
21341,
23,
26,
381,
6,
3,
40,
4350,
1499,
6,
3,
89,
4350,
1499,
6,
1246,
381,
6,
3,
7,
994,
1499,
6,
779,
381,
6,
8815,
381,
6,
690,
834,
4978,
1499,
3,
61,
3,
3210... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
15438,
25424,
6227,
779,
21680,
1236,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
How many draws has lower than rank 10 in rumba/cha-cha/jazz dance? | CREATE TABLE table_name_65 (
draw VARCHAR,
rank VARCHAR,
dance_styles VARCHAR
) | SELECT COUNT(draw) FROM table_name_65 WHERE rank < 10 AND dance_styles = "rumba/cha-cha/jazz dance" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4122,
41,
3314,
584,
4280,
28027,
6,
11003,
584,
4280,
28027,
6,
2595,
834,
4084,
7,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
14924,
65,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
19489,
61,
21680,
953,
834,
4350,
834,
4122,
549,
17444,
427,
11003,
3,
2,
335,
3430,
2595,
834,
4084,
7,
3274,
96,
52,
5937,
9,
87,
3441,
18,
3441,
87,
1191,
5271,
2595,
121,
1,
-100,
-100,
-100... |
What was the winning score on Jan 22, 1995 when the margin of victory was 1 stroke? | CREATE TABLE table_name_32 (winning_score VARCHAR, margin_of_victory VARCHAR, date VARCHAR) | SELECT winning_score FROM table_name_32 WHERE margin_of_victory = "1 stroke" AND date = "jan 22, 1995" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2668,
41,
8163,
834,
7,
9022,
584,
4280,
28027,
6,
6346,
834,
858,
834,
7287,
10972,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
3,
23143,
14196,
3447,
834,
7,
9022,
21680,
953,
834,
4350,
834,
2668,
549,
17444,
427,
6346,
834,
858,
834,
7287,
10972,
3274,
96,
536,
9529,
121,
3430,
833,
3274,
96,
7066,
12889,
7273,
121,
1,
-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.