NATURAL_LANG stringlengths 0 446 | SCHEMA stringlengths 27 2.21k | SQL stringlengths 18 453 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|
Show the names of buildings except for those having an institution founded in 2003. | CREATE TABLE building (name VARCHAR, building_id VARCHAR); CREATE TABLE building (name VARCHAR); CREATE TABLE institution (building_id VARCHAR, founded VARCHAR) | SELECT name FROM building EXCEPT SELECT T1.name FROM building AS T1 JOIN institution AS T2 ON T1.building_id = T2.building_id WHERE T2.founded = 2003 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
740,
41,
4350,
584,
4280,
28027,
6,
740,
834,
23,
26,
584,
4280,
28027,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
740,
41,
4350,
584,
4280,
28027,
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,
564,
21680,
740,
262,
4,
30416,
3,
23143,
14196,
332,
5411,
4350,
21680,
740,
6157,
332,
536,
3,
15355,
3162,
6568,
6157,
332,
357,
9191,
332,
5411,
10905,
834,
23,
26,
3274,
332,
4416,
10905,
834,
23,
26,
549,
1744... |
Who are the sideline reporter(s) on NBC with al michaels on the play-by-play after 2013? | CREATE TABLE table_name_22 (
sideline_reporter_s_ VARCHAR,
year VARCHAR,
network VARCHAR,
play_by_play VARCHAR
) | SELECT sideline_reporter_s_ FROM table_name_22 WHERE network = "nbc" AND play_by_play = "al michaels" AND year > 2013 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2884,
41,
596,
747,
834,
60,
1493,
49,
834,
7,
834,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
6,
1229,
584,
4280,
28027,
6,
577,
834,
969,
834,
4895,
584,
42... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
596,
747,
834,
60,
1493,
49,
834,
7,
834,
21680,
953,
834,
4350,
834,
2884,
549,
17444,
427,
1229,
3274,
96,
29,
115,
75,
121,
3430,
577,
834,
969,
834,
4895,
3274,
96,
138,
2278,
9,
3573,
121,
3430,
215,
2490,
... |
What is the sort value that had deaths of 71? | CREATE TABLE table_48048 (
"Month" text,
"Births" text,
"Deaths" text,
"Rate (%)" text,
"Sort restore" real
) | SELECT "Sort restore" FROM table_48048 WHERE "Deaths" = '71' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
20579,
3707,
41,
96,
9168,
189,
121,
1499,
6,
96,
279,
23,
52,
189,
7,
121,
1499,
6,
96,
2962,
9,
189,
7,
121,
1499,
6,
96,
448,
342,
41,
6210,
121,
1499,
6,
96,
134,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
134,
127,
17,
7882,
121,
21680,
953,
834,
20579,
3707,
549,
17444,
427,
96,
2962,
9,
189,
7,
121,
3274,
3,
31,
4450,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Which player plays for the Winnipeg Blue Bombers? | CREATE TABLE table_24280 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
) | SELECT "Player" FROM table_24280 WHERE "CFL Team" = 'Winnipeg Blue Bombers' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2266,
17518,
41,
96,
345,
3142,
1713,
121,
490,
6,
96,
254,
10765,
2271,
121,
1499,
6,
96,
15800,
49,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
9939,
7883,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
15800,
49,
121,
21680,
953,
834,
2266,
17518,
549,
17444,
427,
96,
254,
10765,
2271,
121,
3274,
3,
31,
18455,
29,
23,
855,
122,
2419,
16327,
277,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What country has a 70-73-70=213 score? | CREATE TABLE table_44549 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | SELECT "Country" FROM table_44549 WHERE "Score" = '70-73-70=213' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
2128,
3647,
41,
96,
345,
11706,
121,
1499,
6,
96,
15800,
49,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
3696,
260,
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,
10628,
651,
121,
21680,
953,
834,
591,
2128,
3647,
549,
17444,
427,
96,
134,
9022,
121,
3274,
3,
31,
2518,
18,
4552,
18,
2518,
2423,
357,
2368,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
A tournament on which date has a margin of victory of 2 strokes and a par of 16? | CREATE TABLE table_name_8 (
date VARCHAR,
margin_of_victory VARCHAR,
to_par VARCHAR
) | SELECT date FROM table_name_8 WHERE margin_of_victory = "2 strokes" AND to_par = "−16" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
927,
41,
833,
584,
4280,
28027,
6,
6346,
834,
858,
834,
7287,
10972,
584,
4280,
28027,
6,
12,
834,
1893,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
833,
21680,
953,
834,
4350,
834,
927,
549,
17444,
427,
6346,
834,
858,
834,
7287,
10972,
3274,
96,
357,
9529,
7,
121,
3430,
12,
834,
1893,
3274,
96,
2,
2938,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the team 1 with a (g14)morolo team 2? | CREATE TABLE table_name_7 (team_1 VARCHAR, team_2 VARCHAR) | SELECT team_1 FROM table_name_7 WHERE team_2 = "(g14)morolo" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
940,
41,
11650,
834,
536,
584,
4280,
28027,
6,
372,
834,
357,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
372,
209,
28,
3,
9,
41,
122,
253... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
372,
834,
536,
21680,
953,
834,
4350,
834,
940,
549,
17444,
427,
372,
834,
357,
3274,
96,
599,
122,
2534,
61,
2528,
32,
40,
32,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the population density in the Brighton area? | CREATE TABLE table_910 (
"Local Government Area" text,
"Principal town" text,
"Land Area (km\u00b2)" text,
"Population 2011 census" real,
"Density" text,
"Region" text
) | SELECT "Density" FROM table_910 WHERE "Principal town" = 'Brighton' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1298,
1714,
41,
96,
434,
32,
1489,
3141,
5690,
121,
1499,
6,
96,
7855,
29,
3389,
138,
1511,
121,
1499,
6,
96,
434,
232,
5690,
41,
5848,
2,
76,
1206,
115,
7318,
121,
1499,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
308,
35,
7,
485,
121,
21680,
953,
834,
1298,
1714,
549,
17444,
427,
96,
7855,
29,
3389,
138,
1511,
121,
3274,
3,
31,
279,
3535,
106,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Just show the first name and the manager id with a bar chart. | CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
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)
) | SELECT T1.FIRST_NAME, T1.MANAGER_ID FROM employees AS T1 JOIN departments AS T2 ON T1.DEPARTMENT_ID = T2.DEPARTMENT_ID WHERE T1.EMPLOYEE_ID = T2.MANAGER_ID | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
613,
834,
10193,
10972,
41,
262,
5244,
5017,
476,
5080,
834,
4309,
7908,
1982,
599,
11071,
632,
201,
5097,
8241,
834,
308,
6048,
833,
6,
3,
14920,
834,
308,
6048,
833,
6,
446,
10539,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
332,
5411,
371,
5705,
4209,
834,
567,
17683,
6,
332,
5411,
9312,
188,
17966,
834,
4309,
21680,
1652,
6157,
332,
536,
3,
15355,
3162,
10521,
6157,
332,
357,
9191,
332,
5411,
5596,
19846,
11810,
834,
4309,
3274,
332,
44... |
Which To par has a Money ($) larger than 5,500? | CREATE TABLE table_name_48 (to_par VARCHAR, money___$__ INTEGER) | SELECT to_par FROM table_name_48 WHERE money___$__ > 5 OFFSET 500 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3707,
41,
235,
834,
1893,
584,
4280,
28027,
6,
540,
834,
834,
834,
3229,
834,
834,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
4073,
304,
260,
65,
3,
9,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
12,
834,
1893,
21680,
953,
834,
4350,
834,
3707,
549,
17444,
427,
540,
834,
834,
834,
3229,
834,
834,
2490,
305,
3,
15316,
20788,
2899,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the postion of the player listed from Dooly County High School? | CREATE TABLE table_11677691_10 (position VARCHAR, school VARCHAR) | SELECT position FROM table_11677691_10 WHERE school = "Dooly County High school" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2596,
3708,
3959,
4729,
834,
1714,
41,
4718,
584,
4280,
28027,
6,
496,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
442,
23,
106,
13,
8,
1959,
2616,
45,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1102,
21680,
953,
834,
2596,
3708,
3959,
4729,
834,
1714,
549,
17444,
427,
496,
3274,
96,
4135,
32,
120,
1334,
1592,
496,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Compare the number of services by services with a bar graph, and could you display x-axis in desc order? | CREATE TABLE route (
train_id int,
station_id int
)
CREATE TABLE weekly_weather (
station_id int,
day_of_week text,
high_temperature int,
low_temperature int,
precipitation real,
wind_speed_mph int
)
CREATE TABLE train (
id int,
train_number int,
name text,
origin text,
destination text,
time text,
interval text
)
CREATE TABLE station (
id int,
network_name text,
services text,
local_authority text
) | SELECT services, COUNT(services) FROM station GROUP BY services ORDER BY services DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2981,
41,
2412,
834,
23,
26,
16,
17,
6,
2478,
834,
23,
26,
16,
17,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
5547,
834,
26809,
41,
2478,
834,
23,
26,
16,
17,
6,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
364,
6,
2847,
17161,
599,
5114,
7,
61,
21680,
2478,
350,
4630,
6880,
272,
476,
364,
4674,
11300,
272,
476,
364,
309,
25067,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What country is Nick Price from? | CREATE TABLE table_name_35 (country VARCHAR, player VARCHAR) | SELECT country FROM table_name_35 WHERE player = "nick price" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2469,
41,
17529,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
684,
19,
7486,
5312,
45,
58,
1,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
684,
21680,
953,
834,
4350,
834,
2469,
549,
17444,
427,
1959,
3274,
96,
11191,
594,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Where was the game played on 3 january 2009 against east fife? | CREATE TABLE table_64806 (
"Date" text,
"Venue" text,
"Opponents" text,
"Competition" text,
"Match Report" text
) | SELECT "Venue" FROM table_64806 WHERE "Opponents" = 'east fife' AND "Date" = '3 january 2009' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4389,
2079,
948,
41,
96,
308,
342,
121,
1499,
6,
96,
553,
35,
76,
15,
121,
1499,
6,
96,
667,
102,
9977,
7,
121,
1499,
6,
96,
5890,
4995,
4749,
121,
1499,
6,
96,
329,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
553,
35,
76,
15,
121,
21680,
953,
834,
4389,
2079,
948,
549,
17444,
427,
96,
667,
102,
9977,
7,
121,
3274,
3,
31,
11535,
361,
89,
15,
31,
3430,
96,
308,
342,
121,
3274,
3,
31,
519,
3,
7066,
76,
1208,
2464,... |
Name the minumim first elected for alvin bush | CREATE TABLE table_1342013_37 (first_elected INTEGER, incumbent VARCHAR) | SELECT MIN(first_elected) FROM table_1342013_37 WHERE incumbent = "Alvin Bush" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
11138,
834,
4118,
41,
14672,
834,
19971,
3,
21342,
17966,
6,
28406,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
3519,
440,
603,
166,
8160,
21,
491,
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,
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,
14672,
834,
19971,
61,
21680,
953,
834,
23747,
11138,
834,
4118,
549,
17444,
427,
28406,
3274,
96,
188,
40,
2494,
8905,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the rank for more than 120.44 points in East Germany and a SP+FS of 3? | CREATE TABLE table_57226 (
"Rank" real,
"Name" text,
"Nation" text,
"SP+FS" real,
"Points" real,
"Places" text
) | SELECT COUNT("Rank") FROM table_57226 WHERE "Points" > '120.44' AND "Nation" = 'east germany' AND "SP+FS" = '3' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3436,
357,
2688,
41,
96,
22557,
121,
490,
6,
96,
23954,
121,
1499,
6,
96,
567,
257,
121,
1499,
6,
96,
4274,
1220,
7674,
121,
490,
6,
96,
22512,
7,
121,
490,
6,
96,
345,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
22557,
8512,
21680,
953,
834,
3436,
357,
2688,
549,
17444,
427,
96,
22512,
7,
121,
2490,
3,
31,
15518,
5,
3628,
31,
3430,
96,
567,
257,
121,
3274,
3,
31,
11535,
13692,
63,
31,
3430,
96,
4274... |
how many patients whose admission type is emergency and ethnicity is american indian/alaska native? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
14798,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
564,
1499,
6,
2774,
1947,
834,
8547,
302,
1499,
6,
1246,
1499,
6,
103,
115,
1499,
6,
7285,
1499,
6,
1612,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
9,
26,
5451,
834,
6137,
3274,
96,
427,
13098,
18464,
17063,
121,
3430,
14798,
5,
15,
189,
2532,
... |
What was the date of the premiere that had a 20.9 rating? | CREATE TABLE table_name_38 (
premiere VARCHAR,
rating VARCHAR
) | SELECT premiere FROM table_name_38 WHERE rating = "20.9" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3747,
41,
13539,
584,
4280,
28027,
6,
5773,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
833,
13,
8,
13539,
24,
141,
3,
9,
204,
23758,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
13539,
21680,
953,
834,
4350,
834,
3747,
549,
17444,
427,
5773,
3274,
96,
357,
23758,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What are the ids of the students who are under 20 years old and are involved in at least one activity. | CREATE TABLE activity (
actid number,
activity_name text
)
CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
)
CREATE TABLE faculty (
facid number,
lname text,
fname text,
rank text,
sex text,
phone number,
room text,
building text
)
CREATE TABLE participates_in (
stuid number,
actid number
)
CREATE TABLE faculty_participates_in (
facid number,
actid number
) | SELECT stuid FROM participates_in INTERSECT SELECT stuid FROM student WHERE age < 20 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1756,
41,
1810,
23,
26,
381,
6,
1756,
834,
4350,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
1236,
41,
21341,
23,
26,
381,
6,
3,
40,
4350,
1499,
6,
3,
89,
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,
21341,
23,
26,
21680,
3716,
7,
834,
77,
3,
21342,
5249,
14196,
3,
23143,
14196,
21341,
23,
26,
21680,
1236,
549,
17444,
427,
1246,
3,
2,
460,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Name the date for 17-32 | CREATE TABLE table_25832 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT "Date" FROM table_25832 WHERE "Record" = '17-32' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
4591,
357,
41,
96,
23055,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
18699,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
21417,
979,
121,
1499,
6,
96,
21417,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
308,
342,
121,
21680,
953,
834,
1828,
4591,
357,
549,
17444,
427,
96,
1649,
7621,
121,
3274,
3,
31,
2517,
18,
2668,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the Australian letter with a British of ɪ and a letter of æ /i/?? | CREATE TABLE table_name_67 (australian VARCHAR, british VARCHAR, letter VARCHAR) | SELECT australian FROM table_name_67 WHERE british = "ɪ" AND letter = "æ /i/" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3708,
41,
402,
3109,
9928,
584,
4280,
28027,
6,
3,
2160,
17,
1273,
584,
4280,
28027,
6,
2068,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
23407,
29,
21680,
953,
834,
4350,
834,
3708,
549,
17444,
427,
3,
2160,
17,
1273,
3274,
96,
2,
121,
3430,
2068,
3274,
96,
2,
3,
87,
23,
87,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is Score, when Attendance is '349'? | CREATE TABLE table_name_66 (
score VARCHAR,
attendance VARCHAR
) | SELECT score FROM table_name_66 WHERE attendance = "349" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3539,
41,
2604,
584,
4280,
28027,
6,
11364,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
17763,
6,
116,
22497,
663,
19,
3,
31,
519,
3647,
31,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2604,
21680,
953,
834,
4350,
834,
3539,
549,
17444,
427,
11364,
3274,
96,
519,
3647,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Calculate the average age of spanish speaking patients who have overdose as the primary disease. | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
) | SELECT AVG(demographic.age) FROM demographic WHERE demographic.language = "SPAN" AND demographic.diagnosis = "OVERDOSE" | [
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,
71,
17217,
599,
1778,
16587,
5,
545,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
24925,
3274,
96,
21215,
567,
121,
3430,
14798,
5,
25930,
4844,
159,
3274,
96,
23288,
308,
22177,
121,
1,
-100,
-100,
-100,
-100,
-100,
... |
Who were the director/s of episodes written by Mike Daniels? | CREATE TABLE table_22227 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (millions)" text
) | SELECT "Directed by" FROM table_22227 WHERE "Written by" = 'Mike Daniels' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26144,
2555,
41,
96,
4168,
5,
16,
939,
121,
490,
6,
96,
4168,
5,
16,
774,
121,
490,
6,
96,
382,
155,
109,
121,
1499,
6,
96,
23620,
15,
26,
57,
121,
1499,
6,
96,
24965... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
23620,
15,
26,
57,
121,
21680,
953,
834,
26144,
2555,
549,
17444,
427,
96,
24965,
324,
57,
121,
3274,
3,
31,
329,
5208,
4173,
7,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Which candidates ran in the Alabama 6 district? | CREATE TABLE table_1341973_3 (
candidates VARCHAR,
district VARCHAR
) | SELECT candidates FROM table_1341973_3 WHERE district = "Alabama 6" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2294,
4552,
834,
519,
41,
4341,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
4341,
4037,
16,
8,
13050,
431,
3939,
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,
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,
4341,
21680,
953,
834,
23747,
2294,
4552,
834,
519,
549,
17444,
427,
3939,
3274,
96,
188,
9339,
265,
9,
431,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Who is the winner constructor with driver riccardo patrese? | CREATE TABLE table_name_79 (
winning_constructor VARCHAR,
winning_driver VARCHAR
) | SELECT winning_constructor FROM table_name_79 WHERE winning_driver = "riccardo patrese" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4440,
41,
3447,
834,
15982,
5317,
584,
4280,
28027,
6,
3447,
834,
13739,
52,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
19,
8,
4668,
6774,
127,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3447,
834,
15982,
5317,
21680,
953,
834,
4350,
834,
4440,
549,
17444,
427,
3447,
834,
13739,
52,
3274,
96,
2234,
6043,
32,
6234,
60,
7,
15,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the total number of bronze that has less than 2 gold, and more than 1 silver? | CREATE TABLE table_name_97 (
bronze VARCHAR,
gold VARCHAR,
silver VARCHAR
) | SELECT COUNT(bronze) FROM table_name_97 WHERE gold < 2 AND silver > 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4327,
41,
13467,
584,
4280,
28027,
6,
2045,
584,
4280,
28027,
6,
4294,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
792,
381,
13,
13467,
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
13711,
776,
61,
21680,
953,
834,
4350,
834,
4327,
549,
17444,
427,
2045,
3,
2,
204,
3430,
4294,
2490,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the highest round for College of Nebraska if the Overall is under 190? | CREATE TABLE table_71220 (
"Round" real,
"Pick #" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
) | SELECT MAX("Round") FROM table_71220 WHERE "College" = 'nebraska' AND "Overall" < '190' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4450,
357,
1755,
41,
96,
448,
32,
1106,
121,
490,
6,
96,
345,
3142,
1713,
121,
490,
6,
96,
23847,
1748,
121,
490,
6,
96,
23954,
121,
1499,
6,
96,
345,
32,
7,
4749,
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,
4800,
4,
599,
121,
448,
32,
1106,
8512,
21680,
953,
834,
4450,
357,
1755,
549,
17444,
427,
96,
9939,
7883,
121,
3274,
3,
31,
29,
15,
1939,
10717,
31,
3430,
96,
23847,
1748,
121,
3,
2,
3,
31,
11776,
31,
1,
-100,
... |
Who were the Opponents when Laura DuPont had Pam Shriver as Partner with a Score of 6-3, 6-3? | CREATE TABLE table_name_10 (opponents VARCHAR, partner VARCHAR, score VARCHAR) | SELECT opponents FROM table_name_10 WHERE partner = "pam shriver" AND score = "6-3, 6-3" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1714,
41,
32,
102,
9977,
7,
584,
4280,
28027,
6,
2397,
584,
4280,
28027,
6,
2604,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
130,
8,
4495,
9977,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
16383,
21680,
953,
834,
4350,
834,
1714,
549,
17444,
427,
2397,
3274,
96,
102,
265,
3,
31763,
624,
121,
3430,
2604,
3274,
96,
24262,
6,
3,
24262,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the name of the Loser when the winner was new england patriots, and a Location of giants stadium, and a Result of 30 28? | CREATE TABLE table_74995 (
"Year" real,
"Date" text,
"Winner" text,
"Result" text,
"Loser" text,
"Location" text
) | SELECT "Loser" FROM table_74995 WHERE "Winner" = 'new england patriots' AND "Location" = 'giants stadium' AND "Result" = '30–28' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4581,
3264,
755,
41,
96,
476,
2741,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
18455,
687,
121,
1499,
6,
96,
20119,
121,
1499,
6,
96,
434,
32,
7,
49,
121,
1499,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
434,
32,
7,
49,
121,
21680,
953,
834,
4581,
3264,
755,
549,
17444,
427,
96,
18455,
687,
121,
3274,
3,
31,
5534,
3,
4606,
40,
232,
6234,
12884,
7,
31,
3430,
96,
434,
32,
75,
257,
121,
3274,
3,
31,
22898,
17... |
Tell me the Hindu with Jewish of source: uk 2001 census | CREATE TABLE table_name_87 (hindu VARCHAR, jewish VARCHAR) | SELECT hindu FROM table_name_87 WHERE jewish = "source: uk 2001 census" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4225,
41,
107,
13580,
584,
4280,
28027,
6,
528,
210,
1273,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
8779,
140,
8,
18528,
28,
6692,
13,
1391,
10,
3,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3811,
1259,
21680,
953,
834,
4350,
834,
4225,
549,
17444,
427,
528,
210,
1273,
3274,
96,
7928,
10,
3,
1598,
4402,
23087,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the number of people who attended the game later than game 6? | CREATE TABLE table_name_68 (
attendance VARCHAR,
game INTEGER
) | SELECT COUNT(attendance) FROM table_name_68 WHERE game > 6 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3651,
41,
11364,
584,
4280,
28027,
6,
467,
3,
21342,
17966,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
381,
13,
151,
113,
5526,
8,
467,
865,
145,
467,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
15116,
663,
61,
21680,
953,
834,
4350,
834,
3651,
549,
17444,
427,
467,
2490,
431,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name the screening started when it was completed 3 may 2006 | CREATE TABLE table_name_40 (
screening_started VARCHAR,
screening_completed VARCHAR
) | SELECT screening_started FROM table_name_40 WHERE screening_completed = "3 may 2006" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2445,
41,
7468,
834,
3624,
1054,
584,
4280,
28027,
6,
7468,
834,
25288,
26,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
7468,
708,
116,
34,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7468,
834,
3624,
1054,
21680,
953,
834,
4350,
834,
2445,
549,
17444,
427,
7468,
834,
25288,
26,
3274,
96,
519,
164,
3581,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the decision of the game on January 13? | CREATE TABLE table_name_24 (decision VARCHAR, date VARCHAR) | SELECT decision FROM table_name_24 WHERE date = "january 13" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2266,
41,
221,
18901,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1357,
13,
8,
467,
30,
1762,
1179,
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,
1357,
21680,
953,
834,
4350,
834,
2266,
549,
17444,
427,
833,
3274,
96,
7066,
76,
1208,
1179,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the total for Bernhard Langer? | CREATE TABLE table_77413 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" real,
"To par" text,
"Finish" text
) | SELECT COUNT("Total") FROM table_77413 WHERE "Player" = 'bernhard langer' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4013,
591,
2368,
41,
96,
15800,
49,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
476,
2741,
599,
7,
61,
751,
121,
1499,
6,
96,
3696,
1947,
121,
490,
6,
96,
3696,
260... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3696,
1947,
8512,
21680,
953,
834,
4013,
591,
2368,
549,
17444,
427,
96,
15800,
49,
121,
3274,
3,
31,
1152,
29,
5651,
6575,
52,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the code of the course which the student whose last name is Smithson took? | CREATE TABLE student (stu_num VARCHAR, stu_lname VARCHAR); CREATE TABLE enroll (class_code VARCHAR, stu_num VARCHAR); CREATE TABLE CLASS (crs_code VARCHAR, class_code VARCHAR) | SELECT T1.crs_code FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T3.stu_num = T2.stu_num WHERE T3.stu_lname = 'Smithson' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1236,
41,
7,
17,
76,
834,
5525,
584,
4280,
28027,
6,
21341,
834,
40,
4350,
584,
4280,
28027,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
17990,
41,
4057,
834,
4978,
584,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
332,
5411,
75,
52,
7,
834,
4978,
21680,
3,
31598,
6157,
332,
536,
3,
15355,
3162,
17990,
6157,
332,
357,
9191,
332,
5411,
4057,
834,
4978,
3274,
332,
4416,
4057,
834,
4978,
3,
15355,
3162,
1236,
6157,
332,
519,
9191... |
Which contestant was sponsored by Yogurt Vita Slim? | CREATE TABLE table_28062822_3 (contestant VARCHAR, sponsor VARCHAR) | SELECT contestant FROM table_28062822_3 WHERE sponsor = "Yogurt Vita Slim" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2577,
5176,
2577,
2884,
834,
519,
41,
1018,
4377,
288,
584,
4280,
28027,
6,
9037,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
4233,
288,
47,
11851,
57,
6545,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4233,
288,
21680,
953,
834,
2577,
5176,
2577,
2884,
834,
519,
549,
17444,
427,
9037,
3274,
96,
476,
32,
7840,
17,
11491,
9,
24486,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which Loera has a Source of surveyusa, and a Date of may 16 may 18, 2008? | CREATE TABLE table_75989 (
"Source" text,
"Date" text,
"Goberman" text,
"Loera" text,
"Merkley" text,
"Neville" text,
"Novick" text,
"Obrist" text,
"Other/ Undecided" text
) | SELECT "Loera" FROM table_75989 WHERE "Source" = 'surveyusa' AND "Date" = 'may 16–may 18, 2008' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
940,
3390,
3914,
41,
96,
23799,
121,
1499,
6,
96,
308,
342,
121,
1499,
6,
96,
6221,
1152,
348,
121,
1499,
6,
96,
434,
32,
1498,
121,
1499,
6,
96,
329,
49,
157,
1306,
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,
96,
434,
32,
1498,
121,
21680,
953,
834,
940,
3390,
3914,
549,
17444,
427,
96,
23799,
121,
3274,
3,
31,
3042,
162,
63,
302,
9,
31,
3430,
96,
308,
342,
121,
3274,
3,
31,
13726,
898,
104,
13726,
14985,
2628,
31,
1... |
Count the number of patients taking drug via pb route with aortic insufficiency/re-do sternostomy aortic valve replacement as their primary disease. | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.diagnosis = "AORTIC INSUFFICIENCY\RE-DO STERNOTOMY; AORTIC VALVE REPLACEMENT " AND prescriptions.route = "PB" | [
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... |
have an hgba1c of less than 9 % | CREATE TABLE table_train_215 (
"id" int,
"hemoglobin_a1c_hba1c" float,
"hgba1c" float,
"estimated_glomerular_filtration_rate_egfr" int,
"kidney_disease" bool,
"body_mass_index_bmi" float,
"age" float,
"NOUSE" float
) | SELECT * FROM table_train_215 WHERE hgba1c <= 9 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
9719,
834,
357,
1808,
41,
96,
23,
26,
121,
16,
17,
6,
96,
6015,
32,
14063,
77,
834,
9,
536,
75,
834,
107,
115,
9,
536,
75,
121,
3,
12660,
6,
96,
107,
122,
115,
9,
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,
1429,
21680,
953,
834,
9719,
834,
357,
1808,
549,
17444,
427,
3,
107,
122,
115,
9,
536,
75,
3,
2,
2423,
668,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name the number of locations for geneva college | CREATE TABLE table_28470 (
"Institution" text,
"Location" text,
"Nickname" text,
"Founded" real,
"Enrollment" real,
"Joined" real
) | SELECT COUNT("Location") FROM table_28470 WHERE "Institution" = 'Geneva College' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2577,
27760,
41,
96,
1570,
17448,
121,
1499,
6,
96,
434,
32,
75,
257,
121,
1499,
6,
96,
567,
3142,
4350,
121,
1499,
6,
96,
20100,
121,
490,
6,
96,
8532,
4046,
297,
121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
434,
32,
75,
257,
8512,
21680,
953,
834,
2577,
27760,
549,
17444,
427,
96,
1570,
17448,
121,
3274,
3,
31,
13714,
4721,
1888,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who left office on January 9, 1893 | CREATE TABLE table_name_32 (name VARCHAR, left_office VARCHAR) | SELECT name FROM table_name_32 WHERE left_office = "january 9, 1893" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2668,
41,
4350,
584,
4280,
28027,
6,
646,
834,
19632,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
646,
828,
30,
1762,
9902,
507,
4271,
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,
564,
21680,
953,
834,
4350,
834,
2668,
549,
17444,
427,
646,
834,
19632,
3274,
96,
7066,
76,
1208,
9902,
507,
4271,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is To Par, when Player is K. J. Choi? | CREATE TABLE table_name_58 (to_par VARCHAR, player VARCHAR) | SELECT to_par FROM table_name_58 WHERE player = "k. j. choi" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3449,
41,
235,
834,
1893,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
304,
2180,
6,
116,
12387,
19,
480,
5,
446,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
12,
834,
1893,
21680,
953,
834,
4350,
834,
3449,
549,
17444,
427,
1959,
3274,
96,
157,
5,
3,
354,
5,
3,
3995,
23,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the average number of seasons for Terri Drake who lost less than 9? | CREATE TABLE table_5390 (
"Name" text,
"Years" text,
"Seasons" real,
"Lost" real,
"Pct." real
) | SELECT AVG("Seasons") FROM table_5390 WHERE "Name" = 'terri drake' AND "Lost" < '9' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4867,
2394,
41,
96,
23954,
121,
1499,
6,
96,
476,
2741,
7,
121,
1499,
6,
96,
134,
15,
9,
6577,
121,
490,
6,
96,
434,
3481,
121,
490,
6,
96,
345,
75,
17,
535,
490,
3,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
121,
134,
15,
9,
6577,
8512,
21680,
953,
834,
4867,
2394,
549,
17444,
427,
96,
23954,
121,
3274,
3,
31,
17,
21301,
3,
3515,
1050,
31,
3430,
96,
434,
3481,
121,
3,
2,
3,
31,
1298,
31,
1,
-100,
-... |
How many losses have a played greater than 8, ypiranga-sp as the team, with a position greater than 5? | CREATE TABLE table_42932 (
"Position" real,
"Team" text,
"Points" real,
"Played" real,
"Drawn" real,
"Lost" real,
"Against" real,
"Difference" text
) | SELECT COUNT("Lost") FROM table_42932 WHERE "Played" > '8' AND "Team" = 'ypiranga-sp' AND "Position" > '5' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
3166,
2668,
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,
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,
434,
3481,
8512,
21680,
953,
834,
591,
3166,
2668,
549,
17444,
427,
96,
15800,
15,
26,
121,
2490,
3,
31,
927,
31,
3430,
96,
18699,
121,
3274,
3,
31,
63,
2388,
1468,
9,
18,
7,
102,
31,
3430... |
How many trains arrive at 11:00? | CREATE TABLE table_29243 (
"Train No." real,
"Train Name" text,
"Arrival" text,
"Departure" text,
"Days" text,
"Platform No." text
) | SELECT COUNT("Train No.") FROM table_29243 WHERE "Arrival" = '11:00' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3166,
27730,
41,
96,
9402,
77,
465,
535,
490,
6,
96,
9402,
77,
5570,
121,
1499,
6,
96,
188,
52,
25295,
121,
1499,
6,
96,
2962,
2274,
1462,
121,
1499,
6,
96,
16803,
7,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
9402,
77,
465,
5,
8512,
21680,
953,
834,
3166,
27730,
549,
17444,
427,
96,
188,
52,
25295,
121,
3274,
3,
31,
536,
24294,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Who was the originally artist when Jasmine Murray was selected? | CREATE TABLE table_21501564_1 (
original_artist VARCHAR,
result VARCHAR
) | SELECT original_artist FROM table_21501564_1 WHERE result = "Selected" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
12278,
1808,
4389,
834,
536,
41,
926,
834,
1408,
343,
584,
4280,
28027,
6,
741,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
8,
5330,
2377,
116,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
926,
834,
1408,
343,
21680,
953,
834,
357,
12278,
1808,
4389,
834,
536,
549,
17444,
427,
741,
3274,
96,
134,
19971,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
number of competitions | CREATE TABLE table_203_238 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"notes" text
) | SELECT COUNT("competition") FROM table_203_238 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
357,
3747,
41,
3,
23,
26,
381,
6,
96,
1201,
121,
381,
6,
96,
287,
4995,
4749,
121,
1499,
6,
96,
15098,
121,
1499,
6,
96,
4718,
121,
1499,
6,
96,
7977,
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,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
121,
287,
4995,
4749,
8512,
21680,
953,
834,
23330,
834,
357,
3747,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
I want to know the final score for december 27 | CREATE TABLE table_name_74 (final_score VARCHAR, date VARCHAR) | SELECT final_score FROM table_name_74 WHERE date = "december 27" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4581,
41,
12406,
834,
7,
9022,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
27,
241,
12,
214,
8,
804,
2604,
21,
20,
75,
18247,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
804,
834,
7,
9022,
21680,
953,
834,
4350,
834,
4581,
549,
17444,
427,
833,
3274,
96,
221,
75,
18247,
2307,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name the 2005 with 2007 of sf | CREATE TABLE table_name_16 (
Id VARCHAR
) | SELECT 2005 FROM table_name_16 WHERE 2007 = "sf" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2938,
41,
27,
26,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
3105,
28,
4101,
13,
3,
7,
89,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3105,
21680,
953,
834,
4350,
834,
2938,
549,
17444,
427,
4101,
3274,
96,
7,
89,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
keyphrases used by Magdalena Balazinska | CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename varchar
)
CREATE TABLE dataset (
datasetid int,
datasetname varchar
)
CREATE TABLE venue (
venueid int,
venuename varchar
)
CREATE TABLE field (
fieldid int
)
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE paperfield (
fieldid int,
paperid int
) | SELECT DISTINCT keyphrase.keyphraseid FROM author, keyphrase, paper, paperkeyphrase, writes WHERE author.authorname = 'Magdalena Balazinska' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND writes.authorid = author.authorid AND writes.paperid = paper.paperid | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2291,
41,
2291,
23,
26,
16,
17,
6,
2291,
4350,
3,
4331,
4059,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
11858,
41,
1040,
23,
26,
16,
17,
6,
2291,
23,
26,
16,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
15438,
25424,
6227,
843,
27111,
5,
4397,
27111,
23,
26,
21680,
2291,
6,
843,
27111,
6,
1040,
6,
1040,
4397,
27111,
6,
11858,
549,
17444,
427,
2291,
5,
17415,
4350,
3274,
3,
31,
22909,
5437,
29,
9,
4011,
9,
7196... |
count the number of patients whose admission year is less than 2187 and procedure long title is (aorto)coronary bypass of one coronary artery? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2187" AND procedures.long_title = "(Aorto)coronary bypass of one coronary artery" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
When has a Venue of Adelaide Oval? | CREATE TABLE table_name_94 (
date VARCHAR,
venue VARCHAR
) | SELECT date FROM table_name_94 WHERE venue = "adelaide oval" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4240,
41,
833,
584,
4280,
28027,
6,
5669,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
366,
65,
3,
9,
29940,
13,
24272,
411,
2165,
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,
4240,
549,
17444,
427,
5669,
3274,
96,
15311,
5385,
17986,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
other than fairfield , what else was built in 1847 ? | CREATE TABLE table_204_476 (
id number,
"name" text,
"date built" number,
"builder" text,
"works no." number,
"wheels" text,
"cylinders" text,
"notes" text,
"withdrawn" number
) | SELECT "name" FROM table_204_476 WHERE "name" <> 'fairfield' AND "date built" = 1847 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
591,
3959,
41,
3,
23,
26,
381,
6,
96,
4350,
121,
1499,
6,
96,
5522,
1192,
121,
381,
6,
96,
16422,
49,
121,
1499,
6,
96,
13631,
150,
535,
381,
6,
96,
14074,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4350,
121,
21680,
953,
834,
26363,
834,
591,
3959,
549,
17444,
427,
96,
4350,
121,
3,
2,
3155,
3,
31,
14881,
1846,
31,
3430,
96,
5522,
1192,
121,
3274,
507,
4177,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the Surface, when the Finalist is Andrei Pavel? | CREATE TABLE table_9936 (
"Tournament" text,
"Surface" text,
"Week" text,
"Winner" text,
"Finalist" text,
"Semifinalists" text
) | SELECT "Surface" FROM table_9936 WHERE "Finalist" = 'andrei pavel' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3264,
3420,
41,
96,
382,
1211,
20205,
17,
121,
1499,
6,
96,
134,
450,
4861,
121,
1499,
6,
96,
518,
10266,
121,
1499,
6,
96,
18455,
687,
121,
1499,
6,
96,
371,
10270,
343,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
134,
450,
4861,
121,
21680,
953,
834,
3264,
3420,
549,
17444,
427,
96,
371,
10270,
343,
121,
3274,
3,
31,
232,
60,
23,
2576,
4911,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
When 1960 is less than 4,228, 1920 is smaller than 106,021,568 and 1980 is larger than 949, what is the 1970 figure? | CREATE TABLE table_11000 (
"1910" real,
"1920" real,
"1930" real,
"1940" real,
"1950" real,
"1960" real,
"1970" real,
"1980" real,
"1990" real,
"2000" real
) | SELECT SUM("1970") FROM table_11000 WHERE "1960" < '4,228' AND "1920" < '106,021,568' AND "1980" > '949' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2596,
2313,
41,
96,
2294,
1714,
121,
490,
6,
96,
2294,
1755,
121,
490,
6,
96,
2294,
1458,
121,
490,
6,
96,
2294,
2445,
121,
490,
6,
96,
2294,
1752,
121,
490,
6,
96,
229... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
121,
2294,
2518,
8512,
21680,
953,
834,
2596,
2313,
549,
17444,
427,
96,
2294,
3328,
121,
3,
2,
3,
31,
8525,
357,
2577,
31,
3430,
96,
2294,
1755,
121,
3,
2,
3,
31,
16431,
6,
4305,
4347,
755,
3651... |
count the number of emergency hospital admitted patients who were diagnosed with accidental fall on or from other stairs or steps. | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND diagnoses.long_title = "Accidental fall on or from other stairs or steps" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
5... |
how many patients whose gender is f and ethnicity is white? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.ethnicity = "WHITE" | [
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,
122,
3868,
3274,
96,
371,
121,
3430,
14798,
5,
15,
189,
2532,
485,
3274,
96,
15313,
14871,
121,
... |
When none (new seat) is the first elected who are the candidates? | CREATE TABLE table_25030512_12 (
candidates VARCHAR,
first_elected VARCHAR
) | SELECT candidates FROM table_25030512_12 WHERE first_elected = "None (New seat)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
11434,
1458,
24163,
834,
2122,
41,
4341,
584,
4280,
28027,
6,
166,
834,
19971,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
366,
5839,
41,
5534,
3143,
61,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4341,
21680,
953,
834,
11434,
1458,
24163,
834,
2122,
549,
17444,
427,
166,
834,
19971,
3274,
96,
567,
782,
41,
6861,
3143,
61,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Let me know both the icd9 code and short title of the procedure for patient Morgan Mcgee. | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT procedures.icd9_code, procedures.short_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Morgan Mcgee" | [
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,
4293,
5,
447,
26,
1298,
834,
4978,
6,
4293,
5,
7,
14184,
834,
21869,
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,
427,
... |
What is the tyre with a 56 chassis? | CREATE TABLE table_name_99 (tyre VARCHAR, chassis VARCHAR) | SELECT tyre FROM table_name_99 WHERE chassis = "56" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3264,
41,
17,
63,
60,
584,
4280,
28027,
6,
22836,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
3,
17,
63,
60,
28,
3,
9,
11526,
22836,
58,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17,
63,
60,
21680,
953,
834,
4350,
834,
3264,
549,
17444,
427,
22836,
3274,
96,
4834,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the lowest pick number for a united states player picked before round 7? | CREATE TABLE table_name_91 (pick INTEGER, round VARCHAR, nationality VARCHAR) | SELECT MIN(pick) FROM table_name_91 WHERE round > 7 AND nationality = "united states" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4729,
41,
17967,
3,
21342,
17966,
6,
1751,
584,
4280,
28027,
6,
1157,
485,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
7402,
1432,
381,
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,
3,
17684,
599,
17967,
61,
21680,
953,
834,
4350,
834,
4729,
549,
17444,
427,
1751,
2490,
489,
3430,
1157,
485,
3274,
96,
15129,
15,
26,
2315,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
The EPT German open was won by which listed winner? | CREATE TABLE table_name_8 (winner VARCHAR, event VARCHAR) | SELECT winner FROM table_name_8 WHERE event = "ept german open" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
927,
41,
3757,
687,
584,
4280,
28027,
6,
605,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
37,
262,
6383,
2968,
539,
47,
751,
57,
84,
2616,
4668,
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,
4668,
21680,
953,
834,
4350,
834,
927,
549,
17444,
427,
605,
3274,
96,
6707,
13692,
539,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the score on February 8, 1992? | CREATE TABLE table_20745706_1 (
score VARCHAR,
date VARCHAR
) | SELECT score FROM table_20745706_1 WHERE date = "February 8, 1992" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1755,
4581,
3436,
5176,
834,
536,
41,
2604,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
2604,
30,
2083,
9478,
9047,
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,
2604,
21680,
953,
834,
1755,
4581,
3436,
5176,
834,
536,
549,
17444,
427,
833,
3274,
96,
31122,
9478,
9047,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How much do the tickets cost for August 7, 1987? | CREATE TABLE table_18277458_2 (
ticket_price_s_ VARCHAR,
date_s_ VARCHAR
) | SELECT ticket_price_s_ FROM table_18277458_2 WHERE date_s_ = "August 7, 1987" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2606,
2555,
4581,
3449,
834,
357,
41,
4142,
834,
102,
4920,
834,
7,
834,
584,
4280,
28027,
6,
833,
834,
7,
834,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4142,
834,
102,
4920,
834,
7,
834,
21680,
953,
834,
2606,
2555,
4581,
3449,
834,
357,
549,
17444,
427,
833,
834,
7,
834,
3274,
96,
26579,
7973,
12701,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Who are thebmix artists when tears for fears is artist 1 and eric prydz is artist 2? | CREATE TABLE table_26215 (
"Song 1 title" text,
"Artist 1" text,
"Song 2 title" text,
"Artist 2" text,
"Mix artist" text,
"Guitar part?" text,
"Level" text
) | SELECT "Mix artist" FROM table_26215 WHERE "Artist 1" = 'Tears for Fears' AND "Artist 2" = 'Eric Prydz' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2688,
357,
1808,
41,
96,
134,
2444,
209,
2233,
121,
1499,
6,
96,
7754,
343,
209,
121,
1499,
6,
96,
134,
2444,
204,
2233,
121,
1499,
6,
96,
7754,
343,
204,
121,
1499,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
329,
2407,
2377,
121,
21680,
953,
834,
2688,
357,
1808,
549,
17444,
427,
96,
7754,
343,
209,
121,
3274,
3,
31,
382,
2741,
7,
21,
21963,
7,
31,
3430,
96,
7754,
343,
204,
121,
3274,
3,
31,
427,
2234,
276,
651,... |
Please compare the number of names of parties using a bar chart, sort in desc by the X-axis. | CREATE TABLE county (
County_Id int,
County_name text,
Population real,
Zip_code text
)
CREATE TABLE election (
Election_ID int,
Counties_Represented text,
District int,
Delegate text,
Party int,
First_Elected real,
Committee text
)
CREATE TABLE party (
Party_ID int,
Year real,
Party text,
Governor text,
Lieutenant_Governor text,
Comptroller text,
Attorney_General text,
US_Senate text
) | SELECT T2.Party, COUNT(T2.Party) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T2.Party ORDER BY T2.Party DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
5435,
41,
1334,
834,
196,
26,
16,
17,
6,
1334,
834,
4350,
1499,
6,
29659,
490,
6,
22296,
834,
4978,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
4356,
41,
19488,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
13725,
63,
6,
2847,
17161,
599,
382,
4416,
13725,
63,
61,
21680,
4356,
6157,
332,
536,
3,
15355,
3162,
1088,
6157,
332,
357,
9191,
332,
5411,
13725,
63,
3274,
332,
4416,
13725,
63,
834,
4309,
350,
4630,
6... |
What is the nationality of the ship when the principle victims are civilians? | CREATE TABLE table_79837 (
"Estimate" real,
"Name" text,
"Nat." text,
"Ship Type" text,
"Principal victims" text,
"Date" text
) | SELECT "Nat." FROM table_79837 WHERE "Principal victims" = 'civilians' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
940,
3916,
4118,
41,
96,
14997,
23,
5058,
121,
490,
6,
96,
23954,
121,
1499,
6,
96,
567,
144,
535,
1499,
6,
96,
134,
10462,
6632,
121,
1499,
6,
96,
7855,
29,
3389,
138,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
567,
144,
535,
21680,
953,
834,
940,
3916,
4118,
549,
17444,
427,
96,
7855,
29,
3389,
138,
8926,
121,
3274,
3,
31,
27981,
173,
7137,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the number of positions that have 2012 ratings of 0.92? | CREATE TABLE table_name_21 (
position VARCHAR
) | SELECT COUNT(position) FROM table_name_21 WHERE 2012 = "0.92" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2658,
41,
1102,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
381,
13,
4655,
24,
43,
1673,
9712,
13,
4097,
4508,
58,
1,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
4718,
61,
21680,
953,
834,
4350,
834,
2658,
549,
17444,
427,
1673,
3274,
96,
23758,
357,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the result in the event 1 medley for the man with a 4 (6 in 31.85s) in the event 3 squat lift? | CREATE TABLE table_24302700_2 (event_1_medley VARCHAR, event_3_squat_lift VARCHAR) | SELECT event_1_medley FROM table_24302700_2 WHERE event_3_squat_lift = "4 (6 in 31.85s)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
27730,
4305,
9295,
834,
357,
41,
15,
2169,
834,
536,
834,
2726,
1306,
584,
4280,
28027,
6,
605,
834,
519,
834,
7,
4960,
17,
834,
9253,
584,
4280,
28027,
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,
605,
834,
536,
834,
2726,
1306,
21680,
953,
834,
27730,
4305,
9295,
834,
357,
549,
17444,
427,
605,
834,
519,
834,
7,
4960,
17,
834,
9253,
3274,
96,
591,
11372,
16,
2664,
5,
4433,
7,
61,
121,
1,
-100,
-100,
-100,
... |
Tell me the total number of points with chassis of tf103 | CREATE TABLE table_name_2 (
points VARCHAR,
chassis VARCHAR
) | SELECT COUNT(points) FROM table_name_2 WHERE chassis = "tf103" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
357,
41,
979,
584,
4280,
28027,
6,
22836,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
8779,
140,
8,
792,
381,
13,
979,
28,
22836,
13,
3,
17,
89,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
2700,
7,
61,
21680,
953,
834,
4350,
834,
357,
549,
17444,
427,
22836,
3274,
96,
17,
89,
17864,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Return a bar chart on what are the title and maximum price of each film?, and show from high to low by the Title. | CREATE TABLE film (
Film_ID int,
Rank_in_series int,
Number_in_season int,
Title text,
Directed_by text,
Original_air_date text,
Production_code text
)
CREATE TABLE schedule (
Cinema_ID int,
Film_ID int,
Date text,
Show_times_per_day int,
Price float
)
CREATE TABLE cinema (
Cinema_ID int,
Name text,
Openning_year int,
Capacity int,
Location text
) | SELECT Title, MAX(T1.Price) FROM schedule AS T1 JOIN film AS T2 ON T1.Film_ID = T2.Film_ID GROUP BY Title ORDER BY Title DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
814,
41,
3417,
834,
4309,
16,
17,
6,
3,
22557,
834,
77,
834,
10833,
7,
16,
17,
6,
7720,
834,
77,
834,
9476,
16,
17,
6,
11029,
1499,
6,
7143,
15,
26,
834,
969,
1499,
6,
8465,
83... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
11029,
6,
4800,
4,
599,
382,
5411,
345,
4920,
61,
21680,
2023,
6157,
332,
536,
3,
15355,
3162,
814,
6157,
332,
357,
9191,
332,
5411,
371,
173,
51,
834,
4309,
3274,
332,
4416,
371,
173,
51,
834,
4309,
350,
4630,
68... |
What is the date of the game where Dipietro earned a decision and Carolina was the visiting team? | CREATE TABLE table_name_28 (date VARCHAR, decision VARCHAR, visitor VARCHAR) | SELECT date FROM table_name_28 WHERE decision = "dipietro" AND visitor = "carolina" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2577,
41,
5522,
584,
4280,
28027,
6,
1357,
584,
4280,
28027,
6,
7019,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
833,
13,
8,
467,
213,
2317... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
833,
21680,
953,
834,
4350,
834,
2577,
549,
17444,
427,
1357,
3274,
96,
21981,
23,
15252,
121,
3430,
7019,
3274,
96,
1720,
12057,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the Opponent of the game in 1989? | CREATE TABLE table_name_76 (
opponent VARCHAR,
date VARCHAR
) | SELECT opponent FROM table_name_76 WHERE date = 1989 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3959,
41,
15264,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
4495,
9977,
13,
8,
467,
16,
9975,
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,
15264,
21680,
953,
834,
4350,
834,
3959,
549,
17444,
427,
833,
3274,
9975,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
For all employees who have the letters D or S in their first name, a bar chart shows the distribution of job_id and the sum of manager_id , and group by attribute job_id, and could you rank from high to low by the x axis? | 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 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 regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE 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 JOB_ID, SUM(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY JOB_ID DESC | [
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,
9312,
188,
17966,
834,
4309,
61,
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,
3... |
tell me the last procedure patient 007-9853 had until 2 years ago? | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
) | SELECT treatment.treatmentname FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '007-9853')) AND DATETIME(treatment.treatmenttime) <= DATETIME(CURRENT_TIME(), '-2 year') ORDER BY treatment.treatmenttime DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1058,
41,
1058,
23,
26,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
1058,
4350,
1499,
6,
1058,
715,
97,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
1868,
41,
775,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
1058,
5,
26889,
4350,
21680,
1058,
549,
17444,
427,
1058,
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,
21545,
... |
How many medals for spain with 1 silver? | CREATE TABLE table_name_68 (total INTEGER, silver VARCHAR, nation VARCHAR) | SELECT SUM(total) FROM table_name_68 WHERE silver = "1" AND nation = "spain" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3651,
41,
235,
1947,
3,
21342,
17966,
6,
4294,
584,
4280,
28027,
6,
2982,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
9365,
7,
21,
4174,
77,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
180,
6122,
599,
235,
1947,
61,
21680,
953,
834,
4350,
834,
3651,
549,
17444,
427,
4294,
3274,
96,
536,
121,
3430,
2982,
3274,
96,
14147,
77,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the total time for the match that ocurred in Round 3 with opponent Keith Wisniewski? | CREATE TABLE table_name_39 (time VARCHAR, round VARCHAR, opponent VARCHAR) | SELECT time FROM table_name_39 WHERE round = "3" AND opponent = "keith wisniewski" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3288,
41,
715,
584,
4280,
28027,
6,
1751,
584,
4280,
28027,
6,
15264,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
792,
97,
21,
8,
1588,
24,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
97,
21680,
953,
834,
4350,
834,
3288,
549,
17444,
427,
1751,
3274,
96,
519,
121,
3430,
15264,
3274,
96,
5754,
107,
11064,
7,
29,
23,
15,
210,
4009,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What club has less than 10 losses, less than 55 goals, and 13 wins? | CREATE TABLE table_name_47 (club VARCHAR, wins VARCHAR, losses VARCHAR, goals_for VARCHAR) | SELECT club FROM table_name_47 WHERE losses < 10 AND goals_for < 55 AND wins = 13 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4177,
41,
13442,
584,
4280,
28027,
6,
9204,
584,
4280,
28027,
6,
8467,
584,
4280,
28027,
6,
1766,
834,
1161,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1886,
21680,
953,
834,
4350,
834,
4177,
549,
17444,
427,
8467,
3,
2,
335,
3430,
1766,
834,
1161,
3,
2,
6897,
3430,
9204,
3274,
1179,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What Director won a prize of ¥2,000,000? | CREATE TABLE table_name_42 (director_s_ VARCHAR, prize VARCHAR) | SELECT director_s_ FROM table_name_42 WHERE prize = "¥2,000,000" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4165,
41,
25982,
834,
7,
834,
584,
4280,
28027,
6,
6441,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
2578,
751,
3,
9,
6441,
13,
3,
2,
357,
23916,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2090,
834,
7,
834,
21680,
953,
834,
4350,
834,
4165,
549,
17444,
427,
6441,
3274,
96,
2,
357,
23916,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the average attendance when the record was 58 49? | CREATE TABLE table_name_63 (
attendance INTEGER,
record VARCHAR
) | SELECT AVG(attendance) FROM table_name_63 WHERE record = "58–49" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3891,
41,
11364,
3,
21342,
17966,
6,
1368,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
1348,
11364,
116,
8,
1368,
47,
3,
3449,
9526,
58,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
71,
17217,
599,
15116,
663,
61,
21680,
953,
834,
4350,
834,
3891,
549,
17444,
427,
1368,
3274,
96,
3449,
104,
3647,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What position for jj gagiano? | CREATE TABLE table_name_3 (position VARCHAR, player VARCHAR) | SELECT position FROM table_name_3 WHERE player = "jj gagiano" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
519,
41,
4718,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
1102,
21,
3,
354,
354,
23856,
20028,
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,
1102,
21680,
953,
834,
4350,
834,
519,
549,
17444,
427,
1959,
3274,
96,
354,
354,
23856,
20028,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
In what year did the winner of the FIS championship in 1982 win the Winter Olympics? | CREATE TABLE table_21692 (
"Winner" text,
"Country" text,
"Winter Olympics" text,
"FIS Nordic World Ski Championships" text,
"Holmenkollen" text
) | SELECT "Winter Olympics" FROM table_21692 WHERE "FIS Nordic World Ski Championships" = '1982' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
27184,
4508,
41,
96,
18455,
687,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
518,
3870,
17793,
121,
1499,
6,
96,
4936,
134,
24207,
1150,
7409,
7666,
7,
121,
1499,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
518,
3870,
17793,
121,
21680,
953,
834,
27184,
4508,
549,
17444,
427,
96,
4936,
134,
24207,
1150,
7409,
7666,
7,
121,
3274,
3,
31,
2294,
4613,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the lowest Ofsted number for a primary with a CE faith, intake of 30 and a DCSF number lower than 3349? | CREATE TABLE table_name_72 (ofsted_number INTEGER, dcsf_number VARCHAR, intake VARCHAR, type VARCHAR, faith VARCHAR) | SELECT MIN(ofsted_number) FROM table_name_72 WHERE type = "primary" AND faith = "ce" AND intake = 30 AND dcsf_number < 3349 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5865,
41,
858,
6265,
834,
5525,
1152,
3,
21342,
17966,
6,
3,
26,
75,
7,
89,
834,
5525,
1152,
584,
4280,
28027,
6,
11963,
584,
4280,
28027,
6,
686,
584,
4280,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
858,
6265,
834,
5525,
1152,
61,
21680,
953,
834,
4350,
834,
5865,
549,
17444,
427,
686,
3274,
96,
8234,
1208,
121,
3430,
3251,
3274,
96,
565,
121,
3430,
11963,
3274,
604,
3430,
3,
26,
75,
7,
89,
834... |
Among patients admitted before the year 2131, how many of them had a lab test for albumin/creatinine, urine? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2131" AND lab.label = "Albumin/Creatinine, Urine" | [
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,
7690,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7690,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
For those records from the products and each product's manufacturer, find name and code , and group by attribute headquarter, and visualize them by a bar chart, could you rank names in ascending order? | CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) | SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name ORDER BY T1.Name | [
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,
5411,
23954,
6,
332,
5411,
22737,
21680,
7554,
6157,
332,
536,
3,
15355,
3162,
15248,
7,
6157,
332,
357,
9191,
332,
5411,
7296,
76,
8717,
450,
49,
3274,
332,
4416,
22737,
350,
4630,
6880,
272,
476,
3642,
19973,
... |
What is the largest silver value associated with 0 golds? | CREATE TABLE table_40368 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT MAX("Silver") FROM table_40368 WHERE "Gold" < '0' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2445,
519,
3651,
41,
96,
22557,
121,
1499,
6,
96,
567,
257,
121,
1499,
6,
96,
23576,
121,
490,
6,
96,
134,
173,
624,
121,
490,
6,
96,
22780,
29,
776,
121,
490,
6,
96,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
121,
134,
173,
624,
8512,
21680,
953,
834,
2445,
519,
3651,
549,
17444,
427,
96,
23576,
121,
3,
2,
3,
31,
632,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
what is the country when the iata is gva? | CREATE TABLE table_48134 (
"City" text,
"Country" text,
"IATA" text,
"ICAO" text,
"Airport" text
) | SELECT "Country" FROM table_48134 WHERE "IATA" = 'gva' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3707,
23747,
41,
96,
254,
485,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
196,
19282,
121,
1499,
6,
96,
15038,
667,
121,
1499,
6,
96,
20162,
1493,
121,
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,
0... | [
3,
23143,
14196,
96,
10628,
651,
121,
21680,
953,
834,
3707,
23747,
549,
17444,
427,
96,
196,
19282,
121,
3274,
3,
31,
122,
900,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was Great Britain's total time? | CREATE TABLE table_14356 (
"Rank" real,
"Lane" real,
"Name" text,
"Nationality" text,
"Time" real
) | SELECT COUNT("Time") FROM table_14356 WHERE "Nationality" = 'great britain' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
25133,
4834,
41,
96,
22557,
121,
490,
6,
96,
434,
152,
15,
121,
490,
6,
96,
23954,
121,
1499,
6,
96,
24732,
485,
121,
1499,
6,
96,
13368,
121,
490,
3,
61,
3,
32102,
321... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
121,
13368,
8512,
21680,
953,
834,
25133,
4834,
549,
17444,
427,
96,
24732,
485,
121,
3274,
3,
31,
20288,
3,
115,
10694,
77,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is the highest ranking the team has ever received ? | CREATE TABLE table_203_183 (
id number,
"season" text,
"tier" number,
"division" number,
"place" text
) | SELECT MIN("place") FROM table_203_183 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
24361,
41,
3,
23,
26,
381,
6,
96,
9476,
121,
1499,
6,
96,
3276,
121,
381,
6,
96,
26,
23,
6610,
121,
381,
6,
96,
4687,
121,
1499,
3,
61,
3,
32102,
32103,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
121,
4687,
8512,
21680,
953,
834,
23330,
834,
24361,
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... |
Which pick number attended McMaster College? | CREATE TABLE table_54414 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
) | SELECT "Pick #" FROM table_54414 WHERE "College" = 'mcmaster' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
755,
3628,
2534,
41,
96,
345,
3142,
1713,
121,
490,
6,
96,
254,
10765,
2271,
121,
1499,
6,
96,
15800,
49,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
9939,
78... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
3,
23143,
14196,
96,
345,
3142,
1713,
121,
21680,
953,
834,
755,
3628,
2534,
549,
17444,
427,
96,
9939,
7883,
121,
3274,
3,
31,
51,
75,
7429,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What Engine has a Finish of 21? | CREATE TABLE table_67023 (
"Year" real,
"Chassis" text,
"Engine" text,
"Start" text,
"Finish" text,
"Entrant" text
) | SELECT "Engine" FROM table_67023 WHERE "Finish" = '21' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3708,
632,
2773,
41,
96,
476,
2741,
121,
490,
6,
96,
3541,
6500,
7,
121,
1499,
6,
96,
31477,
121,
1499,
6,
96,
7681,
17,
121,
1499,
6,
96,
371,
77,
1273,
121,
1499,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
31477,
121,
21680,
953,
834,
3708,
632,
2773,
549,
17444,
427,
96,
371,
77,
1273,
121,
3274,
3,
31,
2658,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What batting team played in Chittagong in 2003? | CREATE TABLE table_name_63 (
batting_team VARCHAR,
venue VARCHAR,
season VARCHAR
) | SELECT batting_team FROM table_name_63 WHERE venue = "chittagong" AND season = "2003" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3891,
41,
3,
27759,
834,
11650,
584,
4280,
28027,
6,
5669,
584,
4280,
28027,
6,
774,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
3,
27759,
372,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
27759,
834,
11650,
21680,
953,
834,
4350,
834,
3891,
549,
17444,
427,
5669,
3274,
96,
1436,
17,
2408,
2444,
121,
3430,
774,
3274,
96,
23948,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the number of lost games when 2 were drawn, and there were 6 bonus points? | CREATE TABLE table_name_55 (
lost VARCHAR,
drawn VARCHAR,
bonus_points VARCHAR
) | SELECT lost FROM table_name_55 WHERE drawn = "2" AND bonus_points = "6" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3769,
41,
1513,
584,
4280,
28027,
6,
6796,
584,
4280,
28027,
6,
4023,
834,
2700,
7,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
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,
1,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1513,
21680,
953,
834,
4350,
834,
3769,
549,
17444,
427,
6796,
3274,
96,
357,
121,
3430,
4023,
834,
2700,
7,
3274,
96,
948,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name the lowest Crowd of hisense arena on 8 february? | CREATE TABLE table_name_29 (
crowd INTEGER,
venue VARCHAR,
date VARCHAR
) | SELECT MIN(crowd) FROM table_name_29 WHERE venue = "hisense arena" AND date = "8 february" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3166,
41,
4374,
3,
21342,
17966,
6,
5669,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
7402,
15343,
26,
13,
112,
51... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
75,
3623,
26,
61,
21680,
953,
834,
4350,
834,
3166,
549,
17444,
427,
5669,
3274,
96,
10193,
5167,
15134,
121,
3430,
833,
3274,
96,
927,
29976,
76,
1208,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
When 12 is the season number how many series numbers are there? | CREATE TABLE table_25649467_2 (
series__number VARCHAR,
season__number VARCHAR
) | SELECT COUNT(series__number) FROM table_25649467_2 WHERE season__number = 12 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
4389,
4240,
3708,
834,
357,
41,
939,
834,
834,
5525,
1152,
584,
4280,
28027,
6,
774,
834,
834,
5525,
1152,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
366,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
10833,
7,
834,
834,
5525,
1152,
61,
21680,
953,
834,
1828,
4389,
4240,
3708,
834,
357,
549,
17444,
427,
774,
834,
834,
5525,
1152,
3274,
586,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
For those employees who do not work in departments with managers that have ids between 100 and 200, show me about the distribution of phone_number and manager_id in a bar chart, sort MANAGER_ID from high to low order. | CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE 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)
) | SELECT PHONE_NUMBER, MANAGER_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY MANAGER_ID DESC | [
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,
3,
8023,
7894,
834,
567,
6122,
12920,
6,
283,
15610,
17966,
834,
4309,
21680,
1652,
549,
17444,
427,
4486,
3396,
19846,
11810,
834,
4309,
3388,
41,
23143,
14196,
3396,
19846,
11810,
834,
4309,
21680,
10521,
549,
17444,
... |
What is the most years that tournaments held in Rome have lasted? | CREATE TABLE table_23788 (
"Tournament" text,
"Also currently known as" text,
"City(s)" text,
"Country" text,
"Court surface" text,
"Tier IV in" text,
"Years" real
) | SELECT MAX("Years") FROM table_23788 WHERE "Tournament" = 'Rome' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
4118,
4060,
41,
96,
382,
1211,
20205,
17,
121,
1499,
6,
96,
188,
40,
7,
32,
1083,
801,
38,
121,
1499,
6,
96,
254,
485,
599,
7,
61,
121,
1499,
6,
96,
10628,
651,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
476,
2741,
7,
8512,
21680,
953,
834,
357,
4118,
4060,
549,
17444,
427,
96,
382,
1211,
20205,
17,
121,
3274,
3,
31,
448,
7159,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Show the names of products and the number of events they are in by a bar chart, and display Y in ascending order. | CREATE TABLE Locations (
Location_ID INTEGER,
Other_Details VARCHAR(255)
)
CREATE TABLE Channels (
Channel_ID INTEGER,
Other_Details VARCHAR(255)
)
CREATE TABLE Parties (
Party_ID INTEGER,
Party_Details VARCHAR(255)
)
CREATE TABLE Parties_in_Events (
Party_ID INTEGER,
Event_ID INTEGER,
Role_Code CHAR(15)
)
CREATE TABLE Products_in_Events (
Product_in_Event_ID INTEGER,
Event_ID INTEGER,
Product_ID INTEGER
)
CREATE TABLE Events (
Event_ID INTEGER,
Address_ID INTEGER,
Channel_ID INTEGER,
Event_Type_Code CHAR(15),
Finance_ID INTEGER,
Location_ID INTEGER
)
CREATE TABLE Assets_in_Events (
Asset_ID INTEGER,
Event_ID INTEGER
)
CREATE TABLE Finances (
Finance_ID INTEGER,
Other_Details VARCHAR(255)
)
CREATE TABLE Addresses (
Address_ID INTEGER,
address_details VARCHAR(255)
)
CREATE TABLE Products (
Product_ID INTEGER,
Product_Type_Code CHAR(15),
Product_Name VARCHAR(255),
Product_Price DECIMAL(20,4)
)
CREATE TABLE Agreements (
Document_ID INTEGER,
Event_ID INTEGER
)
CREATE TABLE Assets (
Asset_ID INTEGER,
Other_Details VARCHAR(255)
) | SELECT Product_Name, COUNT(*) FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name ORDER BY COUNT(*) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
10450,
7,
41,
10450,
834,
4309,
3,
21342,
17966,
6,
2502,
834,
2962,
5756,
7,
584,
4280,
28027,
599,
25502,
61,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
9916,
7,
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,
6246,
834,
23954,
6,
2847,
17161,
599,
1935,
61,
21680,
7554,
6157,
332,
536,
3,
15355,
3162,
7554,
834,
77,
834,
427,
2169,
7,
6157,
332,
357,
9191,
332,
5411,
3174,
7472,
834,
4309,
3274,
332,
4416,
3174,
7472,
83... |
How many people are shown for mens doubles when guo yue played womens singles? | CREATE TABLE table_30315 (
"Year Location" text,
"Mens Singles" text,
"Womens Singles" text,
"Mens Doubles" text,
"Womens Doubles" text
) | SELECT COUNT("Mens Doubles") FROM table_30315 WHERE "Womens Singles" = 'Guo Yue' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23335,
1808,
41,
96,
476,
2741,
10450,
121,
1499,
6,
96,
329,
35,
7,
7871,
7,
121,
1499,
6,
96,
518,
32,
904,
7,
7871,
7,
121,
1499,
6,
96,
329,
35,
7,
8405,
7,
121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
329,
35,
7,
8405,
7,
8512,
21680,
953,
834,
23335,
1808,
549,
17444,
427,
96,
518,
32,
904,
7,
7871,
7,
121,
3274,
3,
31,
9105,
32,
6214,
15,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.