NATURAL_LANG stringlengths 0 446 | SCHEMA stringlengths 27 2.21k | SQL stringlengths 18 453 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|
Who is the opponent in game 5? | CREATE TABLE table_20745706_1 (
opponent VARCHAR,
_number VARCHAR
) | SELECT opponent FROM table_20745706_1 WHERE _number = "5" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1755,
4581,
3436,
5176,
834,
536,
41,
15264,
584,
4280,
28027,
6,
3,
834,
5525,
1152,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
19,
8,
15264,
16,
467,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
15264,
21680,
953,
834,
1755,
4581,
3436,
5176,
834,
536,
549,
17444,
427,
3,
834,
5525,
1152,
3274,
96,
17395,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What percentage of Asians are there in the year 2009? | CREATE TABLE table_19577 (
"Year" real,
"Enrollment" real,
"Black (%)" text,
"White (%)" text,
"Hispanic (%)" text,
"Asian (%)" text,
"Free/reduced lunch (%)" text
) | SELECT "Asian (%)" FROM table_19577 WHERE "Year" = '2009' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
22464,
4013,
41,
96,
476,
2741,
121,
490,
6,
96,
8532,
4046,
297,
121,
490,
6,
96,
20096,
41,
6210,
121,
1499,
6,
96,
25571,
41,
6210,
121,
1499,
6,
96,
12146,
14147,
253... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10488,
41,
6210,
121,
21680,
953,
834,
22464,
4013,
549,
17444,
427,
96,
476,
2741,
121,
3274,
3,
31,
16660,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the starting position of Joie Chitwood when he finished more than 200 laps? | CREATE TABLE table_name_49 (start VARCHAR, laps INTEGER) | SELECT start FROM table_name_49 WHERE laps > 200 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3647,
41,
10208,
584,
4280,
28027,
6,
14941,
7,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
1684,
1102,
13,
2194,
23,
15,
2695,
17,
2037,
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,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
456,
21680,
953,
834,
4350,
834,
3647,
549,
17444,
427,
14941,
7,
2490,
2382,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name the representating for ingenj r andr es luftf rd | CREATE TABLE table_name_82 (
representing VARCHAR,
original_title VARCHAR
) | SELECT representing FROM table_name_82 WHERE original_title = "ingenjör andrées luftfärd" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4613,
41,
9085,
584,
4280,
28027,
6,
926,
834,
21869,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
4221,
1014,
21,
16,
729,
354,
3,
52,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
9085,
21680,
953,
834,
4350,
834,
4613,
549,
17444,
427,
926,
834,
21869,
3274,
96,
53,
35,
354,
4446,
11,
52,
1325,
3,
20620,
89,
3185,
26,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
On what date was the Competition of Friendly held? | CREATE TABLE table_name_70 (date VARCHAR, competition VARCHAR) | SELECT date FROM table_name_70 WHERE competition = "friendly" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2518,
41,
5522,
584,
4280,
28027,
6,
2259,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
461,
125,
833,
47,
8,
15571,
13,
27105,
1213,
58,
1,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2518,
549,
17444,
427,
2259,
3274,
96,
4905,
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 team won when the race time was 3:12:30? | CREATE TABLE table_2175685_1 (team VARCHAR, race_time VARCHAR) | SELECT team FROM table_2175685_1 WHERE race_time = "3:12:30" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
2517,
4834,
4433,
834,
536,
41,
11650,
584,
4280,
28027,
6,
1964,
834,
715,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
372,
751,
116,
8,
1964,
97,
47,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
372,
21680,
953,
834,
357,
2517,
4834,
4433,
834,
536,
549,
17444,
427,
1964,
834,
715,
3274,
96,
519,
10,
536,
21876,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the number of each allergie type the girl named Lisa has? Show a pie chart. | CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20)
)
CREATE TABLE Allergy_Type (
Allergy VARCHAR(20),
AllergyType VARCHAR(20)
) | SELECT AllergyType, COUNT(AllergyType) FROM Allergy_Type AS T1 JOIN Has_Allergy AS T2 ON T1.Allergy = T2.Allergy JOIN Student AS T3 ON T3.StuID = T2.StuID WHERE T3.Fname = "Lisa" GROUP BY AllergyType | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
6341,
41,
3,
13076,
4309,
3,
21342,
17966,
6,
301,
23954,
584,
4280,
28027,
599,
2122,
201,
377,
4350,
584,
4280,
28027,
599,
2122,
201,
7526,
3,
21342,
17966,
6,
679,
226,
584,
4280,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
49,
122,
63,
25160,
6,
2847,
17161,
599,
6838,
49,
122,
63,
25160,
61,
21680,
432,
49,
122,
63,
834,
25160,
6157,
332,
536,
3,
15355,
3162,
4498,
834,
6838,
49,
122,
63,
6157,
332,
357,
9191,
332,
5411,
6838,... |
Who had the highest assists on the November 13 game? | CREATE TABLE table_51824 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT "High assists" FROM table_51824 WHERE "Date" = 'november 13' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
755,
2606,
2266,
41,
96,
23055,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
18699,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
21417,
979,
121,
1499,
6,
96,
21417,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
21417,
13041,
121,
21680,
953,
834,
755,
2606,
2266,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
5326,
18247,
1179,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is maximum age of patients whose insurance is private and year of death is less than 2126? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT MAX(demographic.age) FROM demographic WHERE demographic.insurance = "Private" AND demographic.dod_year < "2126.0" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
14798,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
564,
1499,
6,
2774,
1947,
834,
8547,
302,
1499,
6,
1246,
1499,
6,
103,
115,
1499,
6,
7285,
1499,
6,
1612,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
1778,
16587,
5,
545,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
29441,
3274,
96,
7855,
208,
342,
121,
3430,
14798,
5,
26,
32,
26,
834,
1201,
3,
2,
96,
24837,
22642,
121,
1,
-100,
-100,
-100,
-100,
... |
What is the total height of the player with a birthdate on September 2, 1973? | CREATE TABLE table_name_65 (height__cm_ VARCHAR, birthdate VARCHAR) | SELECT COUNT(height__cm_) FROM table_name_65 WHERE birthdate = "september 2, 1973" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4122,
41,
88,
2632,
834,
834,
75,
51,
834,
584,
4280,
28027,
6,
3879,
5522,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
792,
3902,
13,
8,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
88,
2632,
834,
834,
75,
51,
834,
61,
21680,
953,
834,
4350,
834,
4122,
549,
17444,
427,
3879,
5522,
3274,
96,
7,
6707,
18247,
3547,
17107,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the district with the candidates leven powell (f) 63.8% roger west (dr) 36.4%? | CREATE TABLE table_2668405_17 (district VARCHAR, candidates VARCHAR) | SELECT district FROM table_2668405_17 WHERE candidates = "Leven Powell (F) 63.8% Roger West (DR) 36.4%" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
3539,
4608,
3076,
834,
2517,
41,
26,
23,
20066,
584,
4280,
28027,
6,
4341,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
3939,
28,
8,
4341,
90,
1926... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3939,
21680,
953,
834,
357,
3539,
4608,
3076,
834,
2517,
549,
17444,
427,
4341,
3274,
96,
434,
6190,
26458,
41,
371,
61,
3,
3891,
5,
5953,
9099,
1244,
41,
3913,
61,
4475,
5,
5988,
121,
1,
-100,
-100,
-100,
-100,
-... |
For those employees who do not work in departments with managers that have ids between 100 and 200, find last_name and department_id , and visualize them by a bar chart, and I want to list in descending by the X please. | CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
) | SELECT LAST_NAME, DEPARTMENT_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY LAST_NAME DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3248,
41,
301,
5618,
8015,
834,
4309,
7908,
1982,
599,
8525,
632,
201,
3,
13733,
26418,
834,
24604,
12200,
134,
3,
4331,
4059,
599,
2445,
201,
3,
16034,
16359,
834,
5911,
5596,
3,
4331... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
301,
12510,
834,
567,
17683,
6,
3396,
19846,
11810,
834,
4309,
21680,
1652,
549,
17444,
427,
4486,
3396,
19846,
11810,
834,
4309,
3388,
41,
23143,
14196,
3396,
19846,
11810,
834,
4309,
21680,
10521,
549,
17444,
427,
283,
... |
What attendance is listed against the date of bye? | CREATE TABLE table_name_4 (
attendance VARCHAR,
date VARCHAR
) | SELECT attendance FROM table_name_4 WHERE date = "bye" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
591,
41,
11364,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
11364,
19,
2616,
581,
8,
833,
13,
57,
15,
58,
1,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
11364,
21680,
953,
834,
4350,
834,
591,
549,
17444,
427,
833,
3274,
96,
969,
15,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the number of "to par" in Mexico with a winning score of 67-67-69-70=273? | CREATE TABLE table_13388681_1 (to_par VARCHAR, country VARCHAR, winning_score VARCHAR) | SELECT to_par FROM table_13388681_1 WHERE country = "Mexico" AND winning_score = 67 - 67 - 69 - 70 = 273 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
3747,
3840,
4959,
834,
536,
41,
235,
834,
1893,
584,
4280,
28027,
6,
684,
584,
4280,
28027,
6,
3447,
834,
7,
9022,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
12,
834,
1893,
21680,
953,
834,
2368,
3747,
3840,
4959,
834,
536,
549,
17444,
427,
684,
3274,
96,
329,
994,
5807,
121,
3430,
3447,
834,
7,
9022,
3274,
3,
3708,
3,
18,
3,
3708,
3,
18,
3,
3951,
3,
18,
2861,
3274,
... |
How many caps does Jon Dahl Tomasson, who has less than 0.46 goals per match, have? | CREATE TABLE table_name_97 (
caps VARCHAR,
name VARCHAR,
goals_per_match VARCHAR
) | SELECT COUNT(caps) FROM table_name_97 WHERE name = "jon dahl tomasson" AND goals_per_match < 0.46 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4327,
41,
16753,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
6,
1766,
834,
883,
834,
19515,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
16753... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2847,
17161,
599,
4010,
7,
61,
21680,
953,
834,
4350,
834,
4327,
549,
17444,
427,
564,
3274,
96,
15429,
836,
107,
40,
12,
2754,
739,
121,
3430,
1766,
834,
883,
834,
19515,
3,
2,
4097,
4448,
1,
-100,
-100,
-100,
-1... |
What airport is in Toronto? | CREATE TABLE table_name_87 (airport VARCHAR, city VARCHAR) | SELECT airport FROM table_name_87 WHERE city = "toronto" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4225,
41,
2256,
1493,
584,
4280,
28027,
6,
690,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
3761,
19,
16,
7030,
58,
1,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3761,
21680,
953,
834,
4350,
834,
4225,
549,
17444,
427,
690,
3274,
96,
235,
4438,
32,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
what the age of patient 006-143187 was during their current hospital visit? | CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
) | SELECT patient.age FROM patient WHERE patient.uniquepid = '006-143187' AND patient.hospitaldischargetime IS NULL | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1868,
41,
775,
12417,
1499,
6,
1868,
15878,
3734,
21545,
23,
26,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
7285,
1499,
6,
1246,
1499,
6,
11655,
485,
1499,
6,
2833,
23,
26,
381,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
1868,
5,
545,
21680,
1868,
549,
17444,
427,
1868,
5,
202,
1495,
12417,
3274,
3,
31,
1206,
948,
18,
25133,
25828,
31,
3430,
1868,
5,
31386,
26,
159,
7993,
715,
6827,
13046,
10376,
1,
-100,
-100,
-100,
-100,
-100,
-10... |
Name the to for 19 league apps | CREATE TABLE table_21220720_1 (
to VARCHAR,
league_apps VARCHAR
) | SELECT to FROM table_21220720_1 WHERE league_apps = 19 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
24837,
1755,
18517,
834,
536,
41,
12,
584,
4280,
28027,
6,
5533,
834,
3096,
7,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
12,
21,
957,
5533,
4050,
1,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
12,
21680,
953,
834,
24837,
1755,
18517,
834,
536,
549,
17444,
427,
5533,
834,
3096,
7,
3274,
957,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Find the schools that were either founded after 1850 or public. | CREATE TABLE basketball_match (
team_id number,
school_id number,
team_name text,
acc_regular_season text,
acc_percent text,
acc_home text,
acc_road text,
all_games text,
all_games_percent number,
all_home text,
all_road text,
all_neutral text
)
CREATE TABLE university (
school_id number,
school text,
location text,
founded number,
affiliation text,
enrollment number,
nickname text,
primary_conference text
) | SELECT school FROM university WHERE founded > 1850 OR affiliation = 'Public' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
8498,
834,
19515,
41,
372,
834,
23,
26,
381,
6,
496,
834,
23,
26,
381,
6,
372,
834,
4350,
1499,
6,
3,
6004,
834,
60,
122,
4885,
834,
9476,
1499,
6,
3,
6004,
834,
883,
3728,
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,
496,
21680,
3819,
549,
17444,
427,
5710,
2490,
507,
1752,
4674,
24405,
3274,
3,
31,
30931,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many documents in different ending date? Return a line chart binning ending date by year interval, could you rank by the X-axis from low to high? | CREATE TABLE All_Documents (
Document_ID INTEGER,
Date_Stored DATETIME,
Document_Type_Code CHAR(15),
Document_Name CHAR(255),
Document_Description CHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Ref_Locations (
Location_Code CHAR(15),
Location_Name VARCHAR(255),
Location_Description VARCHAR(255)
)
CREATE TABLE Documents_to_be_Destroyed (
Document_ID INTEGER,
Destruction_Authorised_by_Employee_ID INTEGER,
Destroyed_by_Employee_ID INTEGER,
Planned_Destruction_Date DATETIME,
Actual_Destruction_Date DATETIME,
Other_Details VARCHAR(255)
)
CREATE TABLE Document_Locations (
Document_ID INTEGER,
Location_Code CHAR(15),
Date_in_Location_From DATETIME,
Date_in_Locaton_To DATETIME
)
CREATE TABLE Employees (
Employee_ID INTEGER,
Role_Code CHAR(15),
Employee_Name VARCHAR(255),
Gender_MFU CHAR(1),
Date_of_Birth DATETIME,
Other_Details VARCHAR(255)
)
CREATE TABLE Roles (
Role_Code CHAR(15),
Role_Name VARCHAR(255),
Role_Description VARCHAR(255)
)
CREATE TABLE Ref_Calendar (
Calendar_Date DATETIME,
Day_Number INTEGER
)
CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_Type_Name VARCHAR(255),
Document_Type_Description VARCHAR(255)
) | SELECT Date_in_Locaton_To, COUNT(Date_in_Locaton_To) FROM Document_Locations ORDER BY Date_in_Locaton_To | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
432,
834,
4135,
1071,
4128,
41,
11167,
834,
4309,
3,
21342,
17966,
6,
7678,
834,
28719,
26,
309,
6048,
382,
15382,
6,
11167,
834,
25160,
834,
22737,
3,
28027,
599,
1808,
201,
11167,
83... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
7678,
834,
77,
834,
434,
32,
2138,
106,
834,
3696,
6,
2847,
17161,
599,
308,
342,
834,
77,
834,
434,
32,
2138,
106,
834,
3696,
61,
21680,
11167,
834,
434,
32,
75,
1628,
4674,
11300,
272,
476,
7678,
834,
77,
834,
... |
What's the number of seasons i which USC Bassam lost to eventual runner-up? | CREATE TABLE table_12444503_1 (
season VARCHAR,
lost_to_eventual_runner_up VARCHAR
) | SELECT COUNT(season) FROM table_12444503_1 WHERE lost_to_eventual_runner_up = "USC Bassam" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2122,
3628,
10593,
519,
834,
536,
41,
774,
584,
4280,
28027,
6,
1513,
834,
235,
834,
15,
2169,
3471,
834,
10806,
834,
413,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
9476,
61,
21680,
953,
834,
2122,
3628,
10593,
519,
834,
536,
549,
17444,
427,
1513,
834,
235,
834,
15,
2169,
3471,
834,
10806,
834,
413,
3274,
96,
3063,
254,
15049,
265,
121,
1,
-100,
-100,
-100,
-... |
What catalog came out after 2000? | CREATE TABLE table_32941 (
"Region" text,
"Year" real,
"Label" text,
"Format" text,
"Catalog" text
) | SELECT "Catalog" FROM table_32941 WHERE "Year" > '2000' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2668,
4240,
536,
41,
96,
17748,
23,
106,
121,
1499,
6,
96,
476,
2741,
121,
490,
6,
96,
434,
10333,
121,
1499,
6,
96,
3809,
3357,
121,
1499,
6,
96,
18610,
9,
2152,
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,
0,
0,
0,
0... | [
3,
23143,
14196,
96,
18610,
9,
2152,
121,
21680,
953,
834,
2668,
4240,
536,
549,
17444,
427,
96,
476,
2741,
121,
2490,
3,
31,
13527,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the average Cuts that were made with a Top-10 that is larger than 9? | CREATE TABLE table_43337 (
"Tournament" text,
"Wins" real,
"Top-5" real,
"Top-10" real,
"Top-25" real,
"Events" real,
"Cuts made" real
) | SELECT AVG("Cuts made") FROM table_43337 WHERE "Top-10" > '9' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4906,
519,
4118,
41,
96,
382,
1211,
20205,
17,
121,
1499,
6,
96,
18455,
7,
121,
490,
6,
96,
22481,
18,
17395,
490,
6,
96,
22481,
4536,
121,
490,
6,
96,
22481,
14855,
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,
71,
17217,
599,
121,
15784,
17,
7,
263,
8512,
21680,
953,
834,
4906,
519,
4118,
549,
17444,
427,
96,
22481,
4536,
121,
2490,
3,
31,
1298,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What Nominating festival was party of the adjustment film? | CREATE TABLE table_name_69 (
nominating_festival VARCHAR,
film VARCHAR
) | SELECT nominating_festival FROM table_name_69 WHERE film = "adjustment" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3951,
41,
150,
1109,
1014,
834,
89,
24742,
584,
4280,
28027,
6,
814,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
465,
1109,
1014,
3994,
47,
1088,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
150,
1109,
1014,
834,
89,
24742,
21680,
953,
834,
4350,
834,
3951,
549,
17444,
427,
814,
3274,
96,
9,
26,
4998,
297,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name the sum of 2010 for 2000 of 17 and 2005 more than 16 | CREATE TABLE table_56916 (
"Year" text,
"2010" real,
"2009" real,
"2008" real,
"2005" real,
"2000" real
) | SELECT SUM("2010") FROM table_56916 WHERE "2000" = '17' AND "2005" > '16' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
755,
3951,
2938,
41,
96,
476,
2741,
121,
1499,
6,
96,
14926,
121,
490,
6,
96,
16660,
121,
490,
6,
96,
16128,
121,
490,
6,
96,
22594,
121,
490,
6,
96,
13527,
121,
490,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
121,
14926,
8512,
21680,
953,
834,
755,
3951,
2938,
549,
17444,
427,
96,
13527,
121,
3274,
3,
31,
2517,
31,
3430,
96,
22594,
121,
2490,
3,
31,
2938,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Where was the away team st kilda? | CREATE TABLE table_name_52 (venue VARCHAR, away_team VARCHAR) | SELECT venue FROM table_name_52 WHERE away_team = "st kilda" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5373,
41,
15098,
584,
4280,
28027,
6,
550,
834,
11650,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2840,
47,
8,
550,
372,
3,
7,
17,
3,
157,
173,
26,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
5669,
21680,
953,
834,
4350,
834,
5373,
549,
17444,
427,
550,
834,
11650,
3274,
96,
7,
17,
3,
157,
173,
26,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the surface for the tournament of manta, ecuador? | CREATE TABLE table_39169 (
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent" text,
"Score" text
) | SELECT "Surface" FROM table_39169 WHERE "Tournament" = 'manta, ecuador' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3288,
27096,
41,
96,
308,
342,
121,
1499,
6,
96,
382,
1211,
20205,
17,
121,
1499,
6,
96,
134,
450,
4861,
121,
1499,
6,
96,
667,
102,
9977,
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,
96,
134,
450,
4861,
121,
21680,
953,
834,
3288,
27096,
549,
17444,
427,
96,
382,
1211,
20205,
17,
121,
3274,
3,
31,
348,
17,
9,
6,
3,
15,
1071,
7923,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
type ii diabetes, depression, bmi < 44 ,ages between 21 _ 65 and female | CREATE TABLE table_dev_42 (
"id" int,
"gender" string,
"depression" bool,
"familial_hypercholesterolemia" bool,
"microalbuminuria" int,
"renal_disease" bool,
"diabetic" string,
"estimated_glomerular_filtration_rate_egfr" int,
"serum_creatinine" float,
"fbg" int,
"body_mass_index_bmi" float,
"triglyceride_tg" float,
"a1c" float,
"age" float,
"NOUSE" float
) | SELECT * FROM table_dev_42 WHERE diabetic = 'ii' AND depression = 1 AND body_mass_index_bmi < 44 AND (age >= 21 AND age <= 65) AND gender = 'female' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
9776,
834,
4165,
41,
96,
23,
26,
121,
16,
17,
6,
96,
122,
3868,
121,
6108,
6,
96,
221,
8243,
121,
3,
12840,
40,
6,
96,
89,
9,
5952,
138,
834,
13397,
49,
14297,
2613,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
1429,
21680,
953,
834,
9776,
834,
4165,
549,
17444,
427,
17496,
447,
3274,
3,
31,
23,
23,
31,
3430,
7562,
3274,
209,
3430,
643,
834,
2754,
7,
834,
18288,
834,
115,
51,
23,
3,
2,
8537,
3430,
41,
545,
2490,
2423,
... |
How many faculty members do we have for each rank? render a bar chart, and sort from high to low by the Y. | CREATE TABLE Faculty (
FacID INTEGER,
Lname VARCHAR(15),
Fname VARCHAR(15),
Rank VARCHAR(15),
Sex VARCHAR(1),
Phone INTEGER,
Room VARCHAR(5),
Building VARCHAR(13)
)
CREATE TABLE Participates_in (
stuid INTEGER,
actid INTEGER
)
CREATE TABLE Activity (
actid INTEGER,
activity_name varchar(25)
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
)
CREATE TABLE Faculty_Participates_in (
FacID INTEGER,
actid INTEGER
) | SELECT Rank, COUNT(Rank) FROM Faculty GROUP BY Rank ORDER BY COUNT(Rank) DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
16896,
41,
1699,
75,
4309,
3,
21342,
17966,
6,
301,
4350,
584,
4280,
28027,
599,
1808,
201,
377,
4350,
584,
4280,
28027,
599,
1808,
201,
3,
22557,
584,
4280,
28027,
599,
1808,
201,
679... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
22557,
6,
2847,
17161,
599,
22557,
61,
21680,
16896,
350,
4630,
6880,
272,
476,
3,
22557,
4674,
11300,
272,
476,
2847,
17161,
599,
22557,
61,
309,
25067,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Which Record has a Game larger than 32, and a December smaller than 21? | CREATE TABLE table_34737 (
"Game" real,
"December" real,
"Opponent" text,
"Score" text,
"Record" text,
"Points" real
) | SELECT "Record" FROM table_34737 WHERE "Game" > '32' AND "December" < '21' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3710,
27931,
41,
96,
23055,
121,
490,
6,
96,
29835,
121,
490,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
1649,
7621,
121,
1499,
6,
96,
22512,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
1649,
7621,
121,
21680,
953,
834,
3710,
27931,
549,
17444,
427,
96,
23055,
121,
2490,
3,
31,
2668,
31,
3430,
96,
29835,
121,
3,
2,
3,
31,
2658,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
When id the episode broadcast with Mark Webber as Jamie and John's guest? | CREATE TABLE table_30961 (
"Episode" text,
"First broadcast" text,
"Andrew and Georgies guest Lee Mack replaced Andrew Flintoff as team captain for one week in series 4, episode 2." text,
"Jamie and Johns guest" text,
"Scores" text
) | SELECT "First broadcast" FROM table_30961 WHERE "Jamie and Johns guest" = 'Mark Webber' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1458,
4314,
536,
41,
96,
427,
102,
159,
32,
221,
121,
1499,
6,
96,
25171,
6878,
121,
1499,
6,
96,
7175,
60,
210,
11,
20916,
725,
3886,
5531,
19155,
5821,
5954,
29612,
1647,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
25171,
6878,
121,
21680,
953,
834,
1458,
4314,
536,
549,
17444,
427,
96,
683,
9,
2720,
11,
1079,
7,
3886,
121,
3274,
3,
31,
19762,
1620,
1152,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What district has a constituency of 60? | CREATE TABLE table_name_27 (
district VARCHAR,
constituency_number VARCHAR
) | SELECT district FROM table_name_27 WHERE constituency_number = "60" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2555,
41,
3939,
584,
4280,
28027,
6,
6439,
4392,
834,
5525,
1152,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
3939,
65,
3,
9,
6439,
4392,
13,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3939,
21680,
953,
834,
4350,
834,
2555,
549,
17444,
427,
6439,
4392,
834,
5525,
1152,
3274,
96,
3328,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which Driver has a Sponsor of pdvsa? | CREATE TABLE table_name_26 (
driver_s_ VARCHAR,
sponsor_s_ VARCHAR
) | SELECT driver_s_ FROM table_name_26 WHERE sponsor_s_ = "pdvsa" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2688,
41,
2535,
834,
7,
834,
584,
4280,
28027,
6,
9037,
834,
7,
834,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
10546,
65,
3,
9,
19254,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2535,
834,
7,
834,
21680,
953,
834,
4350,
834,
2688,
549,
17444,
427,
9037,
834,
7,
834,
3274,
96,
102,
26,
208,
7,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the sum of Polish Cup, when Player is 'Maciej Iwa ski', and when Ekstraklasa is less than 1? | CREATE TABLE table_60549 (
"Player" text,
"Position" text,
"Ekstraklasa" real,
"Polish Cup" real,
"UEFA Cup" real,
"Total" real
) | SELECT SUM("Polish Cup") FROM table_60549 WHERE "Player" = 'maciej iwański' AND "Ekstraklasa" < '1' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3328,
755,
3647,
41,
96,
15800,
49,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
427,
157,
3109,
8142,
7,
9,
121,
490,
6,
96,
8931,
1273,
3802,
121,
490,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
121,
8931,
1273,
3802,
8512,
21680,
953,
834,
3328,
755,
3647,
549,
17444,
427,
96,
15800,
49,
121,
3274,
3,
31,
51,
9,
6267,
354,
3,
23,
210,
9,
2,
4009,
31,
3430,
96,
427,
157,
3109,
8142,
7,
... |
Which Goals against has Points smaller than 26, and Goals for smaller than 38, and a Position larger than 14, and a Goal Difference smaller than -32? | CREATE TABLE table_name_65 (goals_against INTEGER, goal_difference VARCHAR, position VARCHAR, points VARCHAR, goals_for VARCHAR) | SELECT MAX(goals_against) FROM table_name_65 WHERE points < 26 AND goals_for < 38 AND position > 14 AND goal_difference < -32 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4122,
41,
839,
5405,
834,
9,
16720,
7,
17,
3,
21342,
17966,
6,
1288,
834,
26,
99,
11788,
584,
4280,
28027,
6,
1102,
584,
4280,
28027,
6,
979,
584,
4280,
28027,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
839,
5405,
834,
9,
16720,
7,
17,
61,
21680,
953,
834,
4350,
834,
4122,
549,
17444,
427,
979,
3,
2,
2208,
3430,
1766,
834,
1161,
3,
2,
6654,
3430,
1102,
2490,
968,
3430,
1288,
834,
26,
99,
11788,
3,... |
What was the second qualification time with a first qualification time of 1:02.813? | CREATE TABLE table_name_29 (
qual_2 VARCHAR,
qual_1 VARCHAR
) | SELECT qual_2 FROM table_name_29 WHERE qual_1 = "1:02.813" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3166,
41,
3,
11433,
834,
357,
584,
4280,
28027,
6,
3,
11433,
834,
536,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
511,
15513,
97,
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
11433,
834,
357,
21680,
953,
834,
4350,
834,
3166,
549,
17444,
427,
3,
11433,
834,
536,
3274,
96,
536,
10,
12328,
927,
2368,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
How many games were played where exactly 15 points were scored? | CREATE TABLE table_name_34 (
played INTEGER,
points VARCHAR
) | SELECT SUM(played) FROM table_name_34 WHERE points = 15 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3710,
41,
1944,
3,
21342,
17966,
6,
979,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
1031,
130,
1944,
213,
1776,
627,
979,
130,
5799,
58,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
180,
6122,
599,
4895,
15,
26,
61,
21680,
953,
834,
4350,
834,
3710,
549,
17444,
427,
979,
3274,
627,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Which Start has a Duration of 6 months 2 days? | CREATE TABLE table_78896 (
"Name" text,
"Wins" real,
"Start" text,
"Duration" text,
"Defeated by" text
) | SELECT "Start" FROM table_78896 WHERE "Duration" = '6 months 2 days' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3940,
3914,
948,
41,
96,
23954,
121,
1499,
6,
96,
18455,
7,
121,
490,
6,
96,
7681,
17,
121,
1499,
6,
96,
12998,
2661,
121,
1499,
6,
96,
16196,
15,
920,
57,
121,
1499,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
7681,
17,
121,
21680,
953,
834,
3940,
3914,
948,
549,
17444,
427,
96,
12998,
2661,
121,
3274,
3,
31,
948,
767,
204,
477,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is High Rebounds, when High Assists is 'Delonte West (10)'? | CREATE TABLE table_50736 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT "High rebounds" FROM table_50736 WHERE "High assists" = 'delonte west (10)' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1752,
940,
3420,
41,
96,
23055,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
18699,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
21417,
979,
121,
1499,
6,
96,
21417,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
21417,
3,
23768,
121,
21680,
953,
834,
1752,
940,
3420,
549,
17444,
427,
96,
21417,
13041,
121,
3274,
3,
31,
221,
40,
1770,
15,
4653,
41,
16968,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
How many losses have a year later than 2001? | CREATE TABLE table_name_52 (
losses INTEGER,
year INTEGER
) | SELECT SUM(losses) FROM table_name_52 WHERE year > 2001 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5373,
41,
8467,
3,
21342,
17966,
6,
215,
3,
21342,
17966,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
8467,
43,
3,
9,
215,
865,
145,
4402,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
180,
6122,
599,
2298,
2260,
61,
21680,
953,
834,
4350,
834,
5373,
549,
17444,
427,
215,
2490,
4402,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Return a bar chart about the distribution of All_Road and School_ID . | CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
) | SELECT All_Road, School_ID FROM basketball_match | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
8498,
834,
19515,
41,
2271,
834,
4309,
16,
17,
6,
1121,
834,
4309,
16,
17,
6,
2271,
834,
23954,
1499,
6,
3,
14775,
834,
17748,
4885,
834,
134,
15,
9,
739,
1499,
6,
3,
14775,
834,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
432,
834,
448,
32,
9,
26,
6,
1121,
834,
4309,
21680,
8498,
834,
19515,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What's the 2012 during Wimbledon and had a Q3 in 2008? | CREATE TABLE table_name_83 (
tournament VARCHAR
) | SELECT 2012 FROM table_name_83 WHERE 2008 = "q3" AND tournament = "wimbledon" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4591,
41,
5892,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
31,
7,
8,
1673,
383,
31489,
11,
141,
3,
9,
1593,
519,
16,
2628,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1673,
21680,
953,
834,
4350,
834,
4591,
549,
17444,
427,
2628,
3274,
96,
1824,
519,
121,
3430,
5892,
3274,
96,
210,
603,
2296,
2029,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
In which place is Emmet French? | CREATE TABLE table_name_2 (place VARCHAR, player VARCHAR) | SELECT place FROM table_name_2 WHERE player = "emmet french" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
357,
41,
4687,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
86,
84,
286,
19,
3967,
3493,
2379,
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,
286,
21680,
953,
834,
4350,
834,
357,
549,
17444,
427,
1959,
3274,
96,
26570,
17,
20609,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What's the shut down state of the unit that's been in commercial operation since 01.02.1984? | CREATE TABLE table_17902 (
"Unit" text,
"Type" text,
"Net power" text,
"Total power" text,
"Construction start" text,
"Construction finish" text,
"Commercial operation" text,
"Shut down" text
) | SELECT "Shut down" FROM table_17902 WHERE "Commercial operation" = '01.02.1984' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26593,
4305,
41,
96,
5110,
155,
121,
1499,
6,
96,
25160,
121,
1499,
6,
96,
9688,
579,
121,
1499,
6,
96,
3696,
1947,
579,
121,
1499,
6,
96,
4302,
7,
26853,
456,
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,
134,
13985,
323,
121,
21680,
953,
834,
26593,
4305,
549,
17444,
427,
96,
10205,
49,
4703,
2986,
121,
3274,
3,
31,
10068,
12328,
2294,
4608,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the average attendance that has june 24 as the date? | CREATE TABLE table_name_14 (
attendance INTEGER,
date VARCHAR
) | SELECT AVG(attendance) FROM table_name_14 WHERE date = "june 24" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2534,
41,
11364,
3,
21342,
17966,
6,
833,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1348,
11364,
24,
65,
3,
6959,
15,
997,
38,
8,
833... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
71,
17217,
599,
15116,
663,
61,
21680,
953,
834,
4350,
834,
2534,
549,
17444,
427,
833,
3274,
96,
6959,
15,
997,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
On April 15 who is the Home team? | CREATE TABLE table_45715 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Record" text
) | SELECT "Home" FROM table_45715 WHERE "Date" = 'april 15' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
3436,
1808,
41,
96,
308,
342,
121,
1499,
6,
96,
553,
159,
155,
127,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
19040,
121,
1499,
6,
96,
1649,
7621,
121,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
3,
23143,
14196,
96,
19040,
121,
21680,
953,
834,
591,
3436,
1808,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
9,
2246,
40,
627,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
how many hours has passed since the last time patient 007-849 visited ward 430 during their current hospital visit? | CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
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 medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
) | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.unitadmittime)) FROM patient WHERE patient.uniquepid = '007-849' AND patient.wardid = 430 AND patient.hospitaldischargetime IS NULL ORDER BY patient.unitadmittime DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
11963,
670,
2562,
41,
11963,
670,
2562,
23,
26,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
2358,
8292,
1499,
6,
2358,
40,
10333,
1499,
6,
2358,
7480,
35,
76,
17552,
381,
6,
11963,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
997,
1429,
41,
13733,
6245,
15382,
599,
31,
1454,
354,
31,
6,
3,
5211,
12224,
6431,
834,
382,
15382,
9960,
61,
3,
18,
3,
13733,
6245,
15382,
599,
31,
1454,
354,
31,
6,
1868,
5,
15129,
20466,
17,
715,
61,
61,
216... |
What was the away team at collingwood? | CREATE TABLE table_name_95 (away_team VARCHAR, home_team VARCHAR) | SELECT away_team AS score FROM table_name_95 WHERE home_team = "collingwood" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3301,
41,
8006,
834,
11650,
584,
4280,
28027,
6,
234,
834,
11650,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
550,
372,
44,
8029,
53,
2037,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
550,
834,
11650,
6157,
2604,
21680,
953,
834,
4350,
834,
3301,
549,
17444,
427,
234,
834,
11650,
3274,
96,
3297,
697,
2037,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Name the women's singles for glenn macfarlane mark leadbeater | CREATE TABLE table_15025 (
"Year" real,
"Men's singles" text,
"Women's singles" text,
"Men's doubles" text,
"Women's doubles" text,
"Mixed doubles" text
) | SELECT "Women's singles" FROM table_15025 WHERE "Men's doubles" = 'glenn macfarlane mark leadbeater' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
12278,
1828,
41,
96,
476,
2741,
121,
490,
6,
96,
329,
35,
31,
7,
712,
7,
121,
1499,
6,
96,
518,
32,
904,
31,
7,
712,
7,
121,
1499,
6,
96,
329,
35,
31,
7,
1486,
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,
96,
518,
32,
904,
31,
7,
712,
7,
121,
21680,
953,
834,
12278,
1828,
549,
17444,
427,
96,
329,
35,
31,
7,
1486,
7,
121,
3274,
3,
31,
3537,
29,
29,
11486,
5544,
8102,
3946,
991,
12745,
49,
31,
1,
-100,
-100,
-10... |
what is the maximum age of married patients whose admission year is in or after 2184? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT MAX(demographic.age) FROM demographic WHERE demographic.marital_status = "MARRIED" AND demographic.admityear >= "2184" | [
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,
4800,
4,
599,
1778,
16587,
5,
545,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
1635,
9538,
834,
8547,
302,
3274,
96,
13845,
25858,
308,
121,
3430,
14798,
5,
20466,
17,
1201,
2490,
2423,
96,
2658,
4608,
121,
1,
-100... |
Show the location name for document "Robin CV". | CREATE TABLE Ref_locations (location_name VARCHAR, location_code VARCHAR); CREATE TABLE All_documents (document_id VARCHAR, document_name VARCHAR); CREATE TABLE Document_locations (document_id VARCHAR, location_code VARCHAR) | SELECT T3.location_name FROM All_documents AS T1 JOIN Document_locations AS T2 ON T1.document_id = T2.document_id JOIN Ref_locations AS T3 ON T2.location_code = T3.location_code WHERE T1.document_name = "Robin CV" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
419,
89,
834,
14836,
7,
41,
14836,
834,
4350,
584,
4280,
28027,
6,
1128,
834,
4978,
584,
4280,
28027,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
432,
834,
28244,
7,
41,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5787,
14836,
834,
4350,
21680,
432,
834,
28244,
7,
6157,
332,
536,
3,
15355,
3162,
11167,
834,
14836,
7,
6157,
332,
357,
9191,
332,
5411,
28244,
834,
23,
26,
3274,
332,
4416,
28244,
834,
23,
26,
3,
15355,
3162,... |
provide the number of patients whose admission year is less than 2184 and lab test fluid is other body fluid? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2184" AND lab.fluid = "Other Body Fluid" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7690,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
2118,
23,
26,
1499,
6,
5059,
715,
1499,
6,
5692,
1499,
6,
701,
834,
15129,
1499,
6,
3783,
1499,
6,
5798,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7690,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7690,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
what's the candidates with party being democratic and dbeingtrict being north carolina 1 | CREATE TABLE table_740 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | SELECT "Candidates" FROM table_740 WHERE "Party" = 'Democratic' AND "District" = 'North Carolina 1' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
940,
2445,
41,
96,
308,
23,
20066,
121,
1499,
6,
96,
1570,
75,
5937,
295,
121,
1499,
6,
96,
13725,
63,
121,
1499,
6,
96,
25171,
8160,
121,
490,
6,
96,
20119,
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,
14050,
12416,
6203,
121,
21680,
953,
834,
940,
2445,
549,
17444,
427,
96,
13725,
63,
121,
3274,
3,
31,
19679,
447,
31,
3430,
96,
308,
23,
20066,
121,
3274,
3,
31,
22969,
5089,
209,
31,
1,
-100,
-100,
-100,
-10... |
What country is team ucla come from? | CREATE TABLE table_49445 (
"Round" real,
"Pick" real,
"Player" text,
"Nationality" text,
"School/Club Team" text
) | SELECT "Nationality" FROM table_49445 WHERE "School/Club Team" = 'ucla' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3647,
591,
2128,
41,
96,
448,
32,
1106,
121,
490,
6,
96,
345,
3142,
121,
490,
6,
96,
15800,
49,
121,
1499,
6,
96,
24732,
485,
121,
1499,
6,
96,
29364,
87,
254,
11158,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
24732,
485,
121,
21680,
953,
834,
3647,
591,
2128,
549,
17444,
427,
96,
29364,
87,
254,
11158,
2271,
121,
3274,
3,
31,
76,
4651,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What was the date in which Behtash Fariba left his team? | CREATE TABLE table_24907 (
"Team" text,
"Outgoing manager" text,
"Manner of departure" text,
"Date of vacancy" text,
"Replaced by" text,
"Date of appointment" text
) | SELECT "Date of vacancy" FROM table_24907 WHERE "Outgoing manager" = 'Behtash Fariba' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2266,
2394,
940,
41,
96,
18699,
121,
1499,
6,
96,
15767,
9545,
2743,
121,
1499,
6,
96,
7296,
687,
13,
12028,
121,
1499,
6,
96,
308,
342,
13,
3,
29685,
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,
308,
342,
13,
3,
29685,
121,
21680,
953,
834,
2266,
2394,
940,
549,
17444,
427,
96,
15767,
9545,
2743,
121,
3274,
3,
31,
2703,
107,
17,
3198,
1699,
6520,
9,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
On what date was Adelaide 36ers the home team? | CREATE TABLE table_49865 (
"Date" text,
"Home team" text,
"Score" text,
"Away team" text,
"Venue" text,
"Box Score" text,
"Report" text
) | SELECT "Date" FROM table_49865 WHERE "Home team" = 'adelaide 36ers' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
3916,
4122,
41,
96,
308,
342,
121,
1499,
6,
96,
19040,
372,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
188,
1343,
372,
121,
1499,
6,
96,
553,
35,
76,
15,
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,
308,
342,
121,
21680,
953,
834,
591,
3916,
4122,
549,
17444,
427,
96,
19040,
372,
121,
3274,
3,
31,
15311,
5385,
4475,
277,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the highest amount of bronze medals when the rank was larger than 9? | CREATE TABLE table_name_46 (
bronze INTEGER,
rank INTEGER
) | SELECT MAX(bronze) FROM table_name_46 WHERE rank > 9 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4448,
41,
13467,
3,
21342,
17966,
6,
11003,
3,
21342,
17966,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2030,
866,
13,
13467,
9365,
7,
116,
8,
11003,
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,
4800,
4,
599,
13711,
776,
61,
21680,
953,
834,
4350,
834,
4448,
549,
17444,
427,
11003,
2490,
668,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
For those employees who was hired before 2002-06-21, find hire_date and the average of employee_id bin hire_date by time, and visualize them by a bar chart, show in ascending by the Y. | CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
) | SELECT HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY AVG(EMPLOYEE_ID) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3248,
41,
301,
5618,
8015,
834,
4309,
7908,
1982,
599,
8525,
632,
201,
3,
13733,
26418,
834,
24604,
12200,
134,
3,
4331,
4059,
599,
2445,
201,
3,
16034,
16359,
834,
5911,
5596,
3,
4331... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
454,
14132,
834,
308,
6048,
6,
71,
17217,
599,
6037,
345,
5017,
476,
5080,
834,
4309,
61,
21680,
1652,
549,
17444,
427,
454,
14132,
834,
308,
6048,
3,
2,
3,
31,
24898,
18,
5176,
16539,
31,
4674,
11300,
272,
476,
7... |
What is the name of the car that was made in the years 1956-1958? | CREATE TABLE table_42314 (
"Country" text,
"Automobile Name" text,
"Manufacturer" text,
"Engine Make/Capacity" text,
"Year" text
) | SELECT "Automobile Name" FROM table_42314 WHERE "Year" = '1956-1958' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
2773,
2534,
41,
96,
10628,
651,
121,
1499,
6,
96,
16204,
14814,
5570,
121,
1499,
6,
96,
7296,
76,
8717,
450,
49,
121,
1499,
6,
96,
31477,
1796,
87,
19566,
9,
6726,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16204,
14814,
5570,
121,
21680,
953,
834,
591,
2773,
2534,
549,
17444,
427,
96,
476,
2741,
121,
3274,
3,
31,
2294,
4834,
4481,
3449,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which Year did not qualify for Playoffs, and had a Division smaller than 3? | CREATE TABLE table_44946 (
"The Year" real,
"Division" real,
"League" text,
"Regular Season" text,
"Playoffs" text
) | SELECT SUM("The Year") FROM table_44946 WHERE "Playoffs" = 'did not qualify' AND "Division" < '3' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
3647,
4448,
41,
96,
634,
2929,
121,
490,
6,
96,
308,
23,
6610,
121,
490,
6,
96,
2796,
9,
5398,
121,
1499,
6,
96,
17748,
4885,
7960,
121,
1499,
6,
96,
15800,
1647,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
634,
2929,
8512,
21680,
953,
834,
591,
3647,
4448,
549,
17444,
427,
96,
15800,
1647,
7,
121,
3274,
3,
31,
12416,
59,
9448,
31,
3430,
96,
308,
23,
6610,
121,
3,
2,
3,
31,
519,
31,
1,
-100,
... |
What is the title of the episode directed by Rich Correll and written by Dennis Rinsler? | CREATE TABLE table_29102100_1 (title VARCHAR, directed_by VARCHAR, written_by VARCHAR) | SELECT title FROM table_29102100_1 WHERE directed_by = "Rich Correll" AND written_by = "Dennis Rinsler" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3166,
14388,
2915,
834,
536,
41,
21869,
584,
4280,
28027,
6,
6640,
834,
969,
584,
4280,
28027,
6,
1545,
834,
969,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
3,
23143,
14196,
2233,
21680,
953,
834,
3166,
14388,
2915,
834,
536,
549,
17444,
427,
6640,
834,
969,
3274,
96,
448,
362,
638,
21290,
121,
3430,
1545,
834,
969,
3274,
96,
308,
35,
29,
159,
16602,
7,
1171,
121,
1,
-100,
-100,
-100,
... |
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, give me the comparison about the sum of manager_id over the hire_date bin hire_date by time by a bar chart, order from low to high by the total number. | CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
) | SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY SUM(MANAGER_ID) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1440,
41,
2847,
17161,
11824,
834,
4309,
3,
4331,
4059,
16426,
6,
2847,
17161,
11824,
834,
567,
17683,
3,
4331,
4059,
599,
2445,
201,
4083,
517,
9215,
834,
4309,
7908,
1982,
599,
1714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
454,
14132,
834,
308,
6048,
6,
180,
6122,
599,
9312,
188,
17966,
834,
4309,
61,
21680,
1652,
549,
17444,
427,
180,
4090,
24721,
272,
7969,
518,
23394,
3,
25129,
3430,
586,
2313,
3430,
3,
6657,
329,
16994,
9215,
834,
... |
Which Segment A has a Segment B of s awning? | CREATE TABLE table_name_61 (
segment_a VARCHAR,
segment_b VARCHAR
) | SELECT segment_a FROM table_name_61 WHERE segment_b = "s awning" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4241,
41,
5508,
834,
9,
584,
4280,
28027,
6,
5508,
834,
115,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
15696,
297,
71,
65,
3,
9,
15696,
297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5508,
834,
9,
21680,
953,
834,
4350,
834,
4241,
549,
17444,
427,
5508,
834,
115,
3274,
96,
7,
3,
29781,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the Attendance at the game against the Cincinnati Bengals? | CREATE TABLE table_name_7 (attendance VARCHAR, opponent VARCHAR) | SELECT attendance FROM table_name_7 WHERE opponent = "cincinnati bengals" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
940,
41,
15116,
663,
584,
4280,
28027,
6,
15264,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
22497,
663,
44,
8,
467,
581,
8,
20862,
20008,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
11364,
21680,
953,
834,
4350,
834,
940,
549,
17444,
427,
15264,
3274,
96,
75,
11542,
29,
18530,
36,
29,
6191,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Give me the number of living patients who have atrial septal defect mitral valve replacement repair atrial-septal defect/sda as their primary disease. | 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
)
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 WHERE demographic.expire_flag = "0" AND demographic.diagnosis = "ATRIAL SEPTAL DEFECT\MITRAL VALVE REPLACEMENT;REPAIR ATRIAL-SEPTAL DEFECT/SDA" | [
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,
994,
2388,
15,
834,
89,
5430,
3274,
96,
632,
121,
3430,
14798,
5,
25930,
4844,
159,
3274,
96,
18... |
After 1983, what was the Position in Seoul, South Korea? | CREATE TABLE table_name_92 (
position VARCHAR,
year VARCHAR,
venue VARCHAR
) | SELECT position FROM table_name_92 WHERE year > 1983 AND venue = "seoul, south korea" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4508,
41,
1102,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
6,
5669,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
621,
15041,
6,
125,
47,
8,
14258,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1102,
21680,
953,
834,
4350,
834,
4508,
549,
17444,
427,
215,
2490,
15041,
3430,
5669,
3274,
96,
7,
15,
7115,
6,
3414,
3,
5543,
15,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who was the match against when on a clay surface during round 2r? | CREATE TABLE table_name_19 (
against VARCHAR,
round VARCHAR,
surface VARCHAR
) | SELECT against FROM table_name_19 WHERE round = "2r" AND surface = "clay" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2294,
41,
581,
584,
4280,
28027,
6,
1751,
584,
4280,
28027,
6,
1774,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
8,
1588,
581,
116,
30,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
581,
21680,
953,
834,
4350,
834,
2294,
549,
17444,
427,
1751,
3274,
96,
357,
52,
121,
3430,
1774,
3274,
96,
4651,
63,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What company collaborated in non-hodgkin lymphoma? | CREATE TABLE table_13337 (
"Name" text,
"Platform" text,
"Indication" text,
"Status" text,
"Collaboration" text
) | SELECT "Collaboration" FROM table_13337 WHERE "Indication" = 'non-hodgkin lymphoma' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
22974,
4118,
41,
96,
23954,
121,
1499,
6,
96,
10146,
2032,
121,
1499,
6,
96,
1570,
17530,
121,
1499,
6,
96,
134,
17,
144,
302,
121,
1499,
6,
96,
9939,
9456,
257,
121,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
9939,
9456,
257,
121,
21680,
953,
834,
22974,
4118,
549,
17444,
427,
96,
1570,
17530,
121,
3274,
3,
31,
29,
106,
18,
107,
32,
26,
122,
2917,
25049,
32,
51,
9,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name the most pick for evgeny korolev | CREATE TABLE table_2840500_8 (
pick INTEGER,
player VARCHAR
) | SELECT MAX(pick) FROM table_2840500_8 WHERE player = "Evgeny Korolev" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2577,
2445,
2560,
834,
927,
41,
1432,
3,
21342,
17966,
6,
1959,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
167,
1432,
21,
3,
15,
208,
729,
63,
3,
55... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
17967,
61,
21680,
953,
834,
2577,
2445,
2560,
834,
927,
549,
17444,
427,
1959,
3274,
96,
427,
208,
729,
63,
9510,
32,
10912,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
provide the number of patients whose drug code is asa81 and lab test fluid is blood. | 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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.formulary_drug_cd = "ASA81" AND lab.fluid = "Blood" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7744,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7744,
7,
5,
8399,
51,
834,
23,
26,
338... |
Visualize a bar chart about the distribution of ACC_Road and the sum of Team_ID , and group by attribute ACC_Road, and list in desc by the Y please. | 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 ACC_Road, SUM(Team_ID) FROM basketball_match GROUP BY ACC_Road ORDER BY SUM(Team_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,
3,
14775,
834,
448,
32,
9,
26,
6,
180,
6122,
599,
18699,
834,
4309,
61,
21680,
8498,
834,
19515,
350,
4630,
6880,
272,
476,
3,
14775,
834,
448,
32,
9,
26,
4674,
11300,
272,
476,
180,
6122,
599,
18699,
834,
4309,
... |
What are the low and high estimates of film markets? | CREATE TABLE film_market_estimation (
Low_Estimate VARCHAR,
High_Estimate VARCHAR
) | SELECT Low_Estimate, High_Estimate FROM film_market_estimation | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
814,
834,
8809,
834,
3340,
51,
257,
41,
5586,
834,
14997,
23,
5058,
584,
4280,
28027,
6,
1592,
834,
14997,
23,
5058,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
33,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5586,
834,
14997,
23,
5058,
6,
1592,
834,
14997,
23,
5058,
21680,
814,
834,
8809,
834,
3340,
51,
257,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
A line chart for what are the number of the dates of transactions with at least 100 share count or amount bigger than 100? | CREATE TABLE Purchases (
purchase_transaction_id INTEGER,
purchase_details VARCHAR(255)
)
CREATE TABLE Investors (
investor_id INTEGER,
Investor_details VARCHAR(255)
)
CREATE TABLE Sales (
sales_transaction_id INTEGER,
sales_details VARCHAR(255)
)
CREATE TABLE Transactions_Lots (
transaction_id INTEGER,
lot_id INTEGER
)
CREATE TABLE Lots (
lot_id INTEGER,
investor_id INTEGER,
lot_details VARCHAR(255)
)
CREATE TABLE Ref_Transaction_Types (
transaction_type_code VARCHAR(10),
transaction_type_description VARCHAR(80)
)
CREATE TABLE Transactions (
transaction_id INTEGER,
investor_id INTEGER,
transaction_type_code VARCHAR(10),
date_of_transaction DATETIME,
amount_of_transaction DECIMAL(19,4),
share_count VARCHAR(40),
other_details VARCHAR(255)
) | SELECT date_of_transaction, COUNT(date_of_transaction) FROM Transactions WHERE share_count >= 100 OR amount_of_transaction >= 100 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
14839,
7,
41,
1242,
834,
7031,
4787,
834,
23,
26,
3,
21342,
17966,
6,
1242,
834,
221,
5756,
7,
584,
4280,
28027,
599,
25502,
61,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
833,
834,
858,
834,
7031,
4787,
6,
2847,
17161,
599,
5522,
834,
858,
834,
7031,
4787,
61,
21680,
21469,
7,
549,
17444,
427,
698,
834,
13362,
2490,
2423,
910,
4674,
866,
834,
858,
834,
7031,
4787,
2490,
2423,
910,
1,... |
When was incumbent Leo E. Allen first elected? | CREATE TABLE table_1342315_12 (
first_elected INTEGER,
incumbent VARCHAR
) | SELECT MIN(first_elected) FROM table_1342315_12 WHERE incumbent = "Leo E. Allen" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2773,
1808,
834,
2122,
41,
166,
834,
19971,
3,
21342,
17966,
6,
28406,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
366,
47,
28406,
312,
32,
262,
5,
10618,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14672,
834,
19971,
61,
21680,
953,
834,
23747,
2773,
1808,
834,
2122,
549,
17444,
427,
28406,
3274,
96,
2796,
32,
262,
5,
10618,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
give the number of patients who passed away in or before the year 2180. | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE 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
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.dod_year <= "2180.0" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
26,
32,
26,
834,
1201,
3,
2,
2423,
96,
357,
2606,
11739,
121,
1,
-100,
-100,
-100,
-100,
-100,
... |
What are the names and location of the shops in ascending alphabetical order of name. | CREATE TABLE shop (Shop_Name VARCHAR, LOCATION VARCHAR) | SELECT Shop_Name, LOCATION FROM shop ORDER BY Shop_Name | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1814,
41,
16450,
834,
23954,
584,
4280,
28027,
6,
301,
5618,
8015,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
33,
8,
3056,
11,
1128,
13,
8,
5391,
16,
25200,
53,
20688,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3687,
834,
23954,
6,
301,
5618,
8015,
21680,
1814,
4674,
11300,
272,
476,
3687,
834,
23954,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
what is the score when the surface is carpet (i) outcome is winner and the championship is rotterdam, netherlands? | CREATE TABLE table_43606 (
"Outcome" text,
"Date" text,
"Championship" text,
"Surface" text,
"Opponent" text,
"Score" text
) | SELECT "Score" FROM table_43606 WHERE "Surface" = 'carpet (i)' AND "Outcome" = 'winner' AND "Championship" = 'rotterdam, netherlands' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
3420,
5176,
41,
96,
15767,
287,
15,
121,
1499,
6,
96,
308,
342,
121,
1499,
6,
96,
254,
1483,
12364,
2009,
121,
1499,
6,
96,
134,
450,
4861,
121,
1499,
6,
96,
667,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
591,
3420,
5176,
549,
17444,
427,
96,
134,
450,
4861,
121,
3274,
3,
31,
1720,
4995,
41,
23,
61,
31,
3430,
96,
15767,
287,
15,
121,
3274,
3,
31,
3757,
687,
31,
3430,
96,
254,
... |
how many match points did gran parma lost | CREATE TABLE table_30175 (
"Winners" text,
"Match points" text,
"Aggregate score" text,
"Points margin" real,
"Losers" text
) | SELECT "Match points" FROM table_30175 WHERE "Losers" = 'Gran Parma' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
25626,
3072,
41,
96,
18455,
687,
7,
121,
1499,
6,
96,
329,
14547,
979,
121,
1499,
6,
96,
188,
122,
18301,
342,
2604,
121,
1499,
6,
96,
22512,
7,
6346,
121,
490,
6,
96,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
329,
14547,
979,
121,
21680,
953,
834,
25626,
3072,
549,
17444,
427,
96,
434,
32,
7,
277,
121,
3274,
3,
31,
4744,
29,
276,
12764,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What number is the player that played 1998-2001 | CREATE TABLE table_10015132_21 (
no INTEGER,
years_in_toronto VARCHAR
) | SELECT MIN(no) FROM table_10015132_21 WHERE years_in_toronto = "1998-2001" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2915,
1808,
23757,
834,
2658,
41,
150,
3,
21342,
17966,
6,
203,
834,
77,
834,
235,
4438,
32,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
381,
19,
8,
1959,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
29,
32,
61,
21680,
953,
834,
2915,
1808,
23757,
834,
2658,
549,
17444,
427,
203,
834,
77,
834,
235,
4438,
32,
3274,
96,
2294,
3916,
18,
23658,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
did marcus hellner or jean marc gaillard rank tenth ? | CREATE TABLE table_204_713 (
id number,
"rank" number,
"bib" number,
"athlete" text,
"country" text,
"time" text,
"deficit" text
) | SELECT "athlete" FROM table_204_713 WHERE "rank" = 10 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
4450,
519,
41,
3,
23,
26,
381,
6,
96,
6254,
121,
381,
6,
96,
22456,
121,
381,
6,
96,
26170,
15,
121,
1499,
6,
96,
17529,
121,
1499,
6,
96,
715,
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,
26170,
15,
121,
21680,
953,
834,
26363,
834,
4450,
519,
549,
17444,
427,
96,
6254,
121,
3274,
335,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
WHAT IS THE PLAYER WITH TOTAL LESS THAN 151, TO PAR OF 8? | CREATE TABLE table_name_41 (player VARCHAR, total VARCHAR, to_par VARCHAR) | SELECT player FROM table_name_41 WHERE total < 151 AND to_par = 8 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4853,
41,
20846,
584,
4280,
28027,
6,
792,
584,
4280,
28027,
6,
12,
834,
1893,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
21665,
6827,
1853,
17501,
476,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1959,
21680,
953,
834,
4350,
834,
4853,
549,
17444,
427,
792,
3,
2,
3,
26578,
3430,
12,
834,
1893,
3274,
505,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what's the bleeding time with partial thromboplastin time being unaffected and condition being liver failure , early | CREATE TABLE table_19067 (
"Condition" text,
"Prothrombin time" text,
"Partial thromboplastin time" text,
"Bleeding time" text,
"Platelet count" text
) | SELECT "Bleeding time" FROM table_19067 WHERE "Partial thromboplastin time" = 'Unaffected' AND "Condition" = 'Liver failure , early' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
11776,
3708,
41,
96,
4302,
10569,
121,
1499,
6,
96,
3174,
8514,
51,
4517,
97,
121,
1499,
6,
96,
13212,
10646,
3,
8514,
6310,
23918,
77,
97,
121,
1499,
6,
96,
279,
40,
695... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
279,
40,
6958,
53,
97,
121,
21680,
953,
834,
11776,
3708,
549,
17444,
427,
96,
13212,
10646,
3,
8514,
6310,
23918,
77,
97,
121,
3274,
3,
31,
5110,
9,
27488,
31,
3430,
96,
4302,
10569,
121,
3274,
3,
31,
24179,
... |
How many ends were lost by the country whose points for (PF) was 87? | CREATE TABLE table_1644857_2 (
Ends INTEGER,
pf VARCHAR
) | SELECT MAX(Ends) AS lost FROM table_1644857_2 WHERE pf = 87 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26987,
3707,
3436,
834,
357,
41,
3720,
7,
3,
21342,
17966,
6,
3,
102,
89,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
5542,
130,
1513,
57,
8,
684,
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... | [
3,
23143,
14196,
4800,
4,
599,
8532,
26,
7,
61,
6157,
1513,
21680,
953,
834,
26987,
3707,
3436,
834,
357,
549,
17444,
427,
3,
102,
89,
3274,
3,
4225,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
The episode with the production code E0208 is directed by who? | CREATE TABLE table_2618152_1 (
directed_by VARCHAR,
production_code VARCHAR
) | SELECT directed_by FROM table_2618152_1 WHERE production_code = "E0208" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2688,
2606,
26320,
834,
536,
41,
6640,
834,
969,
584,
4280,
28027,
6,
999,
834,
4978,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
37,
5640,
28,
8,
999,
1081,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
6640,
834,
969,
21680,
953,
834,
2688,
2606,
26320,
834,
536,
549,
17444,
427,
999,
834,
4978,
3274,
96,
427,
4305,
4018,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is Teleplay, when Season is greater than 1.1, and when First Broadcast is 'February 20, 1981'? | CREATE TABLE table_name_37 (
teleplay VARCHAR,
season VARCHAR,
first_broadcast VARCHAR
) | SELECT teleplay FROM table_name_37 WHERE season > 1.1 AND first_broadcast = "february 20, 1981" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4118,
41,
3,
1931,
4895,
584,
4280,
28027,
6,
774,
584,
4280,
28027,
6,
166,
834,
115,
8635,
5254,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
1931,
4895,
21680,
953,
834,
4350,
834,
4118,
549,
17444,
427,
774,
2490,
3,
11039,
3430,
166,
834,
115,
8635,
5254,
3274,
96,
89,
15,
9052,
1208,
16047,
15465,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
How many countries were sampled in the index created by The Economist, published in 2007 and ranked 2nd in the LA Ranking? | CREATE TABLE table_19948664_1 (countries_sampled INTEGER, ranking_la__2_ VARCHAR, author___editor___source VARCHAR, year_of_publication VARCHAR) | SELECT MAX(countries_sampled) FROM table_19948664_1 WHERE author___editor___source = "The Economist" AND year_of_publication = "2007" AND ranking_la__2_ = "2nd" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2294,
4240,
3840,
4389,
834,
536,
41,
13362,
2593,
834,
7,
4624,
1361,
3,
21342,
17966,
6,
11592,
834,
521,
834,
834,
357,
834,
584,
4280,
28027,
6,
2291,
834,
834,
834,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
13362,
2593,
834,
7,
4624,
1361,
61,
21680,
953,
834,
2294,
4240,
3840,
4389,
834,
536,
549,
17444,
427,
2291,
834,
834,
834,
11272,
127,
834,
834,
834,
7928,
3274,
96,
634,
262,
12036,
343,
121,
3430,... |
What are all the profits elegance (2007) in which mayor is ma. Ester a. Hamor | CREATE TABLE table_255812_1 (income_class__2007_ VARCHAR, mayor VARCHAR) | SELECT income_class__2007_ FROM table_255812_1 WHERE mayor = "Ma. Ester A. Hamor" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
3449,
2122,
834,
536,
41,
15759,
834,
4057,
834,
834,
20615,
834,
584,
4280,
28027,
6,
18176,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
33,
66,
8,
9613,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2055,
834,
4057,
834,
834,
20615,
834,
21680,
953,
834,
1828,
3449,
2122,
834,
536,
549,
17444,
427,
18176,
3274,
96,
329,
9,
5,
2972,
52,
71,
5,
5845,
127,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what year was natalia oriero 's first tv role ? | CREATE TABLE table_204_871 (
id number,
"ano" text,
"title" text,
"role" text,
"channel" text,
"notes" text
) | SELECT MIN("ano") FROM table_204_871 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
4225,
536,
41,
3,
23,
26,
381,
6,
96,
152,
32,
121,
1499,
6,
96,
21869,
121,
1499,
6,
96,
3491,
15,
121,
1499,
6,
96,
19778,
121,
1499,
6,
96,
7977,
7,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
121,
152,
32,
8512,
21680,
953,
834,
26363,
834,
4225,
536,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Who was the first person elected from Democratic GAIN? | CREATE TABLE table_name_73 (
first_elected VARCHAR,
result VARCHAR
) | SELECT first_elected FROM table_name_73 WHERE result = "democratic gain" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4552,
41,
166,
834,
19971,
584,
4280,
28027,
6,
741,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
8,
166,
568,
8160,
45,
10021,
350,
13570,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
166,
834,
19971,
21680,
953,
834,
4350,
834,
4552,
549,
17444,
427,
741,
3274,
96,
23319,
447,
2485,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the navigator for James? | CREATE TABLE table_name_3 (
navigator VARCHAR,
driver VARCHAR
) | SELECT navigator FROM table_name_3 WHERE driver = "james" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
519,
41,
16867,
1016,
584,
4280,
28027,
6,
2535,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
16867,
1016,
21,
2549,
58,
1,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16867,
1016,
21680,
953,
834,
4350,
834,
519,
549,
17444,
427,
2535,
3274,
96,
1191,
2687,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is the number of patients whose admission year is less than 2178 and drug route is both eyes? | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admityear < "2178" AND prescriptions.route = "BOTH EYES" | [
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... |
Name the australian marquee for alessandro del piero | CREATE TABLE table_17932 (
"Club" text,
"Australian Marquee" text,
"International Marquee" text,
"Junior Marquee player" text,
"Captain" text,
"Vice-Captain" text
) | SELECT "Australian Marquee" FROM table_17932 WHERE "International Marquee" = 'Alessandro Del Piero' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26593,
2668,
41,
96,
254,
11158,
121,
1499,
6,
96,
31971,
29,
1571,
835,
15,
121,
1499,
6,
96,
27490,
1571,
835,
15,
121,
1499,
6,
96,
683,
202,
23,
127,
1571,
835,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
31971,
29,
1571,
835,
15,
121,
21680,
953,
834,
26593,
2668,
549,
17444,
427,
96,
27490,
1571,
835,
15,
121,
3274,
3,
31,
188,
924,
9,
22357,
6236,
18451,
32,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
where there more or less than 5 players picked from the united states ? | CREATE TABLE table_204_263 (
id number,
"pick" number,
"player" text,
"country of origin" text,
"pba team" text,
"college" text
) | SELECT (SELECT COUNT("player") FROM table_204_263 WHERE "country of origin" = 'united states') > 5 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
357,
3891,
41,
3,
23,
26,
381,
6,
96,
17967,
121,
381,
6,
96,
20846,
121,
1499,
6,
96,
17529,
13,
5233,
121,
1499,
6,
96,
102,
115,
9,
372,
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,
41,
23143,
14196,
2847,
17161,
599,
121,
20846,
8512,
21680,
953,
834,
26363,
834,
357,
3891,
549,
17444,
427,
96,
17529,
13,
5233,
121,
3274,
3,
31,
15129,
15,
26,
2315,
31,
61,
2490,
305,
1,
-100,
-100,
-100,
-100... |
Who was the runner-up for the event that ended with a winning score of –15 (66-67-70-70=273)? | CREATE TABLE table_name_27 (runner_s__up VARCHAR, winning_score VARCHAR) | SELECT runner_s__up FROM table_name_27 WHERE winning_score = –15(66 - 67 - 70 - 70 = 273) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2555,
41,
10806,
834,
7,
834,
834,
413,
584,
4280,
28027,
6,
3447,
834,
7,
9022,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
8,
3,
10806,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10806,
834,
7,
834,
834,
413,
21680,
953,
834,
4350,
834,
2555,
549,
17444,
427,
3447,
834,
7,
9022,
3274,
3,
104,
1808,
599,
3539,
3,
18,
3,
3708,
3,
18,
2861,
3,
18,
2861,
3274,
2307,
5268,
1,
-100,
-100,
... |
Which Year is the first one that has an Apparatus of uneven bars, and a Rank-Final smaller than 3? | CREATE TABLE table_name_15 (year INTEGER, apparatus VARCHAR, rank_final VARCHAR) | SELECT MIN(year) FROM table_name_15 WHERE apparatus = "uneven bars" AND rank_final < 3 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1808,
41,
1201,
3,
21342,
17966,
6,
20282,
584,
4280,
28027,
6,
11003,
834,
12406,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
2929,
19,
8,
166,
80,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1201,
61,
21680,
953,
834,
4350,
834,
1808,
549,
17444,
427,
20282,
3274,
96,
444,
1926,
6448,
121,
3430,
11003,
834,
12406,
3,
2,
220,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What are the stations in Tarzana? | CREATE TABLE table_2093995_1 (
stations VARCHAR,
city__neighborhood VARCHAR
) | SELECT stations FROM table_2093995_1 WHERE city__neighborhood = "Tarzana" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
4198,
3288,
3301,
834,
536,
41,
6991,
584,
4280,
28027,
6,
690,
834,
834,
29848,
107,
6693,
4500,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
33,
8,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
6991,
21680,
953,
834,
357,
4198,
3288,
3301,
834,
536,
549,
17444,
427,
690,
834,
834,
29848,
107,
6693,
4500,
3274,
96,
382,
291,
10241,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name the team with laps of 97 and grid of 3 | CREATE TABLE table_name_79 (
team VARCHAR,
laps VARCHAR,
grid VARCHAR
) | SELECT team FROM table_name_79 WHERE laps = 97 AND grid = 3 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4440,
41,
372,
584,
4280,
28027,
6,
14941,
7,
584,
4280,
28027,
6,
8634,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
372,
28,
14941,
7,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
372,
21680,
953,
834,
4350,
834,
4440,
549,
17444,
427,
14941,
7,
3274,
3,
4327,
3430,
8634,
3274,
220,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
A bar chart for returning the number of the countries of the mountains that have a height larger than 5000, list in desc by the X. | CREATE TABLE climber (
Climber_ID int,
Name text,
Country text,
Time text,
Points real,
Mountain_ID int
)
CREATE TABLE mountain (
Mountain_ID int,
Name text,
Height real,
Prominence real,
Range text,
Country text
) | SELECT Country, COUNT(Country) FROM mountain WHERE Height > 5000 GROUP BY Country ORDER BY Country DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
8147,
49,
41,
205,
9577,
49,
834,
4309,
16,
17,
6,
5570,
1499,
6,
6993,
1499,
6,
2900,
1499,
6,
4564,
7,
490,
6,
5617,
834,
4309,
16,
17,
3,
61,
3,
32102,
32103,
32102,
205,
4386... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
6993,
6,
2847,
17161,
599,
10628,
651,
61,
21680,
4180,
549,
17444,
427,
24231,
2490,
3,
12814,
350,
4630,
6880,
272,
476,
6993,
4674,
11300,
272,
476,
6993,
309,
25067,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
give me the number of patients whose days of hospital stay is greater than 8 and drug name is magnesium oxide? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "8" AND prescriptions.drug = "Magnesium Oxide" | [
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 was the score in round 7? | CREATE TABLE table_26847237_1 (score VARCHAR, round__number VARCHAR) | SELECT score FROM table_26847237_1 WHERE round__number = "Round 7" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2688,
4608,
5865,
4118,
834,
536,
41,
7,
9022,
584,
4280,
28027,
6,
1751,
834,
834,
5525,
1152,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
2604,
16,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2604,
21680,
953,
834,
2688,
4608,
5865,
4118,
834,
536,
549,
17444,
427,
1751,
834,
834,
5525,
1152,
3274,
96,
448,
32,
1106,
489,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.