NATURAL_LANG stringlengths 0 446 | SCHEMA stringlengths 27 2.21k | SQL stringlengths 18 453 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|
What was the first week that had a transition with Pat Mccready? | CREATE TABLE table_name_6 (week INTEGER, transition VARCHAR) | SELECT MIN(week) FROM table_name_6 WHERE transition = "pat mccready" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
948,
41,
8041,
3,
21342,
17966,
6,
3508,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
166,
471,
24,
141,
3,
9,
3508,
28,
5192,
3038,
75,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
8041,
61,
21680,
953,
834,
4350,
834,
948,
549,
17444,
427,
3508,
3274,
96,
4665,
3,
51,
75,
75,
23015,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
How many HUC example codes have 1 level? | CREATE TABLE table_name_48 (
example_code__huc_ VARCHAR,
level VARCHAR
) | SELECT COUNT(example_code__huc_) FROM table_name_48 WHERE level = 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3707,
41,
677,
834,
4978,
834,
834,
107,
76,
75,
834,
584,
4280,
28027,
6,
593,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
454,
6463,
677,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
994,
9,
9208,
834,
4978,
834,
834,
107,
76,
75,
834,
61,
21680,
953,
834,
4350,
834,
3707,
549,
17444,
427,
593,
3274,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is Segment A where Segment B is Kevlar S Canoe? | CREATE TABLE table_19883 (
"Series Ep." text,
"Episode" real,
"Netflix" text,
"Segment A" text,
"Segment B" text,
"Segment C" text,
"Segment D" text
) | SELECT "Segment A" FROM table_19883 WHERE "Segment B" = 'Kevlar s Canoe' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
24151,
4591,
41,
96,
12106,
7,
10395,
535,
1499,
6,
96,
427,
102,
159,
32,
221,
121,
490,
6,
96,
9688,
89,
17591,
121,
1499,
6,
96,
134,
15,
122,
297,
71,
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,
134,
15,
122,
297,
71,
121,
21680,
953,
834,
24151,
4591,
549,
17444,
427,
96,
134,
15,
122,
297,
272,
121,
3274,
3,
31,
439,
15,
208,
40,
291,
3,
7,
1072,
32,
15,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100... |
count the number of patients whose primary disease is ventricular tachycardia and age is less than 86? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "VENTRICULAR TACHYCARDIA" AND demographic.age < "86" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
14798,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
564,
1499,
6,
2774,
1947,
834,
8547,
302,
1499,
6,
1246,
1499,
6,
103,
115,
1499,
6,
7285,
1499,
6,
1612,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
25930,
4844,
159,
3274,
96,
24992,
23503,
4254,
4280,
332,
24488,
476,
254,
4280,
24605,
121,
3430,
... |
Who is the studio host for the year 2010? | CREATE TABLE table_22485543_1 (studio_host VARCHAR, year VARCHAR) | SELECT studio_host FROM table_22485543_1 WHERE year = "2010" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2884,
3707,
3769,
4906,
834,
536,
41,
22991,
834,
12675,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
19,
8,
3100,
2290,
21,
8,
215,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3100,
834,
12675,
21680,
953,
834,
2884,
3707,
3769,
4906,
834,
536,
549,
17444,
427,
215,
3274,
96,
14926,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the number of start date of each apartment booking for each year? Return a bar chart, rank by the Y in descending. | 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
)
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 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 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_Facilities (
apt_id INTEGER,
facility_code CHAR(15)
) | SELECT booking_start_date, COUNT(booking_start_date) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id ORDER BY COUNT(booking_start_date) DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
15970,
834,
13355,
53,
7,
41,
3,
6789,
834,
2567,
53,
834,
23,
26,
3,
21342,
17966,
6,
3,
6789,
834,
23,
26,
3,
21342,
17966,
6,
3886,
834,
23,
26,
3,
21342,
17966,
6,
5038,
834,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
5038,
834,
10208,
834,
5522,
6,
2847,
17161,
599,
2567,
53,
834,
10208,
834,
5522,
61,
21680,
15970,
834,
13355,
53,
7,
6157,
332,
536,
3,
15355,
3162,
15970,
7,
6157,
332,
357,
9191,
332,
5411,
6789,
834,
23,
26,
... |
What player attended UAB college? | CREATE TABLE table_33207 (
"Round" real,
"Pick" real,
"Player" text,
"Position" text,
"College" text
) | SELECT "Player" FROM table_33207 WHERE "College" = 'uab' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4201,
26426,
41,
96,
448,
32,
1106,
121,
490,
6,
96,
345,
3142,
121,
490,
6,
96,
15800,
49,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
9939,
7883,
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,
0,
0,
0,
0... | [
3,
23143,
14196,
96,
15800,
49,
121,
21680,
953,
834,
4201,
26426,
549,
17444,
427,
96,
9939,
7883,
121,
3274,
3,
31,
76,
9,
115,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Who was the girl on week 1 that was previous to week 3's Ava Hart? | CREATE TABLE table_61243 (
"Week 1" text,
"Week 2" text,
"Week 3" text,
"Week 4" text,
"Week 5" text
) | SELECT "Week 1" FROM table_61243 WHERE "Week 3" = 'ava hart' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4241,
27730,
41,
96,
518,
10266,
209,
121,
1499,
6,
96,
518,
10266,
204,
121,
1499,
6,
96,
518,
10266,
220,
121,
1499,
6,
96,
518,
10266,
3,
20364,
1499,
6,
96,
518,
1026... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
518,
10266,
209,
121,
21680,
953,
834,
4241,
27730,
549,
17444,
427,
96,
518,
10266,
220,
121,
3274,
3,
31,
8644,
12479,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Where was the location of the Mong Kok Stadium? | CREATE TABLE table_name_12 (
location VARCHAR,
home_ground VARCHAR
) | SELECT location FROM table_name_12 WHERE home_ground = "mong kok stadium" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2122,
41,
1128,
584,
4280,
28027,
6,
234,
834,
9232,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2840,
47,
8,
1128,
13,
8,
2963,
122,
1793,
157,
1275... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1128,
21680,
953,
834,
4350,
834,
2122,
549,
17444,
427,
234,
834,
9232,
3274,
96,
51,
2444,
3,
157,
1825,
14939,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Show me about the distribution of All_Neutral and School_ID in a bar chart, and rank from high to low by the y-axis. | CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
) | SELECT All_Neutral, School_ID FROM basketball_match ORDER BY School_ID DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3819,
41,
1121,
834,
4309,
16,
17,
6,
1121,
1499,
6,
10450,
1499,
6,
3,
20100,
490,
6,
71,
89,
8027,
23,
257,
1499,
6,
695,
4046,
297,
490,
6,
7486,
4350,
1499,
6,
14542,
834,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
432,
834,
26288,
8792,
6,
1121,
834,
4309,
21680,
8498,
834,
19515,
4674,
11300,
272,
476,
1121,
834,
4309,
309,
25067,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
When ملح هذا البحر is the arabic title what is the english title? | CREATE TABLE table_26555737_1 (english_title VARCHAR, arabic_title VARCHAR) | SELECT english_title FROM table_26555737_1 WHERE arabic_title = "ملح هذا البحر" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2688,
28803,
27931,
834,
536,
41,
4606,
40,
1273,
834,
21869,
584,
4280,
28027,
6,
21165,
447,
834,
21869,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
366,
3,
2,
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,
22269,
834,
21869,
21680,
953,
834,
2688,
28803,
27931,
834,
536,
549,
17444,
427,
21165,
447,
834,
21869,
3274,
96,
2,
3,
2,
3,
2,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
how many places speak sotho ? | CREATE TABLE table_204_64 (
id number,
"place" text,
"code" number,
"area (km2)" number,
"population" number,
"most spoken language" text
) | SELECT COUNT("place") FROM table_204_64 WHERE "most spoken language" = 'sotho' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
4389,
41,
3,
23,
26,
381,
6,
96,
4687,
121,
1499,
6,
96,
4978,
121,
381,
6,
96,
498,
41,
5848,
7318,
121,
381,
6,
96,
9791,
7830,
121,
381,
6,
96,
5463,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4687,
8512,
21680,
953,
834,
26363,
834,
4389,
549,
17444,
427,
96,
5463,
11518,
1612,
121,
3274,
3,
31,
7,
32,
189,
32,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
How many losses occurred when the club team was ekranas-2 panevėžys | CREATE TABLE table_18018214_3 (loses INTEGER, club VARCHAR) | SELECT MAX(loses) FROM table_18018214_3 WHERE club = "Ekranas-2 Panevėžys" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
20829,
2606,
27357,
834,
519,
41,
10227,
7,
3,
21342,
17966,
6,
1886,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
8467,
6935,
116,
8,
1886,
372,
47,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
10227,
7,
61,
21680,
953,
834,
20829,
2606,
27357,
834,
519,
549,
17444,
427,
1886,
3274,
96,
427,
9669,
29,
9,
7,
4949,
2709,
15482,
2,
63,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Show the names of all high schoolers in grade 10. | CREATE TABLE Highschooler (name VARCHAR, grade VARCHAR) | SELECT name FROM Highschooler WHERE grade = 10 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1592,
6646,
49,
41,
4350,
584,
4280,
28027,
6,
2769,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
3111,
8,
3056,
13,
66,
306,
496,
277,
16,
2769,
5477,
1,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
564,
21680,
1592,
6646,
49,
549,
17444,
427,
2769,
3274,
335,
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... |
How many different directors are associated with the writer Gaby Chiappe? | CREATE TABLE table_15026994_2 (director VARCHAR, writer VARCHAR) | SELECT COUNT(director) FROM table_15026994_2 WHERE writer = "Gaby Chiappe" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
12278,
2688,
3264,
591,
834,
357,
41,
25982,
584,
4280,
28027,
6,
4346,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
315,
10392,
33,
1968,
28,
8,
4346,
1589... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
25982,
61,
21680,
953,
834,
12278,
2688,
3264,
591,
834,
357,
549,
17444,
427,
4346,
3274,
96,
517,
9,
969,
2695,
3096,
15,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
For those records from the products and each product's manufacturer, draw a bar chart about the distribution of name and the average of revenue , and group by attribute name, and sort X-axis in desc order. | CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | SELECT T1.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Name DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
15248,
7,
41,
3636,
3,
21342,
17966,
6,
5570,
584,
4280,
28027,
599,
25502,
201,
3642,
19973,
584,
4280,
28027,
599,
25502,
201,
3,
19145,
584,
4280,
28027,
599,
25502,
201,
19764,
17833... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
332,
5411,
23954,
6,
332,
4416,
1649,
15098,
21680,
7554,
6157,
332,
536,
3,
15355,
3162,
15248,
7,
6157,
332,
357,
9191,
332,
5411,
7296,
76,
8717,
450,
49,
3274,
332,
4416,
22737,
350,
4630,
6880,
272,
476,
332,
5... |
what was the name of the drug patient 009-5351 was allergic to it in 06/2105. | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE 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 intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
) | SELECT allergy.drugname FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '009-5351')) AND STRFTIME('%y-%m', allergy.allergytime) = '2105-06' | [
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,
23886,
5,
26,
13534,
4350,
21680,
23886,
549,
17444,
427,
23886,
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 are the number of titles written by patrick massett and john zinman ? | CREATE TABLE table_203_306 (
id number,
"no." number,
"title" text,
"directed by" text,
"written by" text,
"original air date" text
) | SELECT COUNT("title") FROM table_203_306 WHERE "written by" = 'patrick massett & john zinman' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
1458,
948,
41,
3,
23,
26,
381,
6,
96,
29,
32,
535,
381,
6,
96,
21869,
121,
1499,
6,
96,
22955,
57,
121,
1499,
6,
96,
14973,
57,
121,
1499,
6,
96,
21878,
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,
121,
21869,
8512,
21680,
953,
834,
23330,
834,
1458,
948,
549,
17444,
427,
96,
14973,
57,
121,
3274,
3,
31,
4665,
5206,
3294,
15,
17,
17,
3,
184,
3,
27341,
3,
7196,
348,
31,
1,
-100,
-100,
-100,
... |
Which years did James Robert Jones serve? | CREATE TABLE table_name_46 (years VARCHAR, representative VARCHAR) | SELECT years FROM table_name_46 WHERE representative = "james robert jones" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4448,
41,
1201,
7,
584,
4280,
28027,
6,
6978,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
203,
410,
2549,
2715,
6193,
1716,
58,
1,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
203,
21680,
953,
834,
4350,
834,
4448,
549,
17444,
427,
6978,
3274,
96,
1191,
2687,
3,
5840,
49,
17,
3,
1927,
1496,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
When was the game in which Deron Williams (13) did the high assists played? | CREATE TABLE table_23286223_5 (date VARCHAR, high_assists VARCHAR) | SELECT date FROM table_23286223_5 WHERE high_assists = "Deron Williams (13)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2773,
2577,
4056,
2773,
834,
755,
41,
5522,
584,
4280,
28027,
6,
306,
834,
6500,
7,
17,
7,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
366,
47,
8,
467,
16,
84,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
833,
21680,
953,
834,
2773,
2577,
4056,
2773,
834,
755,
549,
17444,
427,
306,
834,
6500,
7,
17,
7,
3274,
96,
308,
49,
106,
6060,
4077,
5268,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which Front Side Bus has a Voltage of 1.4 v, and a Frequency of 1333 mhz? | CREATE TABLE table_name_58 (front_side_bus VARCHAR, voltage VARCHAR, frequency VARCHAR) | SELECT front_side_bus FROM table_name_58 WHERE voltage = "1.4 v" AND frequency = "1333 mhz" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3449,
41,
6849,
834,
1583,
834,
3465,
584,
4280,
28027,
6,
10594,
584,
4280,
28027,
6,
7321,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
7383,
9466,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
851,
834,
1583,
834,
3465,
21680,
953,
834,
4350,
834,
3449,
549,
17444,
427,
10594,
3274,
96,
14912,
3,
208,
121,
3430,
7321,
3274,
96,
2368,
4201,
3,
51,
107,
172,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
count the number of patients whose diagnoses icd9 code is e9300 and drug type is main? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "E9300" AND prescriptions.drug_type = "MAIN" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
3... |
What is the number of goals against when the played is more than 38? | CREATE TABLE table_name_19 (goals_against VARCHAR, played INTEGER) | SELECT COUNT(goals_against) FROM table_name_19 WHERE played > 38 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2294,
41,
839,
5405,
834,
9,
16720,
7,
17,
584,
4280,
28027,
6,
1944,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
381,
13,
1766,
581,
116,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
839,
5405,
834,
9,
16720,
7,
17,
61,
21680,
953,
834,
4350,
834,
2294,
549,
17444,
427,
1944,
2490,
6654,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many rounds have 6,150 as attendance? | CREATE TABLE table_24312 (
"Competition" text,
"Round" text,
"Opponent" text,
"Result" text,
"Score" text,
"Home/Away" text,
"Venue" text,
"Attendance" text,
"Date" text
) | SELECT "Round" FROM table_24312 WHERE "Attendance" = '6,150' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
27730,
2122,
41,
96,
5890,
4995,
4749,
121,
1499,
6,
96,
448,
32,
1106,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
20119,
121,
1499,
6,
96,
134,
9022,
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,
448,
32,
1106,
121,
21680,
953,
834,
27730,
2122,
549,
17444,
427,
96,
188,
17,
324,
26,
663,
121,
3274,
3,
31,
11071,
12278,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
List the number of episodes directed by linda mendoza. | CREATE TABLE table_25548213_1 (
production_code VARCHAR,
directed_by VARCHAR
) | SELECT COUNT(production_code) FROM table_25548213_1 WHERE directed_by = "Linda Mendoza" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
5062,
4613,
2368,
834,
536,
41,
999,
834,
4978,
584,
4280,
28027,
6,
6640,
834,
969,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
6792,
8,
381,
13,
13562,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
20762,
834,
4978,
61,
21680,
953,
834,
1828,
5062,
4613,
2368,
834,
536,
549,
17444,
427,
6640,
834,
969,
3274,
96,
434,
77,
26,
9,
3137,
26,
13277,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Who won the tournament for the Atlantic Sun Conference? | CREATE TABLE table_24248450_3 (
tournament_winner VARCHAR,
conference VARCHAR
) | SELECT tournament_winner FROM table_24248450_3 WHERE conference = "Atlantic Sun conference" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2266,
357,
3707,
10593,
834,
519,
41,
5892,
834,
3757,
687,
584,
4280,
28027,
6,
2542,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
751,
8,
5892,
21,
8,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
5892,
834,
3757,
687,
21680,
953,
834,
2266,
357,
3707,
10593,
834,
519,
549,
17444,
427,
2542,
3274,
96,
188,
17,
1618,
1225,
3068,
2542,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
what is the number of patients whose days of hospital stay is greater than 1 and diagnoses long title is end stage renal disease? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
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.days_stay > "1" AND diagnoses.long_title = "End stage renal disease" | [
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... |
When was the score 5-31? | CREATE TABLE table_name_20 (
date VARCHAR,
record VARCHAR
) | SELECT date FROM table_name_20 WHERE record = "5-31" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1755,
41,
833,
584,
4280,
28027,
6,
1368,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
366,
47,
8,
2604,
7670,
3341,
58,
1,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
833,
21680,
953,
834,
4350,
834,
1755,
549,
17444,
427,
1368,
3274,
96,
755,
18,
3341,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
WHAT POSITION HAS A 23 PICK? | CREATE TABLE table_47321 (
"Round" real,
"Pick" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
) | SELECT "Position" FROM table_47321 WHERE "Pick" = '23' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4177,
519,
2658,
41,
96,
448,
32,
1106,
121,
490,
6,
96,
345,
3142,
121,
490,
6,
96,
23847,
1748,
121,
490,
6,
96,
23954,
121,
1499,
6,
96,
345,
32,
7,
4749,
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,
345,
32,
7,
4749,
121,
21680,
953,
834,
4177,
519,
2658,
549,
17444,
427,
96,
345,
3142,
121,
3274,
3,
31,
2773,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
count the number of patients whose ethnicity is hispanic or latino and procedure icd9 code is 3950? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.ethnicity = "HISPANIC OR LATINO" AND procedures.icd9_code = "3950" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7690,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
2118,
23,
26,
1499,
6,
5059,
715,
1499,
6,
5692,
1499,
6,
701,
834,
15129,
1499,
6,
3783,
1499,
6,
5798,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
What is the entire inhabitants in Southeast Asia? | CREATE TABLE table_1389609_3 (total_population INTEGER, region VARCHAR) | SELECT MIN(total_population) FROM table_1389609_3 WHERE region = "Southeast Asia" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
22744,
4314,
4198,
834,
519,
41,
235,
1947,
834,
9791,
7830,
3,
21342,
17966,
6,
1719,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1297,
21155,
16,
18862... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
235,
1947,
834,
9791,
7830,
61,
21680,
953,
834,
22744,
4314,
4198,
834,
519,
549,
17444,
427,
1719,
3274,
96,
22081,
11535,
3826,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What was the result of the dance which had a style of contemporary jazz? | CREATE TABLE table_name_1 (
results VARCHAR,
style VARCHAR
) | SELECT results FROM table_name_1 WHERE style = "contemporary jazz" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
536,
41,
772,
584,
4280,
28027,
6,
869,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
741,
13,
8,
2595,
84,
141,
3,
9,
869,
13,
4092,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
772,
21680,
953,
834,
4350,
834,
536,
549,
17444,
427,
869,
3274,
96,
1018,
13089,
52,
1208,
9948,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Which Date performed has a Position of bottom 3, and Scores by each individual judge of 5 + 5 + 4 = 14? | CREATE TABLE table_58962 (
"Main contestant" text,
"Co-contestant (Yaar vs. Pyaar)" text,
"Date performed" text,
"Scores by each individual judge" text,
"Total score/week" text,
"Position" text,
"Status" text
) | SELECT "Date performed" FROM table_58962 WHERE "Position" = 'bottom 3' AND "Scores by each individual judge" = '5 + 5 + 4 = 14' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3449,
4314,
357,
41,
96,
21978,
29,
4233,
288,
121,
1499,
6,
96,
3881,
18,
1018,
4377,
288,
41,
476,
9,
291,
3,
208,
7,
5,
12901,
9,
291,
61,
121,
1499,
6,
96,
308,
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,
308,
342,
3032,
121,
21680,
953,
834,
3449,
4314,
357,
549,
17444,
427,
96,
345,
32,
7,
4749,
121,
3274,
3,
31,
30142,
220,
31,
3430,
96,
134,
9022,
7,
57,
284,
928,
5191,
121,
3274,
3,
31,
755,
1768,
305,
... |
What is the best fit (all data) when the parameter shows fluctuation amplitude at 8h 1 mpc? | CREATE TABLE table_name_18 (
best_fit__all_data_ VARCHAR,
parameter VARCHAR
) | SELECT best_fit__all_data_ FROM table_name_18 WHERE parameter = "fluctuation amplitude at 8h −1 mpc" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2606,
41,
200,
834,
5616,
834,
834,
1748,
834,
6757,
834,
584,
4280,
28027,
6,
15577,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
200,
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,
200,
834,
5616,
834,
834,
1748,
834,
6757,
834,
21680,
953,
834,
4350,
834,
2606,
549,
17444,
427,
15577,
3274,
96,
6947,
75,
17,
76,
257,
3,
24608,
19835,
44,
505,
107,
3,
2,
536,
3,
1167,
75,
121,
1,
-100,
-10... |
Which Fencing Victories (pts) that has a Equestrian Time (pts) of 67.88 (1144)? | CREATE TABLE table_65457 (
"Athlete" text,
"Shooting Score (pts)" text,
"Fencing Victories (pts)" text,
"Swimming Time (pts)" text,
"Equestrian Time (pts)" text,
"Running Time (pts)" text,
"Total" real
) | SELECT "Fencing Victories (pts)" FROM table_65457 WHERE "Equestrian Time (pts)" = '67.88 (1144)' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4122,
591,
3436,
41,
96,
188,
189,
1655,
15,
121,
1499,
6,
96,
10499,
32,
32,
1222,
17763,
41,
102,
17,
7,
61,
121,
1499,
6,
96,
371,
15,
4733,
8884,
725,
41,
102,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
371,
15,
4733,
8884,
725,
41,
102,
17,
7,
61,
121,
21680,
953,
834,
4122,
591,
3436,
549,
17444,
427,
96,
427,
10952,
5288,
2900,
41,
102,
17,
7,
61,
121,
3274,
3,
31,
3708,
5,
4060,
41,
18959,
7256,
31,
1... |
Which City of license has a Channels TV / RF of 36 (psip) 36 (uhf)? Question 5 | CREATE TABLE table_name_3 (
city_of_license VARCHAR,
channels_tv___rf VARCHAR
) | SELECT city_of_license FROM table_name_3 WHERE channels_tv___rf = "36 (psip) 36 (uhf)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
519,
41,
690,
834,
858,
834,
28062,
584,
4280,
28027,
6,
6047,
834,
17,
208,
834,
834,
834,
52,
89,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
834,
858,
834,
28062,
21680,
953,
834,
4350,
834,
519,
549,
17444,
427,
6047,
834,
17,
208,
834,
834,
834,
52,
89,
3274,
96,
3420,
41,
102,
7,
23,
102,
61,
4475,
41,
76,
107,
89,
61,
121,
1,
-100,
-100,
-... |
What is the production code for the episode written by J. H. Wyman & Jeff Pinkner? | CREATE TABLE table_24649082_1 (production_code VARCHAR, written_by VARCHAR) | SELECT production_code FROM table_24649082_1 WHERE written_by = "J. H. Wyman & Jeff Pinkner" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2266,
4389,
2394,
4613,
834,
536,
41,
20762,
834,
4978,
584,
4280,
28027,
6,
1545,
834,
969,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
999,
1081,
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,
999,
834,
4978,
21680,
953,
834,
2266,
4389,
2394,
4613,
834,
536,
549,
17444,
427,
1545,
834,
969,
3274,
96,
683,
5,
454,
5,
11314,
348,
3,
184,
8507,
12070,
687,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name the number of nationalities for ryan mckie | CREATE TABLE table_2840500_8 (nationality VARCHAR, player VARCHAR) | SELECT COUNT(nationality) FROM table_2840500_8 WHERE player = "Ryan Mckie" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2577,
2445,
2560,
834,
927,
41,
16557,
485,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
381,
13,
1157,
2197,
21,
3,
651,
152,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
16557,
485,
61,
21680,
953,
834,
2577,
2445,
2560,
834,
927,
549,
17444,
427,
1959,
3274,
96,
448,
63,
152,
3038,
11390,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
When the home team was fitzroy, what did the away team score? | CREATE TABLE table_77741 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Away team score" FROM table_77741 WHERE "Home team" = 'fitzroy' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26225,
4853,
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,
2604,
121,
21680,
953,
834,
26225,
4853,
549,
17444,
427,
96,
19040,
372,
121,
3274,
3,
31,
89,
5615,
8170,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What category is Matthew Barton? | CREATE TABLE table_name_35 (category VARCHAR, opponent VARCHAR) | SELECT category FROM table_name_35 WHERE opponent = "matthew barton" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2469,
41,
8367,
839,
651,
584,
4280,
28027,
6,
15264,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
3295,
19,
9771,
1386,
17,
106,
58,
1,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3295,
21680,
953,
834,
4350,
834,
2469,
549,
17444,
427,
15264,
3274,
96,
3357,
532,
210,
1207,
17,
106,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What grid is Ducati with fewer than 22 laps? | CREATE TABLE table_name_96 (
grid VARCHAR,
manufacturer VARCHAR,
laps VARCHAR
) | SELECT grid FROM table_name_96 WHERE manufacturer = "ducati" AND laps < 22 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4314,
41,
8634,
584,
4280,
28027,
6,
4818,
584,
4280,
28027,
6,
14941,
7,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
8634,
19,
970,
16461,
28,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
8634,
21680,
953,
834,
4350,
834,
4314,
549,
17444,
427,
4818,
3274,
96,
1259,
16461,
121,
3430,
14941,
7,
3,
2,
1630,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
How many player eliminated an opponent within the time frame of 32:32? | CREATE TABLE table_18598175_2 (
eliminated_by VARCHAR,
time VARCHAR
) | SELECT COUNT(eliminated_by) FROM table_18598175_2 WHERE time = "32:32" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2606,
3390,
4959,
3072,
834,
357,
41,
17809,
834,
969,
584,
4280,
28027,
6,
97,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
1959,
17809,
46,
15264,
441,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
15,
4941,
77,
920,
834,
969,
61,
21680,
953,
834,
2606,
3390,
4959,
3072,
834,
357,
549,
17444,
427,
97,
3274,
96,
2668,
10,
2668,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the type if quantity rebuilt is more than 2 and the railway number is 4' 150? | CREATE TABLE table_79438 (
"Class" text,
"Railway number(s)" text,
"Quantity rebuilt" real,
"Rebuildjahr(e)" text,
"Type" text
) | SELECT "Type" FROM table_79438 WHERE "Quantity rebuilt" > '2' AND "Railway number(s)" = '4"…150' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4440,
591,
3747,
41,
96,
21486,
121,
1499,
6,
96,
448,
9,
173,
1343,
381,
599,
7,
61,
121,
1499,
6,
96,
5991,
288,
485,
26935,
121,
490,
6,
96,
1649,
16422,
8375,
599,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
25160,
121,
21680,
953,
834,
4440,
591,
3747,
549,
17444,
427,
96,
5991,
288,
485,
26935,
121,
2490,
3,
31,
357,
31,
3430,
96,
448,
9,
173,
1343,
381,
599,
7,
61,
121,
3274,
3,
31,
20364,
233,
12278,
31,
1,
... |
What is Opponent, when Attendance is 58,836? | CREATE TABLE table_49308 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | SELECT "Opponent" FROM table_49308 WHERE "Attendance" = '58,836' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3647,
1458,
927,
41,
96,
518,
10266,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
20119,
121,
1499,
6,
96,
188,
17,
324,
26,
663,
121,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
667,
102,
9977,
121,
21680,
953,
834,
3647,
1458,
927,
549,
17444,
427,
96,
188,
17,
324,
26,
663,
121,
3274,
3,
31,
3449,
6,
927,
3420,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is Home Team, when Date is 18 February 1956, and when Away Team is Blackburn Rovers? | CREATE TABLE table_name_59 (home_team VARCHAR, date VARCHAR, away_team VARCHAR) | SELECT home_team FROM table_name_59 WHERE date = "18 february 1956" AND away_team = "blackburn rovers" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3390,
41,
5515,
834,
11650,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
6,
550,
834,
11650,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
1210,
227... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
234,
834,
11650,
21680,
953,
834,
4350,
834,
3390,
549,
17444,
427,
833,
3274,
96,
2606,
29976,
76,
1208,
22951,
121,
3430,
550,
834,
11650,
3274,
96,
19699,
7223,
3,
8843,
277,
121,
1,
-100,
-100,
-100,
-100,
-100,
... |
how many of the patients had icd9 code 9229? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
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 procedures.icd9_code = "9229" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
What tournament has a 3r in 1983? | CREATE TABLE table_name_81 (tournament VARCHAR) | SELECT tournament FROM table_name_81 WHERE 1983 = "3r" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4959,
41,
17,
1211,
20205,
17,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
5892,
65,
3,
9,
220,
52,
16,
15041,
58,
1,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
5892,
21680,
953,
834,
4350,
834,
4959,
549,
17444,
427,
15041,
3274,
96,
519,
52,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many total draws was played less than 18 with 11 losts? | CREATE TABLE table_name_2 (
draw INTEGER,
lost VARCHAR,
played VARCHAR
) | SELECT SUM(draw) FROM table_name_2 WHERE lost = 11 AND played < 18 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
357,
41,
3314,
3,
21342,
17966,
6,
1513,
584,
4280,
28027,
6,
1944,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
792,
14924,
47,
1944,
705,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
180,
6122,
599,
19489,
61,
21680,
953,
834,
4350,
834,
357,
549,
17444,
427,
1513,
3274,
850,
3430,
1944,
3,
2,
507,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many gold medals for Bulgaria (BUL) with 2 silvers and a less than 18 rank? | CREATE TABLE table_name_61 (
gold INTEGER,
rank VARCHAR,
silver VARCHAR,
nation VARCHAR
) | SELECT SUM(gold) FROM table_name_61 WHERE silver = 2 AND nation = "bulgaria (bul)" AND rank < 18 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4241,
41,
2045,
3,
21342,
17966,
6,
11003,
584,
4280,
28027,
6,
4294,
584,
4280,
28027,
6,
2982,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14910,
61,
21680,
953,
834,
4350,
834,
4241,
549,
17444,
427,
4294,
3274,
204,
3430,
2982,
3274,
96,
6724,
122,
6286,
41,
6724,
61,
121,
3430,
11003,
3,
2,
507,
1,
-100,
-100,
-100,
-100,
-100,
-100,... |
how many patients whose drug code is hydz25? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "HYDZ25" | [
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,
7744,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7744,
7,
5,
8399,
51,
834,
23,
26,
549... |
How many customers in state of CA? | CREATE TABLE sqlite_sequence (
name text,
seq text
)
CREATE TABLE invoices (
id number,
customer_id number,
invoice_date time,
billing_address text,
billing_city text,
billing_state text,
billing_country text,
billing_postal_code text,
total number
)
CREATE TABLE tracks (
id number,
name text,
album_id number,
media_type_id number,
genre_id number,
composer text,
milliseconds number,
bytes number,
unit_price number
)
CREATE TABLE artists (
id number,
name text
)
CREATE TABLE invoice_lines (
id number,
invoice_id number,
track_id number,
unit_price number,
quantity number
)
CREATE TABLE media_types (
id number,
name text
)
CREATE TABLE albums (
id number,
title text,
artist_id number
)
CREATE TABLE customers (
id number,
first_name text,
last_name text,
company text,
address text,
city text,
state text,
country text,
postal_code text,
phone text,
fax text,
email text,
support_rep_id number
)
CREATE TABLE playlists (
id number,
name text
)
CREATE TABLE genres (
id number,
name text
)
CREATE TABLE playlist_tracks (
playlist_id number,
track_id number
)
CREATE TABLE employees (
id number,
last_name text,
first_name text,
title text,
reports_to number,
birth_date time,
hire_date time,
address text,
city text,
state text,
country text,
postal_code text,
phone text,
fax text,
email text
) | SELECT COUNT(*) FROM customers WHERE state = "CA" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
11820,
6311,
834,
7,
15,
835,
3772,
41,
564,
1499,
6,
142,
1824,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
10921,
7,
41,
3,
23,
26,
381,
6,
884,
834,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
722,
549,
17444,
427,
538,
3274,
96,
4490,
121,
1,
-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 total of Prom in M for Peak great knoutberry hill? | CREATE TABLE table_name_72 (prom__m_ INTEGER, peak VARCHAR) | SELECT SUM(prom__m_) FROM table_name_72 WHERE peak = "great knoutberry hill" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5865,
41,
1409,
51,
834,
834,
51,
834,
3,
21342,
17966,
6,
6734,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
792,
13,
749,
51,
16,
283,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
180,
6122,
599,
1409,
51,
834,
834,
51,
834,
61,
21680,
953,
834,
4350,
834,
5865,
549,
17444,
427,
6734,
3274,
96,
20288,
3,
157,
29,
670,
7418,
9956,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the score of the game when the Boston Bruins were the visiting team? | CREATE TABLE table_name_75 (score VARCHAR, visitor VARCHAR) | SELECT score FROM table_name_75 WHERE visitor = "boston bruins" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3072,
41,
7,
9022,
584,
4280,
28027,
6,
7019,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
2604,
13,
8,
467,
116,
8,
5053,
272,
23162,
130,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2604,
21680,
953,
834,
4350,
834,
3072,
549,
17444,
427,
7019,
3274,
96,
115,
32,
4411,
3,
115,
23162,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
How many air dates where directed by jim donovan? | CREATE TABLE table_22325 (
"No." real,
"#" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Canadian air date" text,
"U.S. air date" text,
"Production code" real,
"Canadian viewers (million)" text
) | SELECT COUNT("U.S. air date") FROM table_22325 WHERE "Directed by" = 'Jim Donovan' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
2773,
1828,
41,
96,
4168,
535,
490,
6,
96,
4663,
121,
490,
6,
96,
382,
155,
109,
121,
1499,
6,
96,
23620,
15,
26,
57,
121,
1499,
6,
96,
24965,
324,
57,
121,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
1265,
5,
134,
5,
799,
833,
8512,
21680,
953,
834,
357,
2773,
1828,
549,
17444,
427,
96,
23620,
15,
26,
57,
121,
3274,
3,
31,
683,
603,
1008,
32,
2132,
31,
1,
-100,
-100,
-100,
-100,
-100,
... |
what is the operator of trains arriving at 13.39 | CREATE TABLE table_18333678_2 (
operator VARCHAR,
arrival VARCHAR
) | SELECT operator FROM table_18333678_2 WHERE arrival = "13.39" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2606,
4201,
3420,
3940,
834,
357,
41,
7221,
584,
4280,
28027,
6,
6870,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
125,
19,
8,
7221,
13,
14053,
15315,
44,
8808,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7221,
21680,
953,
834,
2606,
4201,
3420,
3940,
834,
357,
549,
17444,
427,
6870,
3274,
96,
2368,
5,
3288,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
How many championships does Pakistan have? | CREATE TABLE table_23020 (
"Country" text,
"Total Drivers" real,
"Champions" real,
"Championships" real,
"Current March 20, 2010" real,
"First driver(s)" text,
"Last/Current driver(s) March 20, 2010" text
) | SELECT COUNT("Championships") FROM table_23020 WHERE "Country" = 'Pakistan' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
13427,
1755,
41,
96,
10628,
651,
121,
1499,
6,
96,
3696,
1947,
10546,
7,
121,
490,
6,
96,
3541,
4624,
2865,
121,
490,
6,
96,
254,
1483,
12364,
2009,
7,
121,
490,
6,
96,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
254,
1483,
12364,
2009,
7,
8512,
21680,
953,
834,
13427,
1755,
549,
17444,
427,
96,
10628,
651,
121,
3274,
3,
31,
345,
11259,
5627,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What current conference is Post University a member of? | CREATE TABLE table_12936521_2 (current_conference VARCHAR, institution VARCHAR) | SELECT current_conference FROM table_12936521_2 WHERE institution = "Post University" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
22174,
10402,
2658,
834,
357,
41,
14907,
834,
28496,
584,
4280,
28027,
6,
6568,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
750,
2542,
19,
1844,
636,
3,
9,
1144... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
750,
834,
28496,
21680,
953,
834,
22174,
10402,
2658,
834,
357,
549,
17444,
427,
6568,
3274,
96,
22507,
636,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is the score when the home team is king's lynn? | CREATE TABLE table_name_66 (
score VARCHAR,
home_team VARCHAR
) | SELECT score FROM table_name_66 WHERE home_team = "king's lynn" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3539,
41,
2604,
584,
4280,
28027,
6,
234,
834,
11650,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
125,
19,
8,
2604,
116,
8,
234,
372,
19,
3,
1765,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2604,
21680,
953,
834,
4350,
834,
3539,
549,
17444,
427,
234,
834,
11650,
3274,
96,
1765,
31,
7,
3,
120,
29,
29,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
how long did colin clarke coach the puerto rico islanders for ? | CREATE TABLE table_204_832 (
id number,
"name" text,
"nationality" text,
"club" text,
"from" number,
"until" text
) | SELECT "until" - "from" FROM table_204_832 WHERE "name" = 'colin clarke' AND "club" = 'puerto rico islanders' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
4591,
357,
41,
3,
23,
26,
381,
6,
96,
4350,
121,
1499,
6,
96,
16557,
485,
121,
1499,
6,
96,
13442,
121,
1499,
6,
96,
7152,
121,
381,
6,
96,
202,
17,
173,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
202,
17,
173,
121,
3,
18,
96,
7152,
121,
21680,
953,
834,
26363,
834,
4591,
357,
549,
17444,
427,
96,
4350,
121,
3274,
3,
31,
9044,
29,
6860,
1050,
31,
3430,
96,
13442,
121,
3274,
3,
31,
4987,
49,
235,
3,
... |
Please give me a bar chart to show the distribution of results of all music festival, and order Y from high to low order. | CREATE TABLE music_festival (
ID int,
Music_Festival text,
Date_of_ceremony text,
Category text,
Volume int,
Result text
)
CREATE TABLE volume (
Volume_ID int,
Volume_Issue text,
Issue_Date text,
Weeks_on_Top real,
Song text,
Artist_ID int
)
CREATE TABLE artist (
Artist_ID int,
Artist text,
Age int,
Famous_Title text,
Famous_Release_date text
) | SELECT Result, COUNT(Result) FROM music_festival GROUP BY Result ORDER BY COUNT(Result) DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
723,
834,
89,
24742,
41,
4699,
16,
17,
6,
3057,
834,
371,
24742,
1499,
6,
7678,
834,
858,
834,
2110,
15,
21208,
1499,
6,
17459,
1499,
6,
14816,
16,
17,
6,
3,
20119,
1499,
3,
61,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
20119,
6,
2847,
17161,
599,
20119,
61,
21680,
723,
834,
89,
24742,
350,
4630,
6880,
272,
476,
3,
20119,
4674,
11300,
272,
476,
2847,
17161,
599,
20119,
61,
309,
25067,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
provide the number of patients whose procedure icd9 code is 4611? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE 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 procedures.icd9_code = "4611" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
What was the score for the game when the record was 37-27? | CREATE TABLE table_23286158_9 (
score VARCHAR,
record VARCHAR
) | SELECT score FROM table_23286158_9 WHERE record = "37-27" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23188,
3840,
26556,
834,
1298,
41,
2604,
584,
4280,
28027,
6,
1368,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
2604,
21,
8,
467,
116,
8,
1368,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2604,
21680,
953,
834,
23188,
3840,
26556,
834,
1298,
549,
17444,
427,
1368,
3274,
96,
4118,
18,
2555,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many Episodes have a Romaji Title of dragon zakura? | CREATE TABLE table_64719 (
"Japanese Title" text,
"Romaji Title" text,
"TV Station" text,
"Episodes" real,
"Average Ratings" text
) | SELECT COUNT("Episodes") FROM table_64719 WHERE "Romaji Title" = 'dragon zakura' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
948,
4177,
2294,
41,
96,
683,
9750,
1496,
15,
11029,
121,
1499,
6,
96,
448,
32,
16547,
23,
11029,
121,
1499,
6,
96,
4562,
5939,
121,
1499,
6,
96,
427,
102,
159,
32,
1395,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
427,
102,
159,
32,
1395,
8512,
21680,
953,
834,
948,
4177,
2294,
549,
17444,
427,
96,
448,
32,
16547,
23,
11029,
121,
3274,
3,
31,
3515,
5307,
3,
1629,
10923,
9,
31,
1,
-100,
-100,
-100,
-10... |
What was the highest number of bronze medals for the entry with rank 2 and fewer than 3 silver medals? | CREATE TABLE table_58830 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT MAX("Bronze") FROM table_58830 WHERE "Rank" = '2' AND "Silver" < '3' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
755,
4060,
1458,
41,
96,
22557,
121,
1499,
6,
96,
567,
257,
121,
1499,
6,
96,
23576,
121,
490,
6,
96,
134,
173,
624,
121,
490,
6,
96,
22780,
29,
776,
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,
4800,
4,
599,
121,
22780,
29,
776,
8512,
21680,
953,
834,
755,
4060,
1458,
549,
17444,
427,
96,
22557,
121,
3274,
3,
31,
357,
31,
3430,
96,
134,
173,
624,
121,
3,
2,
3,
31,
519,
31,
1,
-100,
-100,
-100,
-100,
... |
What are all the vicinity (km ) where profits magnificence (2007) is 2nd | CREATE TABLE table_255812_1 (
area__km²_ VARCHAR,
income_class__2007_ VARCHAR
) | SELECT area__km²_ FROM table_255812_1 WHERE income_class__2007_ = "2nd" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
3449,
2122,
834,
536,
41,
616,
834,
834,
5848,
357,
834,
584,
4280,
28027,
6,
2055,
834,
4057,
834,
834,
20615,
834,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
3,
23143,
14196,
616,
834,
834,
5848,
357,
834,
21680,
953,
834,
1828,
3449,
2122,
834,
536,
549,
17444,
427,
2055,
834,
4057,
834,
834,
20615,
834,
3274,
96,
357,
727,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What score has tim duncan (27) as the leading scorer? | CREATE TABLE table_34461 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Leading scorer" text,
"Record" text
) | SELECT "Score" FROM table_34461 WHERE "Leading scorer" = 'tim duncan (27)' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
519,
3628,
4241,
41,
96,
308,
342,
121,
1499,
6,
96,
553,
159,
155,
127,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
19040,
121,
1499,
6,
96,
2796,
9,
26,
53,
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,
96,
134,
9022,
121,
21680,
953,
834,
519,
3628,
4241,
549,
17444,
427,
96,
2796,
9,
26,
53,
2604,
52,
121,
3274,
3,
31,
2998,
146,
29,
1608,
4743,
12703,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
what player score is higher than 17 | CREATE TABLE table_38056 (
"Round" real,
"Pick" real,
"Player" text,
"Position" text,
"School/Club Team" text
) | SELECT "Player" FROM table_38056 WHERE "Round" = '17' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
22671,
4834,
41,
96,
448,
32,
1106,
121,
490,
6,
96,
345,
3142,
121,
490,
6,
96,
15800,
49,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
29364,
87,
254,
11158,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15800,
49,
121,
21680,
953,
834,
22671,
4834,
549,
17444,
427,
96,
448,
32,
1106,
121,
3274,
3,
31,
2517,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the Home Team of the game against Seattle on June 1? | CREATE TABLE table_name_7 (home_team VARCHAR, road_team VARCHAR, date VARCHAR) | SELECT home_team FROM table_name_7 WHERE road_team = "seattle" AND date = "june 1" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
940,
41,
5515,
834,
11650,
584,
4280,
28027,
6,
1373,
834,
11650,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1210,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
234,
834,
11650,
21680,
953,
834,
4350,
834,
940,
549,
17444,
427,
1373,
834,
11650,
3274,
96,
7,
15,
9,
8692,
121,
3430,
833,
3274,
96,
6959,
15,
209,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is the most losses when the club is terang and draws is less than 0? | CREATE TABLE table_name_75 (losses INTEGER, club VARCHAR, draws VARCHAR) | SELECT MAX(losses) FROM table_name_75 WHERE club = "terang" AND draws < 0 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3072,
41,
2298,
2260,
3,
21342,
17966,
6,
1886,
584,
4280,
28027,
6,
14924,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
125,
19,
8,
167,
8467,
116,
8,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
2298,
2260,
61,
21680,
953,
834,
4350,
834,
3072,
549,
17444,
427,
1886,
3274,
96,
449,
1468,
121,
3430,
14924,
3,
2,
3,
632,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
After Round 5, which player was drafted for Defensive Tackle? | CREATE TABLE table_41358 (
"Round" real,
"Pick" text,
"Player" text,
"Position" text,
"Team" text
) | SELECT "Player" FROM table_41358 WHERE "Round" > '5' AND "Position" = 'defensive tackle' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
2368,
3449,
41,
96,
448,
32,
1106,
121,
490,
6,
96,
345,
3142,
121,
1499,
6,
96,
15800,
49,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
18699,
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,
15800,
49,
121,
21680,
953,
834,
591,
2368,
3449,
549,
17444,
427,
96,
448,
32,
1106,
121,
2490,
3,
31,
755,
31,
3430,
96,
345,
32,
7,
4749,
121,
3274,
3,
31,
221,
23039,
15,
8000,
31,
1,
-100,
-100,
-100,
... |
What are the names of the technicians and how many machines are they assigned to repair, and could you display by the Y-axis in asc? | CREATE TABLE technician (
technician_id real,
Name text,
Team text,
Starting_Year real,
Age int
)
CREATE TABLE machine (
Machine_ID int,
Making_Year int,
Class text,
Team text,
Machine_series text,
value_points real,
quality_rank int
)
CREATE TABLE repair_assignment (
technician_id int,
repair_ID int,
Machine_ID int
)
CREATE TABLE repair (
repair_ID int,
name text,
Launch_Date text,
Notes text
) | SELECT Name, COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_id = T2.technician_id GROUP BY T2.Name ORDER BY COUNT(*) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
17730,
41,
17730,
834,
23,
26,
490,
6,
5570,
1499,
6,
2271,
1499,
6,
14362,
834,
476,
2741,
490,
6,
7526,
16,
17,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
1437,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
5570,
6,
2847,
17161,
599,
1935,
61,
21680,
2096,
834,
9,
7,
6732,
297,
6157,
332,
536,
3,
15355,
3162,
17730,
6157,
332,
357,
9191,
332,
5411,
3470,
7742,
152,
834,
23,
26,
3274,
332,
4416,
3470,
7742,
152,
834,
... |
what was the last year they did not qualify ? | CREATE TABLE table_204_58 (
id number,
"year" number,
"position" text
) | SELECT MAX("year") FROM table_204_58 WHERE "position" = 'did not qualify' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
3449,
41,
3,
23,
26,
381,
6,
96,
1201,
121,
381,
6,
96,
4718,
121,
1499,
3,
61,
3,
32102,
32103,
32101,
32103,
125,
47,
8,
336,
215,
79,
410,
59,
9448,
3,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
121,
1201,
8512,
21680,
953,
834,
26363,
834,
3449,
549,
17444,
427,
96,
4718,
121,
3274,
3,
31,
12416,
59,
9448,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the played number when the points against is 179? | CREATE TABLE table_name_78 (
played VARCHAR,
points_against VARCHAR
) | SELECT played FROM table_name_78 WHERE points_against = "179" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3940,
41,
1944,
584,
4280,
28027,
6,
979,
834,
9,
16720,
7,
17,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1944,
381,
116,
8,
979,
581... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1944,
21680,
953,
834,
4350,
834,
3940,
549,
17444,
427,
979,
834,
9,
16720,
7,
17,
3274,
96,
26593,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the tournament that had byron black playing against magnus larsson? | CREATE TABLE table_name_70 (tournament VARCHAR, opponent VARCHAR) | SELECT tournament FROM table_name_70 WHERE opponent = "magnus larsson" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2518,
41,
17,
1211,
20205,
17,
584,
4280,
28027,
6,
15264,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
5892,
24,
141,
57,
52,
106,
1001,
155... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5892,
21680,
953,
834,
4350,
834,
2518,
549,
17444,
427,
15264,
3274,
96,
7493,
29,
302,
50,
52,
7,
739,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is the average age of male patients with medicaid insurance? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT AVG(demographic.age) FROM demographic WHERE demographic.gender = "M" AND demographic.insurance = "Medicaid" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7690,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
2118,
23,
26,
1499,
6,
5059,
715,
1499,
6,
5692,
1499,
6,
701,
834,
15129,
1499,
6,
3783,
1499,
6,
5798,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
1778,
16587,
5,
545,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
122,
3868,
3274,
96,
329,
121,
3430,
14798,
5,
29441,
3274,
96,
15789,
6146,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
which album was released later , beautiful , or j' adore ? | CREATE TABLE table_203_276 (
id number,
"album#" text,
"english title" text,
"chinese (traditional)" text,
"chinese (simplified)" text,
"release date" text,
"label" text
) | SELECT "english title" FROM table_203_276 WHERE "english title" IN ('beautiful', "j'adore") ORDER BY "release date" DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
357,
3959,
41,
3,
23,
26,
381,
6,
96,
23703,
4663,
121,
1499,
6,
96,
4606,
40,
1273,
2233,
121,
1499,
6,
96,
1436,
1496,
15,
41,
26374,
61,
121,
1499,
6,
96... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
4606,
40,
1273,
2233,
121,
21680,
953,
834,
23330,
834,
357,
3959,
549,
17444,
427,
96,
4606,
40,
1273,
2233,
121,
3388,
41,
31,
346,
402,
17,
99,
83,
31,
6,
96,
354,
31,
10097,
8512,
4674,
11300,
272,
476,
... |
Look for the number of elective hospital admission patients who had a unilateral radical neck dissection procedure. | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND procedures.short_title = "Unilat rad neck dissect" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
How many career titles does roy emerson have? | CREATE TABLE table_26045 (
"Years led" text,
"Span of years led" real,
"Player" text,
"Titles won at point of lead" real,
"Total Career titles" real,
"Tournament at which lead began" text
) | SELECT "Total Career titles" FROM table_26045 WHERE "Player" = 'Roy Emerson' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
18365,
2128,
41,
96,
476,
2741,
7,
2237,
121,
1499,
6,
96,
19675,
13,
203,
2237,
121,
490,
6,
96,
15800,
49,
121,
1499,
6,
96,
382,
155,
965,
751,
44,
500,
13,
991,
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,
3696,
1947,
15151,
8342,
121,
21680,
953,
834,
18365,
2128,
549,
17444,
427,
96,
15800,
49,
121,
3274,
3,
31,
448,
32,
63,
3967,
13515,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Which country scored 69-67-69-70=275? | CREATE TABLE table_name_22 (country VARCHAR, score VARCHAR) | SELECT country FROM table_name_22 WHERE score = 69 - 67 - 69 - 70 = 275 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2884,
41,
17529,
584,
4280,
28027,
6,
2604,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
684,
5799,
3,
3951,
18,
3708,
18,
3951,
18,
2518,
2423,
2598... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
684,
21680,
953,
834,
4350,
834,
2884,
549,
17444,
427,
2604,
3274,
3,
3951,
3,
18,
3,
3708,
3,
18,
3,
3951,
3,
18,
2861,
3274,
3,
25988,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which school has a quarterback? | CREATE TABLE table_78538 (
"Round" real,
"Pick" text,
"Player" text,
"Position" text,
"School" text
) | SELECT "School" FROM table_78538 WHERE "Position" = 'quarterback' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3940,
755,
3747,
41,
96,
448,
32,
1106,
121,
490,
6,
96,
345,
3142,
121,
1499,
6,
96,
15800,
49,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
29364,
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,
0,
0,
0,
0... | [
3,
23143,
14196,
96,
29364,
121,
21680,
953,
834,
3940,
755,
3747,
549,
17444,
427,
96,
345,
32,
7,
4749,
121,
3274,
3,
31,
19973,
1549,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
count the number of patients whose gender is m and drug code is mepe50i? | 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 INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.gender = "M" AND prescriptions.formulary_drug_cd = "MEPE50I" | [
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 is the average Goals, when Playoffs is Lost in Round 2, and when Games is less than 81? | CREATE TABLE table_43397 (
"Season" text,
"Games" real,
"Lost" real,
"Points" real,
"Pct %" real,
"Goals for" real,
"Goals against" real,
"Playoffs" text
) | SELECT AVG("Goals for") FROM table_43397 WHERE "Playoffs" = 'lost in round 2' AND "Games" < '81' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4906,
519,
4327,
41,
96,
134,
15,
9,
739,
121,
1499,
6,
96,
23055,
7,
121,
490,
6,
96,
434,
3481,
121,
490,
6,
96,
22512,
7,
121,
490,
6,
96,
345,
75,
17,
3,
1454,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
121,
6221,
5405,
21,
8512,
21680,
953,
834,
4906,
519,
4327,
549,
17444,
427,
96,
15800,
1647,
7,
121,
3274,
3,
31,
2298,
17,
16,
1751,
204,
31,
3430,
96,
23055,
7,
121,
3,
2,
3,
31,
4959,
31,
... |
What country does charles coody play for? | CREATE TABLE table_9390 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" real,
"To par" real
) | SELECT "Country" FROM table_9390 WHERE "Player" = 'charles coody' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4271,
2394,
41,
96,
15800,
49,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
476,
2741,
599,
7,
61,
751,
121,
1499,
6,
96,
3696,
1947,
121,
490,
6,
96,
3696,
260,
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,
10628,
651,
121,
21680,
953,
834,
4271,
2394,
549,
17444,
427,
96,
15800,
49,
121,
3274,
3,
31,
4059,
965,
576,
9666,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
how many divorced patients take drug via inhalation? | 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
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.marital_status = "DIVORCED" AND prescriptions.route = "INHALATION" | [
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,
7744,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7744,
7,
5,
8399,
51,
834,
23,
26,
549... |
What is the average Area (in km²), when Markatal is less than 0? | CREATE TABLE table_name_81 (area__in_km²_ INTEGER, markatal INTEGER) | SELECT AVG(area__in_km²_) FROM table_name_81 WHERE markatal < 0 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4959,
41,
498,
834,
834,
77,
834,
5848,
357,
834,
3,
21342,
17966,
6,
3946,
9,
1947,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1348,
5690,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
498,
834,
834,
77,
834,
5848,
357,
834,
61,
21680,
953,
834,
4350,
834,
4959,
549,
17444,
427,
3946,
9,
1947,
3,
2,
3,
632,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Show the studios that have not produced films with director 'Walter Hill'. | CREATE TABLE film_market_estimation (
estimation_id number,
low_estimate number,
high_estimate number,
film_id number,
type text,
market_id number,
year number
)
CREATE TABLE market (
market_id number,
country text,
number_cities number
)
CREATE TABLE film (
film_id number,
title text,
studio text,
director text,
gross_in_dollar number
) | SELECT studio FROM film EXCEPT SELECT studio FROM film WHERE director = "Walter Hill" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
814,
834,
8809,
834,
3340,
51,
257,
41,
22781,
834,
23,
26,
381,
6,
731,
834,
3340,
5058,
381,
6,
306,
834,
3340,
5058,
381,
6,
814,
834,
23,
26,
381,
6,
686,
1499,
6,
512,
834,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3100,
21680,
814,
262,
4,
30416,
3,
23143,
14196,
3100,
21680,
814,
549,
17444,
427,
2090,
3274,
96,
518,
8818,
3588,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
what is the 1st prize for may 21 | CREATE TABLE table_35801 (
"Date" text,
"Tournament" text,
"Location" text,
"Winner" text,
"Score" text,
"1st prize ( $ )" real
) | SELECT SUM("1st prize ( $ )") FROM table_35801 WHERE "Date" = 'may 21' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2469,
2079,
536,
41,
96,
308,
342,
121,
1499,
6,
96,
382,
1211,
20205,
17,
121,
1499,
6,
96,
434,
32,
75,
257,
121,
1499,
6,
96,
18455,
687,
121,
1499,
6,
96,
134,
9022... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
121,
536,
7,
17,
6441,
41,
1514,
3,
61,
8512,
21680,
953,
834,
2469,
2079,
536,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
13726,
1401,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the score on the 1st leg if the team 2 is botafogo? | CREATE TABLE table_21448 (
"Team #1" text,
"Points" text,
"Team #2" text,
"1st leg" text,
"2nd leg" text
) | SELECT COUNT("1st leg") FROM table_21448 WHERE "Team #2" = 'Botafogo' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
27357,
3707,
41,
96,
18699,
7172,
121,
1499,
6,
96,
22512,
7,
121,
1499,
6,
96,
18699,
15493,
121,
1499,
6,
96,
536,
7,
17,
4553,
121,
1499,
6,
96,
357,
727,
4553,
121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
536,
7,
17,
4553,
8512,
21680,
953,
834,
27357,
3707,
549,
17444,
427,
96,
18699,
15493,
121,
3274,
3,
31,
26465,
9,
89,
32,
839,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which World Rank happened in 1977? | CREATE TABLE table_name_81 (
world_rank VARCHAR,
year VARCHAR
) | SELECT world_rank FROM table_name_81 WHERE year = 1977 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4959,
41,
296,
834,
6254,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
1150,
3,
22557,
2817,
16,
16433,
58,
1,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
296,
834,
6254,
21680,
953,
834,
4350,
834,
4959,
549,
17444,
427,
215,
3274,
16433,
1,
-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 total number of Area (km ), when Population (2007) is 6,176? | CREATE TABLE table_46182 (
"Barangay" text,
"Area (km\u00b2)" real,
"Population (2007)" real,
"Population (2010)" real,
"Pop. density (per km\u00b2)" real
) | SELECT COUNT("Area (km\u00b2)") FROM table_46182 WHERE "Population (2007)" = '6,176' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4448,
2606,
357,
41,
96,
14851,
1468,
9,
63,
121,
1499,
6,
96,
188,
864,
41,
5848,
2,
76,
1206,
115,
7318,
121,
490,
6,
96,
27773,
7830,
3,
27964,
121,
490,
6,
96,
2777... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
188,
864,
41,
5848,
2,
76,
1206,
115,
7318,
8512,
21680,
953,
834,
4448,
2606,
357,
549,
17444,
427,
96,
27773,
7830,
3,
27964,
121,
3274,
3,
31,
11071,
26782,
31,
1,
-100,
-100,
-100,
-100,
... |
In what round did Al Unser win at Wisconsin State Fair Park Speedway? | CREATE TABLE table_25231 (
"Rnd" real,
"Date" text,
"Race Name" text,
"Length" text,
"Track" text,
"Location" text,
"Pole Position" text,
"Winning Driver" text
) | SELECT MIN("Rnd") FROM table_25231 WHERE "Winning Driver" = 'Al Unser' AND "Track" = 'Wisconsin State Fair Park Speedway' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
357,
3341,
41,
96,
448,
727,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
448,
3302,
5570,
121,
1499,
6,
96,
434,
4606,
189,
121,
1499,
6,
96,
382,
16729,
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,
3,
17684,
599,
121,
448,
727,
8512,
21680,
953,
834,
1828,
357,
3341,
549,
17444,
427,
96,
518,
10503,
10546,
121,
3274,
3,
31,
188,
40,
10697,
31,
3430,
96,
382,
16729,
121,
3274,
3,
31,
518,
159,
8056,
77,
1015,... |
return me the conferences, which have more than 10 papers by ' H. V. Jagadish ' . | CREATE TABLE domain (
did int,
name varchar
)
CREATE TABLE journal (
homepage varchar,
jid int,
name varchar
)
CREATE TABLE domain_publication (
did int,
pid int
)
CREATE TABLE cite (
cited int,
citing int
)
CREATE TABLE domain_keyword (
did int,
kid int
)
CREATE TABLE domain_conference (
cid int,
did int
)
CREATE TABLE keyword (
keyword varchar,
kid int
)
CREATE TABLE publication (
abstract varchar,
cid int,
citation_num int,
jid int,
pid int,
reference_num int,
title varchar,
year int
)
CREATE TABLE publication_keyword (
kid int,
pid int
)
CREATE TABLE domain_journal (
did int,
jid int
)
CREATE TABLE author (
aid int,
homepage varchar,
name varchar,
oid int
)
CREATE TABLE organization (
continent varchar,
homepage varchar,
name varchar,
oid int
)
CREATE TABLE domain_author (
aid int,
did int
)
CREATE TABLE writes (
aid int,
pid int
)
CREATE TABLE conference (
cid int,
homepage varchar,
name varchar
) | SELECT conference.name FROM author, conference, publication, writes WHERE author.name = 'H. V. Jagadish' AND publication.cid = conference.cid AND writes.aid = author.aid AND writes.pid = publication.pid GROUP BY conference.name HAVING COUNT(DISTINCT (publication.title)) > 10 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3303,
41,
410,
16,
17,
6,
564,
3,
4331,
4059,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
6378,
41,
22844,
3,
4331,
4059,
6,
3,
354,
23,
26,
16,
17,
6,
564,
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,
2542,
5,
4350,
21680,
2291,
6,
2542,
6,
5707,
6,
11858,
549,
17444,
427,
2291,
5,
4350,
3274,
3,
31,
566,
5,
584,
5,
21520,
9,
26,
1273,
31,
3430,
5707,
5,
10812,
3274,
2542,
5,
10812,
3430,
11858,
5,
6146,
3274... |
What is the country of t1 place player wayne grady? | CREATE TABLE table_name_9 (country VARCHAR, place VARCHAR, player VARCHAR) | SELECT country FROM table_name_9 WHERE place = "t1" AND player = "wayne grady" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1298,
41,
17529,
584,
4280,
28027,
6,
286,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
684,
13,
3,
17,
536,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
684,
21680,
953,
834,
4350,
834,
1298,
549,
17444,
427,
286,
3274,
96,
17,
536,
121,
3430,
1959,
3274,
96,
1343,
29,
15,
3,
3987,
63,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many games had a record of 16-17? | CREATE TABLE table_name_83 (game VARCHAR, record VARCHAR) | SELECT COUNT(game) FROM table_name_83 WHERE record = "16-17" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4591,
41,
7261,
584,
4280,
28027,
6,
1368,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
1031,
141,
3,
9,
1368,
13,
898,
10794,
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,
2847,
17161,
599,
7261,
61,
21680,
953,
834,
4350,
834,
4591,
549,
17444,
427,
1368,
3274,
96,
2938,
10794,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the production code of the episode with series #8? | CREATE TABLE table_28967275_2 (
production_code VARCHAR,
series__number VARCHAR
) | SELECT production_code FROM table_28967275_2 WHERE series__number = 8 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2577,
4314,
5865,
3072,
834,
357,
41,
999,
834,
4978,
584,
4280,
28027,
6,
939,
834,
834,
5525,
1152,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
99... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
999,
834,
4978,
21680,
953,
834,
2577,
4314,
5865,
3072,
834,
357,
549,
17444,
427,
939,
834,
834,
5525,
1152,
3274,
505,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the name of the element with a calculated value of 56? | CREATE TABLE table_name_57 (
name VARCHAR,
calculated VARCHAR
) | SELECT name FROM table_name_57 WHERE calculated = "56" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3436,
41,
564,
584,
4280,
28027,
6,
11338,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
564,
13,
8,
3282,
28,
3,
9,
11338,
701,
13,
1152... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
564,
21680,
953,
834,
4350,
834,
3436,
549,
17444,
427,
11338,
3274,
96,
4834,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
WHAT ARE THE HIGHEST POINTS WITH GOALS LARGER THAN 48, WINS LESS THAN 19, GOALS AGAINST SMALLER THAN 44, DRAWS LARGER THAN 5? | CREATE TABLE table_name_1 (
points INTEGER,
draws VARCHAR,
goals_against VARCHAR,
goals_for VARCHAR,
wins VARCHAR
) | SELECT MAX(points) FROM table_name_1 WHERE goals_for > 48 AND wins < 19 AND goals_against < 44 AND draws > 5 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
536,
41,
979,
3,
21342,
17966,
6,
14924,
584,
4280,
28027,
6,
1766,
834,
9,
16720,
7,
17,
584,
4280,
28027,
6,
1766,
834,
1161,
584,
4280,
28027,
6,
9204,
584,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
2700,
7,
61,
21680,
953,
834,
4350,
834,
536,
549,
17444,
427,
1766,
834,
1161,
2490,
4678,
3430,
9204,
3,
2,
957,
3430,
1766,
834,
9,
16720,
7,
17,
3,
2,
8537,
3430,
14924,
2490,
305,
1,
-100,
-10... |
What was Australia's place? | CREATE TABLE table_name_99 (
place VARCHAR,
country VARCHAR
) | SELECT place FROM table_name_99 WHERE country = "australia" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3264,
41,
286,
584,
4280,
28027,
6,
684,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
2051,
31,
7,
286,
58,
1,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
286,
21680,
953,
834,
4350,
834,
3264,
549,
17444,
427,
684,
3274,
96,
2064,
8792,
23,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
List the number of years where ritchie ocampo was the mutya ng pilipinas winner. | CREATE TABLE table_26854 (
"Year" real,
"Mutya ng Pilipinas Asia Pacific" text,
"1st runner-up" text,
"2nd runner-up" text,
"3rd runner-up" text,
"4th runner-up" text
) | SELECT COUNT("Year") FROM table_26854 WHERE "Mutya ng Pilipinas Asia Pacific" = 'Ritchie Ocampo' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
3651,
5062,
41,
96,
476,
2741,
121,
490,
6,
96,
329,
76,
17,
63,
9,
3,
1725,
16536,
23,
3180,
9,
7,
3826,
5824,
121,
1499,
6,
96,
536,
7,
17,
3,
10806,
18,
413,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
476,
2741,
8512,
21680,
953,
834,
357,
3651,
5062,
549,
17444,
427,
96,
329,
76,
17,
63,
9,
3,
1725,
16536,
23,
3180,
9,
7,
3826,
5824,
121,
3274,
3,
31,
448,
155,
9781,
411,
12389,
32,
31... |
When Bob Dole had 26%, and Pete du Pont had 0%, what did Pat Robertson have? | CREATE TABLE table_name_43 (
pat_robertson VARCHAR,
bob_dole VARCHAR,
pete_du_pont VARCHAR
) | SELECT pat_robertson FROM table_name_43 WHERE bob_dole = "26%" AND pete_du_pont = "0%" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4906,
41,
6234,
834,
5840,
49,
17,
739,
584,
4280,
28027,
6,
3,
17396,
834,
26,
32,
109,
584,
4280,
28027,
6,
3947,
15,
834,
1259,
834,
5041,
17,
584,
4280,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
6234,
834,
5840,
49,
17,
739,
21680,
953,
834,
4350,
834,
4906,
549,
17444,
427,
3,
17396,
834,
26,
32,
109,
3274,
96,
357,
6370,
121,
3430,
3947,
15,
834,
1259,
834,
5041,
17,
3274,
96,
6932,
121,
1,
-100,
-100,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.