NATURAL_LANG stringlengths 0 446 | SCHEMA stringlengths 27 2.21k | SQL stringlengths 18 453 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|
What was the score of the game when there was a loss of Kern (0-2)? | CREATE TABLE table_15398 (
"Date" text,
"Opponent" text,
"Site" text,
"Score" text,
"Loss" text
) | SELECT "Score" FROM table_15398 WHERE "Loss" = 'kern (0-2)' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
27025,
3916,
41,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
26030,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
434,
32,
7,
7,
121,
1499,
3,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
134,
9022,
121,
21680,
953,
834,
27025,
3916,
549,
17444,
427,
96,
434,
32,
7,
7,
121,
3274,
3,
31,
2304,
29,
17482,
18,
7318,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What was the race that featured stirling moss winning with a maserati at aintree? | CREATE TABLE table_name_45 (
race_name VARCHAR,
winning_driver VARCHAR,
constructor VARCHAR,
circuit VARCHAR
) | SELECT race_name FROM table_name_45 WHERE constructor = "maserati" AND circuit = "aintree" AND winning_driver = "stirling moss" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2128,
41,
1964,
834,
4350,
584,
4280,
28027,
6,
3447,
834,
13739,
52,
584,
4280,
28027,
6,
6774,
127,
584,
4280,
28027,
6,
4558,
584,
4280,
28027,
3,
61,
3,
3210... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
1964,
834,
4350,
21680,
953,
834,
4350,
834,
2128,
549,
17444,
427,
6774,
127,
3274,
96,
2754,
15,
6850,
121,
3430,
4558,
3274,
96,
9,
77,
929,
15,
121,
3430,
3447,
834,
13739,
52,
3274,
96,
2248,
52,
697,
3,
3972... |
What's the 1881 when 1871 had 1017? | CREATE TABLE table_name_38 (Id VARCHAR) | SELECT 1881 FROM table_name_38 WHERE 1871 = "1017" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3747,
41,
196,
26,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
31,
7,
8,
507,
4959,
116,
507,
4450,
141,
335,
2517,
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,
507,
4959,
21680,
953,
834,
4350,
834,
3747,
549,
17444,
427,
507,
4450,
3274,
96,
1714,
2517,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which Filename extension has an Interactivity support of no, an Open standard of yes, and an Image support of no? | CREATE TABLE table_name_64 (filename_extension VARCHAR, image_support VARCHAR, interactivity_support VARCHAR, open_standard VARCHAR) | SELECT filename_extension FROM table_name_64 WHERE interactivity_support = "no" AND open_standard = "yes" AND image_support = "no" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4389,
41,
11966,
4350,
834,
994,
13177,
584,
4280,
28027,
6,
1023,
834,
20390,
584,
4280,
28027,
6,
1413,
21661,
834,
20390,
584,
4280,
28027,
6,
539,
834,
16020,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
1042,
4350,
834,
994,
13177,
21680,
953,
834,
4350,
834,
4389,
549,
17444,
427,
1413,
21661,
834,
20390,
3274,
96,
29,
32,
121,
3430,
539,
834,
16020,
3274,
96,
10070,
121,
3430,
1023,
834,
20390,
3274,
96,
29,
32,
... |
Score of 122–105 had what record? | CREATE TABLE table_name_68 (record VARCHAR, score VARCHAR) | SELECT record FROM table_name_68 WHERE score = "122–105" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3651,
41,
60,
7621,
584,
4280,
28027,
6,
2604,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
17763,
13,
3,
20889,
104,
12869,
141,
125,
1368,
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,
1368,
21680,
953,
834,
4350,
834,
3651,
549,
17444,
427,
2604,
3274,
96,
20889,
104,
12869,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
diastolic blood pressure between 65 and 100 mm hg | CREATE TABLE table_train_274 (
"id" int,
"gender" string,
"serum_bicarbonate" int,
"randomization_bg" int,
"positive_serum" bool,
"diabetic_ketoacidosis" bool,
"urinary_ketones" bool,
"diastolic_blood_pressure_dbp" int,
"heart_rate" int,
"body_mass_index_bmi" float,
"age" float,
"NOUSE" float
) | SELECT * FROM table_train_274 WHERE diastolic_blood_pressure_dbp >= 65 AND diastolic_blood_pressure_dbp <= 100 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
9719,
834,
2555,
591,
41,
96,
23,
26,
121,
16,
17,
6,
96,
122,
3868,
121,
6108,
6,
96,
7,
49,
440,
834,
115,
23,
17089,
342,
121,
16,
17,
6,
96,
2002,
5012,
1707,
834... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
1429,
21680,
953,
834,
9719,
834,
2555,
591,
549,
17444,
427,
1227,
9,
7,
235,
2176,
834,
27798,
834,
26866,
834,
26,
115,
102,
2490,
2423,
7123,
3430,
1227,
9,
7,
235,
2176,
834,
27798,
834,
26866,
834,
26,
115,
... |
For Vegas Verdicts week, what was the result? | CREATE TABLE table_15436 (
"Week" text,
"Theme" text,
"Song choice" text,
"Original artist" text,
"Result" text
) | SELECT "Result" FROM table_15436 WHERE "Week" = 'vegas verdicts' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
27308,
3420,
41,
96,
518,
10266,
121,
1499,
6,
96,
634,
526,
121,
1499,
6,
96,
134,
2444,
1160,
121,
1499,
6,
96,
667,
3380,
10270,
2377,
121,
1499,
6,
96,
20119,
121,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
20119,
121,
21680,
953,
834,
27308,
3420,
549,
17444,
427,
96,
518,
10266,
121,
3274,
3,
31,
162,
5556,
23173,
7,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the bayonet lug status for a m4 hbar and m4le carbine equipped? | CREATE TABLE table_12834315_5 (bayonet_lug VARCHAR, barrel_profile VARCHAR, name VARCHAR) | SELECT bayonet_lug FROM table_12834315_5 WHERE barrel_profile = "M4 HBAR" AND name = "M4LE Carbine" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2122,
4591,
4906,
1808,
834,
755,
41,
11119,
782,
17,
834,
8076,
584,
4280,
28027,
6,
10650,
834,
18816,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
61,
3,
32102,
32103,
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,
10210,
782,
17,
834,
8076,
21680,
953,
834,
2122,
4591,
4906,
1808,
834,
755,
549,
17444,
427,
10650,
834,
18816,
3274,
96,
329,
591,
3,
19990,
4280,
121,
3430,
564,
3274,
96,
329,
591,
3765,
1184,
12712,
121,
1,
-1... |
what is the score in fg-fga if in ft-fta is 16-21 | CREATE TABLE table_26335 (
"Player" text,
"GP-GS" text,
"Min Avg" text,
"FG-FGA" text,
"FG Pct" text,
"3FG-FGA" text,
"3FG Pct" text,
"FT-FTA" text,
"FT Pct" text,
"Reb" real,
"Ast" real,
"Blk" real,
"Stl" real,
"Pts" real,
"Avg Pts" text
) | SELECT "FG-FGA" FROM table_26335 WHERE "FT-FTA" = '16-21' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
3891,
2469,
41,
96,
15800,
49,
121,
1499,
6,
96,
8049,
18,
8256,
121,
1499,
6,
96,
12858,
71,
208,
122,
121,
1499,
6,
96,
22807,
18,
371,
6302,
121,
1499,
6,
96,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
22807,
18,
371,
6302,
121,
21680,
953,
834,
357,
3891,
2469,
549,
17444,
427,
96,
6245,
18,
6245,
188,
121,
3274,
3,
31,
2938,
16539,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the usual attendance for july 2? | CREATE TABLE table_name_6 (
attendance INTEGER,
date VARCHAR
) | SELECT AVG(attendance) FROM table_name_6 WHERE date = "july 2" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
948,
41,
11364,
3,
21342,
17966,
6,
833,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
4680,
11364,
21,
3,
2047,
120,
204,
58,
1,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
71,
17217,
599,
15116,
663,
61,
21680,
953,
834,
4350,
834,
948,
549,
17444,
427,
833,
3274,
96,
2047,
120,
204,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
4th Runner-up smaller than 1, and a 5th Runner-up of 0, and a Miss World smaller than 2 has which lowest 3rd Runner-up? | CREATE TABLE table_39334 (
"Rank" real,
"Country/Territory" text,
"Miss World" real,
"1st Runner-up" real,
"2nd Runner-up" real,
"3rd Runner-up" real,
"4th Runner-up" real,
"5th Runner-up" real,
"6th Runner-up" real,
"Semifinalists" real,
"Total" real
) | SELECT MIN("3rd Runner-up") FROM table_39334 WHERE "4th Runner-up" < '1' AND "5th Runner-up" = '0' AND "Miss World" < '2' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3288,
519,
3710,
41,
96,
22557,
121,
490,
6,
96,
10628,
651,
87,
382,
21301,
10972,
121,
1499,
6,
96,
329,
159,
7,
1150,
121,
490,
6,
96,
536,
7,
17,
3,
23572,
18,
413,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
121,
519,
52,
26,
3,
23572,
18,
413,
8512,
21680,
953,
834,
3288,
519,
3710,
549,
17444,
427,
96,
591,
189,
3,
23572,
18,
413,
121,
3,
2,
3,
31,
536,
31,
3430,
96,
755,
189,
3,
23572,
18,
413,
... |
For those employees who was hired before 2002-06-21, return a bar chart about the distribution of job_id and the sum of employee_id , and group by attribute job_id, and display from low to high by the y axis please. | 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 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 locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
) | SELECT JOB_ID, SUM(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY SUM(EMPLOYEE_ID) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1440,
41,
2847,
17161,
11824,
834,
4309,
3,
4331,
4059,
16426,
6,
2847,
17161,
11824,
834,
567,
17683,
3,
4331,
4059,
599,
2445,
201,
4083,
517,
9215,
834,
4309,
7908,
1982,
599,
1714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
446,
10539,
834,
4309,
6,
180,
6122,
599,
6037,
345,
5017,
476,
5080,
834,
4309,
61,
21680,
1652,
549,
17444,
427,
454,
14132,
834,
308,
6048,
3,
2,
3,
31,
24898,
18,
5176,
16539,
31,
350,
4630,
6880,
272,
476,
44... |
What is the episode title for episode number 12? | CREATE TABLE table_25640730_7 (title VARCHAR, _number VARCHAR) | SELECT title FROM table_25640730_7 WHERE _number = 12 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
4389,
4560,
1458,
834,
940,
41,
21869,
584,
4280,
28027,
6,
3,
834,
5525,
1152,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
5640,
2233,
21,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2233,
21680,
953,
834,
1828,
4389,
4560,
1458,
834,
940,
549,
17444,
427,
3,
834,
5525,
1152,
3274,
586,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Who was the opponent for the game on November 20, 1955? | CREATE TABLE table_name_35 (opponent VARCHAR, date VARCHAR) | SELECT opponent FROM table_name_35 WHERE date = "november 20, 1955" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2469,
41,
32,
102,
9977,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
8,
15264,
21,
8,
467,
30,
1671,
16047,
23652,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
15264,
21680,
953,
834,
4350,
834,
2469,
549,
17444,
427,
833,
3274,
96,
5326,
18247,
16047,
23652,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Which Opened has a System of c-train, and a Daily ridership smaller than 269,600? | CREATE TABLE table_name_80 (opened INTEGER, system VARCHAR, daily_ridership VARCHAR) | SELECT MAX(opened) FROM table_name_80 WHERE system = "c-train" AND daily_ridership < 269 OFFSET 600 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2079,
41,
26940,
3,
21342,
17966,
6,
358,
584,
4280,
28027,
6,
1444,
834,
4055,
49,
2009,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
2384,
15,
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,
4800,
4,
599,
26940,
61,
21680,
953,
834,
4350,
834,
2079,
549,
17444,
427,
358,
3274,
96,
75,
18,
9719,
121,
3430,
1444,
834,
4055,
49,
2009,
3,
2,
204,
3951,
3,
15316,
20788,
7366,
1,
-100,
-100,
-100,
-100,
-10... |
What is the year of most recent appearance of the Suncoast sound, who had more than 7 finals appearances? | CREATE TABLE table_5473 (
"Corps Name" text,
"Number of Finals Appearances" real,
"Year of First Appearance" real,
"Year of Most Recent Appearance" real,
"All Years of Finals Appearances" text
) | SELECT COUNT("Year of Most Recent Appearance") FROM table_5473 WHERE "Corps Name" = 'suncoast sound' AND "Number of Finals Appearances" > '7' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
5062,
4552,
41,
96,
13026,
102,
7,
5570,
121,
1499,
6,
96,
567,
5937,
49,
13,
6514,
7,
2276,
2741,
663,
7,
121,
490,
6,
96,
476,
2741,
13,
1485,
2276,
2741,
663,
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,
2847,
17161,
599,
121,
476,
2741,
13,
1377,
17716,
2276,
2741,
663,
8512,
21680,
953,
834,
5062,
4552,
549,
17444,
427,
96,
13026,
102,
7,
5570,
121,
3274,
3,
31,
7,
202,
25500,
1345,
31,
3430,
96,
567,
5937,
49,
... |
Score of 108-85 is what lowest game? | CREATE TABLE table_name_77 (
game INTEGER,
score VARCHAR
) | SELECT MIN(game) FROM table_name_77 WHERE score = "108-85" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4013,
41,
467,
3,
21342,
17966,
6,
2604,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
17763,
13,
3,
16169,
18,
4433,
19,
125,
7402,
467,
58,
1,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
7261,
61,
21680,
953,
834,
4350,
834,
4013,
549,
17444,
427,
2604,
3274,
96,
16169,
18,
4433,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Which position does Jesse Boulerice play? | CREATE TABLE table_name_83 (position VARCHAR, player VARCHAR) | SELECT position FROM table_name_83 WHERE player = "jesse boulerice" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4591,
41,
4718,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
1102,
405,
446,
6119,
8657,
109,
4920,
577,
58,
1,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1102,
21680,
953,
834,
4350,
834,
4591,
549,
17444,
427,
1959,
3274,
96,
354,
6119,
22333,
4920,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What date is the crowd larger than 20,000? | CREATE TABLE table_name_56 (
date VARCHAR,
crowd INTEGER
) | SELECT date FROM table_name_56 WHERE crowd > 20 OFFSET 000 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4834,
41,
833,
584,
4280,
28027,
6,
4374,
3,
21342,
17966,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
833,
19,
8,
4374,
2186,
145,
3,
13922,
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,
833,
21680,
953,
834,
4350,
834,
4834,
549,
17444,
427,
4374,
2490,
460,
3,
15316,
20788,
6078,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name the circuit for italian grand prix | CREATE TABLE table_name_97 (circuit VARCHAR, race VARCHAR) | SELECT circuit FROM table_name_97 WHERE race = "italian grand prix" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4327,
41,
15357,
21560,
584,
4280,
28027,
6,
1964,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
4558,
21,
24168,
1907,
3407,
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,
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,
4558,
21680,
953,
834,
4350,
834,
4327,
549,
17444,
427,
1964,
3274,
96,
155,
9,
9928,
1907,
3407,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, give me the comparison about the sum of salary over the job_id , and group by attribute job_id by a bar chart. | CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE 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 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)
) | SELECT JOB_ID, SUM(SALARY) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
10521,
41,
3396,
19846,
11810,
834,
4309,
7908,
1982,
599,
8525,
632,
201,
3396,
19846,
11810,
834,
567,
17683,
3,
4331,
4059,
599,
1458,
201,
283,
15610,
17966,
834,
4309,
7908,
1982,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
446,
10539,
834,
4309,
6,
180,
6122,
599,
134,
4090,
24721,
61,
21680,
1652,
549,
17444,
427,
180,
4090,
24721,
272,
7969,
518,
23394,
3,
25129,
3430,
586,
2313,
3430,
3,
6657,
329,
16994,
9215,
834,
4051,
382,
3,
2... |
provide the number of patients whose discharge location is short term hospital and procedure short title is attach pedicle graft nec? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "SHORT TERM HOSPITAL" AND procedures.short_title = "Attach pedicle graft NEC" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
What is the Outcome of the Match played after 2003 with a Score of 6 0, 6 3? | CREATE TABLE table_name_88 (
outcome VARCHAR,
year VARCHAR,
score VARCHAR
) | SELECT outcome FROM table_name_88 WHERE year > 2003 AND score = "6–0, 6–3" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4060,
41,
6138,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
6,
2604,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
3387,
287,
15,
13,
8,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
6138,
21680,
953,
834,
4350,
834,
4060,
549,
17444,
427,
215,
2490,
3888,
3430,
2604,
3274,
96,
948,
104,
632,
6,
431,
104,
519,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What season was the Formula BMW USA in? | CREATE TABLE table_name_87 (season VARCHAR, series VARCHAR) | SELECT season FROM table_name_87 WHERE series = "formula bmw usa" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4225,
41,
9476,
584,
4280,
28027,
6,
939,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
774,
47,
8,
13786,
8764,
2312,
16,
58,
1,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
774,
21680,
953,
834,
4350,
834,
4225,
549,
17444,
427,
939,
3274,
96,
2032,
83,
9,
3,
29471,
178,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What are the types of competition and number of competitions for that type. Show bar chart. | CREATE TABLE player (
Player_ID int,
name text,
Position text,
Club_ID int,
Apps real,
Tries real,
Goals text,
Points real
)
CREATE TABLE competition (
Competition_ID int,
Year real,
Competition_type text,
Country text
)
CREATE TABLE club (
Club_ID int,
name text,
Region text,
Start_year text
)
CREATE TABLE competition_result (
Competition_ID int,
Club_ID_1 int,
Club_ID_2 int,
Score text
)
CREATE TABLE club_rank (
Rank real,
Club_ID int,
Gold real,
Silver real,
Bronze real,
Total real
) | SELECT Competition_type, COUNT(*) FROM competition GROUP BY Competition_type | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1959,
41,
12387,
834,
4309,
16,
17,
6,
564,
1499,
6,
14258,
1499,
6,
1949,
834,
4309,
16,
17,
6,
2276,
7,
490,
6,
332,
2593,
490,
6,
17916,
7,
1499,
6,
4564,
7,
490,
3,
61,
3,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
15571,
834,
6137,
6,
2847,
17161,
599,
1935,
61,
21680,
2259,
350,
4630,
6880,
272,
476,
15571,
834,
6137,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the draw when the tries against was 69? | CREATE TABLE table_name_75 (
drawn VARCHAR,
tries_against VARCHAR
) | SELECT drawn FROM table_name_75 WHERE tries_against = "69" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3072,
41,
6796,
584,
4280,
28027,
6,
3,
9000,
834,
9,
16720,
7,
17,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
3314,
116,
8,
3,
9000,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6796,
21680,
953,
834,
4350,
834,
3072,
549,
17444,
427,
3,
9000,
834,
9,
16720,
7,
17,
3274,
96,
3951,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the average number of top-10s for events with more than 12 cuts made and 0 wins? | CREATE TABLE table_name_56 (top_10 INTEGER, cuts_made VARCHAR, wins VARCHAR) | SELECT AVG(top_10) FROM table_name_56 WHERE cuts_made > 12 AND wins < 0 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4834,
41,
2916,
834,
1714,
3,
21342,
17966,
6,
8620,
834,
4725,
584,
4280,
28027,
6,
9204,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1348,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
71,
17217,
599,
2916,
834,
16968,
21680,
953,
834,
4350,
834,
4834,
549,
17444,
427,
8620,
834,
4725,
2490,
586,
3430,
9204,
3,
2,
3,
632,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the average number of top-25s for events with less than 2 top-10s? | CREATE TABLE table_name_93 (top_25 INTEGER, top_10 INTEGER) | SELECT AVG(top_25) FROM table_name_93 WHERE top_10 < 2 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4271,
41,
2916,
834,
1828,
3,
21342,
17966,
6,
420,
834,
1714,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1348,
381,
13,
420,
14855,
7,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
71,
17217,
599,
2916,
834,
1828,
61,
21680,
953,
834,
4350,
834,
4271,
549,
17444,
427,
420,
834,
1714,
3,
2,
204,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Show the number of products with price higher than 1000 or lower than 500 for each product type code in a bar chart, rank x-axis in ascending order. | CREATE TABLE Customer_Orders (
order_id INTEGER,
customer_id INTEGER,
order_date DATETIME,
order_status_code VARCHAR(15)
)
CREATE TABLE Order_Items (
order_item_id INTEGER,
order_id INTEGER,
product_id INTEGER,
order_quantity VARCHAR(80)
)
CREATE TABLE Products (
product_id INTEGER,
product_type_code VARCHAR(15),
product_name VARCHAR(80),
product_price DOUBLE
)
CREATE TABLE Customer_Address_History (
customer_id INTEGER,
address_id INTEGER,
date_from DATETIME,
date_to DATETIME
)
CREATE TABLE Contacts (
contact_id INTEGER,
customer_id INTEGER,
gender VARCHAR(1),
first_name VARCHAR(80),
last_name VARCHAR(50),
contact_phone VARCHAR(80)
)
CREATE TABLE Addresses (
address_id INTEGER,
line_1_number_building VARCHAR(80),
city VARCHAR(50),
zip_postcode VARCHAR(20),
state_province_county VARCHAR(50),
country VARCHAR(50)
)
CREATE TABLE Customers (
customer_id INTEGER,
payment_method_code VARCHAR(15),
customer_number VARCHAR(20),
customer_name VARCHAR(80),
customer_address VARCHAR(255),
customer_phone VARCHAR(80),
customer_email VARCHAR(80)
) | SELECT product_type_code, COUNT(product_type_code) FROM Products WHERE product_price > 1000 OR product_price < 500 GROUP BY product_type_code ORDER BY product_type_code | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7327,
834,
7395,
588,
7,
41,
455,
834,
23,
26,
3,
21342,
17966,
6,
884,
834,
23,
26,
3,
21342,
17966,
6,
455,
834,
5522,
309,
6048,
382,
15382,
6,
455,
834,
8547,
302,
834,
4978,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
556,
834,
6137,
834,
4978,
6,
2847,
17161,
599,
15892,
834,
6137,
834,
4978,
61,
21680,
7554,
549,
17444,
427,
556,
834,
102,
4920,
2490,
5580,
4674,
556,
834,
102,
4920,
3,
2,
2899,
350,
4630,
6880,
272,
476,
556,
... |
Name the number of year for score being 6 3, 6 2, 6 4 | CREATE TABLE table_22597626_6 (
year VARCHAR,
score_in_the_final VARCHAR
) | SELECT COUNT(year) FROM table_22597626_6 WHERE score_in_the_final = "6–3, 6–2, 6–4" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2884,
3390,
3959,
2688,
834,
948,
41,
215,
584,
4280,
28027,
6,
2604,
834,
77,
834,
532,
834,
12406,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
1201,
61,
21680,
953,
834,
2884,
3390,
3959,
2688,
834,
948,
549,
17444,
427,
2604,
834,
77,
834,
532,
834,
12406,
3274,
96,
948,
104,
6355,
431,
104,
4482,
431,
104,
20364,
1,
-100,
-100,
-100,
-1... |
What is the largest number of 10 C points for a team with 39 total points? | CREATE TABLE table_28169 (
"Pos" real,
"Team" text,
"07 A Pts" real,
"08 C Pts" real,
"08 A Pts" real,
"09 C Pts" real,
"09 A Pts" real,
"10 C Pts" real,
"Total Pts" real,
"Total Pld" real,
"Avg" text
) | SELECT MAX("10 C Pts") FROM table_28169 WHERE "Total Pts" = '39' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2577,
27096,
41,
96,
345,
32,
7,
121,
490,
6,
96,
18699,
121,
1499,
6,
96,
4560,
71,
276,
17,
7,
121,
490,
6,
96,
4018,
205,
276,
17,
7,
121,
490,
6,
96,
4018,
71,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1714,
205,
276,
17,
7,
8512,
21680,
953,
834,
2577,
27096,
549,
17444,
427,
96,
3696,
1947,
276,
17,
7,
121,
3274,
3,
31,
3288,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Find the total student enrollment for different affiliation type schools Plot them as bar chart, display by the sum enrollment from low to high. | CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
) | SELECT Affiliation, SUM(Enrollment) FROM university GROUP BY Affiliation ORDER BY SUM(Enrollment) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
8498,
834,
19515,
41,
2271,
834,
4309,
16,
17,
6,
1121,
834,
4309,
16,
17,
6,
2271,
834,
23954,
1499,
6,
3,
14775,
834,
17748,
4885,
834,
134,
15,
9,
739,
1499,
6,
3,
14775,
834,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
89,
8027,
23,
257,
6,
180,
6122,
599,
8532,
4046,
297,
61,
21680,
3819,
350,
4630,
6880,
272,
476,
71,
89,
8027,
23,
257,
4674,
11300,
272,
476,
180,
6122,
599,
8532,
4046,
297,
61,
1,
-100,
-100,
-100,
-100,
... |
What is the Year won for the player with a larger than 4 To par and less the 157 Total? | CREATE TABLE table_name_4 (
year_won VARCHAR,
to_par VARCHAR,
total VARCHAR
) | SELECT year_won FROM table_name_4 WHERE to_par > 4 AND total < 157 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
591,
41,
215,
834,
210,
106,
584,
4280,
28027,
6,
12,
834,
1893,
584,
4280,
28027,
6,
792,
584,
4280,
28027,
3,
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,
1,
1,
1... | [
3,
23143,
14196,
215,
834,
210,
106,
21680,
953,
834,
4350,
834,
591,
549,
17444,
427,
12,
834,
1893,
2490,
314,
3430,
792,
3,
2,
3,
27452,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What suumer team was James Lomangino from St. John's on? | CREATE TABLE table_20589703_2 (summer_team VARCHAR, college VARCHAR, player VARCHAR) | SELECT summer_team FROM table_20589703_2 WHERE college = "St. John's" AND player = "James Lomangino" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1755,
3449,
4327,
4928,
834,
357,
41,
23541,
52,
834,
11650,
584,
4280,
28027,
6,
1900,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
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,
0,
0,
0... | [
3,
23143,
14196,
1248,
834,
11650,
21680,
953,
834,
1755,
3449,
4327,
4928,
834,
357,
549,
17444,
427,
1900,
3274,
96,
134,
17,
5,
1079,
31,
7,
121,
3430,
1959,
3274,
96,
683,
9,
2687,
1815,
348,
122,
77,
32,
121,
1,
-100,
-100,
... |
What digital channel corresponds to virtual channel 5.2? | CREATE TABLE table_30608 (
"Callsign" text,
"City of license" text,
"Virtual channel" text,
"Digital channel" text,
"Network" text
) | SELECT "Digital channel" FROM table_30608 WHERE "Virtual channel" = '5.2' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1458,
3328,
927,
41,
96,
254,
1748,
6732,
121,
1499,
6,
96,
254,
485,
13,
3344,
121,
1499,
6,
96,
21031,
17,
3471,
4245,
121,
1499,
6,
96,
30225,
4245,
121,
1499,
6,
96,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
30225,
4245,
121,
21680,
953,
834,
1458,
3328,
927,
549,
17444,
427,
96,
21031,
17,
3471,
4245,
121,
3274,
3,
31,
24342,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What nation has 1 as the gold and 2 as the total? | CREATE TABLE table_name_6 (
nation VARCHAR,
gold VARCHAR,
total VARCHAR
) | SELECT nation FROM table_name_6 WHERE gold = 1 AND total = 2 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
948,
41,
2982,
584,
4280,
28027,
6,
2045,
584,
4280,
28027,
6,
792,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
2982,
65,
209,
38,
8,
2045,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2982,
21680,
953,
834,
4350,
834,
948,
549,
17444,
427,
2045,
3274,
209,
3430,
792,
3274,
204,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the date of the Arden Street Oval game? | CREATE TABLE table_name_59 (date VARCHAR, venue VARCHAR) | SELECT date FROM table_name_59 WHERE venue = "arden street oval" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3390,
41,
5522,
584,
4280,
28027,
6,
5669,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
833,
13,
8,
22635,
35,
1887,
411,
2165,
467,
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,
833,
21680,
953,
834,
4350,
834,
3390,
549,
17444,
427,
5669,
3274,
96,
986,
35,
2815,
17986,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
How many candidates ran in the race where the incumbent is J. L. Pilcher? | CREATE TABLE table_1342013_10 (
candidates VARCHAR,
incumbent VARCHAR
) | SELECT COUNT(candidates) FROM table_1342013_10 WHERE incumbent = "J. L. Pilcher" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
11138,
834,
1714,
41,
4341,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
4341,
4037,
16,
8,
1964,
213,
8,
28406,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
1608,
12416,
6203,
61,
21680,
953,
834,
23747,
11138,
834,
1714,
549,
17444,
427,
28406,
3274,
96,
683,
5,
301,
5,
16536,
1703,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What are ids of the all distinct orders, sorted by placement date? | CREATE TABLE order_items (
order_item_id number,
product_id number,
order_id number,
order_item_status text,
order_item_details text
)
CREATE TABLE shipments (
shipment_id number,
order_id number,
invoice_number number,
shipment_tracking_number text,
shipment_date time,
other_shipment_details text
)
CREATE TABLE invoices (
invoice_number number,
invoice_date time,
invoice_details text
)
CREATE TABLE customers (
customer_id number,
customer_name text,
customer_details text
)
CREATE TABLE shipment_items (
shipment_id number,
order_item_id number
)
CREATE TABLE orders (
order_id number,
customer_id number,
order_status text,
date_order_placed time,
order_details text
)
CREATE TABLE products (
product_id number,
product_name text,
product_details text
) | SELECT DISTINCT order_id FROM orders ORDER BY date_order_placed | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
455,
834,
23,
3524,
7,
41,
455,
834,
23,
3524,
834,
23,
26,
381,
6,
556,
834,
23,
26,
381,
6,
455,
834,
23,
26,
381,
6,
455,
834,
23,
3524,
834,
8547,
302,
1499,
6,
455,
834,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
15438,
25424,
6227,
455,
834,
23,
26,
21680,
5022,
4674,
11300,
272,
476,
833,
834,
9397,
834,
4687,
26,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
how many total standards are there for type b plugs ? | CREATE TABLE table_204_794 (
id number,
"iec\nworld plugs\nType" text,
"standard" text,
"power\nrating" text,
"earthed" text,
"polarised" text,
"fused" text,
"insulated\npins" text,
"europlug\ncompatible" text
) | SELECT COUNT("standard") FROM table_204_794 WHERE "iec\nworld plugs\nType" = 'b' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
4440,
591,
41,
3,
23,
26,
381,
6,
96,
23,
15,
75,
2,
29,
7276,
6635,
7,
2,
29,
25160,
121,
1499,
6,
96,
16020,
121,
1499,
6,
96,
6740,
2,
29,
52,
1014,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16020,
8512,
21680,
953,
834,
26363,
834,
4440,
591,
549,
17444,
427,
96,
23,
15,
75,
2,
29,
7276,
6635,
7,
2,
29,
25160,
121,
3274,
3,
31,
115,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is drug type of drug name sodium chloride 3% inhalation soln? | 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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
) | SELECT prescriptions.drug_type FROM prescriptions WHERE prescriptions.drug = "Sodium Chloride 3% Inhalation Soln" | [
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,
7744,
7,
5,
26,
13534,
834,
6137,
21680,
7744,
7,
549,
17444,
427,
7744,
7,
5,
26,
13534,
3274,
96,
28637,
4004,
322,
1599,
3,
5170,
86,
3828,
257,
5175,
29,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
How many Wins have Losses larger than 2, and an Against of 73.3? | CREATE TABLE table_46973 (
"Season" real,
"Competition" text,
"Games" real,
"Wins" real,
"Loses" real,
"Against" text
) | SELECT SUM("Wins") FROM table_46973 WHERE "Loses" > '2' AND "Against" = '73.3' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4448,
4327,
519,
41,
96,
134,
15,
9,
739,
121,
490,
6,
96,
5890,
4995,
4749,
121,
1499,
6,
96,
23055,
7,
121,
490,
6,
96,
18455,
7,
121,
490,
6,
96,
434,
32,
2260,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
121,
18455,
7,
8512,
21680,
953,
834,
4448,
4327,
519,
549,
17444,
427,
96,
434,
32,
2260,
121,
2490,
3,
31,
357,
31,
3430,
96,
20749,
121,
3274,
3,
31,
940,
19660,
31,
1,
-100,
-100,
-100,
-100,
... |
Which Points have Goals against of 32, and Played larger than 38? | CREATE TABLE table_59877 (
"Position" real,
"Club" text,
"Played" real,
"Points" real,
"Wins" real,
"Draws" real,
"Losses" real,
"Goals for" real,
"Goals against" real,
"Goal Difference" real
) | SELECT MAX("Points") FROM table_59877 WHERE "Goals against" = '32' AND "Played" > '38' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3390,
27697,
41,
96,
345,
32,
7,
4749,
121,
490,
6,
96,
254,
11158,
121,
1499,
6,
96,
15800,
15,
26,
121,
490,
6,
96,
22512,
7,
121,
490,
6,
96,
18455,
7,
121,
490,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
121,
22512,
7,
8512,
21680,
953,
834,
3390,
27697,
549,
17444,
427,
96,
6221,
5405,
581,
121,
3274,
3,
31,
2668,
31,
3430,
96,
15800,
15,
26,
121,
2490,
3,
31,
3747,
31,
1,
-100,
-100,
-100,
-100,
... |
count the number of patients whose insurance is private and procedure short title is spinal canal explor nec? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Private" AND procedures.short_title = "Spinal canal explor NEC" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
14798,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
564,
1499,
6,
2774,
1947,
834,
8547,
302,
1499,
6,
1246,
1499,
6,
103,
115,
1499,
6,
7285,
1499,
6,
1612,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
What is Part 4, when Part 2 is 'batt'? | CREATE TABLE table_48531 (
"Class" text,
"Part 1" text,
"Part 2" text,
"Part 3" text,
"Part 4" text
) | SELECT "Part 4" FROM table_48531 WHERE "Part 2" = 'batt' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
4433,
3341,
41,
96,
21486,
121,
1499,
6,
96,
13725,
209,
121,
1499,
6,
96,
13725,
204,
121,
1499,
6,
96,
13725,
220,
121,
1499,
6,
96,
13725,
3,
20364,
1499,
3,
61,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
13725,
3,
20364,
21680,
953,
834,
591,
4433,
3341,
549,
17444,
427,
96,
13725,
204,
121,
3274,
3,
31,
3697,
17,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Give me the comparison about School_ID over the ACC_Road , and group by attribute ACC_Home by a bar chart, could you list in ascending by the y axis please? | CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
) | SELECT ACC_Road, School_ID FROM basketball_match GROUP BY ACC_Home, ACC_Road ORDER BY School_ID | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
8498,
834,
19515,
41,
2271,
834,
4309,
16,
17,
6,
1121,
834,
4309,
16,
17,
6,
2271,
834,
23954,
1499,
6,
3,
14775,
834,
17748,
4885,
834,
134,
15,
9,
739,
1499,
6,
3,
14775,
834,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
14775,
834,
448,
32,
9,
26,
6,
1121,
834,
4309,
21680,
8498,
834,
19515,
350,
4630,
6880,
272,
476,
3,
14775,
834,
19040,
6,
3,
14775,
834,
448,
32,
9,
26,
4674,
11300,
272,
476,
1121,
834,
4309,
1,
-100,
-10... |
Name the number of v core for model number mobile athlon 64 3000+ | CREATE TABLE table_27277284_8 (
v_core VARCHAR,
model_number VARCHAR
) | SELECT COUNT(v_core) FROM table_27277284_8 WHERE model_number = "Mobile Athlon 64 3000+" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2555,
2555,
5865,
4608,
834,
927,
41,
3,
208,
834,
9022,
584,
4280,
28027,
6,
825,
834,
5525,
1152,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
381,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
208,
834,
9022,
61,
21680,
953,
834,
2555,
2555,
5865,
4608,
834,
927,
549,
17444,
427,
825,
834,
5525,
1152,
3274,
96,
22162,
71,
189,
40,
106,
6687,
220,
2313,
1220,
121,
1,
-100,
-100,
-100,
-10... |
Which women's double took place in 2006? | CREATE TABLE table_14865 (
"Year" text,
"Men's singles" text,
"Women's singles" text,
"Men's doubles" text,
"Women's doubles" text,
"Mixed doubles" text
) | SELECT "Women's doubles" FROM table_14865 WHERE "Year" = '2006' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
24748,
4122,
41,
96,
476,
2741,
121,
1499,
6,
96,
329,
35,
31,
7,
712,
7,
121,
1499,
6,
96,
518,
32,
904,
31,
7,
712,
7,
121,
1499,
6,
96,
329,
35,
31,
7,
1486,
7,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
518,
32,
904,
31,
7,
1486,
7,
121,
21680,
953,
834,
24748,
4122,
549,
17444,
427,
96,
476,
2741,
121,
3274,
3,
31,
21196,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
what was the name of the last medication that was prescribed to patient 003-42706 when they visited the hospital last time? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime 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 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 cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
) | SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '003-42706' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1)) ORDER BY medication.drugstarttime DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2179,
9339,
41,
2179,
521,
9824,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
1543,
3585,
1499,
6,
9329,
1499,
6,
1543,
4914,
29,
715,
97,
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,
7757,
5,
26,
13534,
4350,
21680,
7757,
549,
17444,
427,
7757,
5,
10061,
15129,
21545,
23,
26,
3388,
41,
23143,
14196,
1868,
5,
10061,
15129,
21545,
23,
26,
21680,
1868,
549,
17444,
427,
1868,
5,
10061,
15878,
3734,
21... |
what's the title where original air date is january18,2009 | CREATE TABLE table_11589522_3 (
title VARCHAR,
original_air_date VARCHAR
) | SELECT title FROM table_11589522_3 WHERE original_air_date = "January18,2009" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2596,
3449,
3301,
2884,
834,
519,
41,
2233,
584,
4280,
28027,
6,
926,
834,
2256,
834,
5522,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
125,
31,
7,
8,
2233,
213... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2233,
21680,
953,
834,
2596,
3449,
3301,
2884,
834,
519,
549,
17444,
427,
926,
834,
2256,
834,
5522,
3274,
96,
30404,
2606,
6,
16660,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Which Platelet count has a Condition of factor v deficiency? | CREATE TABLE table_name_39 (platelet_count VARCHAR, condition VARCHAR) | SELECT platelet_count FROM table_name_39 WHERE condition = "factor v deficiency" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3288,
41,
17628,
1655,
834,
13362,
584,
4280,
28027,
6,
1706,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
14477,
1655,
3476,
65,
3,
9,
24239,
13,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3829,
1655,
834,
13362,
21680,
953,
834,
4350,
834,
3288,
549,
17444,
427,
1706,
3274,
96,
17899,
3,
208,
20,
4638,
23,
4392,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What grid is Ducati with fewer than 22 laps? | CREATE TABLE table_76578 (
"Rider" text,
"Manufacturer" text,
"Laps" real,
"Time" text,
"Grid" real
) | SELECT "Grid" FROM table_76578 WHERE "Manufacturer" = 'ducati' AND "Laps" < '22' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3959,
755,
3940,
41,
96,
448,
23,
588,
121,
1499,
6,
96,
7296,
76,
8717,
450,
49,
121,
1499,
6,
96,
3612,
102,
7,
121,
490,
6,
96,
13368,
121,
1499,
6,
96,
13313,
26,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
13313,
26,
121,
21680,
953,
834,
3959,
755,
3940,
549,
17444,
427,
96,
7296,
76,
8717,
450,
49,
121,
3274,
3,
31,
1259,
16461,
31,
3430,
96,
3612,
102,
7,
121,
3,
2,
3,
31,
2884,
31,
1,
-100,
-100,
-100,
-... |
In the year 2009 who was the under-13? | CREATE TABLE table_26368963_1 (under_13 VARCHAR, year VARCHAR) | SELECT under_13 FROM table_26368963_1 WHERE year = 2009 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2688,
3420,
3914,
3891,
834,
536,
41,
7248,
834,
2368,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
86,
8,
215,
2464,
113,
47,
8,
365,
130... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
365,
834,
2368,
21680,
953,
834,
2688,
3420,
3914,
3891,
834,
536,
549,
17444,
427,
215,
3274,
2464,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is the date where the constructor is ferrari and the location is anderstorp? | CREATE TABLE table_1140085_2 (
date VARCHAR,
constructor VARCHAR,
location VARCHAR
) | SELECT date FROM table_1140085_2 WHERE constructor = "Ferrari" AND location = "Anderstorp" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2596,
5548,
4433,
834,
357,
41,
833,
584,
4280,
28027,
6,
6774,
127,
584,
4280,
28027,
6,
1128,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
125,
19,
8,
833,
213... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
833,
21680,
953,
834,
2596,
5548,
4433,
834,
357,
549,
17444,
427,
6774,
127,
3274,
96,
371,
49,
52,
1665,
121,
3430,
1128,
3274,
96,
7175,
49,
7279,
102,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
How much tonnage has a Fate of sunk, and a Flag of great britain, and a Date of 26 september 1940, and Deaths of 2? | CREATE TABLE table_name_83 (tonnage___grt__ INTEGER, deaths VARCHAR, date VARCHAR, fate VARCHAR, flag VARCHAR) | SELECT SUM(tonnage___grt__) FROM table_name_83 WHERE fate = "sunk" AND flag = "great britain" AND date = "26 september 1940" AND deaths = 2 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4591,
41,
17,
106,
9761,
834,
834,
834,
122,
52,
17,
834,
834,
3,
21342,
17966,
6,
14319,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
6,
15126,
584,
4280,
28027,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
17,
106,
9761,
834,
834,
834,
122,
52,
17,
834,
834,
61,
21680,
953,
834,
4350,
834,
4591,
549,
17444,
427,
15126,
3274,
96,
7,
6513,
121,
3430,
5692,
3274,
96,
20288,
3,
115,
10694,
77,
121,
3430,... |
What's the sum of points for the 1963 season when there are more than 30 games? | CREATE TABLE table_name_8 (
points INTEGER,
season VARCHAR,
games VARCHAR
) | SELECT SUM(points) FROM table_name_8 WHERE season = "1963" AND games > 30 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
927,
41,
979,
3,
21342,
17966,
6,
774,
584,
4280,
28027,
6,
1031,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
31,
7,
8,
4505,
13,
979,
21,
8,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
180,
6122,
599,
2700,
7,
61,
21680,
953,
834,
4350,
834,
927,
549,
17444,
427,
774,
3274,
96,
2294,
3891,
121,
3430,
1031,
2490,
604,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the title for the label mother / mvp / polydor? | CREATE TABLE table_name_80 (
title VARCHAR,
label VARCHAR
) | SELECT title FROM table_name_80 WHERE label = "mother / mvp / polydor" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2079,
41,
2233,
584,
4280,
28027,
6,
3783,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
2233,
21,
8,
3783,
2039,
3,
87,
3,
51,
208,
102,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2233,
21680,
953,
834,
4350,
834,
2079,
549,
17444,
427,
3783,
3274,
96,
21226,
3,
87,
3,
51,
208,
102,
3,
87,
4251,
26,
127,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the frequency of KFNW? | CREATE TABLE table_name_36 (frequency VARCHAR, call_sign VARCHAR) | SELECT frequency FROM table_name_36 WHERE call_sign = "kfnw" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3420,
41,
30989,
584,
4280,
28027,
6,
580,
834,
6732,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
7321,
13,
480,
22870,
518,
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,
7321,
21680,
953,
834,
4350,
834,
3420,
549,
17444,
427,
580,
834,
6732,
3274,
96,
157,
89,
29,
210,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the date of birth of a republican member of the United States House of Representatives who held the term of 1863-1865? | CREATE TABLE table_name_80 (date_of_birth VARCHAR, party VARCHAR, house_term VARCHAR) | SELECT date_of_birth FROM table_name_80 WHERE party = "republican" AND house_term = "1863-1865" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2079,
41,
5522,
834,
858,
834,
20663,
584,
4280,
28027,
6,
1088,
584,
4280,
28027,
6,
629,
834,
1987,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
833,
834,
858,
834,
20663,
21680,
953,
834,
4350,
834,
2079,
549,
17444,
427,
1088,
3274,
96,
60,
15727,
152,
121,
3430,
629,
834,
1987,
3274,
96,
2606,
3891,
6996,
4122,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which Home team that has a Tie no of 20? | CREATE TABLE table_name_74 (home_team VARCHAR, tie_no VARCHAR) | SELECT home_team FROM table_name_74 WHERE tie_no = "20" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4581,
41,
5515,
834,
11650,
584,
4280,
28027,
6,
6177,
834,
29,
32,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
1210,
372,
24,
65,
3,
9,
2262,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
234,
834,
11650,
21680,
953,
834,
4350,
834,
4581,
549,
17444,
427,
6177,
834,
29,
32,
3274,
96,
1755,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the lowest Muslim (% of Total population) of a year after 2011? | CREATE TABLE table_name_37 (muslim___percentage_of_total_population_ INTEGER, census_year INTEGER) | SELECT MIN(muslim___percentage_of_total_population_) FROM table_name_37 WHERE census_year > 2011 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4118,
41,
3252,
4941,
834,
834,
834,
883,
3728,
545,
834,
858,
834,
235,
1947,
834,
9791,
7830,
834,
3,
21342,
17966,
6,
23087,
834,
1201,
3,
21342,
17966,
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,
3,
17684,
599,
3252,
4941,
834,
834,
834,
883,
3728,
545,
834,
858,
834,
235,
1947,
834,
9791,
7830,
834,
61,
21680,
953,
834,
4350,
834,
4118,
549,
17444,
427,
23087,
834,
1201,
2490,
2722,
1,
-100,
-100,
-100,
-10... |
Where was game number 55 played? | CREATE TABLE table_23248940_9 (location_attendance VARCHAR, game VARCHAR) | SELECT location_attendance FROM table_23248940_9 WHERE game = 55 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2773,
2266,
3914,
2445,
834,
1298,
41,
14836,
834,
15116,
663,
584,
4280,
28027,
6,
467,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2840,
47,
467,
381,
6897,
1944,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1128,
834,
15116,
663,
21680,
953,
834,
2773,
2266,
3914,
2445,
834,
1298,
549,
17444,
427,
467,
3274,
6897,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
How many same release titles are there in the table? | CREATE TABLE torrents (
groupname text,
totalsnatched number,
artist text,
groupyear number,
releasetype text,
groupid number,
id number
)
CREATE TABLE tags (
index number,
id number,
tag text
) | SELECT COUNT(*) FROM (SELECT groupname FROM torrents GROUP BY groupname HAVING COUNT(*) > 1) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
23326,
7,
41,
563,
4350,
1499,
6,
792,
7,
29,
144,
4513,
381,
6,
2377,
1499,
6,
563,
1201,
381,
6,
1576,
6137,
1499,
6,
563,
23,
26,
381,
6,
3,
23,
26,
381,
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,
1935,
61,
21680,
41,
23143,
14196,
563,
4350,
21680,
23326,
7,
350,
4630,
6880,
272,
476,
563,
4350,
454,
6968,
2365,
2847,
17161,
599,
1935,
61,
2490,
8925,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
what is the primary disease and diagnosis for the patient name miguel hodges? | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT demographic.diagnosis, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Miguel Hodges" | [
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,
14798,
5,
25930,
4844,
159,
6,
18730,
7,
5,
7,
14184,
834,
21869,
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,
549,
17444,
... |
Which Best Actor has a Best Director of takeshi kitano for outrage beyond? | CREATE TABLE table_name_44 (best_actor VARCHAR, best_director VARCHAR) | SELECT best_actor FROM table_name_44 WHERE best_director = "takeshi kitano for outrage beyond" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3628,
41,
9606,
834,
9,
5317,
584,
4280,
28027,
6,
200,
834,
25982,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
1648,
1983,
127,
65,
3,
9,
1648,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
200,
834,
9,
5317,
21680,
953,
834,
4350,
834,
3628,
549,
17444,
427,
200,
834,
25982,
3274,
96,
4914,
5605,
3650,
152,
32,
21,
91,
4843,
1909,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Which Score is the lowest one that has a Year of 1868? | CREATE TABLE table_name_75 (
score INTEGER,
year VARCHAR
) | SELECT MIN(score) FROM table_name_75 WHERE year = 1868 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3072,
41,
2604,
3,
21342,
17966,
6,
215,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
17763,
19,
8,
7402,
80,
24,
65,
3,
9,
2929,
13,
507,
365... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
7,
9022,
61,
21680,
953,
834,
4350,
834,
3072,
549,
17444,
427,
215,
3274,
507,
3651,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
For those records from the products and each product's manufacturer, give me the comparison about the sum of revenue over the name , and group by attribute name by a bar chart, could you list bars from high to low order please? | CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) | SELECT T2.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7554,
41,
3636,
3,
21342,
17966,
6,
5570,
584,
4280,
28027,
599,
25502,
201,
5312,
3396,
254,
26330,
434,
6,
15248,
3,
21342,
17966,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
332,
4416,
23954,
6,
332,
4416,
1649,
15098,
21680,
7554,
6157,
332,
536,
3,
15355,
3162,
15248,
7,
6157,
332,
357,
9191,
332,
5411,
7296,
76,
8717,
450,
49,
3274,
332,
4416,
22737,
350,
4630,
6880,
272,
476,
332,
4... |
How many invoices do we have? | CREATE TABLE customers (
customer_id number,
customer_first_name text,
customer_middle_initial text,
customer_last_name text,
gender text,
email_address text,
login_name text,
login_password text,
phone_number text,
town_city text,
state_county_province text,
country text
)
CREATE TABLE order_items (
order_item_id number,
order_id number,
product_id number,
product_quantity text,
other_order_item_details text
)
CREATE TABLE invoice_line_items (
order_item_id number,
invoice_number number,
product_id number,
product_title text,
product_quantity text,
product_price number,
derived_product_cost number,
derived_vat_payable number,
derived_total_cost number
)
CREATE TABLE invoices (
invoice_number number,
order_id number,
invoice_date time
)
CREATE TABLE financial_transactions (
transaction_id number,
account_id number,
invoice_number number,
transaction_type text,
transaction_date time,
transaction_amount number,
transaction_comment text,
other_transaction_details text
)
CREATE TABLE products (
product_id number,
parent_product_id number,
production_type_code text,
unit_price number,
product_name text,
product_color text,
product_size text
)
CREATE TABLE accounts (
account_id number,
customer_id number,
date_account_opened time,
account_name text,
other_account_details text
)
CREATE TABLE product_categories (
production_type_code text,
product_type_description text,
vat_rating number
)
CREATE TABLE orders (
order_id number,
customer_id number,
date_order_placed time,
order_details text
) | SELECT COUNT(*) FROM invoices | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
722,
41,
884,
834,
23,
26,
381,
6,
884,
834,
14672,
834,
4350,
1499,
6,
884,
834,
51,
23,
8437,
834,
77,
23,
10646,
1499,
6,
884,
834,
5064,
834,
4350,
1499,
6,
7285,
1499,
6,
79... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10921,
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,
-100,
-100,
-10... |
how many lands with longitude of -100.895783 are? | CREATE TABLE table_1913 (
"Township" text,
"County" text,
"Pop. (2010)" real,
"Land ( sqmi )" text,
"Water (sqmi)" text,
"Latitude" text,
"Longitude" text,
"GEO ID" real,
"ANSI code" real
) | SELECT COUNT("Land ( sqmi )") FROM table_1913 WHERE "Longitude" = '-100.895783' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2294,
2368,
41,
96,
382,
9197,
2009,
121,
1499,
6,
96,
10628,
63,
121,
1499,
6,
96,
27773,
5,
26118,
121,
490,
6,
96,
434,
232,
41,
11820,
51,
23,
3,
61,
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,
434,
232,
41,
11820,
51,
23,
3,
61,
8512,
21680,
953,
834,
2294,
2368,
549,
17444,
427,
96,
434,
2444,
20341,
121,
3274,
3,
31,
18,
2915,
5,
3914,
3436,
4591,
31,
1,
-100,
-100,
-100,
-100,
... |
baseline hgb < 11.7 g / dl in female , or < 13 g / dl in male ; lymphopenia ( < 1000 lymphocytes / mcl ) or leukopenia ( < 3000 total leukocytes / mcl ) , or an absolute cd4 count < 500 , or platelets < 150000 | CREATE TABLE table_dev_21 (
"id" int,
"gender" string,
"leukopenia" int,
"dialysis" bool,
"hemoglobin_a1c_hba1c" float,
"cd4_count" int,
"platelets" int,
"renal_disease" bool,
"fasting_triglycerides" int,
"hyperlipidemia" bool,
"lymphopenia" int,
"hba1c" float,
"fasting_ldl_cholesterol" int,
"serum_creatinine" float,
"baseline_hemoglobin_hgb" float,
"triglyceride_tg" float,
"NOUSE" float
) | SELECT * FROM table_dev_21 WHERE (baseline_hemoglobin_hgb < 11.7 AND gender = 'female') OR (baseline_hemoglobin_hgb < 13 AND gender = 'male') OR lymphopenia < 1000 OR leukopenia < 3000 OR cd4_count < 500 OR platelets < 150000 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
9776,
834,
2658,
41,
96,
23,
26,
121,
16,
17,
6,
96,
122,
3868,
121,
6108,
6,
96,
109,
1598,
8751,
23,
9,
121,
16,
17,
6,
96,
26,
23,
9,
21091,
121,
3,
12840,
40,
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,
1429,
21680,
953,
834,
9776,
834,
2658,
549,
17444,
427,
41,
10925,
747,
834,
6015,
32,
14063,
77,
834,
107,
122,
115,
3,
2,
209,
18596,
3430,
7285,
3274,
3,
31,
89,
15,
13513,
31,
61,
4674,
41,
10925,
747,
834,
... |
how many patients' primary disease is hypertension but not coronary artery disease/cardiac cath and their year of death is in or before 2115? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "HYPERTENSION;RULE OUT CORONARY ARTERY DISEASE\CARDIAC CATH" AND demographic.dod_year <= "2115.0" | [
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,
25930,
4844,
159,
3274,
96,
15761,
8742,
17779,
134,
9215,
117,
8503,
3765,
3,
9744,
2847,
13044,
... |
What was the address in 1974? | CREATE TABLE table_name_42 (address VARCHAR, year VARCHAR) | SELECT address FROM table_name_42 WHERE year = "1974" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4165,
41,
9,
26,
12039,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
1115,
16,
17184,
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,
1115,
21680,
953,
834,
4350,
834,
4165,
549,
17444,
427,
215,
3274,
96,
27181,
20364,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the smallest grid with collision as the Time/Retired for pedro diniz? | CREATE TABLE table_51664 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | SELECT MIN("Grid") FROM table_51664 WHERE "Time/Retired" = 'collision' AND "Driver" = 'pedro diniz' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
755,
2938,
4389,
41,
96,
20982,
52,
121,
1499,
6,
96,
4302,
7593,
127,
121,
1499,
6,
96,
3612,
102,
7,
121,
490,
6,
96,
13368,
87,
1649,
11809,
26,
121,
1499,
6,
96,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
121,
13313,
26,
8512,
21680,
953,
834,
755,
2938,
4389,
549,
17444,
427,
96,
13368,
87,
1649,
11809,
26,
121,
3274,
3,
31,
75,
20953,
1938,
31,
3430,
96,
20982,
52,
121,
3274,
3,
31,
3138,
52,
32,
... |
What percentage voted for Tom Horner according to the poll source with sampling error of 2.5%? | CREATE TABLE table_20032301_3 (tom_horner__i_ VARCHAR, sampling_error VARCHAR) | SELECT tom_horner__i_ FROM table_20032301_3 WHERE sampling_error = "2.5%" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23948,
13427,
536,
834,
519,
41,
235,
51,
834,
6293,
49,
834,
834,
23,
834,
584,
4280,
28027,
6,
17222,
834,
17262,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
3,
23143,
14196,
12,
51,
834,
6293,
49,
834,
834,
23,
834,
21680,
953,
834,
23948,
13427,
536,
834,
519,
549,
17444,
427,
17222,
834,
17262,
3274,
96,
4416,
2712,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the name of the episode that was directed by Dennis Smith? | CREATE TABLE table_2828803_1 (title VARCHAR, directed_by VARCHAR) | SELECT title FROM table_2828803_1 WHERE directed_by = "Dennis Smith" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2577,
2577,
2079,
519,
834,
536,
41,
21869,
584,
4280,
28027,
6,
6640,
834,
969,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
564,
13,
8,
5640,
24,
47,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2233,
21680,
953,
834,
2577,
2577,
2079,
519,
834,
536,
549,
17444,
427,
6640,
834,
969,
3274,
96,
308,
35,
29,
159,
3931,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Give me the comparison about School_ID over the All_Home , and group by attribute ACC_Road by a bar chart, and rank from high to low by the Y. | CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
) | SELECT All_Home, School_ID FROM basketball_match GROUP BY ACC_Road, All_Home ORDER BY School_ID DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
8498,
834,
19515,
41,
2271,
834,
4309,
16,
17,
6,
1121,
834,
4309,
16,
17,
6,
2271,
834,
23954,
1499,
6,
3,
14775,
834,
17748,
4885,
834,
134,
15,
9,
739,
1499,
6,
3,
14775,
834,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
432,
834,
19040,
6,
1121,
834,
4309,
21680,
8498,
834,
19515,
350,
4630,
6880,
272,
476,
3,
14775,
834,
448,
32,
9,
26,
6,
432,
834,
19040,
4674,
11300,
272,
476,
1121,
834,
4309,
309,
25067,
1,
-100,
-100,
-100,
... |
list the id list of patients who have been diagnosed with sepsis - sepsis with single organ dysfunction- circulatory system failure last year. | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime 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 lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
) | SELECT patient.uniquepid FROM patient WHERE patient.patientunitstayid IN (SELECT diagnosis.patientunitstayid FROM diagnosis WHERE diagnosis.diagnosisname = 'sepsis - sepsis with single organ dysfunction- circulatory system failure' AND DATETIME(diagnosis.diagnosistime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
8209,
41,
8209,
23,
26,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
8209,
4350,
1499,
6,
8209,
715,
97,
6,
3,
447,
26,
1298,
4978,
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,
1868,
5,
202,
1495,
12417,
21680,
1868,
549,
17444,
427,
1868,
5,
10061,
15129,
21545,
23,
26,
3388,
41,
23143,
14196,
8209,
5,
10061,
15129,
21545,
23,
26,
21680,
8209,
549,
17444,
427,
8209,
5,
25930,
4844,
159,
435... |
Which % FPv has First Pref votes larger than 19,684, and Seats of 9? | CREATE TABLE table_7975 (
"Party" text,
"Seats" text,
"% of seats" text,
"First Pref votes" real,
"% FPv" text
) | SELECT "% FPv" FROM table_7975 WHERE "First Pref votes" > '19,684' AND "Seats" = '9' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4440,
3072,
41,
96,
13725,
63,
121,
1499,
6,
96,
134,
1544,
7,
121,
1499,
6,
96,
1454,
13,
6116,
121,
1499,
6,
96,
25171,
1266,
89,
11839,
121,
490,
6,
96,
1454,
3,
106... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1454,
3,
10698,
208,
121,
21680,
953,
834,
4440,
3072,
549,
17444,
427,
96,
25171,
1266,
89,
11839,
121,
2490,
3,
31,
2294,
6,
3651,
591,
31,
3430,
96,
134,
1544,
7,
121,
3274,
3,
31,
1298,
31,
1,
-100,
-100... |
What is the result for Melbourne when Adelaide, Sydney, and Perth are yes, and Gold Coast is no? | CREATE TABLE table_name_52 (melbourne VARCHAR, gold_coast VARCHAR, perth VARCHAR, adelaide VARCHAR, sydney VARCHAR) | SELECT melbourne FROM table_name_52 WHERE adelaide = "yes" AND sydney = "yes" AND perth = "yes" AND gold_coast = "no" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5373,
41,
2341,
26255,
584,
4280,
28027,
6,
2045,
834,
25500,
584,
4280,
28027,
6,
399,
189,
584,
4280,
28027,
6,
3,
15311,
5385,
584,
4280,
28027,
6,
3,
7,
63,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2341,
26255,
21680,
953,
834,
4350,
834,
5373,
549,
17444,
427,
3,
15311,
5385,
3274,
96,
10070,
121,
3430,
3,
7,
63,
26,
3186,
3274,
96,
10070,
121,
3430,
399,
189,
3274,
96,
10070,
121,
3430,
2045,
834,
25500,
... |
Which Tournament was played in NH in 2011? | CREATE TABLE table_39608 (
"Tournament" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
) | SELECT "Tournament" FROM table_39608 WHERE "2011" = 'nh' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
519,
4314,
4018,
41,
96,
382,
1211,
20205,
17,
121,
1499,
6,
96,
21196,
121,
1499,
6,
96,
20615,
121,
1499,
6,
96,
16128,
121,
1499,
6,
96,
16660,
121,
1499,
6,
96,
14926... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1211,
20205,
17,
121,
21680,
953,
834,
519,
4314,
4018,
549,
17444,
427,
96,
13907,
121,
3274,
3,
31,
29,
107,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
history of stroke or seizure | CREATE TABLE table_train_102 (
"id" int,
"autoimmune_disease" bool,
"stroke" bool,
"renal_disease" bool,
"hepatic_disease" bool,
"liver_disease" bool,
"serum_creatinine" float,
"seizure_disorder" bool,
"NOUSE" float
) | SELECT * FROM table_train_102 WHERE stroke = 1 OR seizure_disorder = 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
9719,
834,
14388,
41,
96,
23,
26,
121,
16,
17,
6,
96,
31650,
834,
26,
159,
14608,
121,
3,
12840,
40,
6,
96,
24790,
121,
3,
12840,
40,
6,
96,
1536,
138,
834,
26,
159,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14388,
549,
17444,
427,
9529,
3274,
209,
4674,
4736,
1000,
60,
834,
26,
159,
9397,
3274,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
When Netherlands is the country what is the report? | CREATE TABLE table_24200 (
"Round" real,
"Country" text,
"Circuit" text,
"Date" text,
"Pole Position" text,
"Fastest Lap" text,
"Winning Rider" text,
"Winning Team" text,
"Report" text
) | SELECT "Report" FROM table_24200 WHERE "Country" = 'Netherlands' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2266,
3632,
41,
96,
448,
32,
1106,
121,
490,
6,
96,
10628,
651,
121,
1499,
6,
96,
254,
23,
52,
21560,
121,
1499,
6,
96,
308,
342,
121,
1499,
6,
96,
8931,
15,
14258,
121... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
1649,
1493,
121,
21680,
953,
834,
2266,
3632,
549,
17444,
427,
96,
10628,
651,
121,
3274,
3,
31,
9688,
760,
6347,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Return a bar chart on how many movie reviews does each director get? | CREATE TABLE Reviewer (
rID int,
name text
)
CREATE TABLE Movie (
mID int,
title text,
year int,
director text
)
CREATE TABLE Rating (
rID int,
mID int,
stars int,
ratingDate date
) | SELECT director, COUNT(*) FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4543,
49,
41,
3,
52,
4309,
16,
17,
6,
564,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
10743,
41,
3,
51,
4309,
16,
17,
6,
2233,
1499,
6,
215,
16,
17,
6,
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,
2090,
6,
2847,
17161,
599,
1935,
61,
21680,
10743,
6157,
332,
536,
3,
15355,
3162,
21662,
6157,
332,
357,
9191,
332,
5411,
51,
4309,
3274,
332,
4416,
51,
4309,
350,
4630,
6880,
272,
476,
332,
5411,
25982,
1,
-100,
-... |
What is the name where the type is listed as free agent and the country is ngr eng? | CREATE TABLE table_1731 (
"N" real,
"P" text,
"Name" text,
"EU" text,
"Country" text,
"Age" real,
"Type" text,
"Moving from" text,
"Transfer window" text,
"Ends" text,
"Transfer fee" text,
"Source" text
) | SELECT "Name" FROM table_1731 WHERE "Type" = 'Free Agent' AND "Country" = 'NGR ENG' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2517,
3341,
41,
96,
567,
121,
490,
6,
96,
345,
121,
1499,
6,
96,
23954,
121,
1499,
6,
96,
12062,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
188,
397,
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,
96,
23954,
121,
21680,
953,
834,
2517,
3341,
549,
17444,
427,
96,
25160,
121,
3274,
3,
31,
16393,
8628,
31,
3430,
96,
10628,
651,
121,
3274,
3,
31,
567,
8727,
3,
23182,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Who had 1344 points? | CREATE TABLE table_name_79 (name VARCHAR, points VARCHAR) | SELECT name FROM table_name_79 WHERE points = 1344 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4440,
41,
4350,
584,
4280,
28027,
6,
979,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
141,
1179,
3628,
979,
58,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
564,
21680,
953,
834,
4350,
834,
4440,
549,
17444,
427,
979,
3274,
1179,
3628,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
what is the total number of liatongus militaris castelanu released ? | CREATE TABLE table_204_869 (
id number,
"species" text,
"country of origin" text,
"total released" number,
"first release" text,
"last release" text,
"areas of release" text,
"areas established" text,
"pasture type" text
) | SELECT "total released" FROM table_204_869 WHERE "species" = 'liatongus militaris castelanu' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
927,
3951,
41,
3,
23,
26,
381,
6,
96,
7576,
725,
121,
1499,
6,
96,
17529,
13,
5233,
121,
1499,
6,
96,
235,
1947,
1883,
121,
381,
6,
96,
14672,
1576,
121,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
235,
1947,
1883,
121,
21680,
953,
834,
26363,
834,
927,
3951,
549,
17444,
427,
96,
7576,
725,
121,
3274,
3,
31,
40,
23,
144,
2444,
302,
26153,
7,
4061,
15,
1618,
76,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the total rank for New Zealand, when less than 1 bronze medals were won? | CREATE TABLE table_name_56 (
rank INTEGER,
nation VARCHAR,
bronze VARCHAR
) | SELECT SUM(rank) FROM table_name_56 WHERE nation = "new zealand" AND bronze < 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4834,
41,
11003,
3,
21342,
17966,
6,
2982,
584,
4280,
28027,
6,
13467,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
792,
11003,
21,
368,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
180,
6122,
599,
6254,
61,
21680,
953,
834,
4350,
834,
4834,
549,
17444,
427,
2982,
3274,
96,
5534,
3,
776,
138,
232,
121,
3430,
13467,
3,
2,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the time with 10 grids? | CREATE TABLE table_name_81 (time_retired VARCHAR, grid VARCHAR) | SELECT time_retired FROM table_name_81 WHERE grid = 10 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4959,
41,
715,
834,
10682,
1271,
584,
4280,
28027,
6,
8634,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
97,
28,
335,
8634,
7,
58,
1,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
97,
834,
10682,
1271,
21680,
953,
834,
4350,
834,
4959,
549,
17444,
427,
8634,
3274,
335,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Week larger than 6, and a Date of november 22, 1959 had what result? | CREATE TABLE table_name_5 (
result VARCHAR,
week VARCHAR,
date VARCHAR
) | SELECT result FROM table_name_5 WHERE week > 6 AND date = "november 22, 1959" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
755,
41,
741,
584,
4280,
28027,
6,
471,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
6551,
2186,
145,
8580,
11,
3,
9,
7678,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
741,
21680,
953,
834,
4350,
834,
755,
549,
17444,
427,
471,
2490,
431,
3430,
833,
3274,
96,
5326,
18247,
12889,
22471,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
provide the number of patients who were admitted before the year 2174 and given the drug cefpodoxime proxetil. | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admityear < "2174" AND prescriptions.drug = "Cefpodoxime Proxetil" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
14798,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
564,
1499,
6,
2774,
1947,
834,
8547,
302,
1499,
6,
1246,
1499,
6,
103,
115,
1499,
6,
7285,
1499,
6,
1612,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7744,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7744,
7,
5,
8399,
51,
834,
23,
26,
549... |
A bar chart shows the distribution of Date_of_Birth and Height , and order by the y axis in ascending. | CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate real
)
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight real
) | SELECT Date_of_Birth, Height FROM people ORDER BY Height | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4775,
41,
25833,
17,
15,
834,
4309,
16,
17,
6,
2449,
834,
4309,
16,
17,
6,
14457,
834,
23799,
1499,
6,
7678,
1499,
6,
4224,
834,
2206,
490,
6,
9151,
834,
2206,
490,
6,
4495,
2748,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
7678,
834,
858,
834,
279,
23,
52,
189,
6,
24231,
21680,
151,
4674,
11300,
272,
476,
24231,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
how many players are middle blockers ? | CREATE TABLE table_203_116 (
id number,
"no." number,
"player" text,
"birth date" text,
"weight" number,
"height" number,
"position" text,
"current club" text
) | SELECT COUNT("player") FROM table_203_116 WHERE "position" = 'middle blocker' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
20159,
41,
3,
23,
26,
381,
6,
96,
29,
32,
535,
381,
6,
96,
20846,
121,
1499,
6,
96,
20663,
833,
121,
1499,
6,
96,
9378,
121,
381,
6,
96,
88,
2632,
121,
38... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
20846,
8512,
21680,
953,
834,
23330,
834,
20159,
549,
17444,
427,
96,
4718,
121,
3274,
3,
31,
51,
23,
8437,
2463,
49,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the lowest Points with an against of 20 and less than 1 lost? | CREATE TABLE table_7551 (
"Position" real,
"Team" text,
"Points" real,
"Played" real,
"Drawn" real,
"Lost" real,
"Against" real,
"Difference" text
) | SELECT MIN("Points") FROM table_7551 WHERE "Against" = '20' AND "Lost" < '1' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3072,
5553,
41,
96,
345,
32,
7,
4749,
121,
490,
6,
96,
18699,
121,
1499,
6,
96,
22512,
7,
121,
490,
6,
96,
15800,
15,
26,
121,
490,
6,
96,
308,
10936,
29,
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,
3,
17684,
599,
121,
22512,
7,
8512,
21680,
953,
834,
3072,
5553,
549,
17444,
427,
96,
20749,
121,
3274,
3,
31,
1755,
31,
3430,
96,
434,
3481,
121,
3,
2,
3,
31,
536,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What years did the person coach who had more than 31 ties? | CREATE TABLE table_36196 (
"Coach" text,
"Years" text,
"Wins" real,
"Losses" real,
"Ties" real
) | SELECT "Years" FROM table_36196 WHERE "Ties" > '31' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3420,
26937,
41,
96,
3881,
1836,
121,
1499,
6,
96,
476,
2741,
7,
121,
1499,
6,
96,
18455,
7,
121,
490,
6,
96,
434,
13526,
7,
121,
490,
6,
96,
382,
725,
121,
490,
3,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
476,
2741,
7,
121,
21680,
953,
834,
3420,
26937,
549,
17444,
427,
96,
382,
725,
121,
2490,
3,
31,
3341,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the lowest number of districts (kecamatan) in the north sulawesi province with more than 1,510 villages? | CREATE TABLE table_name_97 (number_of_districts__kecamatan_ INTEGER, province VARCHAR, villages VARCHAR) | SELECT MIN(number_of_districts__kecamatan_) FROM table_name_97 WHERE province = "north sulawesi" AND villages > 1 OFFSET 510 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4327,
41,
5525,
1152,
834,
858,
834,
26,
23,
20066,
7,
834,
834,
1050,
6527,
144,
152,
834,
3,
21342,
17966,
6,
7985,
584,
4280,
28027,
6,
12293,
584,
4280,
2802... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
5525,
1152,
834,
858,
834,
26,
23,
20066,
7,
834,
834,
1050,
6527,
144,
152,
834,
61,
21680,
953,
834,
4350,
834,
4327,
549,
17444,
427,
7985,
3274,
96,
29,
127,
189,
2629,
4207,
15,
7,
23,
121,
3... |
For all employees who have the letters D or S in their first name, show me the trend about salary over hire_date with a line chart, I want to show x axis in desc order. | CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
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)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE 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)
) | SELECT HIRE_DATE, SALARY FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY HIRE_DATE DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1440,
41,
2847,
17161,
11824,
834,
4309,
3,
4331,
4059,
16426,
6,
2847,
17161,
11824,
834,
567,
17683,
3,
4331,
4059,
599,
2445,
201,
4083,
517,
9215,
834,
4309,
7908,
1982,
599,
1714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
454,
14132,
834,
308,
6048,
6,
180,
4090,
24721,
21680,
1652,
549,
17444,
427,
30085,
834,
567,
17683,
8729,
9914,
3,
31,
1454,
308,
1454,
31,
4674,
30085,
834,
567,
17683,
8729,
9914,
3,
31,
1454,
134,
1454,
31,
46... |
What is the population as of 11-01-2010 for Bayan County? | CREATE TABLE table_name_50 (
population__2010_11_01_ VARCHAR,
name VARCHAR
) | SELECT population__2010_11_01_ FROM table_name_50 WHERE name = "bayan county" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1752,
41,
2074,
834,
834,
14926,
834,
2596,
834,
4542,
834,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2074,
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,
2074,
834,
834,
14926,
834,
2596,
834,
4542,
834,
21680,
953,
834,
4350,
834,
1752,
549,
17444,
427,
564,
3274,
96,
11119,
152,
5435,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What was the film title nominated from the Netherlands? | CREATE TABLE table_71315 (
"Country" text,
"Film title used in nomination" text,
"Language" text,
"Original title" text,
"Director" text
) | SELECT "Film title used in nomination" FROM table_71315 WHERE "Country" = 'netherlands' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4450,
519,
1808,
41,
96,
10628,
651,
121,
1499,
6,
96,
371,
173,
51,
2233,
261,
16,
13588,
121,
1499,
6,
96,
434,
1468,
76,
545,
121,
1499,
6,
96,
667,
3380,
10270,
2233,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
173,
51,
2233,
261,
16,
13588,
121,
21680,
953,
834,
4450,
519,
1808,
549,
17444,
427,
96,
10628,
651,
121,
3274,
3,
31,
29,
16764,
6347,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What College/Junior/Club Team (League) from Canada has a round smaller than 3? | CREATE TABLE table_name_52 (college_junior_club_team__league_ VARCHAR, nationality VARCHAR, round VARCHAR) | SELECT college_junior_club_team__league_ FROM table_name_52 WHERE nationality = "canada" AND round < 3 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5373,
41,
3297,
7883,
834,
6959,
23,
127,
834,
13442,
834,
11650,
834,
834,
29512,
834,
584,
4280,
28027,
6,
1157,
485,
584,
4280,
28027,
6,
1751,
584,
4280,
28027... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
1900,
834,
6959,
23,
127,
834,
13442,
834,
11650,
834,
834,
29512,
834,
21680,
953,
834,
4350,
834,
5373,
549,
17444,
427,
1157,
485,
3274,
96,
658,
18089,
121,
3430,
1751,
3,
2,
220,
1,
-100,
-100,
-100,
-100,
-100... |
Who were the guests on a show where the production code is 6152? | CREATE TABLE table_27999 (
"Episode #" real,
"The W\u00f8rd" text,
"Guest" text,
"Introductory phrase" text,
"Original airdate" text,
"Production code" real
) | SELECT "Guest" FROM table_27999 WHERE "Production code" = '6152' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2555,
19446,
41,
96,
427,
102,
159,
32,
221,
1713,
121,
490,
6,
96,
634,
549,
2,
76,
1206,
89,
927,
52,
26,
121,
1499,
6,
96,
9105,
222,
121,
1499,
6,
96,
1570,
17,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
9105,
222,
121,
21680,
953,
834,
2555,
19446,
549,
17444,
427,
96,
3174,
8291,
1081,
121,
3274,
3,
31,
4241,
5373,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.