NATURAL_LANG stringlengths 0 446 | SCHEMA stringlengths 27 2.21k | SQL stringlengths 18 453 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|
Which Crowd has a Home team of geelong? | CREATE TABLE table_name_86 (crowd VARCHAR, home_team VARCHAR) | SELECT crowd FROM table_name_86 WHERE home_team = "geelong" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3840,
41,
75,
3623,
26,
584,
4280,
28027,
6,
234,
834,
11650,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
15343,
26,
65,
3,
9,
1210,
372,
13,
873,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4374,
21680,
953,
834,
4350,
834,
3840,
549,
17444,
427,
234,
834,
11650,
3274,
96,
397,
15,
2961,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What yacht had LOA Metres of 13.34? | CREATE TABLE table_3316 (
"Position" real,
"Sail number" text,
"Yacht" text,
"State/country" text,
"Yacht type" text,
"LOA (Metres)" text,
"Skipper" text,
"Corrected time d:hh:mm:ss" text
) | SELECT "Yacht" FROM table_3316 WHERE "LOA (Metres)" = '13.34' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4201,
2938,
41,
96,
345,
32,
7,
4749,
121,
490,
6,
96,
134,
9,
173,
381,
121,
1499,
6,
96,
476,
9,
3997,
121,
1499,
6,
96,
134,
4748,
87,
17529,
121,
1499,
6,
96,
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,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
476,
9,
3997,
121,
21680,
953,
834,
4201,
2938,
549,
17444,
427,
96,
5017,
188,
41,
23351,
60,
7,
61,
121,
3274,
3,
31,
2368,
5,
3710,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
For those employees who did not have any job in the past, draw a scatter chart about the correlation between employee_id and salary . | 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 countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
) | SELECT EMPLOYEE_ID, SALARY FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1652,
41,
262,
5244,
5017,
476,
5080,
834,
4309,
7908,
1982,
599,
11071,
632,
201,
30085,
834,
567,
17683,
3,
4331,
4059,
599,
1755,
201,
301,
12510,
834,
567,
17683,
3,
4331,
4059,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
262,
5244,
5017,
476,
5080,
834,
4309,
6,
180,
4090,
24721,
21680,
1652,
549,
17444,
427,
4486,
262,
5244,
5017,
476,
5080,
834,
4309,
3388,
41,
23143,
14196,
262,
5244,
5017,
476,
5080,
834,
4309,
21680,
613,
834,
10... |
What year did helle nielsen marie r pke play womens' doubles? | CREATE TABLE table_69552 (
"Year" real,
"Men's singles" text,
"Women's singles" text,
"Men's doubles" text,
"Women's doubles" text,
"Mixed doubles" text
) | SELECT "Year" FROM table_69552 WHERE "Women's doubles" = 'helle nielsen marie røpke' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3951,
3769,
357,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
476,
2741,
121,
21680,
953,
834,
3951,
3769,
357,
549,
17444,
427,
96,
518,
32,
904,
31,
7,
1486,
7,
121,
3274,
3,
31,
107,
693,
6691,
40,
7,
35,
2774,
15,
3,
52,
2,
102,
1050,
31,
1,
-100,
-100,
-100,
-... |
In episode 115 what is seen being made before British police helmets? | CREATE TABLE table_15187735_9 (
segment_b VARCHAR,
segment_c VARCHAR
) | SELECT segment_b FROM table_15187735_9 WHERE segment_c = "British Police Helmets" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26578,
27697,
2469,
834,
1298,
41,
5508,
834,
115,
584,
4280,
28027,
6,
5508,
834,
75,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
86,
5640,
3,
15660,
125,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
5508,
834,
115,
21680,
953,
834,
26578,
27697,
2469,
834,
1298,
549,
17444,
427,
5508,
834,
75,
3274,
96,
279,
13224,
7,
107,
5076,
22887,
15,
17,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Which Pos has a Team of germian racing? | CREATE TABLE table_name_68 (pos VARCHAR, team VARCHAR) | SELECT pos FROM table_name_68 WHERE team = "germian racing" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3651,
41,
2748,
584,
4280,
28027,
6,
372,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
13995,
65,
3,
9,
2271,
13,
19652,
23,
152,
8191,
58,
1,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
2748,
21680,
953,
834,
4350,
834,
3651,
549,
17444,
427,
372,
3274,
96,
1304,
51,
23,
152,
8191,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Draw a bar chart for what is the average base price of rooms, for each bed type? | CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
basePrice INTEGER,
decor TEXT
)
CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adults INTEGER,
Kids INTEGER
) | SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4181,
7,
41,
4181,
196,
26,
3,
3463,
4,
382,
6,
562,
23954,
3,
3463,
4,
382,
6,
8326,
3,
21342,
17966,
6,
1953,
25160,
3,
3463,
4,
382,
6,
9858,
667,
75,
4658,
6833,
3,
21342,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
1953,
25160,
6,
71,
17217,
599,
10925,
345,
4920,
61,
21680,
4181,
7,
350,
4630,
6880,
272,
476,
1953,
25160,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
In how many stages did Jose Vicente Garcia Acosta won? | CREATE TABLE table_15088557_1 (
stage VARCHAR,
winner VARCHAR
) | SELECT COUNT(stage) FROM table_15088557_1 WHERE winner = "Jose Vicente Garcia Acosta" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1808,
4018,
4433,
3436,
834,
536,
41,
1726,
584,
4280,
28027,
6,
4668,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
86,
149,
186,
6518,
410,
10854,
12060,
4617,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
10705,
61,
21680,
953,
834,
1808,
4018,
4433,
3436,
834,
536,
549,
17444,
427,
4668,
3274,
96,
683,
32,
7,
15,
12060,
4617,
22373,
71,
11290,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Show the total salary by each hire date of employees, and please bin the hire date into the Month interval for showing a bar chart. | CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
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 countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE 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(SALARY) FROM employees | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
6266,
41,
4083,
517,
9215,
834,
4309,
7908,
1982,
599,
11116,
632,
201,
4083,
517,
9215,
834,
567,
17683,
3,
4331,
4059,
599,
1828,
61,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
454,
14132,
834,
308,
6048,
6,
180,
6122,
599,
134,
4090,
24721,
61,
21680,
1652,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
WHAT ARE THE RACES WITH A POLE SMALLER THAN 2 IN 2007? | CREATE TABLE table_name_93 (
races INTEGER,
pole VARCHAR,
season VARCHAR
) | SELECT MIN(races) FROM table_name_93 WHERE pole < 2 AND season = "2007" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4271,
41,
10879,
3,
21342,
17966,
6,
11148,
584,
4280,
28027,
6,
774,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
21665,
3,
7451,
1853,
3,
22034,
3205,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
12614,
7,
61,
21680,
953,
834,
4350,
834,
4271,
549,
17444,
427,
11148,
3,
2,
204,
3430,
774,
3274,
96,
20615,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What was the deed number with a population of more than 869 in the woorabinda community? | CREATE TABLE table_name_24 (deed_number VARCHAR, population VARCHAR, name_of_community VARCHAR) | SELECT deed_number FROM table_name_24 WHERE population > 869 AND name_of_community = "woorabinda" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2266,
41,
26,
6958,
834,
5525,
1152,
584,
4280,
28027,
6,
2074,
584,
4280,
28027,
6,
564,
834,
858,
834,
18782,
485,
584,
4280,
28027,
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,
20,
15,
26,
834,
5525,
1152,
21680,
953,
834,
4350,
834,
2266,
549,
17444,
427,
2074,
2490,
505,
3951,
3430,
564,
834,
858,
834,
18782,
485,
3274,
96,
14952,
52,
9,
8610,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-... |
Name the team for record 3-2 | CREATE TABLE table_22654073_6 (team VARCHAR, record VARCHAR) | SELECT team FROM table_22654073_6 WHERE record = "3-2" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2884,
4122,
2445,
4552,
834,
948,
41,
11650,
584,
4280,
28027,
6,
1368,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
372,
21,
1368,
3,
21160,
1,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
372,
21680,
953,
834,
2884,
4122,
2445,
4552,
834,
948,
549,
17444,
427,
1368,
3274,
96,
21160,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
count the number of patients whose admission location is transfer from hosp/extram? | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "TRANSFER FROM HOSP/EXTRAM" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7690,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
2118,
23,
26,
1499,
6,
5059,
715,
1499,
6,
5692,
1499,
6,
701,
834,
15129,
1499,
6,
3783,
1499,
6,
5798,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
9,
26,
5451,
834,
14836,
3274,
96,
11359,
7369,
20805,
21680,
3,
6299,
4274,
87,
427,
4,
11359,
... |
What is the name of episode 165? | CREATE TABLE table_2226817_9 (
title VARCHAR,
no_in_series VARCHAR
) | SELECT title FROM table_2226817_9 WHERE no_in_series = 165 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26144,
3651,
2517,
834,
1298,
41,
2233,
584,
4280,
28027,
6,
150,
834,
77,
834,
10833,
7,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
564,
13,
5640,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2233,
21680,
953,
834,
26144,
3651,
2517,
834,
1298,
549,
17444,
427,
150,
834,
77,
834,
10833,
7,
3274,
3,
22823,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the largest value for Fall 08 when Fall 09 is 792 and Fall 05 is less than 791? | CREATE TABLE table_5189 (
"Maryland Counties" text,
"Fall 05" real,
"Fall 06" real,
"Fall 07" real,
"Fall 08" real,
"Fall 09" real
) | SELECT MAX("Fall 08") FROM table_5189 WHERE "Fall 09" = '792' AND "Fall 05" < '791' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
5553,
3914,
41,
96,
7286,
28900,
3,
10628,
725,
121,
1499,
6,
96,
371,
1748,
3,
3076,
121,
490,
6,
96,
371,
1748,
13574,
121,
490,
6,
96,
371,
1748,
10668,
121,
490,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
121,
371,
1748,
12046,
8512,
21680,
953,
834,
5553,
3914,
549,
17444,
427,
96,
371,
1748,
14146,
121,
3274,
3,
31,
4440,
357,
31,
3430,
96,
371,
1748,
3,
3076,
121,
3,
2,
3,
31,
4440,
536,
31,
1,
... |
Name the 2011 with 2010 of 2r | CREATE TABLE table_name_59 (Id VARCHAR) | SELECT 2011 FROM table_name_59 WHERE 2010 = "2r" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3390,
41,
196,
26,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
2722,
28,
2735,
13,
204,
52,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2722,
21680,
953,
834,
4350,
834,
3390,
549,
17444,
427,
2735,
3274,
96,
357,
52,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Get me the number of hispanic or latino-puerto rican patients who have diagnoses icd9 code 69514. | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND diagnoses.icd9_code = "69514" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
5... |
What is the highest capacity in Aslantepe in 2002-2005? | CREATE TABLE table_name_97 (
capacity INTEGER,
location VARCHAR,
year VARCHAR
) | SELECT MAX(capacity) FROM table_name_97 WHERE location = "aslantepe" AND year = "2002-2005" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4327,
41,
2614,
3,
21342,
17966,
6,
1128,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2030,
2614,
16,
282,
6761... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
4010,
9,
6726,
61,
21680,
953,
834,
4350,
834,
4327,
549,
17444,
427,
1128,
3274,
96,
9,
7,
6761,
15,
855,
121,
3430,
215,
3274,
96,
24898,
18,
22594,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
In the first episode of Garfield titled Robodie II, what is the title of the U.S. Acres Episode? | CREATE TABLE table_22388 (
"Episode" text,
"Garfield Episode 1" text,
"U.S. Acres Episode" text,
"Garfield Episode 2" text,
"Original Airdate" text
) | SELECT "U.S. Acres Episode" FROM table_22388 WHERE "Garfield Episode 1" = 'Robodie II' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
2773,
4060,
41,
96,
427,
102,
159,
32,
221,
121,
1499,
6,
96,
21846,
1846,
16112,
209,
121,
1499,
6,
96,
1265,
5,
134,
5,
4292,
60,
7,
16112,
121,
1499,
6,
96,
218... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1265,
5,
134,
5,
4292,
60,
7,
16112,
121,
21680,
953,
834,
357,
2773,
4060,
549,
17444,
427,
96,
21846,
1846,
16112,
209,
121,
3274,
3,
31,
24372,
32,
2498,
2466,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Who is the original performer when the episode is casting? | CREATE TABLE table_29547777_1 (
original_performer VARCHAR,
episode VARCHAR
) | SELECT original_performer FROM table_29547777_1 WHERE episode = "Casting" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
3301,
4177,
26225,
834,
536,
41,
926,
834,
883,
2032,
49,
584,
4280,
28027,
6,
5640,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
19,
8,
926,
1912,
49... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
926,
834,
883,
2032,
49,
21680,
953,
834,
357,
3301,
4177,
26225,
834,
536,
549,
17444,
427,
5640,
3274,
96,
254,
9,
11026,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
List all total poll percentages when the for percentage is 59,532 (54). | CREATE TABLE table_17865 (
"Constituency" text,
"Electorate" real,
"s Spoilt vote" real,
"Total poll (%)" text,
"For (%)" text,
"Against (%)" text
) | SELECT "Total poll (%)" FROM table_17865 WHERE "For (%)" = '59,532 (54)' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
27640,
4122,
41,
96,
4302,
2248,
17,
76,
4392,
121,
1499,
6,
96,
21543,
127,
342,
121,
490,
6,
96,
7,
8927,
173,
17,
2902,
121,
490,
6,
96,
3696,
1947,
5492,
41,
6210,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
3696,
1947,
5492,
41,
6210,
121,
21680,
953,
834,
27640,
4122,
549,
17444,
427,
96,
3809,
41,
6210,
121,
3274,
3,
31,
3390,
6,
4867,
357,
9209,
7256,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many picks for round 12? | CREATE TABLE table_name_5 (
pick__number VARCHAR,
round VARCHAR
) | SELECT COUNT(pick__number) FROM table_name_5 WHERE round = 12 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
755,
41,
1432,
834,
834,
5525,
1152,
584,
4280,
28027,
6,
1751,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
1432,
7,
21,
1751,
586,
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,
2847,
17161,
599,
17967,
834,
834,
5525,
1152,
61,
21680,
953,
834,
4350,
834,
755,
549,
17444,
427,
1751,
3274,
586,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many match numbers have team europe listed as osku palermaa? | CREATE TABLE table_1987 (
"Match no." real,
"Match Type" text,
"Team Europe" text,
"Score" text,
"Team USA" text,
"Progressive Total" text
) | SELECT COUNT("Match no.") FROM table_1987 WHERE "Team Europe" = 'Osku Palermaa' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2294,
4225,
41,
96,
329,
14547,
150,
535,
490,
6,
96,
329,
14547,
6632,
121,
1499,
6,
96,
18699,
1740,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
18699,
2312,
121,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
329,
14547,
150,
5,
8512,
21680,
953,
834,
2294,
4225,
549,
17444,
427,
96,
18699,
1740,
121,
3274,
3,
31,
667,
7,
2729,
4826,
49,
51,
9,
9,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what are the event details of the services that have the type code 'Marriage', and count them by a bar chart, and display Y-axis in asc order. | CREATE TABLE Participants (
Participant_ID INTEGER,
Participant_Type_Code CHAR(15),
Participant_Details VARCHAR(255)
)
CREATE TABLE Services (
Service_ID INTEGER,
Service_Type_Code CHAR(15)
)
CREATE TABLE Events (
Event_ID INTEGER,
Service_ID INTEGER,
Event_Details VARCHAR(255)
)
CREATE TABLE Participants_in_Events (
Event_ID INTEGER,
Participant_ID INTEGER
) | SELECT Event_Details, COUNT(Event_Details) FROM Events AS T1 JOIN Services AS T2 ON T1.Service_ID = T2.Service_ID WHERE T2.Service_Type_Code = 'Marriage' GROUP BY Event_Details ORDER BY COUNT(Event_Details) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
19204,
41,
15077,
288,
834,
4309,
3,
21342,
17966,
6,
15077,
288,
834,
25160,
834,
22737,
3,
28027,
599,
1808,
201,
15077,
288,
834,
2962,
5756,
7,
584,
4280,
28027,
599,
25502,
61,
3,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
8042,
834,
2962,
5756,
7,
6,
2847,
17161,
599,
427,
2169,
834,
2962,
5756,
7,
61,
21680,
11137,
6157,
332,
536,
3,
15355,
3162,
1799,
6157,
332,
357,
9191,
332,
5411,
15260,
834,
4309,
3274,
332,
4416,
15260,
834,
4... |
Who is the incumbent in the Washington 1 district? | CREATE TABLE table_1805191_48 (incumbent VARCHAR, district VARCHAR) | SELECT incumbent FROM table_1805191_48 WHERE district = "Washington 1" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
20829,
5553,
4729,
834,
3707,
41,
77,
75,
5937,
295,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
19,
8,
28406,
16,
8,
2386,
209,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
28406,
21680,
953,
834,
20829,
5553,
4729,
834,
3707,
549,
17444,
427,
3939,
3274,
96,
518,
3198,
6029,
209,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who played Melbourne as the home team? | CREATE TABLE table_51620 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Home team" FROM table_51620 WHERE "Away team" = 'melbourne' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
5553,
26898,
41,
96,
19040,
372,
121,
1499,
6,
96,
19040,
372,
2604,
121,
1499,
6,
96,
188,
1343,
372,
121,
1499,
6,
96,
188,
1343,
372,
2604,
121,
1499,
6,
96,
553,
35,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
19040,
372,
121,
21680,
953,
834,
5553,
26898,
549,
17444,
427,
96,
188,
1343,
372,
121,
3274,
3,
31,
2341,
26255,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the median age where the area is 1.7? | CREATE TABLE table_17162 (
"Suburb" text,
"Population (in 2008)" real,
"Median age (in 2006)" text,
"Mean household size (in 2006)" text,
"Area (km\u00b2)" text,
"Density (/km\u00b2)" real,
"Date first settled as a suburb" real,
"Gazetted as a Division Name" text
) | SELECT "Median age (in 2006)" FROM table_17162 WHERE "Area (km\u00b2)" = '1.7' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2517,
2938,
357,
41,
96,
25252,
450,
115,
121,
1499,
6,
96,
27773,
7830,
41,
77,
2628,
61,
121,
490,
6,
96,
24607,
29,
1246,
41,
77,
3581,
61,
121,
1499,
6,
96,
329,
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,
24607,
29,
1246,
41,
77,
3581,
61,
121,
21680,
953,
834,
2517,
2938,
357,
549,
17444,
427,
96,
188,
864,
41,
5848,
2,
76,
1206,
115,
7318,
121,
3274,
3,
31,
18596,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the highest value in 2011 with less than 5,049 in 2006 and less than 1,380,935 in 2008? | CREATE TABLE table_75380 (
"Years" text,
"2004" real,
"2005" real,
"2006" real,
"2007" real,
"2008" real,
"2009" real,
"2010" real,
"2011" real
) | SELECT MAX("2011") FROM table_75380 WHERE "2006" < '5,049' AND "2008" < '1,380,935' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3072,
22671,
41,
96,
476,
2741,
7,
121,
1499,
6,
96,
21653,
121,
490,
6,
96,
22594,
121,
490,
6,
96,
21196,
121,
490,
6,
96,
20615,
121,
490,
6,
96,
16128,
121,
490,
6,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
121,
13907,
8512,
21680,
953,
834,
3072,
22671,
549,
17444,
427,
96,
21196,
121,
3,
2,
3,
31,
11116,
632,
3647,
31,
3430,
96,
16128,
121,
3,
2,
3,
31,
4347,
22671,
6,
1298,
2469,
31,
1,
-100,
-100,... |
What are the distinct publishers of publications with price higher than 5000000? | CREATE TABLE publication (Publisher VARCHAR, Price INTEGER) | SELECT DISTINCT Publisher FROM publication WHERE Price > 5000000 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
5707,
41,
31009,
49,
584,
4280,
28027,
6,
5312,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
363,
33,
8,
6746,
18902,
13,
10142,
28,
594,
1146,
145,
2899,
19568,
58,
1,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
15438,
25424,
6227,
19816,
21680,
5707,
549,
17444,
427,
5312,
2490,
2899,
19568,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which date has 3 as the goal? | CREATE TABLE table_name_55 (
date VARCHAR,
goal VARCHAR
) | SELECT date FROM table_name_55 WHERE goal = 3 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3769,
41,
833,
584,
4280,
28027,
6,
1288,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
833,
65,
220,
38,
8,
1288,
58,
1,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
833,
21680,
953,
834,
4350,
834,
3769,
549,
17444,
427,
1288,
3274,
220,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is first names of the top 5 staff who have handled the greatest number of complaints? | CREATE TABLE customers (
customer_id number,
customer_type_code text,
address_line_1 text,
address_line_2 text,
town_city text,
state text,
email_address text,
phone_number text
)
CREATE TABLE products (
product_id number,
parent_product_id number,
product_category_code text,
date_product_first_available time,
date_product_discontinued time,
product_name text,
product_description text,
product_price number
)
CREATE TABLE complaints (
complaint_id number,
product_id number,
customer_id number,
complaint_outcome_code text,
complaint_status_code text,
complaint_type_code text,
date_complaint_raised time,
date_complaint_closed time,
staff_id number
)
CREATE TABLE staff (
staff_id number,
gender text,
first_name text,
last_name text,
email_address text,
phone_number text
) | SELECT t1.first_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id GROUP BY t2.staff_id ORDER BY COUNT(*) LIMIT 5 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
722,
41,
884,
834,
23,
26,
381,
6,
884,
834,
6137,
834,
4978,
1499,
6,
1115,
834,
747,
834,
536,
1499,
6,
1115,
834,
747,
834,
357,
1499,
6,
1511,
834,
6726,
1499,
6,
538,
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,
3,
17,
5411,
14672,
834,
4350,
21680,
871,
6157,
3,
17,
536,
3,
15355,
3162,
11244,
6157,
3,
17,
357,
9191,
3,
17,
5411,
26416,
834,
23,
26,
3274,
3,
17,
4416,
26416,
834,
23,
26,
350,
4630,
6880,
272,
476,
3,
... |
Show me a pie chart comparing the total number of captains in each class. | CREATE TABLE Ship (
Ship_ID int,
Name text,
Type text,
Built_Year real,
Class text,
Flag text
)
CREATE TABLE captain (
Captain_ID int,
Name text,
Ship_ID int,
age text,
Class text,
Rank text
) | SELECT Class, COUNT(Class) FROM captain GROUP BY Class | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
15508,
41,
15508,
834,
4309,
16,
17,
6,
5570,
1499,
6,
6632,
1499,
6,
14862,
834,
476,
2741,
490,
6,
4501,
1499,
6,
17016,
1499,
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,
4501,
6,
2847,
17161,
599,
21486,
61,
21680,
14268,
350,
4630,
6880,
272,
476,
4501,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What's the English Pluperfect when the Bulgarian is ? | CREATE TABLE table_64655 (
"English" text,
"German" text,
"Dutch" text,
"Latin" text,
"Romanian" text,
"Portuguese" text,
"Spanish" text,
"Italian" text,
"French" text,
"Greek (Modern)" text,
"Bulgarian" text,
"Macedonian" text,
"Polish (extinct)" text
) | SELECT "English" FROM table_64655 WHERE "Bulgarian" = 'бяха чули' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4389,
4122,
755,
41,
96,
26749,
121,
1499,
6,
96,
24518,
121,
1499,
6,
96,
12998,
17,
524,
121,
1499,
6,
96,
3612,
17,
77,
121,
1499,
6,
96,
25139,
23,
152,
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,
26749,
121,
21680,
953,
834,
4389,
4122,
755,
549,
17444,
427,
96,
279,
83,
122,
6855,
121,
3274,
3,
31,
2,
2533,
3,
2,
3700,
14601,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Which model number has a GVM (kg) Technical Capacity of 16000 and a Torque Nm@rpm of 600 @ 1700? | CREATE TABLE table_241 (
"Model" text,
"Engine make/Capacity" text,
"Power kW@rpm" text,
"Torque Nm@rpm" text,
"Transmission Make/Type/Speed" text,
"GVM (kg) Technical Capacity" text,
"GCM (kg) Technical Capacity" text
) | SELECT "Model" FROM table_241 WHERE "GVM (kg) Technical Capacity" = '16000' AND "Torque Nm@rpm" = '600 @ 1700' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2266,
536,
41,
96,
24663,
121,
1499,
6,
96,
31477,
143,
87,
19566,
9,
6726,
121,
1499,
6,
96,
23553,
3,
21729,
1741,
52,
2028,
121,
1499,
6,
96,
382,
127,
835,
445,
51,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
24663,
121,
21680,
953,
834,
2266,
536,
549,
17444,
427,
96,
517,
12623,
41,
8711,
61,
10728,
4000,
9,
6726,
121,
3274,
3,
31,
2938,
2313,
31,
3430,
96,
382,
127,
835,
445,
51,
1741,
52,
2028,
121,
3274,
3,
... |
Which VIETNAMESE has a CHINESE of / b r m du ? | CREATE TABLE table_name_25 (
vietnamese VARCHAR,
chinese VARCHAR
) | SELECT vietnamese FROM table_name_25 WHERE chinese = "不如密多 / bùrúmìduō" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1828,
41,
2240,
17,
4350,
7,
15,
584,
4280,
28027,
6,
3,
1436,
1496,
15,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
584,
5091,
11053,
17683,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
3,
23143,
14196,
2240,
17,
4350,
7,
15,
21680,
953,
834,
4350,
834,
1828,
549,
17444,
427,
3,
1436,
1496,
15,
3274,
96,
2,
3,
87,
3,
115,
23063,
52,
2,
51,
2,
1259,
2,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
How many party events do we have? | CREATE TABLE party_events (
event_id number,
event_name text,
party_id number,
member_in_charge_id number
)
CREATE TABLE party (
party_id number,
minister text,
took_office text,
left_office text,
region_id number,
party_name text
)
CREATE TABLE region (
region_id number,
region_name text,
date text,
label text,
format text,
catalogue text
)
CREATE TABLE member (
member_id number,
member_name text,
party_id text,
in_office text
) | SELECT COUNT(*) FROM party_events | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1088,
834,
15,
2169,
7,
41,
605,
834,
23,
26,
381,
6,
605,
834,
4350,
1499,
6,
1088,
834,
23,
26,
381,
6,
1144,
834,
77,
834,
7993,
834,
23,
26,
381,
3,
61,
3,
32102,
32103,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
1088,
834,
15,
2169,
7,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the total number in 2006, which has an official foundation of municipality of 1918? | CREATE TABLE table_name_95 (date_of_official_foundation_of_municipality VARCHAR) | SELECT COUNT(2006) FROM table_name_95 WHERE date_of_official_foundation_of_municipality = 1918 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3301,
41,
5522,
834,
858,
834,
20884,
834,
19732,
257,
834,
858,
834,
11760,
3389,
10355,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
792,
381... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
21196,
61,
21680,
953,
834,
4350,
834,
3301,
549,
17444,
427,
833,
834,
858,
834,
20884,
834,
19732,
257,
834,
858,
834,
11760,
3389,
10355,
3274,
21402,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What country had the play Cyclops? | CREATE TABLE table_name_15 (
country VARCHAR,
play VARCHAR
) | SELECT country FROM table_name_15 WHERE play = "cyclops" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1808,
41,
684,
584,
4280,
28027,
6,
577,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
684,
141,
8,
577,
6400,
3903,
102,
7,
58,
1,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
684,
21680,
953,
834,
4350,
834,
1808,
549,
17444,
427,
577,
3274,
96,
7132,
9280,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the home team at the Junction Oval venue? | CREATE TABLE table_56874 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Home team" FROM table_56874 WHERE "Venue" = 'junction oval' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4834,
4225,
591,
41,
96,
19040,
372,
121,
1499,
6,
96,
19040,
372,
2604,
121,
1499,
6,
96,
188,
1343,
372,
121,
1499,
6,
96,
188,
1343,
372,
2604,
121,
1499,
6,
96,
553,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
19040,
372,
121,
21680,
953,
834,
4834,
4225,
591,
549,
17444,
427,
96,
553,
35,
76,
15,
121,
3274,
3,
31,
6959,
4985,
17986,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which 1997's 1992 was 1r when 1994 was a? | CREATE TABLE table_name_77 (
Id VARCHAR
) | SELECT 1997 FROM table_name_77 WHERE 1992 = "1r" AND 1994 = "a" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4013,
41,
27,
26,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
6622,
31,
7,
9047,
47,
209,
52,
116,
7520,
47,
3,
9,
58,
1,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
6622,
21680,
953,
834,
4350,
834,
4013,
549,
17444,
427,
9047,
3274,
96,
536,
52,
121,
3430,
7520,
3274,
96,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What message has hd 186408 as a designation HD? | CREATE TABLE table_name_75 (
message VARCHAR,
designation_hd VARCHAR
) | SELECT message FROM table_name_75 WHERE designation_hd = "hd 186408" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3072,
41,
1569,
584,
4280,
28027,
6,
21767,
834,
107,
26,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
1569,
65,
3,
107,
26,
507,
4389,
4018,
38,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1569,
21680,
953,
834,
4350,
834,
3072,
549,
17444,
427,
21767,
834,
107,
26,
3274,
96,
107,
26,
507,
4389,
4018,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Which gender has an Authority of state, Years of 1–8, and a Decile smaller than 10, and a Roll of 36? | CREATE TABLE table_name_76 (gender VARCHAR, roll VARCHAR, decile VARCHAR, authority VARCHAR, years VARCHAR) | SELECT gender FROM table_name_76 WHERE authority = "state" AND years = "1–8" AND decile < 10 AND roll = 36 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3959,
41,
122,
3868,
584,
4280,
28027,
6,
3812,
584,
4280,
28027,
6,
7908,
109,
584,
4280,
28027,
6,
5015,
584,
4280,
28027,
6,
203,
584,
4280,
28027,
61,
3,
321... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
7285,
21680,
953,
834,
4350,
834,
3959,
549,
17444,
427,
5015,
3274,
96,
5540,
121,
3430,
203,
3274,
96,
536,
104,
927,
121,
3430,
7908,
109,
3,
2,
335,
3430,
3812,
3274,
4475,
1,
-100,
-100,
-100,
-100,
-100,
-100,... |
For those records from the products and each product's manufacturer, show me about the distribution of name and the amount of name , and group by attribute name in a bar chart, and display y-axis in desc order please. | CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | SELECT T2.Name, COUNT(T2.Name) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY COUNT(T2.Name) DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
15248,
7,
41,
3636,
3,
21342,
17966,
6,
5570,
584,
4280,
28027,
599,
25502,
201,
3642,
19973,
584,
4280,
28027,
599,
25502,
201,
3,
19145,
584,
4280,
28027,
599,
25502,
201,
19764,
17833... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
332,
4416,
23954,
6,
2847,
17161,
599,
382,
4416,
23954,
61,
21680,
7554,
6157,
332,
536,
3,
15355,
3162,
15248,
7,
6157,
332,
357,
9191,
332,
5411,
7296,
76,
8717,
450,
49,
3274,
332,
4416,
22737,
350,
4630,
6880,
... |
What engines have the year 1992? | CREATE TABLE table_name_7 (engine_s_ VARCHAR, year VARCHAR) | SELECT engine_s_ FROM table_name_7 WHERE year = 1992 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
940,
41,
20165,
834,
7,
834,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
7277,
43,
8,
215,
9047,
58,
1,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1948,
834,
7,
834,
21680,
953,
834,
4350,
834,
940,
549,
17444,
427,
215,
3274,
9047,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
How many companies were created by Andy? | CREATE TABLE products (
code number,
name text,
price number,
manufacturer number
)
CREATE TABLE manufacturers (
code number,
name text,
headquarter text,
founder text,
revenue number
) | SELECT COUNT(*) FROM manufacturers WHERE founder = 'Andy' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
494,
41,
1081,
381,
6,
564,
1499,
6,
594,
381,
6,
4818,
381,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
5360,
41,
1081,
381,
6,
564,
1499,
6,
819,
19973,
1499,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
5360,
549,
17444,
427,
7174,
3274,
3,
31,
7175,
63,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Who won the Best Female Artist where Best R&B Contributor won the Best Male Lyricist? | CREATE TABLE table_22546460_4 (
best_female_artist VARCHAR,
best_male_lyricist VARCHAR
) | SELECT best_female_artist FROM table_22546460_4 WHERE best_male_lyricist = "Best R&B Contributor" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
20489,
4448,
25991,
834,
591,
41,
200,
834,
89,
15,
13513,
834,
1408,
343,
584,
4280,
28027,
6,
200,
834,
13513,
834,
120,
2234,
343,
584,
4280,
28027,
3,
61,
3,
32102,
321... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
200,
834,
89,
15,
13513,
834,
1408,
343,
21680,
953,
834,
20489,
4448,
25991,
834,
591,
549,
17444,
427,
200,
834,
13513,
834,
120,
2234,
343,
3274,
96,
17278,
391,
184,
279,
21489,
17,
127,
121,
1,
-100,
-100,
-100... |
between super dragon , scott lost and paul london - who had the highest number of reigns and defences ? | CREATE TABLE table_204_721 (
id number,
"rank" number,
"wrestler" text,
"no. of reigns" number,
"combined\ndefenses" number,
"combined\ndays" number
) | SELECT "wrestler" FROM table_204_721 WHERE "wrestler" IN ('super dragon', 'scott lost', 'paul london') ORDER BY "no. of reigns" + "combined\ndefenses" DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
940,
2658,
41,
3,
23,
26,
381,
6,
96,
6254,
121,
381,
6,
96,
210,
6216,
1171,
121,
1499,
6,
96,
29,
32,
5,
13,
17367,
7,
121,
381,
6,
96,
287,
12712,
26,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
210,
6216,
1171,
121,
21680,
953,
834,
26363,
834,
940,
2658,
549,
17444,
427,
96,
210,
6216,
1171,
121,
3388,
41,
31,
21771,
14580,
31,
6,
3,
31,
7,
10405,
1513,
31,
6,
3,
31,
102,
9,
83,
3,
40,
106,
2029... |
A bar chart for what are the number of the names of photos taken with the lens brand 'Sigma' or 'Olympus'?, and sort by the how many name from low to high please. | CREATE TABLE mountain (
id int,
name text,
Height real,
Prominence real,
Range text,
Country text
)
CREATE TABLE photos (
id int,
camera_lens_id int,
mountain_id int,
color text,
name text
)
CREATE TABLE camera_lens (
id int,
brand text,
name text,
focal_length_mm real,
max_aperture real
) | SELECT T1.name, COUNT(T1.name) FROM camera_lens AS T1 JOIN photos AS T2 ON T2.camera_lens_id = T1.id WHERE T1.brand = 'Sigma' OR T1.brand = 'Olympus' GROUP BY T1.name ORDER BY COUNT(T1.name) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4180,
41,
3,
23,
26,
16,
17,
6,
564,
1499,
6,
24231,
490,
6,
749,
1109,
1433,
490,
6,
10971,
1499,
6,
6993,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
1302,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
332,
5411,
4350,
6,
2847,
17161,
599,
382,
5411,
4350,
61,
21680,
1861,
834,
40,
35,
7,
6157,
332,
536,
3,
15355,
3162,
1302,
6157,
332,
357,
9191,
332,
4416,
6527,
1498,
834,
40,
35,
7,
834,
23,
26,
3274,
332,
... |
What is the total number of Viewers with a Rank (Night) of n/a, and a Timeslot of 8:30 p.m.? | CREATE TABLE table_53884 (
"Episode" text,
"Air Date" text,
"Timeslot" text,
"Rating" real,
"Share" real,
"18-49 (Rating/Share)" text,
"Viewers (m)" real,
"Rank (Timeslot)" real,
"Rank (Night)" text,
"Rank (Overall)" real
) | SELECT COUNT("Viewers (m)") FROM table_53884 WHERE "Rank (Night)" = 'n/a' AND "Timeslot" = '8:30 p.m.' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4867,
4060,
591,
41,
96,
427,
102,
159,
32,
221,
121,
1499,
6,
96,
20162,
7678,
121,
1499,
6,
96,
13368,
7,
3171,
121,
1499,
6,
96,
448,
1014,
121,
490,
6,
96,
24501,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
15270,
277,
41,
51,
61,
8512,
21680,
953,
834,
4867,
4060,
591,
549,
17444,
427,
96,
22557,
41,
567,
2632,
61,
121,
3274,
3,
31,
29,
87,
9,
31,
3430,
96,
13368,
7,
3171,
121,
3274,
3,
31,
... |
what is the number of patients whose admission year is less than 2138 and lab test name is folate? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2138" AND lab.label = "Folate" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7690,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7690,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
Show the total salary by each hire date of employees, and please bin the hire date into the day of week interval for showing a bar chart, sort by the Y in asc. | 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 countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
) | SELECT HIRE_DATE, SUM(SALARY) FROM employees ORDER BY SUM(SALARY) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
613,
834,
10193,
10972,
41,
262,
5244,
5017,
476,
5080,
834,
4309,
7908,
1982,
599,
11071,
632,
201,
5097,
8241,
834,
308,
6048,
833,
6,
3,
14920,
834,
308,
6048,
833,
6,
446,
10539,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
134,
4090,
24721,
61,
21680,
1652,
4674,
11300,
272,
476,
180,
6122,
599,
134,
4090,
24721,
61,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
count the number of patients whose marital status is single and diagnoses short title is toxic encephalopathy? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.marital_status = "SINGLE" AND diagnoses.short_title = "Toxic encephalopathy" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7690,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
2118,
23,
26,
1499,
6,
5059,
715,
1499,
6,
5692,
1499,
6,
701,
834,
15129,
1499,
6,
3783,
1499,
6,
5798,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
5... |
What is the average high temperature for each day of week Plot them as bar chart, I want to sort in ascending by the Y-axis. | CREATE TABLE train (
id int,
train_number int,
name text,
origin text,
destination text,
time text,
interval text
)
CREATE TABLE weekly_weather (
station_id int,
day_of_week text,
high_temperature int,
low_temperature int,
precipitation real,
wind_speed_mph int
)
CREATE TABLE station (
id int,
network_name text,
services text,
local_authority text
)
CREATE TABLE route (
train_id int,
station_id int
) | SELECT day_of_week, AVG(high_temperature) FROM weekly_weather GROUP BY day_of_week ORDER BY AVG(high_temperature) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2412,
41,
3,
23,
26,
16,
17,
6,
2412,
834,
5525,
1152,
16,
17,
6,
564,
1499,
6,
5233,
1499,
6,
3954,
1499,
6,
97,
1499,
6,
8572,
1499,
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,
239,
834,
858,
834,
8041,
6,
71,
17217,
599,
6739,
834,
21010,
15,
61,
21680,
5547,
834,
26809,
350,
4630,
6880,
272,
476,
239,
834,
858,
834,
8041,
4674,
11300,
272,
476,
71,
17217,
599,
6739,
834,
21010,
15,
61,
... |
If the title if the Lost Boy, how many directors were there? | CREATE TABLE table_19517621_3 (
directed_by VARCHAR,
title VARCHAR
) | SELECT COUNT(directed_by) FROM table_19517621_3 WHERE title = "The Lost Boy" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
22464,
26782,
2658,
834,
519,
41,
6640,
834,
969,
584,
4280,
28027,
6,
2233,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
156,
8,
2233,
3,
99,
8,
19576,
7508,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
22955,
834,
969,
61,
21680,
953,
834,
22464,
26782,
2658,
834,
519,
549,
17444,
427,
2233,
3274,
96,
634,
19576,
7508,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
A bar chart shows the distribution of name and ID , and sort from high to low by the ID. | CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text,
meter_300 text,
meter_400 text,
meter_500 text,
meter_600 text,
meter_700 text,
Time text
)
CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
) | SELECT name, ID FROM swimmer ORDER BY ID DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
27424,
41,
4699,
16,
17,
6,
564,
1499,
6,
868,
485,
1499,
6,
3,
4401,
834,
2915,
490,
6,
3,
4401,
834,
3632,
1499,
6,
3,
4401,
834,
5426,
1499,
6,
3,
4401,
834,
5548,
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,
564,
6,
4699,
21680,
27424,
4674,
11300,
272,
476,
4699,
309,
25067,
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,
-10... |
Tell me the 1st leg for asfa rabat | CREATE TABLE table_name_9 (team__number1 VARCHAR) | SELECT 1 AS st_leg FROM table_name_9 WHERE team__number1 = "asfa rabat" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1298,
41,
11650,
834,
834,
5525,
1152,
536,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
8779,
140,
8,
209,
7,
17,
4553,
21,
38,
89,
9,
3,
7093,
144,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
209,
6157,
3,
7,
17,
834,
5772,
21680,
953,
834,
4350,
834,
1298,
549,
17444,
427,
372,
834,
834,
5525,
1152,
536,
3274,
96,
9,
7,
89,
9,
3,
7093,
144,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What was the quantity of the A Score when the E Score was larger than 9.566 in the Greece and the T score was more than 4? | CREATE TABLE table_38624 (
"Nation" text,
"T Score" real,
"A Score" real,
"E Score" real,
"Total" real
) | SELECT SUM("A Score") FROM table_38624 WHERE "E Score" > '9.566' AND "Nation" = 'greece' AND "T Score" > '4' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
519,
3840,
2266,
41,
96,
567,
257,
121,
1499,
6,
96,
382,
17763,
121,
490,
6,
96,
188,
17763,
121,
490,
6,
96,
427,
17763,
121,
490,
6,
96,
3696,
1947,
121,
490,
3,
61,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
121,
188,
17763,
8512,
21680,
953,
834,
519,
3840,
2266,
549,
17444,
427,
96,
427,
17763,
121,
2490,
3,
31,
22321,
3539,
31,
3430,
96,
567,
257,
121,
3274,
3,
31,
3584,
15,
565,
31,
3430,
96,
382,
... |
What was the opposing team's score at the match that was played at Victoria Park? | CREATE TABLE table_name_31 (away_team VARCHAR, venue VARCHAR) | SELECT away_team AS score FROM table_name_31 WHERE venue = "victoria park" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3341,
41,
8006,
834,
11650,
584,
4280,
28027,
6,
5669,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
10720,
53,
372,
31,
7,
2604,
44,
8,
1588,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
550,
834,
11650,
6157,
2604,
21680,
953,
834,
4350,
834,
3341,
549,
17444,
427,
5669,
3274,
96,
7287,
3600,
9,
2447,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What percentage of the population is below 50% of the median income in the region where 10.4% of the population earns below 40% of the median income? | CREATE TABLE table_3206 (
"Region" text,
"Median income ( Intl.$ )" real,
"Below 40% of median income" text,
"Below 50% of median income" text,
"Below 60% of median income" text
) | SELECT COUNT("Below 50% of median income") FROM table_3206 WHERE "Below 40% of median income" = '10.4%' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2668,
5176,
41,
96,
17748,
23,
106,
121,
1499,
6,
96,
24607,
29,
2055,
41,
86,
17,
40,
5,
3229,
3,
61,
121,
490,
6,
96,
2703,
3216,
13152,
13,
15572,
2055,
121,
1499,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
2703,
3216,
5743,
13,
15572,
2055,
8512,
21680,
953,
834,
2668,
5176,
549,
17444,
427,
96,
2703,
3216,
13152,
13,
15572,
2055,
121,
3274,
3,
31,
10415,
5988,
31,
1,
-100,
-100,
-100,
-100,
-100,... |
What is the date of appointment of nejat biyedi ? | CREATE TABLE table_62211 (
"Name" text,
"Club" text,
"Date of departure" text,
"Replacement" text,
"Date of appointment" text
) | SELECT "Date of appointment" FROM table_62211 WHERE "Name" = 'nejat biyedić' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4056,
27278,
41,
96,
23954,
121,
1499,
6,
96,
254,
11158,
121,
1499,
6,
96,
308,
342,
13,
12028,
121,
1499,
6,
96,
1649,
4687,
297,
121,
1499,
6,
96,
308,
342,
13,
4141,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4141,
121,
21680,
953,
834,
4056,
27278,
549,
17444,
427,
96,
23954,
121,
3274,
3,
31,
29,
15,
1191,
17,
2647,
10093,
23,
2,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Tell me the total number of SP+FS with rank more than 8 for the netherlands and points more than 127.26 | CREATE TABLE table_name_75 (fs VARCHAR, sp VARCHAR, points VARCHAR, rank VARCHAR, nation VARCHAR) | SELECT COUNT(sp) + fs FROM table_name_75 WHERE rank > 8 AND nation = "netherlands" AND points > 127.26 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3072,
41,
89,
7,
584,
4280,
28027,
6,
3,
7,
102,
584,
4280,
28027,
6,
979,
584,
4280,
28027,
6,
11003,
584,
4280,
28027,
6,
2982,
584,
4280,
28027,
61,
3,
3210... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
7,
102,
61,
1768,
3,
89,
7,
21680,
953,
834,
4350,
834,
3072,
549,
17444,
427,
11003,
2490,
505,
3430,
2982,
3274,
96,
29,
16764,
6347,
121,
3430,
979,
2490,
3,
22367,
5,
2688,
1,
-100,
-100,
-10... |
Who was the opponent in games over 58, after Feb 16, and having a record of 40-20-4? | CREATE TABLE table_name_47 (opponent VARCHAR, record VARCHAR, game VARCHAR, february VARCHAR) | SELECT opponent FROM table_name_47 WHERE game > 58 AND february > 16 AND record = "40-20-4" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4177,
41,
32,
102,
9977,
584,
4280,
28027,
6,
1368,
584,
4280,
28027,
6,
467,
584,
4280,
28027,
6,
29976,
76,
1208,
584,
4280,
28027,
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,
15264,
21680,
953,
834,
4350,
834,
4177,
549,
17444,
427,
467,
2490,
3,
3449,
3430,
29976,
76,
1208,
2490,
898,
3430,
1368,
3274,
96,
2445,
7988,
18,
20364,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the name of the Home Stadium in which the Division is in the south, and Conference is national, as well as being in the city named charlotte, North Carolina? | CREATE TABLE table_name_64 (
home_stadium VARCHAR,
city VARCHAR,
division VARCHAR,
conference VARCHAR
) | SELECT home_stadium FROM table_name_64 WHERE division = "south" AND conference = "national" AND city = "charlotte, north carolina" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4389,
41,
234,
834,
2427,
12925,
584,
4280,
28027,
6,
690,
584,
4280,
28027,
6,
4889,
584,
4280,
28027,
6,
2542,
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,
234,
834,
2427,
12925,
21680,
953,
834,
4350,
834,
4389,
549,
17444,
427,
4889,
3274,
96,
7,
670,
107,
121,
3430,
2542,
3274,
96,
16557,
121,
3430,
690,
3274,
96,
4059,
21538,
6,
3457,
443,
12057,
9,
121,
1,
-100,
... |
For the game ending with a record of 31-43-2, what was the decision? | CREATE TABLE table_60646 (
"Date" text,
"Opponent" text,
"Score" text,
"Decision" text,
"Attendance" real,
"Record" text
) | SELECT "Decision" FROM table_60646 WHERE "Record" = '31-43-2' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3328,
4389,
948,
41,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
2962,
18901,
121,
1499,
6,
96,
188,
17,
324,
26,
663... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
2962,
18901,
121,
21680,
953,
834,
3328,
4389,
948,
549,
17444,
427,
96,
1649,
7621,
121,
3274,
3,
31,
3341,
4278,
21160,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name the title with termination of mission of february 24, 1828 | CREATE TABLE table_name_65 (
title VARCHAR,
termination_of_mission VARCHAR
) | SELECT title FROM table_name_65 WHERE termination_of_mission = "february 24, 1828" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4122,
41,
2233,
584,
4280,
28027,
6,
18739,
834,
858,
834,
5451,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
2233,
28,
18739,
13,
2253,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2233,
21680,
953,
834,
4350,
834,
4122,
549,
17444,
427,
18739,
834,
858,
834,
5451,
3274,
96,
89,
15,
9052,
1208,
14320,
507,
2577,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What was the date of the game when the Canadiens had a record of 31–19–9? | CREATE TABLE table_name_40 (date VARCHAR, record VARCHAR) | SELECT date FROM table_name_40 WHERE record = "31–19–9" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2445,
41,
5522,
584,
4280,
28027,
6,
1368,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
833,
13,
8,
467,
116,
8,
1072,
9,
26,
8065,
141,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
833,
21680,
953,
834,
4350,
834,
2445,
549,
17444,
427,
1368,
3274,
96,
3341,
104,
2294,
104,
1298,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Which player has fewer than 2 rounds? | CREATE TABLE table_9418 (
"Round" real,
"Pick" real,
"Player" text,
"Position" text,
"Nationality" text,
"School/Club Team" text
) | SELECT "Player" FROM table_9418 WHERE "Round" < '2' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4240,
2606,
41,
96,
448,
32,
1106,
121,
490,
6,
96,
345,
3142,
121,
490,
6,
96,
15800,
49,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
24732,
485,
121,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
15800,
49,
121,
21680,
953,
834,
4240,
2606,
549,
17444,
427,
96,
448,
32,
1106,
121,
3,
2,
3,
31,
357,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
How many Attendances on 13 april 1903? | CREATE TABLE table_39361 (
"Date" text,
"Opponents" text,
"H / A" text,
"Result F \u2013 A" text,
"Attendance" real
) | SELECT "Attendance" FROM table_39361 WHERE "Date" = '13 april 1903' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3288,
3420,
536,
41,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
7,
121,
1499,
6,
96,
566,
3,
87,
71,
121,
1499,
6,
96,
20119,
377,
3,
2,
76,
11138,
71,
121,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
188,
17,
324,
26,
663,
121,
21680,
953,
834,
3288,
3420,
536,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
2368,
3,
9,
2246,
40,
957,
4928,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the title of the song that has a translation of Without Me? | CREATE TABLE table_71343 (
"Title" text,
"English translation" text,
"lyrics by" text,
"music by" text,
"time" text
) | SELECT "Title" FROM table_71343 WHERE "English translation" = 'without me' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4450,
3710,
519,
41,
96,
382,
155,
109,
121,
1499,
6,
96,
26749,
7314,
121,
1499,
6,
96,
120,
2234,
7,
57,
121,
1499,
6,
96,
22170,
57,
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,
382,
155,
109,
121,
21680,
953,
834,
4450,
3710,
519,
549,
17444,
427,
96,
26749,
7314,
121,
3274,
3,
31,
23016,
140,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
How much Standard Rank has a Name of 311 south wacker drive, and a Year larger than 1990? | CREATE TABLE table_name_97 (std_rank INTEGER, name VARCHAR, year VARCHAR) | SELECT SUM(std_rank) FROM table_name_97 WHERE name = "311 south wacker drive" AND year > 1990 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4327,
41,
7,
17,
26,
834,
6254,
3,
21342,
17966,
6,
564,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
231,
5150,
3,
22557,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7,
17,
26,
834,
6254,
61,
21680,
953,
834,
4350,
834,
4327,
549,
17444,
427,
564,
3274,
96,
519,
2596,
3414,
8036,
3383,
1262,
121,
3430,
215,
2490,
5541,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
which incoming player had the highest transfer fee ? | CREATE TABLE table_203_440 (
id number,
"rank" number,
"player" text,
"from" text,
"to" text,
"transfer fee\n(\u20ac million)" number,
"year" number
) | SELECT "player" FROM table_203_440 ORDER BY "transfer fee\n(\u20ac million)" DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
22335,
41,
3,
23,
26,
381,
6,
96,
6254,
121,
381,
6,
96,
20846,
121,
1499,
6,
96,
7152,
121,
1499,
6,
96,
235,
121,
1499,
6,
96,
7031,
1010,
2572,
2,
29,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
20846,
121,
21680,
953,
834,
23330,
834,
22335,
4674,
11300,
272,
476,
96,
7031,
1010,
2572,
2,
29,
599,
2,
76,
1755,
9,
75,
770,
61,
121,
309,
25067,
8729,
12604,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
diagnosis of diabetes mellitus type i or type ii | CREATE TABLE table_train_222 (
"id" int,
"autoimmune_disease" bool,
"diabetic" string,
"allergy_to_hcq" bool,
"fasting_plasma_glucose" int,
"fasting_serum_insulin" int,
"NOUSE" float
) | SELECT * FROM table_train_222 WHERE diabetic = 'i' OR diabetic = 'ii' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
9719,
834,
26144,
41,
96,
23,
26,
121,
16,
17,
6,
96,
31650,
834,
26,
159,
14608,
121,
3,
12840,
40,
6,
96,
26,
23,
9,
346,
1225,
121,
6108,
6,
96,
11211,
122,
63,
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,
1429,
21680,
953,
834,
9719,
834,
26144,
549,
17444,
427,
17496,
447,
3274,
3,
31,
23,
31,
4674,
17496,
447,
3274,
3,
31,
23,
23,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the score of the game against the phoenix suns? | CREATE TABLE table_name_18 (score VARCHAR, opponent VARCHAR) | SELECT score FROM table_name_18 WHERE opponent = "phoenix suns" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2606,
41,
7,
9022,
584,
4280,
28027,
6,
15264,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
2604,
13,
8,
467,
581,
8,
3,
9553,
35,
2407,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2604,
21680,
953,
834,
4350,
834,
2606,
549,
17444,
427,
15264,
3274,
96,
9553,
35,
2407,
1997,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
what is age and gender of subject id 76508? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT demographic.age, demographic.gender FROM demographic WHERE demographic.subject_id = "76508" | [
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,
14798,
5,
545,
6,
14798,
5,
122,
3868,
21680,
14798,
549,
17444,
427,
14798,
5,
7304,
11827,
834,
23,
26,
3274,
96,
3959,
1752,
927,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Name the total number of no result for losses more than 1 and played of 38 and wins less than 19 | CREATE TABLE table_name_16 (no_result VARCHAR, wins VARCHAR, losses VARCHAR, played VARCHAR) | SELECT COUNT(no_result) FROM table_name_16 WHERE losses > 1 AND played = 38 AND wins < 19 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2938,
41,
29,
32,
834,
60,
7,
83,
17,
584,
4280,
28027,
6,
9204,
584,
4280,
28027,
6,
8467,
584,
4280,
28027,
6,
1944,
584,
4280,
28027,
61,
3,
32102,
32103,
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,
2847,
17161,
599,
29,
32,
834,
60,
7,
83,
17,
61,
21680,
953,
834,
4350,
834,
2938,
549,
17444,
427,
8467,
2490,
209,
3430,
1944,
3274,
6654,
3430,
9204,
3,
2,
957,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Which driver had 248 laps? | CREATE TABLE table_name_9 (
driver VARCHAR,
laps VARCHAR
) | SELECT driver FROM table_name_9 WHERE laps = 248 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1298,
41,
2535,
584,
4280,
28027,
6,
14941,
7,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
2535,
141,
204,
3707,
14941,
7,
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,
2535,
21680,
953,
834,
4350,
834,
1298,
549,
17444,
427,
14941,
7,
3274,
204,
3707,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was Craig Stadler's score? | CREATE TABLE table_name_80 (score VARCHAR, player VARCHAR) | SELECT score FROM table_name_80 WHERE player = "craig stadler" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2079,
41,
7,
9022,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
12870,
472,
9,
12807,
31,
7,
2604,
58,
1,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2604,
21680,
953,
834,
4350,
834,
2079,
549,
17444,
427,
1959,
3274,
96,
2935,
23,
122,
3342,
12807,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the Frequency MHz of Trinidad, Colorado? | CREATE TABLE table_39209 (
"Call sign" text,
"Frequency MHz" real,
"City of license" text,
"ERP W" real,
"Height m ( ft )" text,
"Class" text,
"FCC info" text
) | SELECT "Frequency MHz" FROM table_39209 WHERE "City of license" = 'trinidad, colorado' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3288,
357,
4198,
41,
96,
254,
1748,
1320,
121,
1499,
6,
96,
371,
60,
835,
11298,
3,
20210,
121,
490,
6,
96,
254,
485,
13,
3344,
121,
1499,
6,
96,
3316,
345,
549,
121,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
371,
60,
835,
11298,
3,
20210,
121,
21680,
953,
834,
3288,
357,
4198,
549,
17444,
427,
96,
254,
485,
13,
3344,
121,
3274,
3,
31,
1788,
29,
15644,
6,
945,
9,
26,
32,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,... |
Who is the R1st that has 36 RYds? | CREATE TABLE table_name_49 (r1st VARCHAR, ryds VARCHAR) | SELECT r1st FROM table_name_49 WHERE ryds = "36" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3647,
41,
52,
536,
7,
17,
584,
4280,
28027,
6,
3,
651,
26,
7,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
19,
8,
391,
536,
7,
17,
24,
65,
4475... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3,
52,
536,
7,
17,
21680,
953,
834,
4350,
834,
3647,
549,
17444,
427,
3,
651,
26,
7,
3274,
96,
3420,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
what's patient 017-16385's hospital admission times since 2103? | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime 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 medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
) | SELECT patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '017-16385' AND STRFTIME('%y', patient.hospitaladmittime) >= '2103' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1058,
41,
1058,
23,
26,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
1058,
4350,
1499,
6,
1058,
715,
97,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
2179,
9339,
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,
1868,
5,
31386,
20466,
17,
715,
21680,
1868,
549,
17444,
427,
1868,
5,
202,
1495,
12417,
3274,
3,
31,
632,
2517,
10892,
519,
4433,
31,
3430,
3,
13733,
6245,
15382,
599,
31,
1454,
63,
31,
6,
1868,
5,
31386,
20466,
... |
What is the total number of German submarines lost with more than 120958 sunk by mines? | CREATE TABLE table_41886 (
"Month, year" text,
"Sunk by U-Boat" real,
"Sunk by aircraft" real,
"Sunk by warship or raider" real,
"Sunk by mines" real,
"German submarines lost" real
) | SELECT COUNT("German submarines lost") FROM table_41886 WHERE "Sunk by mines" > '120958' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
2606,
3840,
41,
96,
9168,
189,
6,
215,
121,
1499,
6,
96,
134,
6513,
57,
412,
18,
279,
32,
144,
121,
490,
6,
96,
134,
6513,
57,
6442,
121,
490,
6,
96,
134,
6513,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
24518,
28158,
7,
1513,
8512,
21680,
953,
834,
591,
2606,
3840,
549,
17444,
427,
96,
134,
6513,
57,
2000,
7,
121,
2490,
3,
31,
2122,
4198,
3449,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Which Team has a Score of 108-107? | CREATE TABLE table_name_82 (team VARCHAR, score VARCHAR) | SELECT team FROM table_name_82 WHERE score = "108-107" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4613,
41,
11650,
584,
4280,
28027,
6,
2604,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
2271,
65,
3,
9,
17763,
13,
3,
16169,
18,
18057,
58,
1,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
372,
21680,
953,
834,
4350,
834,
4613,
549,
17444,
427,
2604,
3274,
96,
16169,
18,
18057,
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 day and date of game 2? | CREATE TABLE table_name_20 (
day VARCHAR,
_date VARCHAR,
game VARCHAR
) | SELECT day, _date FROM table_name_20 WHERE game = "2" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1755,
41,
239,
584,
4280,
28027,
6,
3,
834,
5522,
584,
4280,
28027,
6,
467,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
239,
11,
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,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
239,
6,
3,
834,
5522,
21680,
953,
834,
4350,
834,
1755,
549,
17444,
427,
467,
3274,
96,
357,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who directed episode number 626 in the series? | CREATE TABLE table_25800134_19 (director VARCHAR, series__number VARCHAR) | SELECT director FROM table_25800134_19 WHERE series__number = 626 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
6192,
23747,
834,
2294,
41,
25982,
584,
4280,
28027,
6,
939,
834,
834,
5525,
1152,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
6640,
5640,
381,
431,
2688,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2090,
21680,
953,
834,
1828,
6192,
23747,
834,
2294,
549,
17444,
427,
939,
834,
834,
5525,
1152,
3274,
431,
2688,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the Label of the September 20, 2008 release with Catalog number RTRADCD491? | CREATE TABLE table_name_22 (
label VARCHAR,
catalog VARCHAR,
date VARCHAR
) | SELECT label FROM table_name_22 WHERE catalog = "rtradcd491" AND date = "september 20, 2008" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2884,
41,
3783,
584,
4280,
28027,
6,
10173,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
16229,
13,
8,
1600,
160... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3783,
21680,
953,
834,
4350,
834,
2884,
549,
17444,
427,
10173,
3274,
96,
52,
1313,
26,
75,
26,
3647,
536,
121,
3430,
833,
3274,
96,
7,
6707,
18247,
16047,
2628,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Name who directed the 114 episode in the series | CREATE TABLE table_20164 (
"No. in series" text,
"No. in season" text,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"U.S. viewers (million)" text
) | SELECT "Directed by" FROM table_20164 WHERE "No. in series" = '114' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
11505,
591,
41,
96,
4168,
5,
16,
939,
121,
1499,
6,
96,
4168,
5,
16,
774,
121,
1499,
6,
96,
382,
155,
109,
121,
1499,
6,
96,
23620,
15,
26,
57,
121,
1499,
6,
96,
2496... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
23620,
15,
26,
57,
121,
21680,
953,
834,
11505,
591,
549,
17444,
427,
96,
4168,
5,
16,
939,
121,
3274,
3,
31,
18959,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the total capacity of venues that opened in 1999? | CREATE TABLE table_name_15 (
capacity VARCHAR,
opened VARCHAR
) | SELECT COUNT(capacity) FROM table_name_15 WHERE opened = "1999" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1808,
41,
2614,
584,
4280,
28027,
6,
2946,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
792,
2614,
13,
11778,
24,
2946,
16,
5247,
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,
2847,
17161,
599,
4010,
9,
6726,
61,
21680,
953,
834,
4350,
834,
1808,
549,
17444,
427,
2946,
3274,
96,
2294,
3264,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
what is the grid when the driver is louis rosier and the laps is more than 78? | CREATE TABLE table_name_39 (grid INTEGER, driver VARCHAR, laps VARCHAR) | SELECT MIN(grid) FROM table_name_39 WHERE driver = "louis rosier" AND laps > 78 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3288,
41,
3496,
26,
3,
21342,
17966,
6,
2535,
584,
4280,
28027,
6,
14941,
7,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
125,
19,
8,
8634,
116,
8,
2535,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3,
17684,
599,
3496,
26,
61,
21680,
953,
834,
4350,
834,
3288,
549,
17444,
427,
2535,
3274,
96,
40,
1063,
159,
3,
1859,
972,
121,
3430,
14941,
7,
2490,
3,
3940,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the lowest total of player tommy ring, who has a rank greater than 1? | CREATE TABLE table_name_62 (
total INTEGER,
player VARCHAR,
rank VARCHAR
) | SELECT MIN(total) FROM table_name_62 WHERE player = "tommy ring" AND rank > 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4056,
41,
792,
3,
21342,
17966,
6,
1959,
584,
4280,
28027,
6,
11003,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
7402,
792,
13,
1959,
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,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
235,
1947,
61,
21680,
953,
834,
4350,
834,
4056,
549,
17444,
427,
1959,
3274,
96,
235,
635,
63,
3,
1007,
121,
3430,
11003,
2490,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Which Record has a Date of january 31? | CREATE TABLE table_name_18 (
record VARCHAR,
date VARCHAR
) | SELECT record FROM table_name_18 WHERE date = "january 31" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2606,
41,
1368,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
11392,
65,
3,
9,
7678,
13,
3,
7066,
76,
1208,
2664,
58,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1368,
21680,
953,
834,
4350,
834,
2606,
549,
17444,
427,
833,
3274,
96,
7066,
76,
1208,
2664,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
count how many of these members were unionists . | CREATE TABLE table_204_608 (
id number,
"name" text,
"elected party" text,
"constituency" text,
"elected date" text,
"military service" text
) | SELECT COUNT("name") FROM table_204_608 WHERE "elected party" = 'unionist' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
3328,
927,
41,
3,
23,
26,
381,
6,
96,
4350,
121,
1499,
6,
96,
19971,
1088,
121,
1499,
6,
96,
8056,
17,
155,
76,
4392,
121,
1499,
6,
96,
19971,
833,
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,
2847,
17161,
599,
121,
4350,
8512,
21680,
953,
834,
26363,
834,
3328,
927,
549,
17444,
427,
96,
19971,
1088,
121,
3274,
3,
31,
16598,
343,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the dates where Hillcrest Reserve is the home grounds? | CREATE TABLE table_18752986_1 (first_season VARCHAR, home_ground_s_ VARCHAR) | SELECT first_season FROM table_18752986_1 WHERE home_ground_s_ = "Hillcrest Reserve" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2606,
3072,
3166,
3840,
834,
536,
41,
14672,
834,
9476,
584,
4280,
28027,
6,
234,
834,
9232,
834,
7,
834,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
166,
834,
9476,
21680,
953,
834,
2606,
3072,
3166,
3840,
834,
536,
549,
17444,
427,
234,
834,
9232,
834,
7,
834,
3274,
96,
566,
1092,
21443,
9473,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the total rank by average for 2 dances, which have more than 37 total points? | CREATE TABLE table_61359 (
"Rank by average" real,
"Place" real,
"Couple" text,
"Total points" real,
"Number of dances" real,
"Average" real
) | SELECT COUNT("Rank by average") FROM table_61359 WHERE "Number of dances" = '2' AND "Total points" > '37' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4241,
519,
3390,
41,
96,
22557,
57,
1348,
121,
490,
6,
96,
345,
11706,
121,
490,
6,
96,
3881,
413,
109,
121,
1499,
6,
96,
3696,
1947,
979,
121,
490,
6,
96,
567,
5937,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
22557,
57,
1348,
8512,
21680,
953,
834,
4241,
519,
3390,
549,
17444,
427,
96,
567,
5937,
49,
13,
2595,
7,
121,
3274,
3,
31,
357,
31,
3430,
96,
3696,
1947,
979,
121,
2490,
3,
31,
4118,
31,
... |
Name the percentage for ole miss | CREATE TABLE table_25395 (
"Team" text,
"SEC Wins" real,
"SEC Losses" real,
"Percentage" text,
"Home Record" text,
"Road Record" text,
"Overall Record" text
) | SELECT "Percentage" FROM table_25395 WHERE "Team" = 'Ole Miss' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
519,
3301,
41,
96,
18699,
121,
1499,
6,
96,
134,
3073,
4871,
7,
121,
490,
6,
96,
134,
3073,
3144,
2260,
121,
490,
6,
96,
12988,
3728,
545,
121,
1499,
6,
96,
19040,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12988,
3728,
545,
121,
21680,
953,
834,
1828,
519,
3301,
549,
17444,
427,
96,
18699,
121,
3274,
3,
31,
667,
109,
5964,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is Christian Malcolm s highest react when his time was below 20.58? | CREATE TABLE table_name_72 (
react INTEGER,
time VARCHAR,
athlete VARCHAR
) | SELECT MAX(react) FROM table_name_72 WHERE time < 20.58 AND athlete = "christian malcolm" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5865,
41,
8922,
3,
21342,
17966,
6,
97,
584,
4280,
28027,
6,
17893,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
2826,
29062,
3,
7,
2030,
892... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4800,
4,
599,
60,
2708,
61,
21680,
953,
834,
4350,
834,
5865,
549,
17444,
427,
97,
3,
2,
460,
5,
3449,
3430,
17893,
3274,
96,
15294,
23,
152,
1460,
3297,
51,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Show the average age for all female students and group them by first name in a bar chart, and could you rank the average of age in asc order? | 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 Allergy_Type (
Allergy VARCHAR(20),
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20)
) | SELECT Fname, AVG(Age) FROM Student WHERE Sex = 'F' GROUP BY Fname ORDER BY AVG(Age) | [
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,
377,
4350,
6,
71,
17217,
599,
188,
397,
61,
21680,
6341,
549,
17444,
427,
679,
226,
3274,
3,
31,
371,
31,
350,
4630,
6880,
272,
476,
377,
4350,
4674,
11300,
272,
476,
71,
17217,
599,
188,
397,
61,
1,
-100,
-100,
... |
provide the number of patients whose religion is christian scientist and item id is 50811? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.religion = "CHRISTIAN SCIENTIST" AND lab.itemid = "50811" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7690,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7690,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
What is the nationality of the guard for the chool/Club Team in Virginia? | CREATE TABLE table_name_34 (nationality VARCHAR, position VARCHAR, school_club_team VARCHAR) | SELECT nationality FROM table_name_34 WHERE position = "guard" AND school_club_team = "virginia" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3710,
41,
16557,
485,
584,
4280,
28027,
6,
1102,
584,
4280,
28027,
6,
496,
834,
13442,
834,
11650,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
3,
23143,
14196,
1157,
485,
21680,
953,
834,
4350,
834,
3710,
549,
17444,
427,
1102,
3274,
96,
11010,
121,
3430,
496,
834,
13442,
834,
11650,
3274,
96,
5771,
122,
77,
23,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the average administrative panel of the composition nominated by Taoiseach 0 times with a total less than 4? | CREATE TABLE table_name_36 (administrative_panel INTEGER, nominated_by_the_taoiseach VARCHAR, total VARCHAR) | SELECT AVG(administrative_panel) FROM table_name_36 WHERE nominated_by_the_taoiseach = 0 AND total < 4 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3420,
41,
9571,
1528,
834,
28726,
3,
21342,
17966,
6,
150,
1109,
920,
834,
969,
834,
532,
834,
17,
9,
32,
159,
15,
1836,
584,
4280,
28027,
6,
792,
584,
4280,
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,
71,
17217,
599,
9571,
1528,
834,
28726,
61,
21680,
953,
834,
4350,
834,
3420,
549,
17444,
427,
150,
1109,
920,
834,
969,
834,
532,
834,
17,
9,
32,
159,
15,
1836,
3274,
3,
632,
3430,
792,
3,
2,
314,
1,
-100,
-100... |
What was the total number of matches for Nat Lofthouse, ranking higher than 7? | CREATE TABLE table_41598 (
"Rank" real,
"Name" text,
"Years" text,
"Matches" real,
"Goals" real
) | SELECT COUNT("Matches") FROM table_41598 WHERE "Name" = 'nat lofthouse' AND "Rank" > '7' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
1808,
3916,
41,
96,
22557,
121,
490,
6,
96,
23954,
121,
1499,
6,
96,
476,
2741,
7,
121,
1499,
6,
96,
329,
144,
2951,
121,
490,
6,
96,
6221,
5405,
121,
490,
3,
61,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
329,
144,
2951,
8512,
21680,
953,
834,
591,
1808,
3916,
549,
17444,
427,
96,
23954,
121,
3274,
3,
31,
29,
144,
13871,
1840,
31,
3430,
96,
22557,
121,
2490,
3,
31,
940,
31,
1,
-100,
-100,
-10... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.