NATURAL_LANG stringlengths 0 446 | SCHEMA stringlengths 27 2.21k | SQL stringlengths 18 453 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|
what is the maximum age of patients whose marital status is divorced and admission type is emergency? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
) | SELECT MAX(demographic.age) FROM demographic WHERE demographic.marital_status = "DIVORCED" AND demographic.admission_type = "EMERGENCY" | [
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,
4800,
4,
599,
1778,
16587,
5,
545,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
1635,
9538,
834,
8547,
302,
3274,
96,
308,
7589,
2990,
254,
2326,
121,
3430,
14798,
5,
9,
26,
5451,
834,
6137,
3274,
96,
427,
13098,
... |
how many games did the bombers win ? | CREATE TABLE table_204_227 (
id number,
"week" number,
"date" text,
"opponent" text,
"score" text,
"result" text,
"record" text
) | SELECT COUNT(*) FROM table_204_227 WHERE "result" = 'win' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
357,
2555,
41,
3,
23,
26,
381,
6,
96,
8041,
121,
381,
6,
96,
5522,
121,
1499,
6,
96,
32,
102,
9977,
121,
1499,
6,
96,
7,
9022,
121,
1499,
6,
96,
60,
7,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
953,
834,
26363,
834,
357,
2555,
549,
17444,
427,
96,
60,
7,
83,
17,
121,
3274,
3,
31,
3757,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Show all customer ids and the number of accounts for each customer. | CREATE TABLE financial_transactions (
transaction_id number,
previous_transaction_id number,
account_id number,
card_id number,
transaction_type text,
transaction_date time,
transaction_amount number,
transaction_comment text,
other_transaction_details text
)
CREATE TABLE customers (
customer_id number,
customer_first_name text,
customer_last_name text,
customer_address text,
customer_phone text,
customer_email text,
other_customer_details text
)
CREATE TABLE customers_cards (
card_id number,
customer_id number,
card_type_code text,
card_number text,
date_valid_from time,
date_valid_to time,
other_card_details text
)
CREATE TABLE accounts (
account_id number,
customer_id number,
account_name text,
other_account_details text
) | SELECT customer_id, COUNT(*) FROM accounts GROUP BY customer_id | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
981,
834,
7031,
4787,
7,
41,
5878,
834,
23,
26,
381,
6,
1767,
834,
7031,
4787,
834,
23,
26,
381,
6,
905,
834,
23,
26,
381,
6,
895,
834,
23,
26,
381,
6,
5878,
834,
6137,
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,
884,
834,
23,
26,
6,
2847,
17161,
599,
1935,
61,
21680,
3744,
350,
4630,
6880,
272,
476,
884,
834,
23,
26,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
who has the largest amount of teams , men 's , women , or mixed ? | CREATE TABLE table_204_132 (
id number,
"year" number,
"location" text,
"men's individual" text,
"women's individual" text,
"men's team" text,
"women's team" text,
"mixed team" text,
"ref" number
) | SELECT "men's team" FROM table_204_132 GROUP BY "men's team" ORDER BY COUNT(*) DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
23757,
41,
3,
23,
26,
381,
6,
96,
1201,
121,
381,
6,
96,
14836,
121,
1499,
6,
96,
904,
31,
7,
928,
121,
1499,
6,
96,
210,
32,
904,
31,
7,
928,
121,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
904,
31,
7,
372,
121,
21680,
953,
834,
26363,
834,
23757,
350,
4630,
6880,
272,
476,
96,
904,
31,
7,
372,
121,
4674,
11300,
272,
476,
2847,
17161,
599,
1935,
61,
309,
25067,
8729,
12604,
209,
1,
-100,
-100,
-1... |
For those records from the products and each product's manufacturer, draw a bar chart about the distribution of headquarter and the sum of price , and group by attribute headquarter, I want to sort y axis in desc order. | CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) | SELECT Headquarter, SUM(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY SUM(Price) DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7554,
41,
3636,
3,
21342,
17966,
6,
5570,
584,
4280,
28027,
599,
25502,
201,
5312,
3396,
254,
26330,
434,
6,
15248,
3,
21342,
17966,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3642,
19973,
6,
180,
6122,
599,
345,
4920,
61,
21680,
7554,
6157,
332,
536,
3,
15355,
3162,
15248,
7,
6157,
332,
357,
9191,
332,
5411,
7296,
76,
8717,
450,
49,
3274,
332,
4416,
22737,
350,
4630,
6880,
272,
476,
3642... |
What is the leading cause of wildfires? | CREATE TABLE fires (
fire_year number,
discovery_date number,
discovery_doy number,
discovery_time text,
stat_cause_code number,
stat_cause_descr text,
cont_date text,
cont_doy text,
cont_time text,
fire_size number,
fire_size_class text,
latitude number,
longitude number,
owner_code number,
owner_descr text,
state text,
county text,
fips_code text,
fips_name text
) | SELECT stat_cause_descr FROM fires GROUP BY stat_cause_descr ORDER BY COUNT(*) DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1472,
7,
41,
1472,
834,
1201,
381,
6,
9087,
834,
5522,
381,
6,
9087,
834,
26,
32,
63,
381,
6,
9087,
834,
715,
1499,
6,
3089,
834,
658,
1074,
834,
4978,
381,
6,
3089,
834,
658,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3089,
834,
658,
1074,
834,
26,
1579,
52,
21680,
1472,
7,
350,
4630,
6880,
272,
476,
3089,
834,
658,
1074,
834,
26,
1579,
52,
4674,
11300,
272,
476,
2847,
17161,
599,
1935,
61,
309,
25067,
8729,
12604,
209,
1,
-100,
... |
what number of patients have been discharged from the hospital in 2101? | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
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 medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
) | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE NOT patient.hospitaldischargetime IS NULL AND STRFTIME('%y', patient.hospitaldischargetime) = '2101' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7690,
41,
50,
9824,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
7690,
4350,
1499,
6,
50,
1999,
7,
83,
17,
381,
6,
50,
1999,
7,
83,
17,
715,
97,
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,
2847,
17161,
599,
15438,
25424,
6227,
1868,
5,
202,
1495,
12417,
61,
21680,
1868,
549,
17444,
427,
4486,
1868,
5,
31386,
26,
159,
7993,
715,
6827,
13046,
10376,
3430,
3,
13733,
6245,
15382,
599,
31,
1454,
63,
31,
6,
... |
What was the aggregate score for the game against Dynamo Dresden? | CREATE TABLE table_name_66 (
aggregate_score VARCHAR,
opposition VARCHAR
) | SELECT aggregate_score FROM table_name_66 WHERE opposition = "dynamo dresden" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3539,
41,
12955,
834,
7,
9022,
584,
4280,
28027,
6,
8263,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
12955,
2604,
21,
8,
467,
581,
13967... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12955,
834,
7,
9022,
21680,
953,
834,
4350,
834,
3539,
549,
17444,
427,
8263,
3274,
96,
24805,
51,
32,
3,
26,
60,
7,
537,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
how many patients whose death status is 1 and diagnoses short title is fall nos? | 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
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "1" AND diagnoses.short_title = "Fall NOS" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
5... |
How many games were held on January 5? | CREATE TABLE table_29734 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT COUNT("Game") FROM table_29734 WHERE "Date" = 'January 5' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
4327,
3710,
41,
96,
23055,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
18699,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
21417,
979,
121,
1499,
6,
96,
21417,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
23055,
8512,
21680,
953,
834,
357,
4327,
3710,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
30404,
305,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What county is the town with a rank of 205 located in? | CREATE TABLE table_name_78 (county VARCHAR, population_rank VARCHAR) | SELECT county FROM table_name_78 WHERE population_rank = 205 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3940,
41,
13362,
63,
584,
4280,
28027,
6,
2074,
834,
6254,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
5435,
19,
8,
1511,
28,
3,
9,
11003,
13,
3,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
5435,
21680,
953,
834,
4350,
834,
3940,
549,
17444,
427,
2074,
834,
6254,
3274,
3,
23201,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the series of the episode directed by Abe Levitow released on 1959-06-27? | CREATE TABLE table_name_63 (
series VARCHAR,
director VARCHAR,
release_date VARCHAR
) | SELECT series FROM table_name_63 WHERE director = "abe levitow" AND release_date = "1959-06-27" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3891,
41,
939,
584,
4280,
28027,
6,
2090,
584,
4280,
28027,
6,
1576,
834,
5522,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
939,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
3,
23143,
14196,
939,
21680,
953,
834,
4350,
834,
3891,
549,
17444,
427,
2090,
3274,
96,
9,
346,
90,
5566,
2381,
121,
3430,
1576,
834,
5522,
3274,
96,
2294,
3390,
18,
5176,
18,
2555,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Who plays halfback? | CREATE TABLE table_63832 (
"Pick" real,
"Team" text,
"Player" text,
"Position" text,
"College" text
) | SELECT "Player" FROM table_63832 WHERE "Position" = 'halfback' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3891,
4591,
357,
41,
96,
345,
3142,
121,
490,
6,
96,
18699,
121,
1499,
6,
96,
15800,
49,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
9939,
7883,
121,
1499,
3,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
96,
15800,
49,
121,
21680,
953,
834,
3891,
4591,
357,
549,
17444,
427,
96,
345,
32,
7,
4749,
121,
3274,
3,
31,
17114,
1549,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What district re-elected a Republican? | CREATE TABLE table_59879 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Results" text
) | SELECT "District" FROM table_59879 WHERE "Party" = 'republican' AND "Results" = 're-elected' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
755,
3916,
4440,
41,
96,
308,
23,
20066,
121,
1499,
6,
96,
1570,
75,
5937,
295,
121,
1499,
6,
96,
13725,
63,
121,
1499,
6,
96,
25171,
8160,
121,
490,
6,
96,
20119,
7,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
308,
23,
20066,
121,
21680,
953,
834,
755,
3916,
4440,
549,
17444,
427,
96,
13725,
63,
121,
3274,
3,
31,
60,
15727,
152,
31,
3430,
96,
20119,
7,
121,
3274,
3,
31,
60,
18,
19971,
31,
1,
-100,
-100,
-100,
-100... |
How many copies were sold where the position is lager than 1 in 1988? | CREATE TABLE table_35901 (
"Year" real,
"Album" text,
"Oricon position" real,
"1st week sales" text,
"Copies sold" text
) | SELECT "Copies sold" FROM table_35901 WHERE "Oricon position" > '1' AND "Year" = '1988' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2469,
2394,
536,
41,
96,
476,
2741,
121,
490,
6,
96,
25691,
440,
121,
1499,
6,
96,
7395,
23,
1018,
1102,
121,
490,
6,
96,
536,
7,
17,
471,
1085,
121,
1499,
6,
96,
3881,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3881,
8497,
1916,
121,
21680,
953,
834,
2469,
2394,
536,
549,
17444,
427,
96,
7395,
23,
1018,
1102,
121,
2490,
3,
31,
536,
31,
3430,
96,
476,
2741,
121,
3274,
3,
31,
2294,
4060,
31,
1,
-100,
-100,
-100,
-100,
... |
2007 of 8 4 is involved in what 2002? | CREATE TABLE table_name_69 (
Id VARCHAR
) | SELECT 2002 FROM table_name_69 WHERE 2007 = "8–4" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3951,
41,
27,
26,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4101,
13,
505,
314,
19,
1381,
16,
125,
4407,
58,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4407,
21680,
953,
834,
4350,
834,
3951,
549,
17444,
427,
4101,
3274,
96,
927,
104,
20364,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the score of the game played on August 5? | CREATE TABLE table_name_66 (score VARCHAR, date VARCHAR) | SELECT score FROM table_name_66 WHERE date = "august 5" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3539,
41,
7,
9022,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
2604,
13,
8,
467,
1944,
30,
1660,
305,
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,
2604,
21680,
953,
834,
4350,
834,
3539,
549,
17444,
427,
833,
3274,
96,
402,
17198,
3,
17395,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
how many actors have appeared in each musical?, and list from low to high by the y-axis please. | CREATE TABLE actor (
Actor_ID int,
Name text,
Musical_ID int,
Character text,
Duration text,
age int
)
CREATE TABLE musical (
Musical_ID int,
Name text,
Year int,
Award text,
Category text,
Nominee text,
Result text
) | SELECT T2.Name, COUNT(*) FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID ORDER BY COUNT(*) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7556,
41,
1983,
127,
834,
4309,
16,
17,
6,
5570,
1499,
6,
22307,
834,
4309,
16,
17,
6,
20087,
1499,
6,
20610,
1499,
6,
1246,
16,
17,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
332,
4416,
23954,
6,
2847,
17161,
599,
1935,
61,
21680,
7556,
6157,
332,
536,
3,
15355,
3162,
4183,
6157,
332,
357,
9191,
332,
5411,
29035,
138,
834,
4309,
3274,
332,
4416,
29035,
138,
834,
4309,
350,
4630,
6880,
272,... |
Who are the outgoing head coaches whose manner of departure is Gardening Leave 1? | CREATE TABLE table_29171931_3 (
outgoing_head_coach VARCHAR,
manner_of_departure VARCHAR
) | SELECT outgoing_head_coach FROM table_29171931_3 WHERE manner_of_departure = "Gardening leave 1" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3166,
2517,
2294,
3341,
834,
519,
41,
91,
9545,
834,
3313,
834,
509,
1836,
584,
4280,
28027,
6,
3107,
834,
858,
834,
221,
2274,
1462,
584,
4280,
28027,
3,
61,
3,
32102,
321... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
91,
9545,
834,
3313,
834,
509,
1836,
21680,
953,
834,
3166,
2517,
2294,
3341,
834,
519,
549,
17444,
427,
3107,
834,
858,
834,
221,
2274,
1462,
3274,
96,
21846,
537,
53,
1175,
209,
121,
1,
-100,
-100,
-100,
-100,
-10... |
Who was the developer(s) of the genre Adventure? | CREATE TABLE table_name_22 (developer_s_ VARCHAR, genre VARCHAR) | SELECT developer_s_ FROM table_name_22 WHERE genre = "adventure" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2884,
41,
29916,
49,
834,
7,
834,
584,
4280,
28027,
6,
5349,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
8,
7523,
599,
7,
61,
13,
8,
5349,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7523,
834,
7,
834,
21680,
953,
834,
4350,
834,
2884,
549,
17444,
427,
5349,
3274,
96,
9,
26,
2169,
1462,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
1980 smaller than 719, and a 1960 smaller than 205, and a 1996[2] smaller than 364, and a 1970 larger than 251 is what 1990 highest? | CREATE TABLE table_36166 (
"1950" real,
"1960" real,
"1970" real,
"1980" real,
"1990" real,
"1996[2]" real
) | SELECT MAX("1990") FROM table_36166 WHERE "1980" < '719' AND "1960" < '205' AND "1996[2]" < '364' AND "1970" > '251' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3420,
26811,
41,
96,
2294,
1752,
121,
490,
6,
96,
2294,
3328,
121,
490,
6,
96,
2294,
2518,
121,
490,
6,
96,
2294,
2079,
121,
490,
6,
96,
2294,
2394,
121,
490,
6,
96,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
121,
2294,
2394,
8512,
21680,
953,
834,
3420,
26811,
549,
17444,
427,
96,
2294,
2079,
121,
3,
2,
3,
31,
940,
2294,
31,
3430,
96,
2294,
3328,
121,
3,
2,
3,
31,
23201,
31,
3430,
96,
2294,
4314,
6306,... |
What time did team kawasaki zx10 1000cc have? | CREATE TABLE table_name_72 (time VARCHAR, team VARCHAR) | SELECT time FROM table_name_72 WHERE team = "kawasaki zx10 1000cc" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5865,
41,
715,
584,
4280,
28027,
6,
372,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
97,
410,
372,
3,
1258,
9491,
11259,
3,
172,
226,
1714,
5580,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5865,
549,
17444,
427,
372,
3274,
96,
1258,
9491,
11259,
3,
172,
226,
1714,
5580,
75,
75,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the class when the frequency is 560 AM? | CREATE TABLE table_name_57 (
class VARCHAR,
frequency VARCHAR
) | SELECT class FROM table_name_57 WHERE frequency = "560 am" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3436,
41,
853,
584,
4280,
28027,
6,
7321,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
853,
116,
8,
7321,
19,
305,
3328,
5422,
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,
853,
21680,
953,
834,
4350,
834,
3436,
549,
17444,
427,
7321,
3274,
96,
755,
3328,
183,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What Best Bowl is it that has 151 Matches and 1 100s? | CREATE TABLE table_15732 (
"Matches" real,
"Runs" real,
"Bat Ave" real,
"High Score" text,
"100s" real,
"Wickets" real,
"Bowl Ave" real,
"Best Bowl" text
) | SELECT "Best Bowl" FROM table_15732 WHERE "100s" = '1' AND "Matches" = '151' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
27452,
2668,
41,
96,
329,
144,
2951,
121,
490,
6,
96,
448,
202,
7,
121,
490,
6,
96,
279,
144,
8945,
121,
490,
6,
96,
21417,
17763,
121,
1499,
6,
96,
2915,
7,
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,
17278,
9713,
121,
21680,
953,
834,
27452,
2668,
549,
17444,
427,
96,
2915,
7,
121,
3274,
3,
31,
536,
31,
3430,
96,
329,
144,
2951,
121,
3274,
3,
31,
26578,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What score did vasil levski national stadium, sofia, which was friendly during competition, earn? | CREATE TABLE table_31553 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) | SELECT "Score" FROM table_31553 WHERE "Competition" = 'friendly' AND "Venue" = 'vasil levski national stadium, sofia' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
519,
1808,
4867,
41,
96,
308,
342,
121,
1499,
6,
96,
553,
35,
76,
15,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
20119,
121,
1499,
6,
96,
5890,
4995,
4749,
121,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
134,
9022,
121,
21680,
953,
834,
519,
1808,
4867,
549,
17444,
427,
96,
5890,
4995,
4749,
121,
3274,
3,
31,
4905,
31,
3430,
96,
553,
35,
76,
15,
121,
3274,
3,
31,
9856,
173,
3,
10912,
4009,
1157,
14939,
6,
78... |
How many silver medals were won in 1938? | CREATE TABLE table_44889 (
"Year" text,
"Gold" text,
"Silver" text,
"Bronze" text,
"Total" text
) | SELECT "Silver" FROM table_44889 WHERE "Year" = '1938' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
3707,
3914,
41,
96,
476,
2741,
121,
1499,
6,
96,
23576,
121,
1499,
6,
96,
134,
173,
624,
121,
1499,
6,
96,
22780,
29,
776,
121,
1499,
6,
96,
3696,
1947,
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,
0,
0... | [
3,
23143,
14196,
96,
134,
173,
624,
121,
21680,
953,
834,
591,
3707,
3914,
549,
17444,
427,
96,
476,
2741,
121,
3274,
3,
31,
2294,
3747,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
give the discharge location of kelly gallardo. | 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
)
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 demographic.discharge_location FROM demographic WHERE demographic.name = "Kelly Gallardo" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
14798,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
564,
1499,
6,
2774,
1947,
834,
8547,
302,
1499,
6,
1246,
1499,
6,
103,
115,
1499,
6,
7285,
1499,
6,
1612,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
14798,
5,
26,
159,
7993,
834,
14836,
21680,
14798,
549,
17444,
427,
14798,
5,
4350,
3274,
96,
439,
15,
6073,
10987,
986,
32,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the total number of every ship type by categorizing by nationality?, list by the bar in ascending. | CREATE TABLE mission (
Mission_ID int,
Ship_ID int,
Code text,
Launched_Year int,
Location text,
Speed_knots int,
Fate text
)
CREATE TABLE ship (
Ship_ID int,
Name text,
Type text,
Nationality text,
Tonnage int
) | SELECT Type, COUNT(Type) FROM ship GROUP BY Nationality, Type ORDER BY Type | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2253,
41,
8960,
834,
4309,
16,
17,
6,
15508,
834,
4309,
16,
17,
6,
3636,
1499,
6,
17113,
15,
26,
834,
476,
2741,
16,
17,
6,
10450,
1499,
6,
9913,
834,
157,
2264,
7,
16,
17,
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,
6632,
6,
2847,
17161,
599,
25160,
61,
21680,
4383,
350,
4630,
6880,
272,
476,
868,
485,
6,
6632,
4674,
11300,
272,
476,
6632,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Which city has a First season of current spell in Segunda Divisi n smaller than 2013? | CREATE TABLE table_name_69 (
city VARCHAR,
first_season_of_current_spell_in_segunda_división INTEGER
) | SELECT city FROM table_name_69 WHERE first_season_of_current_spell_in_segunda_división < 2013 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3951,
41,
690,
584,
4280,
28027,
6,
166,
834,
9476,
834,
858,
834,
14907,
834,
7,
19510,
834,
77,
834,
7,
15,
122,
1106,
9,
834,
8481,
159,
23,
15742,
3,
21342... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
690,
21680,
953,
834,
4350,
834,
3951,
549,
17444,
427,
166,
834,
9476,
834,
858,
834,
14907,
834,
7,
19510,
834,
77,
834,
7,
15,
122,
1106,
9,
834,
8481,
159,
23,
15742,
3,
2,
2038,
1,
-100,
-100,
-100,
-100,
-... |
For the player that scored 27 goals, what years did he score them? | CREATE TABLE table_60920 (
"Ranking" text,
"Nationality" text,
"Name" text,
"Years" text,
"Goals" real
) | SELECT "Years" FROM table_60920 WHERE "Goals" = '27' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3328,
27749,
41,
96,
22557,
53,
121,
1499,
6,
96,
24732,
485,
121,
1499,
6,
96,
23954,
121,
1499,
6,
96,
476,
2741,
7,
121,
1499,
6,
96,
6221,
5405,
121,
490,
3,
61,
3,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
476,
2741,
7,
121,
21680,
953,
834,
3328,
27749,
549,
17444,
427,
96,
6221,
5405,
121,
3274,
3,
31,
2555,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
How many draws were there in played games? | CREATE TABLE table_22019 (
"Club" text,
"Played" text,
"Won" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text,
"Losing bonus" text,
"Points" text
) | SELECT "Drawn" FROM table_22019 WHERE "Played" = 'Played' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
8584,
41,
96,
254,
11158,
121,
1499,
6,
96,
15800,
15,
26,
121,
1499,
6,
96,
518,
106,
121,
1499,
6,
96,
308,
10936,
29,
121,
1499,
6,
96,
434,
3481,
121,
1499,
6,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
308,
10936,
29,
121,
21680,
953,
834,
357,
8584,
549,
17444,
427,
96,
15800,
15,
26,
121,
3274,
3,
31,
15800,
15,
26,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the lowest year that has hypo-meeting as the tournament, with 8002 as the points? | CREATE TABLE table_name_52 (
year INTEGER,
tournament VARCHAR,
points VARCHAR
) | SELECT MIN(year) FROM table_name_52 WHERE tournament = "hypo-meeting" AND points = "8002" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5373,
41,
215,
3,
21342,
17966,
6,
5892,
584,
4280,
28027,
6,
979,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
7402,
215,
24,
65,
10950,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3,
17684,
599,
1201,
61,
21680,
953,
834,
4350,
834,
5373,
549,
17444,
427,
5892,
3274,
96,
13397,
32,
18,
526,
15,
1222,
121,
3430,
979,
3274,
96,
6192,
357,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What Silver has the Location of Guangzhou? | CREATE TABLE table_74888 (
"Year" real,
"Location" text,
"Gold" text,
"Silver" text,
"Bronze" text
) | SELECT "Silver" FROM table_74888 WHERE "Location" = 'guangzhou' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4581,
10927,
41,
96,
476,
2741,
121,
490,
6,
96,
434,
32,
75,
257,
121,
1499,
6,
96,
23576,
121,
1499,
6,
96,
134,
173,
624,
121,
1499,
6,
96,
22780,
29,
776,
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,
0... | [
3,
23143,
14196,
96,
134,
173,
624,
121,
21680,
953,
834,
4581,
10927,
549,
17444,
427,
96,
434,
32,
75,
257,
121,
3274,
3,
31,
1744,
1468,
25303,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
give me the number of patients with diagnoses icd9 code 59654 who were hospitalized for more than 6 days. | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE 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
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "6" AND diagnoses.icd9_code = "59654" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
5... |
What ship was built by Palmers Shipbuilding and Iron Company for the Royal Navy? | CREATE TABLE table_13009 (
"Country" text,
"Builder" text,
"Location" text,
"Ship" text,
"Class / type" text
) | SELECT "Ship" FROM table_13009 WHERE "Country" = 'royal navy' AND "Builder" = 'palmers shipbuilding and iron company' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
21448,
4198,
41,
96,
10628,
651,
121,
1499,
6,
96,
24752,
49,
121,
1499,
6,
96,
434,
32,
75,
257,
121,
1499,
6,
96,
134,
10462,
121,
1499,
6,
96,
21486,
3,
87,
686,
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,
134,
10462,
121,
21680,
953,
834,
21448,
4198,
549,
17444,
427,
96,
10628,
651,
121,
3274,
3,
31,
8170,
138,
23118,
31,
3430,
96,
24752,
49,
121,
3274,
3,
31,
6459,
5567,
4383,
10905,
11,
3575,
349,
31,
1,
-10... |
What Conference was during the NCAA Tournament? | CREATE TABLE table_5285 (
"Date" text,
"Opponent" text,
"Location" text,
"Result" text,
"Overall" text,
"Conf." text
) | SELECT "Conf." FROM table_5285 WHERE "Date" = 'ncaa tournament' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
5373,
4433,
41,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
434,
32,
75,
257,
121,
1499,
6,
96,
20119,
121,
1499,
6,
96,
23847,
1748,
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,
4302,
89,
535,
21680,
953,
834,
5373,
4433,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
29,
658,
9,
5892,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
How many Matches have Balls smaller than 224, and an Average larger than 38.25, and an S/Rate larger than 139.09? | CREATE TABLE table_name_87 (
matches INTEGER,
s_rate VARCHAR,
balls VARCHAR,
average VARCHAR
) | SELECT SUM(matches) FROM table_name_87 WHERE balls < 224 AND average > 38.25 AND s_rate > 139.09 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4225,
41,
6407,
3,
21342,
17966,
6,
3,
7,
834,
2206,
584,
4280,
28027,
6,
11607,
584,
4280,
28027,
6,
1348,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
3210... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
19515,
15,
7,
61,
21680,
953,
834,
4350,
834,
4225,
549,
17444,
427,
11607,
3,
2,
3,
24622,
3430,
1348,
2490,
6654,
5,
1828,
3430,
3,
7,
834,
2206,
2490,
3,
24090,
5,
4198,
1,
-100,
-100,
-100,
-... |
how many patients with elective admission type were given the drug rosiglitazone maleate? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND prescriptions.drug = "Rosiglitazone Maleate" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7744,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7744,
7,
5,
8399,
51,
834,
23,
26,
549... |
What was the world rank by ARWU in 2013 of the University of T bingen? | CREATE TABLE table_29538 (
"Members" text,
"Country" text,
"Year Established" real,
"World Rank by THE-WUR , 2013" text,
"World Rank by ARWU , 2013" text,
"World Rank by QS , 2013" text
) | SELECT "World Rank by ARWU , 2013" FROM table_29538 WHERE "Members" = 'University of Tübingen' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
3301,
3747,
41,
96,
329,
18247,
7,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
476,
2741,
25275,
121,
490,
6,
96,
17954,
3,
22557,
57,
1853,
18,
518,
5905,
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,
17954,
3,
22557,
57,
11155,
518,
1265,
3,
6,
2038,
121,
21680,
953,
834,
357,
3301,
3747,
549,
17444,
427,
96,
329,
18247,
7,
121,
3274,
3,
31,
8313,
485,
13,
332,
1272,
115,
53,
35,
31,
1,
-100,
-100,
-100,... |
What are the gaols(L/C/E) with an App(L/C/E) of 55 (47/5/3)? | CREATE TABLE table_46011 (
"Nat." text,
"Name" text,
"Since" text,
"App(L/C/E)" text,
"Goals(L/C/E)" text,
"Ends" real,
"Transfer fee" text
) | SELECT "Goals(L/C/E)" FROM table_46011 WHERE "App(L/C/E)" = '55 (47/5/3)' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
25991,
2596,
41,
96,
567,
144,
535,
1499,
6,
96,
23954,
121,
1499,
6,
96,
134,
77,
565,
121,
1499,
6,
96,
9648,
599,
434,
87,
254,
87,
427,
61,
121,
1499,
6,
96,
6221,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6221,
5405,
599,
434,
87,
254,
87,
427,
61,
121,
21680,
953,
834,
25991,
2596,
549,
17444,
427,
96,
9648,
599,
434,
87,
254,
87,
427,
61,
121,
3274,
3,
31,
3769,
41,
4177,
16936,
87,
5268,
31,
1,
-100,
-100,... |
what is the number of patients whose procedure long title is other open incisional hernia repair with graft or prosthesis and lab test fluid is blood? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE procedures.long_title = "Other open incisional hernia repair with graft or prosthesis" AND lab.fluid = "Blood" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7690,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
2118,
23,
26,
1499,
6,
5059,
715,
1499,
6,
5692,
1499,
6,
701,
834,
15129,
1499,
6,
3783,
1499,
6,
5798,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
3388,
18206... |
What is the Weight of the person born 1981-02-24 from the Uralochka Zlatoust club ? | CREATE TABLE table_58679 (
"Name" text,
"Pos." text,
"Height" text,
"Weight" text,
"Date of Birth" text,
"Club" text
) | SELECT "Weight" FROM table_58679 WHERE "Club" = 'uralochka zlatoust' AND "Date of Birth" = '1981-02-24' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
755,
3840,
4440,
41,
96,
23954,
121,
1499,
6,
96,
345,
32,
7,
535,
1499,
6,
96,
3845,
2632,
121,
1499,
6,
96,
1326,
2632,
121,
1499,
6,
96,
308,
342,
13,
26337,
121,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
1326,
2632,
121,
21680,
953,
834,
755,
3840,
4440,
549,
17444,
427,
96,
254,
11158,
121,
3274,
3,
31,
9709,
6322,
1258,
3,
172,
40,
144,
1162,
17,
31,
3430,
96,
308,
342,
13,
26337,
121,
3274,
3,
31,
24151,
... |
calculate the number of patients to whom neo*iv*clindamycin was administered | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "NEO*IV*Clindamycin" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7744,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7744,
7,
5,
8399,
51,
834,
23,
26,
549... |
What was the earliest year for the 400 M Hurdles in Santiago, Chile? | CREATE TABLE table_name_71 (year INTEGER, venue VARCHAR, event VARCHAR) | SELECT MIN(year) FROM table_name_71 WHERE venue = "santiago, chile" AND event = "400 m hurdles" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4450,
41,
1201,
3,
21342,
17966,
6,
5669,
584,
4280,
28027,
6,
605,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
3,
16454,
215,
21,
8,
4837,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
1201,
61,
21680,
953,
834,
4350,
834,
4450,
549,
17444,
427,
5669,
3274,
96,
7,
5965,
9,
839,
6,
3,
1436,
109,
121,
3430,
605,
3274,
96,
5548,
3,
51,
23463,
7,
121,
1,
-100,
-100,
-100,
-100,
-100... |
Name the least amount of tackles for danny clark | CREATE TABLE table_15581223_8 (tackles INTEGER, player VARCHAR) | SELECT MIN(tackles) FROM table_15581223_8 WHERE player = "Danny Clark" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1808,
3449,
2122,
2773,
834,
927,
41,
17,
4365,
965,
3,
21342,
17966,
6,
1959,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
709,
866,
13,
8000,
7,
21,
1352... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3,
17684,
599,
17,
4365,
965,
61,
21680,
953,
834,
1808,
3449,
2122,
2773,
834,
927,
549,
17444,
427,
1959,
3274,
96,
308,
15159,
8265,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the record when the game was at the Rose Garden? | CREATE TABLE table_name_75 (
record VARCHAR,
location VARCHAR
) | SELECT record FROM table_name_75 WHERE location = "rose garden" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3072,
41,
1368,
584,
4280,
28027,
6,
1128,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
1368,
116,
8,
467,
47,
44,
8,
5088,
5072,
58,
1,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1368,
21680,
953,
834,
4350,
834,
3072,
549,
17444,
427,
1128,
3274,
96,
8115,
2004,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
WHAT IS THE GERMAN NAME OF LIBERALISM? | CREATE TABLE table_49042 (
"Name (English)" text,
"Name (German)" text,
"Abbr." text,
"Ideology" text,
"Position" text,
"Votes (2011)" text,
"Seats in Hamburgische B\u00fcrgerschaft" real
) | SELECT "Name (German)" FROM table_49042 WHERE "Ideology" = 'liberalism' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
2394,
4165,
41,
96,
23954,
41,
26749,
61,
121,
1499,
6,
96,
23954,
41,
24518,
61,
121,
1499,
6,
96,
8952,
115,
52,
535,
1499,
6,
96,
196,
221,
1863,
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,
23954,
41,
24518,
61,
121,
21680,
953,
834,
591,
2394,
4165,
549,
17444,
427,
96,
196,
221,
1863,
121,
3274,
3,
31,
10661,
6835,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Who replaced on the date of appointment 2 november 2010? | CREATE TABLE table_24231638_3 (replaced_by VARCHAR, date_of_appointment VARCHAR) | SELECT replaced_by FROM table_24231638_3 WHERE date_of_appointment = "2 November 2010" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2266,
2773,
2938,
3747,
834,
519,
41,
60,
4687,
26,
834,
969,
584,
4280,
28027,
6,
833,
834,
858,
834,
9,
102,
2700,
297,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
3210... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
5821,
834,
969,
21680,
953,
834,
2266,
2773,
2938,
3747,
834,
519,
549,
17444,
427,
833,
834,
858,
834,
9,
102,
2700,
297,
3274,
96,
357,
1671,
2735,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Which bubbles has an atribute of onlostpointercapture? | CREATE TABLE table_name_87 (
bubbles VARCHAR,
attribute VARCHAR
) | SELECT bubbles FROM table_name_87 WHERE attribute = "onlostpointercapture" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4225,
41,
11144,
7,
584,
4280,
28027,
6,
15816,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
11144,
7,
65,
46,
3,
9,
5135,
17,
15,
13,
30,
229... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
11144,
7,
21680,
953,
834,
4350,
834,
4225,
549,
17444,
427,
15816,
3274,
96,
106,
2298,
17,
2700,
49,
4010,
2693,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Find the names of all distinct wines that have appellations in North Coast area. | CREATE TABLE WINE (
Name VARCHAR,
Appelation VARCHAR
)
CREATE TABLE APPELLATIONs (
Appelation VARCHAR,
Area VARCHAR
) | SELECT DISTINCT T2.Name FROM APPELLATIONs AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = "North Coast" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
549,
9730,
41,
5570,
584,
4280,
28027,
6,
3,
27794,
257,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
3,
13747,
12735,
8015,
7,
41,
3,
27794,
257,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
15438,
25424,
6227,
332,
4416,
23954,
21680,
3,
13747,
12735,
8015,
7,
6157,
332,
536,
3,
15355,
3162,
549,
9730,
6157,
332,
357,
9191,
332,
5411,
27794,
257,
3274,
332,
4416,
27794,
257,
549,
17444,
427,
332,
5411... |
Which ZX Spectrum has a Year larger than 1984, and a Genre of arcade/strategy? | CREATE TABLE table_name_92 (
zx_spectrum VARCHAR,
year VARCHAR,
genre VARCHAR
) | SELECT zx_spectrum FROM table_name_92 WHERE year > 1984 AND genre = "arcade/strategy" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4508,
41,
3,
172,
226,
834,
5628,
2781,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
6,
5349,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
1027,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
172,
226,
834,
5628,
2781,
21680,
953,
834,
4350,
834,
4508,
549,
17444,
427,
215,
2490,
13480,
3430,
5349,
3274,
96,
291,
6615,
87,
7,
17,
2206,
122,
63,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name the number of proto austronesian for *natu | CREATE TABLE table_15568886_14 (
proto_austronesian VARCHAR,
proto_oceanic VARCHAR
) | SELECT COUNT(proto_austronesian) FROM table_15568886_14 WHERE proto_oceanic = "*natu" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1808,
4834,
10927,
948,
834,
2534,
41,
23844,
834,
2064,
6255,
15,
10488,
584,
4280,
28027,
6,
23844,
834,
32,
8433,
2532,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
1409,
235,
834,
2064,
6255,
15,
10488,
61,
21680,
953,
834,
1808,
4834,
10927,
948,
834,
2534,
549,
17444,
427,
23844,
834,
32,
8433,
2532,
3274,
96,
1935,
29,
144,
76,
121,
1,
-100,
-100,
-100,
-1... |
Which Genre has a Year larger than 1999, and a Game of tony hawk's pro skater 2? | CREATE TABLE table_name_90 (
genre VARCHAR,
year VARCHAR,
game VARCHAR
) | SELECT genre FROM table_name_90 WHERE year > 1999 AND game = "tony hawk's pro skater 2" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2394,
41,
5349,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
6,
467,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
5945,
60,
65,
3,
9,
2929,
2186,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
5349,
21680,
953,
834,
4350,
834,
2394,
549,
17444,
427,
215,
2490,
5247,
3430,
467,
3274,
96,
17,
106,
63,
3,
14400,
31,
7,
813,
16573,
52,
204,
121,
1,
-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 headquarter and the average of manufacturer , and group by attribute headquarter, and order by the y-axis in descending. | CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) | SELECT Headquarter, AVG(Manufacturer) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY AVG(Manufacturer) DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7554,
41,
3636,
3,
21342,
17966,
6,
5570,
584,
4280,
28027,
599,
25502,
201,
5312,
3396,
254,
26330,
434,
6,
15248,
3,
21342,
17966,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3642,
19973,
6,
71,
17217,
599,
7296,
76,
8717,
450,
49,
61,
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,
... |
Tell me the Laps for time/retired of +1:08.491 | CREATE TABLE table_name_39 (
laps VARCHAR,
time_retired VARCHAR
) | SELECT laps FROM table_name_39 WHERE time_retired = "+1:08.491" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3288,
41,
14941,
7,
584,
4280,
28027,
6,
97,
834,
10682,
1271,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
8779,
140,
8,
325,
102,
7,
21,
97,
87,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
14941,
7,
21680,
953,
834,
4350,
834,
3288,
549,
17444,
427,
97,
834,
10682,
1271,
3274,
96,
18446,
10,
15000,
3647,
536,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the Total number of medals for the Nation with 7 or less Bronze medals and 1 Silver medal with a Rank of 9 or larger? | CREATE TABLE table_name_90 (
total INTEGER,
rank VARCHAR,
bronze VARCHAR,
silver VARCHAR
) | SELECT MIN(total) FROM table_name_90 WHERE bronze < 7 AND silver = 1 AND rank > 9 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2394,
41,
792,
3,
21342,
17966,
6,
11003,
584,
4280,
28027,
6,
13467,
584,
4280,
28027,
6,
4294,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
235,
1947,
61,
21680,
953,
834,
4350,
834,
2394,
549,
17444,
427,
13467,
3,
2,
489,
3430,
4294,
3274,
209,
3430,
11003,
2490,
668,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
For entries with a lost of 5, what is the sum of the draw entry? | CREATE TABLE table_name_23 (draw INTEGER, lost VARCHAR) | SELECT SUM(draw) FROM table_name_23 WHERE lost = 5 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2773,
41,
19489,
3,
21342,
17966,
6,
1513,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
242,
10066,
28,
3,
9,
1513,
13,
7836,
125,
19,
8,
4505,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
180,
6122,
599,
19489,
61,
21680,
953,
834,
4350,
834,
2773,
549,
17444,
427,
1513,
3274,
305,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the latest year any of the incumbents were first elected? | CREATE TABLE table_1342270_42 (first_elected INTEGER) | SELECT MAX(first_elected) FROM table_1342270_42 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
17485,
834,
4165,
41,
14672,
834,
19971,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1251,
215,
136,
13,
8,
28406,
7,
130,
166,
8160,
58,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
14672,
834,
19971,
61,
21680,
953,
834,
2368,
4165,
17485,
834,
4165,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What's the process technology of the Intel WiFi Link 5100 wireless LAN? | CREATE TABLE table_199666_1 (
process_technology VARCHAR,
wireless_lan VARCHAR
) | SELECT process_technology FROM table_199666_1 WHERE wireless_lan = "Intel WiFi Link 5100" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2294,
4314,
3539,
834,
536,
41,
433,
834,
18485,
584,
4280,
28027,
6,
5419,
834,
1618,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
31,
7,
8,
433,
748,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
433,
834,
18485,
21680,
953,
834,
2294,
4314,
3539,
834,
536,
549,
17444,
427,
5419,
834,
1618,
3274,
96,
1570,
1625,
13831,
7505,
305,
2915,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Which Time has a Round larger than 1, and an Event of total fighting alliance 2? | CREATE TABLE table_name_21 (
time VARCHAR,
round VARCHAR,
event VARCHAR
) | SELECT time FROM table_name_21 WHERE round > 1 AND event = "total fighting alliance 2" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2658,
41,
97,
584,
4280,
28027,
6,
1751,
584,
4280,
28027,
6,
605,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
2900,
65,
3,
9,
9609,
2186,
145,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
97,
21680,
953,
834,
4350,
834,
2658,
549,
17444,
427,
1751,
2490,
209,
3430,
605,
3274,
96,
235,
1947,
6237,
15454,
204,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is Match Report, when Venue is 'Westfalenstadion , Dortmund'? | CREATE TABLE table_name_92 (
match_report VARCHAR,
venue VARCHAR
) | SELECT match_report FROM table_name_92 WHERE venue = "westfalenstadion , dortmund" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4508,
41,
1588,
834,
60,
1493,
584,
4280,
28027,
6,
5669,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
12296,
3750,
6,
116,
29940,
19,
3,
31,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1588,
834,
60,
1493,
21680,
953,
834,
4350,
834,
4508,
549,
17444,
427,
5669,
3274,
96,
12425,
89,
138,
35,
2427,
26,
23,
106,
3,
6,
5048,
51,
1106,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
How many flights in each destination city? Return a bar chart, and display x-axis in asc order please. | CREATE TABLE flight (
flno number(4,0),
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0)
)
CREATE TABLE aircraft (
aid number(9,0),
name varchar2(30),
distance number(6,0)
)
CREATE TABLE certificate (
eid number(9,0),
aid number(9,0)
)
CREATE TABLE employee (
eid number(9,0),
name varchar2(30),
salary number(10,2)
) | SELECT destination, COUNT(destination) FROM flight GROUP BY destination ORDER BY destination | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3777,
41,
3,
89,
40,
29,
32,
381,
599,
8525,
632,
201,
5233,
3,
4331,
4059,
357,
599,
1755,
201,
3954,
3,
4331,
4059,
357,
599,
1755,
201,
2357,
381,
599,
11071,
632,
201,
12028,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3954,
6,
2847,
17161,
599,
13557,
257,
61,
21680,
3777,
350,
4630,
6880,
272,
476,
3954,
4674,
11300,
272,
476,
3954,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What type of state has a royal house of ji and has a ruler? | CREATE TABLE table_name_54 (type VARCHAR, royal_house VARCHAR, title VARCHAR) | SELECT type FROM table_name_54 WHERE royal_house = "ji" AND title = "ruler" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5062,
41,
6137,
584,
4280,
28027,
6,
11268,
834,
1840,
584,
4280,
28027,
6,
2233,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
686,
13,
538,
65,
3,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
686,
21680,
953,
834,
4350,
834,
5062,
549,
17444,
427,
11268,
834,
1840,
3274,
96,
354,
23,
121,
3430,
2233,
3274,
96,
5155,
49,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
When the date is July 8, and the score is 8-12, who is the opponent? | CREATE TABLE table_name_78 (
opponent VARCHAR,
date VARCHAR,
score VARCHAR
) | SELECT opponent FROM table_name_78 WHERE date = "july 8" AND score = "8-12" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3940,
41,
15264,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
6,
2604,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
366,
8,
833,
19,
1718,
9478,
11,
8,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
15264,
21680,
953,
834,
4350,
834,
3940,
549,
17444,
427,
833,
3274,
96,
2047,
120,
505,
121,
3430,
2604,
3274,
96,
927,
5947,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What was the final number for the winning manufacturer with Mercedes-benz, and a circuit of hockenheimring? | CREATE TABLE table_name_18 (round VARCHAR, winning_manufacturer VARCHAR, circuit VARCHAR) | SELECT COUNT(round) FROM table_name_18 WHERE winning_manufacturer = "mercedes-benz" AND circuit = "hockenheimring" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2606,
41,
7775,
584,
4280,
28027,
6,
3447,
834,
348,
76,
8717,
450,
49,
584,
4280,
28027,
6,
4558,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
7775,
61,
21680,
953,
834,
4350,
834,
2606,
549,
17444,
427,
3447,
834,
348,
76,
8717,
450,
49,
3274,
96,
935,
565,
1395,
18,
19738,
121,
3430,
4558,
3274,
96,
19076,
35,
3254,
1007,
121,
1,
-100,
... |
The match that went 1 round, and had a method of submission (rear-naked choke) had what record? | CREATE TABLE table_50247 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
) | SELECT "Record" FROM table_50247 WHERE "Round" = '1' AND "Method" = 'submission (rear-naked choke)' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1752,
357,
4177,
41,
96,
1649,
7,
535,
1499,
6,
96,
1649,
7621,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
23351,
107,
32,
26,
121,
1499,
6,
96,
427,
2169,
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,
1649,
7621,
121,
21680,
953,
834,
1752,
357,
4177,
549,
17444,
427,
96,
448,
32,
1106,
121,
3274,
3,
31,
536,
31,
3430,
96,
23351,
107,
32,
26,
121,
3274,
3,
31,
7304,
5451,
41,
60,
291,
18,
29,
15461,
29787... |
In season 2007 08 who is the runner-up? | CREATE TABLE table_25058269_1 (
runner_up VARCHAR,
season VARCHAR
) | SELECT runner_up FROM table_25058269_1 WHERE season = "2007–08" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
11434,
3449,
357,
3951,
834,
536,
41,
3,
10806,
834,
413,
584,
4280,
28027,
6,
774,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
86,
774,
4101,
12046,
113,
19,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
10806,
834,
413,
21680,
953,
834,
11434,
3449,
357,
3951,
834,
536,
549,
17444,
427,
774,
3274,
96,
20615,
104,
4018,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
how many of the patients aged below 68 were cape speaking? | 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
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.language = "CAPE" AND demographic.age < "68" | [
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,
24925,
3274,
96,
16986,
427,
121,
3430,
14798,
5,
545,
3,
2,
96,
3651,
121,
1,
-100,
-100,
-100,... |
What is the nationality of the player in round 4? | CREATE TABLE table_5191 (
"Round" real,
"Player" text,
"Position" text,
"Nationality" text,
"College/Junior/Club Team" text
) | SELECT "Nationality" FROM table_5191 WHERE "Round" = '4' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
5553,
4729,
41,
96,
448,
32,
1106,
121,
490,
6,
96,
15800,
49,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
24732,
485,
121,
1499,
6,
96,
9939,
7883,
87,
683,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
24732,
485,
121,
21680,
953,
834,
5553,
4729,
549,
17444,
427,
96,
448,
32,
1106,
121,
3274,
3,
31,
591,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
what is the place when the score is 68-67-73-68=276? | CREATE TABLE table_name_20 (
place VARCHAR,
score VARCHAR
) | SELECT place FROM table_name_20 WHERE score = 68 - 67 - 73 - 68 = 276 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1755,
41,
286,
584,
4280,
28027,
6,
2604,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
125,
19,
8,
286,
116,
8,
2604,
19,
3,
3651,
18,
3708,
18,
455... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
286,
21680,
953,
834,
4350,
834,
1755,
549,
17444,
427,
2604,
3274,
3,
3651,
3,
18,
3,
3708,
3,
18,
3,
4552,
3,
18,
3,
3651,
3274,
204,
3959,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the construction of Olivier Panis' car that retired due to a collision? | CREATE TABLE table_name_23 (
constructor VARCHAR,
time_retired VARCHAR,
driver VARCHAR
) | SELECT constructor FROM table_name_23 WHERE time_retired = "collision" AND driver = "olivier panis" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2773,
41,
6774,
127,
584,
4280,
28027,
6,
97,
834,
10682,
1271,
584,
4280,
28027,
6,
2535,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
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,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
6774,
127,
21680,
953,
834,
4350,
834,
2773,
549,
17444,
427,
97,
834,
10682,
1271,
3274,
96,
75,
20953,
1938,
121,
3430,
2535,
3274,
96,
4172,
5144,
2131,
159,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Give the maximum age of patients of black/african american ethnicity who died before the year 2148. | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT MAX(demographic.age) FROM demographic WHERE demographic.ethnicity = "BLACK/AFRICAN AMERICAN" AND demographic.dod_year < "2148.0" | [
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,
4800,
4,
599,
1778,
16587,
5,
545,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
15,
189,
2532,
485,
3274,
96,
8775,
15339,
87,
6282,
5593,
11425,
3,
17683,
5593,
11425,
121,
3430,
14798,
5,
26,
32,
26,
834,
1201,
... |
If Villa Rivero Municipality if 7, what is the language? | CREATE TABLE table_27382 (
"Language" text,
"Punata Municipality" real,
"Villa Rivero Municipality" real,
"San Benito Municipality" real,
"Tacachi Municipality" real,
"Cuchumuela Municipality" real
) | SELECT "Language" FROM table_27382 WHERE "Villa Rivero Municipality" = '7' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2555,
3747,
357,
41,
96,
434,
1468,
76,
545,
121,
1499,
6,
96,
345,
202,
144,
9,
16492,
485,
121,
490,
6,
96,
553,
1092,
9,
2473,
32,
16492,
485,
121,
490,
6,
96,
134,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
434,
1468,
76,
545,
121,
21680,
953,
834,
2555,
3747,
357,
549,
17444,
427,
96,
553,
1092,
9,
2473,
32,
16492,
485,
121,
3274,
3,
31,
940,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What team was the away team when Footscray was the home team? | CREATE TABLE table_11116 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Away team" FROM table_11116 WHERE "Home team" = 'footscray' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
15866,
2938,
41,
96,
19040,
372,
121,
1499,
6,
96,
19040,
372,
2604,
121,
1499,
6,
96,
188,
1343,
372,
121,
1499,
6,
96,
188,
1343,
372,
2604,
121,
1499,
6,
96,
553,
35,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
188,
1343,
372,
121,
21680,
953,
834,
15866,
2938,
549,
17444,
427,
96,
19040,
372,
121,
3274,
3,
31,
6259,
7,
2935,
63,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the largest crowd for North Melbourne home games? | CREATE TABLE table_53694 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT MAX("Crowd") FROM table_53694 WHERE "Home team" = 'north melbourne' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
755,
3420,
4240,
41,
96,
19040,
372,
121,
1499,
6,
96,
19040,
372,
2604,
121,
1499,
6,
96,
188,
1343,
372,
121,
1499,
6,
96,
188,
1343,
372,
2604,
121,
1499,
6,
96,
553,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
121,
254,
3623,
26,
8512,
21680,
953,
834,
755,
3420,
4240,
549,
17444,
427,
96,
19040,
372,
121,
3274,
3,
31,
29,
127,
189,
3,
2341,
26255,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Which episode had viewership of 0.296 million? | CREATE TABLE table_3948 (
"Order" real,
"Episode" text,
"Original airdate" text,
"Timeslot" text,
"Viewers (millions)" text,
"Nightly rank" real,
"Weekly rank" text
) | SELECT "Episode" FROM table_3948 WHERE "Viewers (millions)" = '0.296' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3288,
3707,
41,
96,
7395,
588,
121,
490,
6,
96,
427,
102,
159,
32,
221,
121,
1499,
6,
96,
667,
3380,
10270,
799,
5522,
121,
1499,
6,
96,
13368,
7,
3171,
121,
1499,
6,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
427,
102,
159,
32,
221,
121,
21680,
953,
834,
3288,
3707,
549,
17444,
427,
96,
15270,
277,
41,
17030,
7,
61,
121,
3274,
3,
31,
18189,
4314,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
How many weeks total are there? | CREATE TABLE table_27248 (
"Week" real,
"Date" text,
"Kickoff" text,
"Opponent" text,
"Final score" text,
"Team record" text,
"Game site" text,
"Attendance" real
) | SELECT MAX("Week") FROM table_27248 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2555,
357,
3707,
41,
96,
518,
10266,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
439,
3142,
1647,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
371,
10270,
2604,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
518,
10266,
8512,
21680,
953,
834,
2555,
357,
3707,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the final score for the match with a partnering of Tessa Price? | CREATE TABLE table_name_48 (score_in_the_final VARCHAR, partnering VARCHAR) | SELECT score_in_the_final FROM table_name_48 WHERE partnering = "tessa price" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3707,
41,
7,
9022,
834,
77,
834,
532,
834,
12406,
584,
4280,
28027,
6,
3,
26361,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
804,
2604,
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,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2604,
834,
77,
834,
532,
834,
12406,
21680,
953,
834,
4350,
834,
3707,
549,
17444,
427,
3,
26361,
3274,
96,
1422,
7,
9,
594,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
At the 2001 Davis Cup, what Opponent had less than 50 Aces? | CREATE TABLE table_name_93 (opponent VARCHAR, aces VARCHAR, event VARCHAR) | SELECT opponent FROM table_name_93 WHERE aces < 50 AND event = "2001 davis cup" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4271,
41,
32,
102,
9977,
584,
4280,
28027,
6,
3,
9,
2319,
584,
4280,
28027,
6,
605,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
486,
8,
4402,
8688,
3802... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15264,
21680,
953,
834,
4350,
834,
4271,
549,
17444,
427,
3,
9,
2319,
3,
2,
943,
3430,
605,
3274,
96,
23658,
836,
3466,
4119,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
calculate the number of male patients diagnosed with malignant neoplasm in the descending colon. | 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
)
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.gender = "M" AND diagnoses.short_title = "Mal neo descend colon" | [
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... |
How many stadiums are not in country 'Russia'? | CREATE TABLE stadium (
country VARCHAR
) | SELECT COUNT(*) FROM stadium WHERE country <> 'Russia' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
14939,
41,
684,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
14939,
7,
33,
59,
16,
684,
3,
31,
29613,
31,
58,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
14939,
549,
17444,
427,
684,
3,
2,
3155,
3,
31,
29613,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
how many elective hospital admission patients have had automatic implantable cardioverter/defibrillator (aicd) check? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND procedures.long_title = "Automatic implantable cardioverter/defibrillator (AICD) check" | [
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,
3388,
18206,
3,
15355,
3162,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
How many figures are there for density for Yucheng County? | CREATE TABLE table_2135222_2 (
density VARCHAR,
english_name VARCHAR
) | SELECT COUNT(density) FROM table_2135222_2 WHERE english_name = "Yucheng County" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2658,
2469,
26144,
834,
357,
41,
11048,
584,
4280,
28027,
6,
22269,
834,
4350,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
5638,
33,
132,
21,
11048,
21,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
537,
7,
485,
61,
21680,
953,
834,
2658,
2469,
26144,
834,
357,
549,
17444,
427,
22269,
834,
4350,
3274,
96,
476,
2295,
4606,
1334,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
provide the number of patients whose discharge location is long term care hospital and year of birth is less than 2058? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "LONG TERM CARE HOSPITAL" AND demographic.dob_year < "2058" | [
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,
26,
159,
7993,
834,
14836,
3274,
96,
434,
15628,
3,
5946,
329,
3,
22443,
454,
3638,
4111,
16359,
... |
Name the number for db | CREATE TABLE table_23800 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
) | SELECT COUNT("Pick #") FROM table_23800 WHERE "Position" = 'DB' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2773,
6192,
41,
96,
345,
3142,
1713,
121,
490,
6,
96,
254,
10765,
2271,
121,
1499,
6,
96,
15800,
49,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
9939,
7883,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
121,
345,
3142,
1713,
8512,
21680,
953,
834,
2773,
6192,
549,
17444,
427,
96,
345,
32,
7,
4749,
121,
3274,
3,
31,
9213,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
When the grid is under 5 and justin wilson is driving for the team mi-jack conquest racing, what's the highest number of laps driven? | CREATE TABLE table_name_65 (laps INTEGER, grid VARCHAR, team VARCHAR, driver VARCHAR) | SELECT MAX(laps) FROM table_name_65 WHERE team = "mi-jack conquest racing" AND driver = "justin wilson" AND grid < 5 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4122,
41,
8478,
7,
3,
21342,
17966,
6,
8634,
584,
4280,
28027,
6,
372,
584,
4280,
28027,
6,
2535,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
366,
8,
86... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8478,
7,
61,
21680,
953,
834,
4350,
834,
4122,
549,
17444,
427,
372,
3274,
96,
51,
23,
18,
9325,
975,
10952,
8191,
121,
3430,
2535,
3274,
96,
4998,
77,
3,
210,
173,
739,
121,
3430,
8634,
3,
2,
305,... |
What was the date when the away team was Carlton? | CREATE TABLE table_name_65 (date VARCHAR, away_team VARCHAR) | SELECT date FROM table_name_65 WHERE away_team = "carlton" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4122,
41,
5522,
584,
4280,
28027,
6,
550,
834,
11650,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
833,
116,
8,
550,
372,
47,
3,
30339,
58,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
833,
21680,
953,
834,
4350,
834,
4122,
549,
17444,
427,
550,
834,
11650,
3274,
96,
1720,
7377,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
When 24th is the final placing how many wins are there? | CREATE TABLE table_29038 (
"Season" real,
"Series" text,
"Team Name" text,
"Races" real,
"Wins" real,
"Poles" real,
"Podiums" real,
"Points" real,
"Final Placing" text
) | SELECT COUNT("Wins") FROM table_29038 WHERE "Final Placing" = '24th' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23838,
3747,
41,
96,
134,
15,
9,
739,
121,
490,
6,
96,
12106,
7,
121,
1499,
6,
96,
18699,
5570,
121,
1499,
6,
96,
448,
9,
2319,
121,
490,
6,
96,
18455,
7,
121,
490,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
18455,
7,
8512,
21680,
953,
834,
23838,
3747,
549,
17444,
427,
96,
371,
10270,
8422,
75,
53,
121,
3274,
3,
31,
2266,
189,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
calculate how many times patient 030-47098 has received a phenytoin laboratory test until 2102. | 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 treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE 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 vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
) | SELECT COUNT(*) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-47098')) AND lab.labname = 'phenytoin' AND STRFTIME('%y', lab.labresulttime) <= '2102' | [
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,
1935,
61,
21680,
7690,
549,
17444,
427,
7690,
5,
10061,
15129,
21545,
23,
26,
3388,
41,
23143,
14196,
1868,
5,
10061,
15129,
21545,
23,
26,
21680,
1868,
549,
17444,
427,
1868,
5,
10061,
15878,
3734,
... |
What zone has camp type D/S in area Bl9? | CREATE TABLE table_54333 (
"Area" text,
"Name" text,
"Zone" text,
"Group(s)" real,
"Parties" real,
"Max People" real,
"Camp Type" text
) | SELECT "Zone" FROM table_54333 WHERE "Camp Type" = 'd/s' AND "Area" = 'bl9' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
5062,
23360,
41,
96,
188,
864,
121,
1499,
6,
96,
23954,
121,
1499,
6,
96,
956,
782,
121,
1499,
6,
96,
27247,
599,
7,
61,
121,
490,
6,
96,
13725,
725,
121,
490,
6,
96,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
956,
782,
121,
21680,
953,
834,
5062,
23360,
549,
17444,
427,
96,
24626,
6632,
121,
3274,
3,
31,
26,
87,
7,
31,
3430,
96,
188,
864,
121,
3274,
3,
31,
115,
40,
1298,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,... |
Name the away team score for lake oval | CREATE TABLE table_name_1 (
away_team VARCHAR,
venue VARCHAR
) | SELECT away_team AS score FROM table_name_1 WHERE venue = "lake oval" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
536,
41,
550,
834,
11650,
584,
4280,
28027,
6,
5669,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
550,
372,
2604,
21,
6957,
17986,
1,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
550,
834,
11650,
6157,
2604,
21680,
953,
834,
4350,
834,
536,
549,
17444,
427,
5669,
3274,
96,
16948,
17986,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What are the names of enzymes whose product is not 'Heme'? | CREATE TABLE enzyme (
id number,
name text,
location text,
product text,
chromosome text,
omim number,
porphyria text
)
CREATE TABLE medicine_enzyme_interaction (
enzyme_id number,
medicine_id number,
interaction_type text
)
CREATE TABLE medicine (
id number,
name text,
trade_name text,
fda_approved text
) | SELECT name FROM enzyme WHERE product <> 'Heme' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
15735,
41,
3,
23,
26,
381,
6,
564,
1499,
6,
1128,
1499,
6,
556,
1499,
6,
3,
10363,
3972,
7159,
1499,
6,
3,
32,
51,
603,
381,
6,
5569,
6941,
52,
23,
9,
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,
564,
21680,
15735,
549,
17444,
427,
556,
3,
2,
3155,
3,
31,
3845,
526,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What year had a record of 4-21? | CREATE TABLE table_name_32 (
year VARCHAR,
record VARCHAR
) | SELECT year FROM table_name_32 WHERE record = "4-21" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2668,
41,
215,
584,
4280,
28027,
6,
1368,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
215,
141,
3,
9,
1368,
13,
314,
16539,
58,
1,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
215,
21680,
953,
834,
4350,
834,
2668,
549,
17444,
427,
1368,
3274,
96,
591,
16539,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What type had a beginning term of December 8, 1980 | CREATE TABLE table_1602620_1 (type VARCHAR, term_began VARCHAR) | SELECT type FROM table_1602620_1 WHERE term_began = "December 8, 1980" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
19129,
2688,
1755,
834,
536,
41,
6137,
584,
4280,
28027,
6,
1657,
834,
346,
2565,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
686,
141,
3,
9,
1849,
1657,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
686,
21680,
953,
834,
19129,
2688,
1755,
834,
536,
549,
17444,
427,
1657,
834,
346,
2565,
3274,
96,
29835,
9478,
6694,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
count the number of medicaid patients who have bradycardia primary disease. | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE 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.insurance = "Medicaid" AND demographic.diagnosis = "BRADYCARDIA" | [
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,
29441,
3274,
96,
15789,
6146,
121,
3430,
14798,
5,
25930,
4844,
159,
3274,
96,
22899,
19409,
254,
... |
What is the value in 1987 when it is A in 1999, 1989, and 1997? | CREATE TABLE table_name_47 (Id VARCHAR) | SELECT 1987 FROM table_name_47 WHERE 1999 = "a" AND 1989 = "a" AND 1997 = "a" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4177,
41,
196,
26,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
701,
16,
12701,
116,
34,
19,
71,
16,
5247,
6,
9975,
6,
11,
6622,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
12701,
21680,
953,
834,
4350,
834,
4177,
549,
17444,
427,
5247,
3274,
96,
9,
121,
3430,
9975,
3274,
96,
9,
121,
3430,
6622,
3274,
96,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What are dates of birth of all the guests whose gender is 'Male', and count them by a line chart | CREATE TABLE Apartment_Buildings (
building_id INTEGER,
building_short_name CHAR(15),
building_full_name VARCHAR(80),
building_description VARCHAR(255),
building_address VARCHAR(255),
building_manager VARCHAR(50),
building_phone VARCHAR(80)
)
CREATE TABLE View_Unit_Status (
apt_id INTEGER,
apt_booking_id INTEGER,
status_date DATETIME,
available_yn BIT
)
CREATE TABLE Apartment_Facilities (
apt_id INTEGER,
facility_code CHAR(15)
)
CREATE TABLE Apartments (
apt_id INTEGER,
building_id INTEGER,
apt_type_code CHAR(15),
apt_number CHAR(10),
bathroom_count INTEGER,
bedroom_count INTEGER,
room_count CHAR(5)
)
CREATE TABLE Guests (
guest_id INTEGER,
gender_code CHAR(1),
guest_first_name VARCHAR(80),
guest_last_name VARCHAR(80),
date_of_birth DATETIME
)
CREATE TABLE Apartment_Bookings (
apt_booking_id INTEGER,
apt_id INTEGER,
guest_id INTEGER,
booking_status_code CHAR(15),
booking_start_date DATETIME,
booking_end_date DATETIME
) | SELECT date_of_birth, COUNT(date_of_birth) FROM Guests WHERE gender_code = "Male" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
15970,
834,
24752,
53,
7,
41,
740,
834,
23,
26,
3,
21342,
17966,
6,
740,
834,
7,
14184,
834,
4350,
3,
28027,
599,
1808,
201,
740,
834,
1329,
40,
834,
4350,
584,
4280,
28027,
599,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
833,
834,
858,
834,
20663,
6,
2847,
17161,
599,
5522,
834,
858,
834,
20663,
61,
21680,
3,
22360,
549,
17444,
427,
7285,
834,
4978,
3274,
96,
329,
9,
109,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
How many institutions are there? | CREATE TABLE inst (
Id VARCHAR
) | SELECT COUNT(*) FROM inst | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
16,
7,
17,
41,
27,
26,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
4222,
33,
132,
58,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
16,
7,
17,
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,
... |
What is the average value for Rd 8 in a position less than 2 for Audi Sport Australia? | CREATE TABLE table_name_68 (rd_8 INTEGER, team VARCHAR, position VARCHAR) | SELECT AVG(rd_8) FROM table_name_68 WHERE team = "audi sport australia" AND position < 2 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3651,
41,
52,
26,
834,
927,
3,
21342,
17966,
6,
372,
584,
4280,
28027,
6,
1102,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1348,
701,
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,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
71,
17217,
599,
52,
26,
834,
13520,
21680,
953,
834,
4350,
834,
3651,
549,
17444,
427,
372,
3274,
96,
9,
5291,
2600,
23407,
121,
3430,
1102,
3,
2,
204,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name the driver matched db for joseph grado signature | CREATE TABLE table_1601027_2 (
driver_matched_db VARCHAR,
headphone_class VARCHAR
) | SELECT driver_matched_db FROM table_1601027_2 WHERE headphone_class = "Joseph Grado Signature" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
19129,
1714,
2555,
834,
357,
41,
2535,
834,
10304,
834,
26,
115,
584,
4280,
28027,
6,
819,
6399,
834,
4057,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2535,
834,
10304,
834,
26,
115,
21680,
953,
834,
19129,
1714,
2555,
834,
357,
549,
17444,
427,
819,
6399,
834,
4057,
3274,
96,
683,
32,
7,
15,
102,
107,
10771,
32,
22366,
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.