NATURAL_LANG stringlengths 0 446 | SCHEMA stringlengths 27 2.21k | SQL stringlengths 18 453 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|
Which Surface is on 23 january 2011? | CREATE TABLE table_name_79 (
surface VARCHAR,
date VARCHAR
) | SELECT surface FROM table_name_79 WHERE date = "23 january 2011" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4440,
41,
1774,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
18884,
19,
30,
1902,
3,
7066,
76,
1208,
2722,
58,
1,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1774,
21680,
953,
834,
4350,
834,
4440,
549,
17444,
427,
833,
3274,
96,
2773,
3,
7066,
76,
1208,
2722,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What were the scores on September 11, 2006? | CREATE TABLE table_name_95 (score VARCHAR, date VARCHAR) | SELECT score FROM table_name_95 WHERE date = "september 11, 2006" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3301,
41,
7,
9022,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
130,
8,
7586,
30,
1600,
9694,
3581,
58,
1,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2604,
21680,
953,
834,
4350,
834,
3301,
549,
17444,
427,
833,
3274,
96,
7,
6707,
18247,
9694,
3581,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the largest pick in round 8? | CREATE TABLE table_name_82 (pick INTEGER, round VARCHAR) | SELECT MAX(pick) FROM table_name_82 WHERE round = 8 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4613,
41,
17967,
3,
21342,
17966,
6,
1751,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2015,
1432,
16,
1751,
505,
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,
4800,
4,
599,
17967,
61,
21680,
953,
834,
4350,
834,
4613,
549,
17444,
427,
1751,
3274,
505,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the average React, when Name is 'Candice Davis', and when Lane is less than 3? | CREATE TABLE table_9645 (
"Lane" real,
"Name" text,
"Country" text,
"Mark" real,
"React" real
) | SELECT AVG("React") FROM table_9645 WHERE "Name" = 'candice davis' AND "Lane" < '3' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4314,
2128,
41,
96,
434,
152,
15,
121,
490,
6,
96,
23954,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
19762,
121,
490,
6,
96,
1649,
2708,
121,
490,
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,
121,
1649,
2708,
8512,
21680,
953,
834,
4314,
2128,
549,
17444,
427,
96,
23954,
121,
3274,
3,
31,
75,
232,
867,
836,
3466,
31,
3430,
96,
434,
152,
15,
121,
3,
2,
3,
31,
519,
31,
1,
-100,
-100,
... |
how many albums are performed by martin carthy or ewan maccoll ? | CREATE TABLE table_204_268 (
id number,
"album/single" text,
"performer" text,
"year" number,
"variant" text,
"notes" text
) | SELECT COUNT("album/single") FROM table_204_268 WHERE "performer" IN ('martin carthy', 'ewan maccoll') | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
357,
3651,
41,
3,
23,
26,
381,
6,
96,
23703,
87,
7,
53,
109,
121,
1499,
6,
96,
883,
2032,
49,
121,
1499,
6,
96,
1201,
121,
381,
6,
96,
9504,
288,
121,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
23703,
87,
7,
53,
109,
8512,
21680,
953,
834,
26363,
834,
357,
3651,
549,
17444,
427,
96,
883,
2032,
49,
121,
3388,
41,
31,
1635,
17,
77,
443,
189,
63,
31,
6,
3,
31,
15,
3877,
11486,
3297,... |
What was the score of the match against roger federer on April 3, 2006? | CREATE TABLE table_name_44 (score VARCHAR, opponent VARCHAR, date VARCHAR) | SELECT score FROM table_name_44 WHERE opponent = "roger federer" AND date = "april 3, 2006" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3628,
41,
7,
9022,
584,
4280,
28027,
6,
15264,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
2604,
13,
8,
1588,
581,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2604,
21680,
953,
834,
4350,
834,
3628,
549,
17444,
427,
15264,
3274,
96,
3822,
49,
3,
16812,
49,
121,
3430,
833,
3274,
96,
9,
2246,
40,
6180,
3581,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Name the number of score for january 12 | CREATE TABLE table_29931 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT COUNT("Score") FROM table_29931 WHERE "Date" = 'January 12' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
3264,
3341,
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,
2847,
17161,
599,
121,
134,
9022,
8512,
21680,
953,
834,
357,
3264,
3341,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
30404,
586,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What kind of Japanese has a Region of tōhoku? | CREATE TABLE table_name_71 (japanese VARCHAR, region VARCHAR) | SELECT japanese FROM table_name_71 WHERE region = "tōhoku" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4450,
41,
1191,
2837,
15,
7,
15,
584,
4280,
28027,
6,
1719,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
773,
13,
4318,
65,
3,
9,
6163,
13,
3,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2662,
2837,
15,
7,
15,
21680,
953,
834,
4350,
834,
4450,
549,
17444,
427,
1719,
3274,
96,
17,
2,
107,
18512,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What college team did Ryan Golden come from? | CREATE TABLE table_2781227_7 (
college_junior_club_team VARCHAR,
player VARCHAR
) | SELECT college_junior_club_team FROM table_2781227_7 WHERE player = "Ryan Golden" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
3940,
2122,
2555,
834,
940,
41,
1900,
834,
6959,
23,
127,
834,
13442,
834,
11650,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1900,
834,
6959,
23,
127,
834,
13442,
834,
11650,
21680,
953,
834,
357,
3940,
2122,
2555,
834,
940,
549,
17444,
427,
1959,
3274,
96,
448,
63,
152,
7100,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
When did TDB depart? | CREATE TABLE table_name_16 (
year INTEGER,
departed_from VARCHAR
) | SELECT MAX(year) FROM table_name_16 WHERE departed_from = "tdb" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2938,
41,
215,
3,
21342,
17966,
6,
3,
31779,
834,
7152,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
366,
410,
332,
9213,
15407,
58,
1,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
1201,
61,
21680,
953,
834,
4350,
834,
2938,
549,
17444,
427,
3,
31779,
834,
7152,
3274,
96,
17,
26,
115,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What resulted in a score of 22-21? | CREATE TABLE table_name_27 (result VARCHAR, score VARCHAR) | SELECT result FROM table_name_27 WHERE score = "22-21" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2555,
41,
60,
7,
83,
17,
584,
4280,
28027,
6,
2604,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
741,
15,
26,
16,
3,
9,
2604,
13,
1630,
16539,
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,
741,
21680,
953,
834,
4350,
834,
2555,
549,
17444,
427,
2604,
3274,
96,
2884,
16539,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the Wade-Giles translation of the Pinyin x n r yu nh u? | CREATE TABLE table_name_44 (
wade_giles VARCHAR,
pinyin VARCHAR
) | SELECT wade_giles FROM table_name_44 WHERE pinyin = "xīn rú yuánhóu" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3628,
41,
8036,
221,
834,
122,
699,
7,
584,
4280,
28027,
6,
4522,
63,
77,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
26765,
18,
517,
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,
8036,
221,
834,
122,
699,
7,
21680,
953,
834,
4350,
834,
3628,
549,
17444,
427,
4522,
63,
77,
3274,
96,
226,
2,
29,
3,
52,
2,
3,
63,
76,
12916,
107,
4922,
76,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the number of booking start dates of the apartments with type code 'Duplex' in each year? Return a bar chart, show y axis in ascending order. | CREATE TABLE Guests (
guest_id INTEGER,
gender_code CHAR(1),
guest_first_name VARCHAR(80),
guest_last_name VARCHAR(80),
date_of_birth DATETIME
)
CREATE TABLE Apartment_Bookings (
apt_booking_id INTEGER,
apt_id INTEGER,
guest_id INTEGER,
booking_status_code CHAR(15),
booking_start_date DATETIME,
booking_end_date DATETIME
)
CREATE TABLE Apartment_Buildings (
building_id INTEGER,
building_short_name CHAR(15),
building_full_name VARCHAR(80),
building_description VARCHAR(255),
building_address VARCHAR(255),
building_manager VARCHAR(50),
building_phone VARCHAR(80)
)
CREATE TABLE View_Unit_Status (
apt_id INTEGER,
apt_booking_id INTEGER,
status_date DATETIME,
available_yn BIT
)
CREATE TABLE Apartment_Facilities (
apt_id INTEGER,
facility_code CHAR(15)
)
CREATE TABLE Apartments (
apt_id INTEGER,
building_id INTEGER,
apt_type_code CHAR(15),
apt_number CHAR(10),
bathroom_count INTEGER,
bedroom_count INTEGER,
room_count CHAR(5)
) | SELECT booking_start_date, COUNT(booking_start_date) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = "Duplex" ORDER BY COUNT(booking_start_date) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3,
22360,
41,
3886,
834,
23,
26,
3,
21342,
17966,
6,
7285,
834,
4978,
3,
28027,
14296,
6,
3886,
834,
14672,
834,
4350,
584,
4280,
28027,
599,
2079,
201,
3886,
834,
5064,
834,
4350,
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,
5038,
834,
10208,
834,
5522,
6,
2847,
17161,
599,
2567,
53,
834,
10208,
834,
5522,
61,
21680,
15970,
834,
13355,
53,
7,
6157,
332,
536,
3,
15355,
3162,
15970,
7,
6157,
332,
357,
9191,
332,
5411,
6789,
834,
23,
26,
... |
What's the content of the Tutti i Pacchetti + Sky HD package? | CREATE TABLE table_20387 (
"N\u00b0" real,
"Television service" text,
"Country" text,
"Language" text,
"Content" text,
"DAR" text,
"HDTV" text,
"PPV" text,
"Package/Option" text
) | SELECT "Content" FROM table_20387 WHERE "Package/Option" = 'Tutti i pacchetti + Sky HD' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
4225,
41,
96,
567,
2,
76,
1206,
115,
632,
121,
490,
6,
96,
382,
400,
6610,
313,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
434,
1468,
76,
545,
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,
4302,
4669,
121,
21680,
953,
834,
23330,
4225,
549,
17444,
427,
96,
24376,
545,
87,
9546,
106,
121,
3274,
3,
31,
382,
31944,
3,
23,
3,
5379,
524,
10652,
1768,
5643,
3726,
31,
1,
-100,
-100,
-100,
-100,
-100,
-... |
In how many different years was the team nicknamed Comets founded? | CREATE TABLE table_28243691_2 (
founded VARCHAR,
team_nickname VARCHAR
) | SELECT COUNT(founded) FROM table_28243691_2 WHERE team_nickname = "Comets" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2577,
2266,
3420,
4729,
834,
357,
41,
5710,
584,
4280,
28027,
6,
372,
834,
11191,
4350,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
86,
149,
186,
315,
203,
47,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
23329,
61,
21680,
953,
834,
2577,
2266,
3420,
4729,
834,
357,
549,
17444,
427,
372,
834,
11191,
4350,
3274,
96,
5890,
15,
17,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What were the total career titles of the player who led for 5 years? | CREATE TABLE table_26046 (
"Years led" text,
"Span of years led" real,
"Player" text,
"Titles won at point of lead" real,
"Total Career titles" real,
"Tournament at which lead began" text
) | SELECT COUNT("Total Career titles") FROM table_26046 WHERE "Span of years led" = '5' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
18365,
4448,
41,
96,
476,
2741,
7,
2237,
121,
1499,
6,
96,
19675,
13,
203,
2237,
121,
490,
6,
96,
15800,
49,
121,
1499,
6,
96,
382,
155,
965,
751,
44,
500,
13,
991,
121... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
3696,
1947,
15151,
8342,
8512,
21680,
953,
834,
18365,
4448,
549,
17444,
427,
96,
19675,
13,
203,
2237,
121,
3274,
3,
31,
755,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name the branding for forum communications | CREATE TABLE table_14623167_1 (
branding VARCHAR,
owner VARCHAR
) | SELECT branding FROM table_14623167_1 WHERE owner = "Forum Communications" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
24300,
2773,
27650,
834,
536,
41,
14282,
584,
4280,
28027,
6,
2527,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
14282,
21,
5130,
5030,
1,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14282,
21680,
953,
834,
24300,
2773,
27650,
834,
536,
549,
17444,
427,
2527,
3274,
96,
3809,
440,
11538,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
For the channel smaller than 63.2, what was the programming? | CREATE TABLE table_12011 (
"Channel" real,
"Video" text,
"Aspect" text,
"PSIP Short Name" text,
"Programming" text
) | SELECT "Programming" FROM table_12011 WHERE "Channel" < '63.2' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
536,
13907,
41,
96,
3541,
4515,
40,
121,
490,
6,
96,
25838,
121,
1499,
6,
96,
188,
5628,
121,
1499,
6,
96,
4176,
4629,
7110,
5570,
121,
1499,
6,
96,
3174,
16582,
53,
121,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
3174,
16582,
53,
121,
21680,
953,
834,
536,
13907,
549,
17444,
427,
96,
3541,
4515,
40,
121,
3,
2,
3,
31,
948,
19162,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is the total years on the chart | CREATE TABLE table_204_620 (
id number,
"title" text,
"year" number,
"language" text,
"role" text,
"notes" text
) | SELECT COUNT(DISTINCT "year") FROM table_204_620 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
26898,
41,
3,
23,
26,
381,
6,
96,
21869,
121,
1499,
6,
96,
1201,
121,
381,
6,
96,
24925,
121,
1499,
6,
96,
3491,
15,
121,
1499,
6,
96,
7977,
7,
121,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
96,
1201,
8512,
21680,
953,
834,
26363,
834,
26898,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many licenses have mind workstation software? | CREATE TABLE table_19811 (
"Software" text,
"Version" text,
"Operating systems" text,
"Developer" text,
"License" text
) | SELECT COUNT("License") FROM table_19811 WHERE "Software" = 'Mind WorkStation' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
24151,
2596,
41,
96,
29944,
121,
1499,
6,
96,
5000,
1938,
121,
1499,
6,
96,
667,
883,
1014,
1002,
121,
1499,
6,
96,
2962,
162,
8745,
49,
121,
1499,
6,
96,
434,
447,
5167,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
447,
5167,
8512,
21680,
953,
834,
24151,
2596,
549,
17444,
427,
96,
29944,
121,
3274,
3,
31,
12858,
26,
3118,
134,
6821,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the home port of m40? | CREATE TABLE table_name_62 (
home_port VARCHAR,
pennant VARCHAR
) | SELECT home_port FROM table_name_62 WHERE pennant = "m40" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4056,
41,
234,
834,
1493,
584,
4280,
28027,
6,
4550,
29,
288,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
234,
2147,
13,
3,
51,
2445,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
234,
834,
1493,
21680,
953,
834,
4350,
834,
4056,
549,
17444,
427,
4550,
29,
288,
3274,
96,
51,
2445,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
how many patients with icd9 code 5839 were admitted to phys referral/normal deli? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND diagnoses.icd9_code = "5839" | [
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,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
5... |
For those employees who did not have any job in the past, a bar chart shows the distribution of hire_date and the sum of manager_id bin hire_date by time, could you display in ascending by the Y-axis? | CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
) | SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY SUM(MANAGER_ID) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1652,
41,
262,
5244,
5017,
476,
5080,
834,
4309,
7908,
1982,
599,
11071,
632,
201,
30085,
834,
567,
17683,
3,
4331,
4059,
599,
1755,
201,
301,
12510,
834,
567,
17683,
3,
4331,
4059,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
454,
14132,
834,
308,
6048,
6,
180,
6122,
599,
9312,
188,
17966,
834,
4309,
61,
21680,
1652,
549,
17444,
427,
4486,
262,
5244,
5017,
476,
5080,
834,
4309,
3388,
41,
23143,
14196,
262,
5244,
5017,
476,
5080,
834,
4309,... |
Show the party and the number of drivers in each party with a bar chart. | CREATE TABLE school_bus (
School_ID int,
Driver_ID int,
Years_Working int,
If_full_time bool
)
CREATE TABLE school (
School_ID int,
Grade text,
School text,
Location text,
Type text
)
CREATE TABLE driver (
Driver_ID int,
Name text,
Party text,
Home_city text,
Age int
) | SELECT Party, COUNT(*) FROM driver GROUP BY Party | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
496,
834,
3465,
41,
1121,
834,
4309,
16,
17,
6,
10546,
834,
4309,
16,
17,
6,
13825,
834,
12492,
53,
16,
17,
6,
156,
834,
1329,
40,
834,
715,
3,
12840,
40,
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,
3450,
6,
2847,
17161,
599,
1935,
61,
21680,
2535,
350,
4630,
6880,
272,
476,
3450,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What are the names and opening hours of the tourist attractions that can be accessed by bus or walk? | CREATE TABLE tourist_attraction_features (
tourist_attraction_id number,
feature_id number
)
CREATE TABLE shops (
shop_id number,
shop_details text
)
CREATE TABLE street_markets (
market_id number,
market_details text
)
CREATE TABLE visits (
visit_id number,
tourist_attraction_id number,
tourist_id number,
visit_date time,
visit_details text
)
CREATE TABLE theme_parks (
theme_park_id number,
theme_park_details text
)
CREATE TABLE photos (
photo_id number,
tourist_attraction_id number,
name text,
description text,
filename text,
other_details text
)
CREATE TABLE staff (
staff_id number,
tourist_attraction_id number,
name text,
other_details text
)
CREATE TABLE royal_family (
royal_family_id number,
royal_family_details text
)
CREATE TABLE tourist_attractions (
tourist_attraction_id number,
attraction_type_code text,
location_id number,
how_to_get_there text,
name text,
description text,
opening_hours text,
other_details text
)
CREATE TABLE museums (
museum_id number,
museum_details text
)
CREATE TABLE visitors (
tourist_id number,
tourist_details text
)
CREATE TABLE ref_hotel_star_ratings (
star_rating_code text,
star_rating_description text
)
CREATE TABLE locations (
location_id number,
location_name text,
address text,
other_details text
)
CREATE TABLE features (
feature_id number,
feature_details text
)
CREATE TABLE hotels (
hotel_id number,
star_rating_code text,
pets_allowed_yn text,
price_range number,
other_hotel_details text
)
CREATE TABLE ref_attraction_types (
attraction_type_code text,
attraction_type_description text
) | SELECT name, opening_hours FROM tourist_attractions WHERE how_to_get_there = "bus" OR how_to_get_there = "walk" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
8548,
834,
144,
10559,
834,
30844,
7,
41,
8548,
834,
144,
10559,
834,
23,
26,
381,
6,
1451,
834,
23,
26,
381,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
5391,
41,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
564,
6,
2101,
834,
5842,
7,
21680,
8548,
834,
144,
10559,
7,
549,
17444,
427,
149,
834,
235,
834,
2782,
834,
12137,
3274,
96,
3465,
121,
4674,
149,
834,
235,
834,
2782,
834,
12137,
3274,
96,
12539,
121,
1,
-100,
-... |
On 15/04/07 in the competition Super League XII, what was the score? | CREATE TABLE table_name_94 (score VARCHAR, competition VARCHAR, date VARCHAR) | SELECT score FROM table_name_94 WHERE competition = "super league xii" AND date = "15/04/07" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4240,
41,
7,
9022,
584,
4280,
28027,
6,
2259,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
461,
627,
24288,
87,
4560,
16,
8,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2604,
21680,
953,
834,
4350,
834,
4240,
549,
17444,
427,
2259,
3274,
96,
21771,
5533,
3,
226,
23,
23,
121,
3430,
833,
3274,
96,
1808,
24288,
87,
4560,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
When Cleveland was 2nd, great lakes in the regular season what did they get to in the playoffs? | CREATE TABLE table_2357201_1 (playoffs VARCHAR, regular_season VARCHAR) | SELECT playoffs FROM table_2357201_1 WHERE regular_season = "2nd, Great Lakes" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2773,
3436,
22772,
834,
536,
41,
4895,
1647,
7,
584,
4280,
28027,
6,
1646,
834,
9476,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
366,
13160,
47,
204,
727,
6,
248,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15289,
7,
21680,
953,
834,
2773,
3436,
22772,
834,
536,
549,
17444,
427,
1646,
834,
9476,
3274,
96,
357,
727,
6,
1651,
2154,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the sum of Overall, when Round is less than 24, and when College is North Carolina State? | CREATE TABLE table_name_50 (overall INTEGER, round VARCHAR, college VARCHAR) | SELECT SUM(overall) FROM table_name_50 WHERE round < 24 AND college = "north carolina state" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1752,
41,
1890,
1748,
3,
21342,
17966,
6,
1751,
584,
4280,
28027,
6,
1900,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
4505,
13,
9126,
6,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
180,
6122,
599,
1890,
1748,
61,
21680,
953,
834,
4350,
834,
1752,
549,
17444,
427,
1751,
3,
2,
997,
3430,
1900,
3274,
96,
29,
127,
189,
443,
12057,
9,
538,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the Area KM 2 of the place that has a Census ranking of 1,016 of 5,008? | CREATE TABLE table_171236_2 (
area_km_2 VARCHAR,
census_ranking VARCHAR
) | SELECT area_km_2 FROM table_171236_2 WHERE census_ranking = "1,016 of 5,008" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2517,
2122,
3420,
834,
357,
41,
616,
834,
5848,
834,
357,
584,
4280,
28027,
6,
23087,
834,
6254,
53,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
569... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
616,
834,
5848,
834,
357,
21680,
953,
834,
2517,
2122,
3420,
834,
357,
549,
17444,
427,
23087,
834,
6254,
53,
3274,
96,
4347,
632,
2938,
13,
7836,
1206,
927,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Who wrote the episode with the production code of 3t7255? | CREATE TABLE table_27116696_1 (written_by VARCHAR, production_code VARCHAR) | SELECT written_by FROM table_27116696_1 WHERE production_code = "3T7255" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2555,
2596,
3539,
4314,
834,
536,
41,
14973,
834,
969,
584,
4280,
28027,
6,
999,
834,
4978,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
2832,
8,
5640,
28,
8,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1545,
834,
969,
21680,
953,
834,
2555,
2596,
3539,
4314,
834,
536,
549,
17444,
427,
999,
834,
4978,
3274,
96,
519,
382,
5865,
3769,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
report the long title of procedure and procedure ic9 code for patient with patient id 26746. | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
) | SELECT procedures.icd9_code, procedures.long_title FROM procedures WHERE procedures.subject_id = "26746" | [
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,
4293,
5,
447,
26,
1298,
834,
4978,
6,
4293,
5,
2961,
834,
21869,
21680,
4293,
549,
17444,
427,
4293,
5,
7304,
11827,
834,
23,
26,
3274,
96,
357,
3708,
4448,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
how many patients born before the year 2074 had an elective admission type? | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "ELECTIVE" AND demographic.dob_year < "2074" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
9,
26,
5451,
834,
6137,
3274,
96,
3577,
14196,
8087,
121,
3430,
14798,
5,
26,
32,
115,
834,
1201... |
What was the score for the match where the home team was Leicester City? | CREATE TABLE table_name_16 (score VARCHAR, home_team VARCHAR) | SELECT score FROM table_name_16 WHERE home_team = "leicester city" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2938,
41,
7,
9022,
584,
4280,
28027,
6,
234,
834,
11650,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
2604,
21,
8,
1588,
213,
8,
234,
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,
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,
2938,
549,
17444,
427,
234,
834,
11650,
3274,
96,
109,
867,
1370,
690,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Bar chart x axis type y axis the total number, and show names from high to low order please. | CREATE TABLE mission (
Mission_ID int,
Ship_ID int,
Code text,
Launched_Year int,
Location text,
Speed_knots int,
Fate text
)
CREATE TABLE ship (
Ship_ID int,
Name text,
Type text,
Nationality text,
Tonnage int
) | SELECT Type, COUNT(*) FROM ship GROUP BY Type ORDER BY Type DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2253,
41,
8960,
834,
4309,
16,
17,
6,
15508,
834,
4309,
16,
17,
6,
3636,
1499,
6,
17113,
15,
26,
834,
476,
2741,
16,
17,
6,
10450,
1499,
6,
9913,
834,
157,
2264,
7,
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,
6632,
6,
2847,
17161,
599,
1935,
61,
21680,
4383,
350,
4630,
6880,
272,
476,
6632,
4674,
11300,
272,
476,
6632,
309,
25067,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the total number of first prizes in USD for the Canadian Open? | CREATE TABLE table_name_68 (
tournament VARCHAR
) | SELECT SUM(1 AS st_prize___) AS $__ FROM table_name_68 WHERE tournament = "canadian open" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3651,
41,
5892,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
792,
381,
13,
166,
13340,
16,
9513,
21,
8,
4151,
2384,
58,
1,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
180,
6122,
599,
536,
6157,
3,
7,
17,
834,
2246,
776,
834,
834,
834,
61,
6157,
1514,
834,
834,
21680,
953,
834,
4350,
834,
3651,
549,
17444,
427,
5892,
3274,
96,
1608,
9,
8603,
539,
121,
1,
-100,
-100,
-100,
-100,
... |
For those records from the products and each product's manufacturer, show me about the distribution of name and revenue , and group by attribute name in a bar chart, and order in ascending by the Y. | 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, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name ORDER BY T2.Revenue | [
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,
4416,
1649,
15098,
21680,
7554,
6157,
332,
536,
3,
15355,
3162,
15248,
7,
6157,
332,
357,
9191,
332,
5411,
7296,
76,
8717,
450,
49,
3274,
332,
4416,
22737,
350,
4630,
6880,
272,
476,
332,
5... |
provide the number of patients whose death status is 0 and procedure short title is incision of aorta? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.expire_flag = "0" AND procedures.short_title = "Incision of aorta" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7690,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
2118,
23,
26,
1499,
6,
5059,
715,
1499,
6,
5692,
1499,
6,
701,
834,
15129,
1499,
6,
3783,
1499,
6,
5798,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
Give me the comparison about the sum of Weight over the Sex , and group by attribute Sex, and sort by the Y in descending. | CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate real
)
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight real
) | SELECT Sex, SUM(Weight) FROM people GROUP BY Sex ORDER BY SUM(Weight) DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4775,
41,
25833,
17,
15,
834,
4309,
16,
17,
6,
2449,
834,
4309,
16,
17,
6,
14457,
834,
23799,
1499,
6,
7678,
1499,
6,
4224,
834,
2206,
490,
6,
9151,
834,
2206,
490,
6,
4495,
2748,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
679,
226,
6,
180,
6122,
599,
1326,
2632,
61,
21680,
151,
350,
4630,
6880,
272,
476,
679,
226,
4674,
11300,
272,
476,
180,
6122,
599,
1326,
2632,
61,
309,
25067,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What cub team or college did Bob Law come from? | CREATE TABLE table_1965650_8 (college_junior_club_team VARCHAR, player VARCHAR) | SELECT college_junior_club_team FROM table_1965650_8 WHERE player = "Bob Law" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2294,
4122,
15348,
834,
927,
41,
3297,
7883,
834,
6959,
23,
127,
834,
13442,
834,
11650,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1900,
834,
6959,
23,
127,
834,
13442,
834,
11650,
21680,
953,
834,
2294,
4122,
15348,
834,
927,
549,
17444,
427,
1959,
3274,
96,
279,
32,
115,
2402,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Find the average and maximum age for each type of pet. | CREATE TABLE pets (pettype VARCHAR, pet_age INTEGER) | SELECT AVG(pet_age), MAX(pet_age), pettype FROM pets GROUP BY pettype | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
8636,
41,
4995,
6137,
584,
4280,
28027,
6,
3947,
834,
545,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
2588,
8,
1348,
11,
2411,
1246,
21,
284,
686,
13,
3947,
5,
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,
71,
17217,
599,
4995,
834,
545,
201,
4800,
4,
599,
4995,
834,
545,
201,
3947,
6137,
21680,
8636,
350,
4630,
6880,
272,
476,
3947,
6137,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which country has the catalog nr of thr-048 in 2004? | CREATE TABLE table_name_43 (country VARCHAR, date VARCHAR, catalog_nr VARCHAR) | SELECT country FROM table_name_43 WHERE date = "2004" AND catalog_nr = "thr-048" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4906,
41,
17529,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
6,
10173,
834,
29,
52,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
684,
65,
8,
10173,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
684,
21680,
953,
834,
4350,
834,
4906,
549,
17444,
427,
833,
3274,
96,
21653,
121,
3430,
10173,
834,
29,
52,
3274,
96,
189,
52,
18083,
927,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the average total score of body builders with height bigger than 200? | CREATE TABLE people (
people_id number,
name text,
height number,
weight number,
birth_date text,
birth_place text
)
CREATE TABLE body_builder (
body_builder_id number,
people_id number,
snatch number,
clean_jerk number,
total number
) | SELECT AVG(T1.total) FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T2.height > 200 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
151,
41,
151,
834,
23,
26,
381,
6,
564,
1499,
6,
3902,
381,
6,
1293,
381,
6,
3879,
834,
5522,
1499,
6,
3879,
834,
4687,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
382,
5411,
235,
1947,
61,
21680,
643,
834,
16422,
49,
6157,
332,
536,
3,
15355,
3162,
151,
6157,
332,
357,
9191,
332,
5411,
16588,
834,
23,
26,
3274,
332,
4416,
16588,
834,
23,
26,
549,
17444,
427,
... |
What college did the player who had the position of OT come from who was pick number less than 12 and a overall pick number bigger than 226? | CREATE TABLE table_45975 (
"Round" real,
"Pick" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
) | SELECT "College" FROM table_45975 WHERE "Overall" > '226' AND "Pick" < '12' AND "Position" = 'ot' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
3390,
3072,
41,
96,
448,
32,
1106,
121,
490,
6,
96,
345,
3142,
121,
490,
6,
96,
23847,
1748,
121,
490,
6,
96,
23954,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
9939,
7883,
121,
21680,
953,
834,
591,
3390,
3072,
549,
17444,
427,
96,
23847,
1748,
121,
2490,
3,
31,
357,
2688,
31,
3430,
96,
345,
3142,
121,
3,
2,
3,
31,
2122,
31,
3430,
96,
345,
32,
7,
4749,
121,
3274,
... |
return me the homepage of ' University of Michigan ' . | CREATE TABLE domain (
did int,
name varchar
)
CREATE TABLE publication (
abstract varchar,
cid int,
citation_num int,
jid int,
pid int,
reference_num int,
title varchar,
year int
)
CREATE TABLE keyword (
keyword varchar,
kid int
)
CREATE TABLE conference (
cid int,
homepage varchar,
name varchar
)
CREATE TABLE publication_keyword (
kid int,
pid int
)
CREATE TABLE domain_author (
aid int,
did int
)
CREATE TABLE organization (
continent varchar,
homepage varchar,
name varchar,
oid int
)
CREATE TABLE author (
aid int,
homepage varchar,
name varchar,
oid int
)
CREATE TABLE writes (
aid int,
pid int
)
CREATE TABLE journal (
homepage varchar,
jid int,
name varchar
)
CREATE TABLE cite (
cited int,
citing int
)
CREATE TABLE domain_conference (
cid int,
did int
)
CREATE TABLE domain_publication (
did int,
pid int
)
CREATE TABLE domain_keyword (
did int,
kid int
)
CREATE TABLE domain_journal (
did int,
jid int
) | SELECT homepage FROM organization WHERE name = 'University of Michigan' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3303,
41,
410,
16,
17,
6,
564,
3,
4331,
4059,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
5707,
41,
9838,
3,
4331,
4059,
6,
3,
10812,
16,
17,
6,
3,
13903,
834,
55... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
22844,
21680,
1470,
549,
17444,
427,
564,
3274,
3,
31,
8313,
485,
13,
5847,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
How many wins are associated with 20 points and over 1 podium? | CREATE TABLE table_name_12 (
wins INTEGER,
points VARCHAR,
podiums VARCHAR
) | SELECT SUM(wins) FROM table_name_12 WHERE points = 20 AND podiums > 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2122,
41,
9204,
3,
21342,
17966,
6,
979,
584,
4280,
28027,
6,
22828,
7,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
9204,
33,
1968,
28,
460... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
180,
6122,
599,
3757,
7,
61,
21680,
953,
834,
4350,
834,
2122,
549,
17444,
427,
979,
3274,
460,
3430,
22828,
7,
2490,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What are the colors for the division 2 team with the nickname, the seahawks? | CREATE TABLE table_name_74 (
colors VARCHAR,
division VARCHAR,
nickname VARCHAR
) | SELECT colors FROM table_name_74 WHERE division = "division 2" AND nickname = "seahawks" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4581,
41,
2602,
584,
4280,
28027,
6,
4889,
584,
4280,
28027,
6,
24649,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
33,
8,
2602,
21,
8,
4889,
204... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2602,
21680,
953,
834,
4350,
834,
4581,
549,
17444,
427,
4889,
3274,
96,
26,
23,
6610,
204,
121,
3430,
24649,
3274,
96,
7,
15,
9,
14400,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What were the sales for Dj Casper when he was in a position lower than 13? | CREATE TABLE table_name_51 (sales VARCHAR, position VARCHAR, artist VARCHAR) | SELECT sales FROM table_name_51 WHERE position < 13 AND artist = "dj casper" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5553,
41,
7,
4529,
584,
4280,
28027,
6,
1102,
584,
4280,
28027,
6,
2377,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
130,
8,
1085,
21,
309,
354,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1085,
21680,
953,
834,
4350,
834,
5553,
549,
17444,
427,
1102,
3,
2,
1179,
3430,
2377,
3274,
96,
26,
354,
212,
4339,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
count the number of patients whose admission type is newborn and days of hospital stay is greater than 17? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "NEWBORN" AND demographic.days_stay > "17" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
9,
26,
5451,
834,
6137,
3274,
96,
4171,
518,
8471,
14151,
121,
3430,
14798,
5,
1135,
7,
834,
215... |
What is the nationality of lane 4? | CREATE TABLE table_name_78 (
nationality VARCHAR,
lane VARCHAR
) | SELECT nationality FROM table_name_78 WHERE lane = 4 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3940,
41,
1157,
485,
584,
4280,
28027,
6,
3,
8102,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1157,
485,
13,
3,
8102,
314,
58,
1,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1157,
485,
21680,
953,
834,
4350,
834,
3940,
549,
17444,
427,
3,
8102,
3274,
314,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which Features have Yes listed under Datacenter? | CREATE TABLE table_name_18 (features VARCHAR, datacenter VARCHAR) | SELECT features FROM table_name_18 WHERE datacenter = "yes" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2606,
41,
30844,
7,
584,
4280,
28027,
6,
331,
13866,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
13977,
43,
2163,
2616,
365,
2747,
13866,
58,
1,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
753,
21680,
953,
834,
4350,
834,
2606,
549,
17444,
427,
331,
13866,
3274,
96,
10070,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
give me the number of patients whose diagnoses icd9 code is 30390 and drug route is pb? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE 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
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "30390" AND prescriptions.route = "PB" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7690,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
2118,
23,
26,
1499,
6,
5059,
715,
1499,
6,
5692,
1499,
6,
701,
834,
15129,
1499,
6,
3783,
1499,
6,
5798,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
3... |
Who was the visitor when phoenix was at home? | CREATE TABLE table_name_35 (visitor VARCHAR, home VARCHAR) | SELECT visitor FROM table_name_35 WHERE home = "phoenix" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2469,
41,
3466,
155,
127,
584,
4280,
28027,
6,
234,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
8,
7019,
116,
3,
9553,
35,
2407,
47,
44,
234,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7019,
21680,
953,
834,
4350,
834,
2469,
549,
17444,
427,
234,
3274,
96,
9553,
35,
2407,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
what is the least core diameter -lrb- in -rrb- ? | CREATE TABLE table_204_828 (
id number,
"whitworth size (in)" number,
"core diameter (in)" number,
"threads per inch" number,
"pitch (in)" number,
"tapping drill size" text
) | SELECT MIN("core diameter (in)") FROM table_204_828 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
927,
2577,
41,
3,
23,
26,
381,
6,
96,
12124,
17,
7048,
812,
41,
77,
61,
121,
381,
6,
96,
9022,
9260,
41,
77,
61,
121,
381,
6,
96,
189,
5236,
7,
399,
5913,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
121,
9022,
9260,
41,
77,
61,
8512,
21680,
953,
834,
26363,
834,
927,
2577,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
On what date/s has attendance been 45010? | CREATE TABLE table_21436373_5 (date_year VARCHAR, attendance VARCHAR) | SELECT date_year FROM table_21436373_5 WHERE attendance = 45010 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2658,
4906,
3891,
4552,
834,
755,
41,
5522,
834,
1201,
584,
4280,
28027,
6,
11364,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
461,
125,
833,
87,
7,
65,
11364,
118,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
833,
834,
1201,
21680,
953,
834,
2658,
4906,
3891,
4552,
834,
755,
549,
17444,
427,
11364,
3274,
3,
10593,
1714,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What are the venues prior to 2005 in the World Class category that resulted in a bronze? | CREATE TABLE table_67980 (
"Competition" text,
"Venue" text,
"Year" real,
"Category" text,
"Result" text
) | SELECT "Venue" FROM table_67980 WHERE "Year" < '2005' AND "Category" = 'world class' AND "Result" = 'bronze' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
948,
4440,
2079,
41,
96,
5890,
4995,
4749,
121,
1499,
6,
96,
553,
35,
76,
15,
121,
1499,
6,
96,
476,
2741,
121,
490,
6,
96,
18610,
6066,
651,
121,
1499,
6,
96,
20119,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
948,
4440,
2079,
549,
17444,
427,
96,
476,
2741,
121,
3,
2,
3,
31,
22594,
31,
3430,
96,
18610,
6066,
651,
121,
3274,
3,
31,
7276,
853,
31,
3430,
96,
20119,
121,
3274,
... |
give me the number of patients with procedure icd9 code 3799 who were admitted on an urgent basis. | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "URGENT" AND procedures.icd9_code = "3799" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7690,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
2118,
23,
26,
1499,
6,
5059,
715,
1499,
6,
5692,
1499,
6,
701,
834,
15129,
1499,
6,
3783,
1499,
6,
5798,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
what name was on the year 2012 | CREATE TABLE table_name_22 (name VARCHAR, year VARCHAR, __est_ VARCHAR) | SELECT name FROM table_name_22 WHERE year * __est_ = "2012" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2884,
41,
4350,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
6,
3,
834,
834,
222,
834,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
125,
564,
47,
30,
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,
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,
2884,
549,
17444,
427,
215,
1429,
3,
834,
834,
222,
834,
3274,
96,
12172,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Stacked bar chart of the number of country for with each Competition_type in each country, sort by the the number of country in descending. | CREATE TABLE club (
Club_ID int,
name text,
Region text,
Start_year text
)
CREATE TABLE player (
Player_ID int,
name text,
Position text,
Club_ID int,
Apps real,
Tries real,
Goals text,
Points real
)
CREATE TABLE competition (
Competition_ID int,
Year real,
Competition_type text,
Country text
)
CREATE TABLE club_rank (
Rank real,
Club_ID int,
Gold real,
Silver real,
Bronze real,
Total real
)
CREATE TABLE competition_result (
Competition_ID int,
Club_ID_1 int,
Club_ID_2 int,
Score text
) | SELECT Country, COUNT(Country) FROM competition GROUP BY Competition_type, Country ORDER BY COUNT(Country) DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1886,
41,
1949,
834,
4309,
16,
17,
6,
564,
1499,
6,
6163,
1499,
6,
3273,
834,
1201,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
1959,
41,
12387,
834,
4309,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
6993,
6,
2847,
17161,
599,
10628,
651,
61,
21680,
2259,
350,
4630,
6880,
272,
476,
15571,
834,
6137,
6,
6993,
4674,
11300,
272,
476,
2847,
17161,
599,
10628,
651,
61,
309,
25067,
1,
-100,
-100,
-100,
-100,
-100,
-100,... |
what is the total of named trains ? | CREATE TABLE table_204_336 (
id number,
"operators" text,
"named trains" text,
"destination" text,
"year begun" text,
"year discontinued" number
) | SELECT COUNT("named trains") FROM table_204_336 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
519,
3420,
41,
3,
23,
26,
381,
6,
96,
18140,
5535,
121,
1499,
6,
96,
4350,
26,
14053,
121,
1499,
6,
96,
13557,
257,
121,
1499,
6,
96,
1201,
11173,
121,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
4350,
26,
14053,
8512,
21680,
953,
834,
26363,
834,
519,
3420,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Which battle of the planets where ova (harmony gold dub) is solaris? | CREATE TABLE table_21753 (
"Gatchaman" text,
"Battle of the Planets" text,
"G-Force" text,
"Eagle Riders" text,
"OVA (Harmony Gold Dub)" text
) | SELECT "Battle of the Planets" FROM table_21753 WHERE "OVA (Harmony Gold Dub)" = 'Solaris' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
2517,
4867,
41,
96,
517,
14547,
9,
348,
121,
1499,
6,
96,
279,
9,
8692,
13,
8,
12601,
7,
121,
1499,
6,
96,
517,
18,
3809,
565,
121,
1499,
6,
96,
427,
9,
3537,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
279,
9,
8692,
13,
8,
12601,
7,
121,
21680,
953,
834,
357,
2517,
4867,
549,
17444,
427,
96,
21294,
188,
41,
15537,
21208,
2540,
970,
115,
61,
121,
3274,
3,
31,
134,
17401,
159,
31,
1,
-100,
-100,
-100,
-100,
... |
What is the sum of the goals with less than 30 points, a position less than 10, and more than 57 goals against? | CREATE TABLE table_name_14 (
goals_for INTEGER,
goals_against VARCHAR,
points VARCHAR,
position VARCHAR
) | SELECT SUM(goals_for) FROM table_name_14 WHERE points < 30 AND position < 10 AND goals_against > 57 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2534,
41,
1766,
834,
1161,
3,
21342,
17966,
6,
1766,
834,
9,
16720,
7,
17,
584,
4280,
28027,
6,
979,
584,
4280,
28027,
6,
1102,
584,
4280,
28027,
3,
61,
3,
321... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
839,
5405,
834,
1161,
61,
21680,
953,
834,
4350,
834,
2534,
549,
17444,
427,
979,
3,
2,
604,
3430,
1102,
3,
2,
335,
3430,
1766,
834,
9,
16720,
7,
17,
2490,
3,
3436,
1,
-100,
-100,
-100,
-100,
-10... |
What is Party, when District is less than 10, when Took Office is less than 1991, and when Home Town is Mount Pleasant? | CREATE TABLE table_name_22 (
party VARCHAR,
home_town VARCHAR,
district VARCHAR,
took_office VARCHAR
) | SELECT party FROM table_name_22 WHERE district < 10 AND took_office < 1991 AND home_town = "mount pleasant" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2884,
41,
1088,
584,
4280,
28027,
6,
234,
834,
3540,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
6,
808,
834,
19632,
584,
4280,
28027,
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,
1,
1,
1,
1... | [
3,
23143,
14196,
1088,
21680,
953,
834,
4350,
834,
2884,
549,
17444,
427,
3939,
3,
2,
335,
3430,
808,
834,
19632,
3,
2,
9957,
3430,
234,
834,
3540,
3274,
96,
11231,
8714,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Name the speed for andy reynolds | CREATE TABLE table_name_41 (speed VARCHAR, rider VARCHAR) | SELECT speed FROM table_name_41 WHERE rider = "andy reynolds" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4853,
41,
9993,
584,
4280,
28027,
6,
2564,
52,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
1634,
21,
11,
63,
3,
60,
63,
29,
1490,
7,
1,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1634,
21680,
953,
834,
4350,
834,
4853,
549,
17444,
427,
2564,
52,
3274,
96,
232,
63,
3,
60,
63,
29,
1490,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What fund has a fund return of 19.8% / 13.7%? | CREATE TABLE table_56083 (
"Fund" text,
"Manager" text,
"Fund Period" text,
"Fund Return" text,
"Market return" text
) | SELECT "Fund" FROM table_56083 WHERE "Fund Return" = '19.8% / 13.7%' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4834,
4018,
519,
41,
96,
371,
1106,
121,
1499,
6,
96,
27272,
121,
1499,
6,
96,
371,
1106,
17769,
121,
1499,
6,
96,
371,
1106,
9778,
121,
1499,
6,
96,
22572,
1205,
121,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
371,
1106,
121,
21680,
953,
834,
4834,
4018,
519,
549,
17444,
427,
96,
371,
1106,
9778,
121,
3274,
3,
31,
2294,
5,
5953,
3,
87,
8808,
6170,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Where was game number 55 played? | CREATE TABLE table_23248940_9 (
location_attendance VARCHAR,
game VARCHAR
) | SELECT location_attendance FROM table_23248940_9 WHERE game = 55 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2773,
2266,
3914,
2445,
834,
1298,
41,
1128,
834,
15116,
663,
584,
4280,
28027,
6,
467,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2840,
47,
467,
381,
6897,
1944... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1128,
834,
15116,
663,
21680,
953,
834,
2773,
2266,
3914,
2445,
834,
1298,
549,
17444,
427,
467,
3274,
6897,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Which Combination classification has a Stage of 14? | CREATE TABLE table_6001 (
"Stage" text,
"Winner" text,
"General classification" text,
"Points classification" text,
"Mountains classification" text,
"Combination classification" text,
"Team classification" text
) | SELECT "Combination classification" FROM table_6001 WHERE "Stage" = '14' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
6007,
536,
41,
96,
134,
6505,
121,
1499,
6,
96,
18455,
687,
121,
1499,
6,
96,
20857,
13774,
121,
1499,
6,
96,
22512,
7,
13774,
121,
1499,
6,
96,
329,
32,
14016,
77,
7,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
5890,
4517,
257,
13774,
121,
21680,
953,
834,
6007,
536,
549,
17444,
427,
96,
134,
6505,
121,
3274,
3,
31,
2534,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Show the number of documents created in each day and bin document date by year interval and group by document type with a group line chart, and list x-axis in descending order. | CREATE TABLE Accounts (
Account_ID INTEGER,
Statement_ID INTEGER,
Account_Details VARCHAR(255)
)
CREATE TABLE Documents_with_Expenses (
Document_ID INTEGER,
Budget_Type_Code CHAR(15),
Document_Details VARCHAR(255)
)
CREATE TABLE Ref_Budget_Codes (
Budget_Type_Code CHAR(15),
Budget_Type_Description VARCHAR(255)
)
CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_Type_Name VARCHAR(255),
Document_Type_Description VARCHAR(255)
)
CREATE TABLE Projects (
Project_ID INTEGER,
Project_Details VARCHAR(255)
)
CREATE TABLE Statements (
Statement_ID INTEGER,
Statement_Details VARCHAR(255)
)
CREATE TABLE Documents (
Document_ID INTEGER,
Document_Type_Code CHAR(15),
Project_ID INTEGER,
Document_Date DATETIME,
Document_Name VARCHAR(255),
Document_Description VARCHAR(255),
Other_Details VARCHAR(255)
) | SELECT Document_Date, COUNT(Document_Date) FROM Ref_Document_Types AS T1 JOIN Documents AS T2 ON T1.Document_Type_Code = T2.Document_Type_Code GROUP BY Document_Type_Name ORDER BY Document_Date DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
6288,
7,
41,
6288,
834,
4309,
3,
21342,
17966,
6,
16836,
834,
4309,
3,
21342,
17966,
6,
6288,
834,
2962,
5756,
7,
584,
4280,
28027,
599,
25502,
61,
3,
61,
3,
32102,
32103,
32102,
205... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
11167,
834,
308,
342,
6,
2847,
17161,
599,
4135,
1071,
297,
834,
308,
342,
61,
21680,
419,
89,
834,
4135,
1071,
297,
834,
25160,
7,
6157,
332,
536,
3,
15355,
3162,
11167,
7,
6157,
332,
357,
9191,
332,
5411,
4135,
... |
How many viewers in millions did the Alison McDonald episode get? | CREATE TABLE table_26961951_4 (
us_viewers__million_ VARCHAR,
written_by VARCHAR
) | SELECT us_viewers__million_ FROM table_26961951_4 WHERE written_by = "Alison McDonald" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2688,
4314,
2294,
5553,
834,
591,
41,
178,
834,
4576,
277,
834,
834,
17030,
834,
584,
4280,
28027,
6,
1545,
834,
969,
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
178,
834,
4576,
277,
834,
834,
17030,
834,
21680,
953,
834,
2688,
4314,
2294,
5553,
834,
591,
549,
17444,
427,
1545,
834,
969,
3274,
96,
188,
40,
23,
739,
17970,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
give me the number of patients whose marital status is married and lab test chart time is 2165-06-23 22:30:00? | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "MARRIED" AND lab.charttime = "2165-06-23 22:30:00" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7690,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
2118,
23,
26,
1499,
6,
5059,
715,
1499,
6,
5692,
1499,
6,
701,
834,
15129,
1499,
6,
3783,
1499,
6,
5798,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7690,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7690,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
how many patients have born before the year 2111 with an item id 51439? | 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
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2111" AND lab.itemid = "51439" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7690,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7690,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
Which Finish has a To par of 1, and a Year(s) won of 1955? | CREATE TABLE table_name_61 (
finish VARCHAR,
to_par VARCHAR,
year_s__won VARCHAR
) | SELECT finish FROM table_name_61 WHERE to_par = "–1" AND year_s__won = "1955" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4241,
41,
1992,
584,
4280,
28027,
6,
12,
834,
1893,
584,
4280,
28027,
6,
215,
834,
7,
834,
834,
210,
106,
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,
1992,
21680,
953,
834,
4350,
834,
4241,
549,
17444,
427,
12,
834,
1893,
3274,
96,
104,
536,
121,
3430,
215,
834,
7,
834,
834,
210,
106,
3274,
96,
22464,
17395,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the total for the person with 73.28 bodyweight and fewer snatches than 75? | CREATE TABLE table_name_22 (
total__kg_ INTEGER,
bodyweight VARCHAR,
snatch VARCHAR
) | SELECT AVG(total__kg_) FROM table_name_22 WHERE bodyweight = 73.28 AND snatch < 75 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2884,
41,
792,
834,
834,
8711,
834,
3,
21342,
17966,
6,
643,
9378,
584,
4280,
28027,
6,
3,
7,
29,
14547,
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,
71,
17217,
599,
235,
1947,
834,
834,
8711,
834,
61,
21680,
953,
834,
4350,
834,
2884,
549,
17444,
427,
643,
9378,
3274,
3,
4552,
5,
2577,
3430,
3,
7,
29,
14547,
3,
2,
6374,
1,
-100,
-100,
-100,
-100,
-100,
-100,
... |
In which year did John Force win Funny Car and Mike Dunn win in Top Fuel? | CREATE TABLE table_45049 (
"Year" real,
"Top Fuel" text,
"Funny Car" text,
"Pro Stock" text,
"Pro Stock Motorcycle" text
) | SELECT "Year" FROM table_45049 WHERE "Funny Car" = 'john force' AND "Top Fuel" = 'mike dunn' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
10593,
3647,
41,
96,
476,
2741,
121,
490,
6,
96,
22481,
20942,
121,
1499,
6,
96,
371,
202,
29,
63,
1184,
121,
1499,
6,
96,
3174,
6394,
121,
1499,
6,
96,
3174,
6394,
29941... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
476,
2741,
121,
21680,
953,
834,
10593,
3647,
549,
17444,
427,
96,
371,
202,
29,
63,
1184,
121,
3274,
3,
31,
27341,
2054,
31,
3430,
96,
22481,
20942,
121,
3274,
3,
31,
20068,
15,
146,
29,
29,
31,
1,
-100,
-1... |
Find the team of the player of the highest age. | CREATE TABLE player (
Team VARCHAR,
Age VARCHAR
) | SELECT Team FROM player ORDER BY Age DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1959,
41,
2271,
584,
4280,
28027,
6,
7526,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2588,
8,
372,
13,
8,
1959,
13,
8,
2030,
1246,
5,
1,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2271,
21680,
1959,
4674,
11300,
272,
476,
7526,
309,
25067,
8729,
12604,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What date were the high assists rondo (5) and the high rebounds rondo (10)? | CREATE TABLE table_name_18 (
date VARCHAR,
high_assists VARCHAR,
high_rebounds VARCHAR
) | SELECT date FROM table_name_18 WHERE high_assists = "rondo (5)" AND high_rebounds = "rondo (10)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2606,
41,
833,
584,
4280,
28027,
6,
306,
834,
6500,
7,
17,
7,
584,
4280,
28027,
6,
306,
834,
23768,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
3,
23143,
14196,
833,
21680,
953,
834,
4350,
834,
2606,
549,
17444,
427,
306,
834,
6500,
7,
17,
7,
3274,
96,
52,
17381,
3,
15757,
121,
3430,
306,
834,
23768,
3274,
96,
52,
17381,
41,
16968,
121,
1,
-100,
-100,
-100,
-100,
-100,
-1... |
How many weeks are associated with Season 3 spring 2008? | CREATE TABLE table_name_74 (
_number_of_weeks VARCHAR,
season VARCHAR
) | SELECT COUNT(_number_of_weeks) FROM table_name_74 WHERE season = "3 – spring 2008" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4581,
41,
3,
834,
5525,
1152,
834,
858,
834,
8041,
7,
584,
4280,
28027,
6,
774,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
1274,
33,
1968,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
834,
5525,
1152,
834,
858,
834,
8041,
7,
61,
21680,
953,
834,
4350,
834,
4581,
549,
17444,
427,
774,
3274,
96,
519,
3,
104,
2141,
2628,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
male or female between the ages of 18 and 80 years discharged after hospital admission from general medicine and surgery services ( non _ intensive care unit setting ) . | CREATE TABLE table_train_274 (
"id" int,
"gender" string,
"serum_bicarbonate" int,
"randomization_bg" int,
"positive_serum" bool,
"diabetic_ketoacidosis" bool,
"urinary_ketones" bool,
"diastolic_blood_pressure_dbp" int,
"heart_rate" int,
"body_mass_index_bmi" float,
"age" float,
"NOUSE" float
) | SELECT * FROM table_train_274 WHERE (gender = 'male' OR gender = 'female') AND (age >= 18 AND age <= 80) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
9719,
834,
2555,
591,
41,
96,
23,
26,
121,
16,
17,
6,
96,
122,
3868,
121,
6108,
6,
96,
7,
49,
440,
834,
115,
23,
17089,
342,
121,
16,
17,
6,
96,
2002,
5012,
1707,
834... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
1429,
21680,
953,
834,
9719,
834,
2555,
591,
549,
17444,
427,
41,
122,
3868,
3274,
3,
31,
13513,
31,
4674,
7285,
3274,
3,
31,
89,
15,
13513,
31,
61,
3430,
41,
545,
2490,
2423,
507,
3430,
1246,
3,
2,
2423,
2775,
... |
What is the greatest Total population (1000) from Sweden and born in a non EU state (1000) less than 859? | CREATE TABLE table_14535 (
"Country" text,
"Total population (1000)" real,
"Total Foreign-born (1000)" real,
"Born in other EU state (1000)" real,
"Born in a non EU state (1000)" real
) | SELECT MAX("Total population (1000)") FROM table_14535 WHERE "Country" = 'sweden' AND "Born in a non EU state (1000)" < '859' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
20987,
2469,
41,
96,
10628,
651,
121,
1499,
6,
96,
3696,
1947,
2074,
41,
16824,
61,
121,
490,
6,
96,
3696,
1947,
11957,
18,
7473,
41,
16824,
61,
121,
490,
6,
96,
279,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
121,
3696,
1947,
2074,
41,
16824,
61,
8512,
21680,
953,
834,
20987,
2469,
549,
17444,
427,
96,
10628,
651,
121,
3274,
3,
31,
7,
1123,
537,
31,
3430,
96,
279,
127,
29,
16,
3,
9,
529,
3371,
538,
41,
... |
How many losses for the team atl. colegiales? | CREATE TABLE table_18594107_2 (
losses INTEGER,
team VARCHAR
) | SELECT MAX(losses) FROM table_18594107_2 WHERE team = "Atl. Colegiales" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
21594,
4240,
18057,
834,
357,
41,
8467,
3,
21342,
17966,
6,
372,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
8467,
21,
8,
372,
44,
40,
5,
576,
8492,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4800,
4,
599,
2298,
2260,
61,
21680,
953,
834,
21594,
4240,
18057,
834,
357,
549,
17444,
427,
372,
3274,
96,
188,
17,
40,
5,
27469,
4529,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Which Remixed by has a Version of album version, and an Album of les mots? | CREATE TABLE table_name_80 (remixed_by VARCHAR, version VARCHAR, album VARCHAR) | SELECT remixed_by FROM table_name_80 WHERE version = "album version" AND album = "les mots" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2079,
41,
60,
13682,
15,
26,
834,
969,
584,
4280,
28027,
6,
988,
584,
4280,
28027,
6,
2306,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
419,
13682,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
3,
23143,
14196,
26063,
15,
26,
834,
969,
21680,
953,
834,
4350,
834,
2079,
549,
17444,
427,
988,
3274,
96,
23703,
988,
121,
3430,
2306,
3274,
96,
965,
16214,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What competition has 17-1 as the result? | CREATE TABLE table_name_38 (competition VARCHAR, result VARCHAR) | SELECT competition FROM table_name_38 WHERE result = "17-1" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3747,
41,
287,
4995,
4749,
584,
4280,
28027,
6,
741,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
2259,
65,
1003,
2292,
38,
8,
741,
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,
2259,
21680,
953,
834,
4350,
834,
3747,
549,
17444,
427,
741,
3274,
96,
2517,
2292,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the 1st Edition for Episode 11? | CREATE TABLE table_56142 (
"Episode" text,
"1st edition" text,
"2nd edition" text,
"3rd edition" text,
"4th edition" text
) | SELECT "1st edition" FROM table_56142 WHERE "Episode" = '11' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4834,
24978,
41,
96,
427,
102,
159,
32,
221,
121,
1499,
6,
96,
536,
7,
17,
4182,
121,
1499,
6,
96,
357,
727,
4182,
121,
1499,
6,
96,
519,
52,
26,
4182,
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,
536,
7,
17,
4182,
121,
21680,
953,
834,
4834,
24978,
549,
17444,
427,
96,
427,
102,
159,
32,
221,
121,
3274,
3,
31,
2596,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Which Tries has a Goal smaller than 0? | CREATE TABLE table_name_5 (tries INTEGER, goals INTEGER) | SELECT MIN(tries) FROM table_name_5 WHERE goals < 0 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
755,
41,
9000,
3,
21342,
17966,
6,
1766,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
4073,
332,
2593,
65,
3,
9,
17916,
2755,
145,
3,
632,
58,
1,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
9000,
61,
21680,
953,
834,
4350,
834,
755,
549,
17444,
427,
1766,
3,
2,
3,
632,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
How many game sites are there where the team record is 1 7? | CREATE TABLE table_25380472_2 (
game_site VARCHAR,
team_record VARCHAR
) | SELECT COUNT(game_site) FROM table_25380472_2 WHERE team_record = "1–7" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
22671,
4177,
357,
834,
357,
41,
467,
834,
3585,
584,
4280,
28027,
6,
372,
834,
60,
7621,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
467,
1471,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2847,
17161,
599,
7261,
834,
3585,
61,
21680,
953,
834,
1828,
22671,
4177,
357,
834,
357,
549,
17444,
427,
372,
834,
60,
7621,
3274,
96,
536,
104,
940,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
give the number of patients whose ethnicity is hispanic or latino and they have been given the drug sarna lotion. | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "HISPANIC OR LATINO" AND prescriptions.drug = "Sarna Lotion" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7690,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
2118,
23,
26,
1499,
6,
5059,
715,
1499,
6,
5692,
1499,
6,
701,
834,
15129,
1499,
6,
3783,
1499,
6,
5798,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7744,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7744,
7,
5,
8399,
51,
834,
23,
26,
549... |
how many male patients had the diagnosis long title microscopic hematuria? | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "M" AND diagnoses.long_title = "Microscopic hematuria" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
5... |
What is the high cap total for a lock with the vicenza rangers? | CREATE TABLE table_name_55 (
caps INTEGER,
position VARCHAR,
club_province VARCHAR
) | SELECT MAX(caps) FROM table_name_55 WHERE position = "lock" AND club_province = "vicenza rangers" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3769,
41,
16753,
3,
21342,
17966,
6,
1102,
584,
4280,
28027,
6,
1886,
834,
1409,
2494,
565,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
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,
4800,
4,
599,
4010,
7,
61,
21680,
953,
834,
4350,
834,
3769,
549,
17444,
427,
1102,
3274,
96,
4029,
121,
3430,
1886,
834,
1409,
2494,
565,
3274,
96,
7287,
35,
1629,
620,
52,
7,
121,
1,
-100,
-100,
-100,
-100,
-100... |
Find the checking balance of the accounts whose savings balance is higher than the average savings balance. | CREATE TABLE accounts (custid VARCHAR, name VARCHAR); CREATE TABLE checking (balance INTEGER, custid VARCHAR); CREATE TABLE savings (balance INTEGER, custid VARCHAR); CREATE TABLE savings (balance INTEGER) | SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name IN (SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT AVG(balance) FROM savings)) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3744,
41,
1071,
2248,
26,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
6450,
41,
3849,
663,
3,
21342,
17966,
6,
123,
2248,
26,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
332,
4416,
3849,
663,
21680,
3744,
6157,
332,
536,
3,
15355,
3162,
6450,
6157,
332,
357,
9191,
332,
5411,
1071,
2248,
26,
3274,
332,
4416,
1071,
2248,
26,
549,
17444,
427,
332,
5411,
4350,
3388,
41,
23143,
14196,
332,... |
Which format is released on May 27, 2009? | CREATE TABLE table_name_77 (format VARCHAR, date VARCHAR) | SELECT format FROM table_name_77 WHERE date = "may 27, 2009" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4013,
41,
8995,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
1910,
19,
1883,
30,
932,
14141,
2464,
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,
1910,
21680,
953,
834,
4350,
834,
4013,
549,
17444,
427,
833,
3274,
96,
13726,
14141,
2464,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Who did they lose to on May 20? | CREATE TABLE table_15609 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Record" text
) | SELECT "Loss" FROM table_15609 WHERE "Date" = 'may 20' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
25463,
4198,
41,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
434,
32,
7,
7,
121,
1499,
6,
96,
1649,
7621,
121,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
3,
23143,
14196,
96,
434,
32,
7,
7,
121,
21680,
953,
834,
25463,
4198,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
13726,
460,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
count the number of patients less than 49 years who have diagnoses icd9 code 29590. | 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 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
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "49" AND diagnoses.icd9_code = "29590" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
5... |
What record has detroit as the home and mtl. maroons as the visitor? | CREATE TABLE table_74955 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Record" text
) | SELECT "Record" FROM table_74955 WHERE "Home" = 'detroit' AND "Visitor" = 'mtl. maroons' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4581,
3301,
755,
41,
96,
308,
342,
121,
1499,
6,
96,
553,
159,
155,
127,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
19040,
121,
1499,
6,
96,
1649,
7621,
121,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
1649,
7621,
121,
21680,
953,
834,
4581,
3301,
755,
549,
17444,
427,
96,
19040,
121,
3274,
3,
31,
26,
15252,
155,
31,
3430,
96,
553,
159,
155,
127,
121,
3274,
3,
31,
51,
17,
40,
5,
3157,
32,
106,
7,
31,
1,
... |
Name the date that is a cd | CREATE TABLE table_name_81 (
date VARCHAR,
format VARCHAR
) | SELECT date FROM table_name_81 WHERE format = "cd" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4959,
41,
833,
584,
4280,
28027,
6,
1910,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
833,
24,
19,
3,
9,
3,
75,
26,
1,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
833,
21680,
953,
834,
4350,
834,
4959,
549,
17444,
427,
1910,
3274,
96,
75,
26,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What Type of Tunnel is the Downhill Tunnel? | CREATE TABLE table_name_78 (type VARCHAR, tunnel VARCHAR) | SELECT type FROM table_name_78 WHERE tunnel = "downhill" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3940,
41,
6137,
584,
4280,
28027,
6,
11916,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
6632,
13,
27990,
19,
8,
7309,
6321,
27990,
58,
1,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
686,
21680,
953,
834,
4350,
834,
3940,
549,
17444,
427,
11916,
3274,
96,
3035,
6321,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
name the film from 2008 under the publisher dc comics that grossed over $ 10,000,000 and was distributed by lionsgate . | CREATE TABLE table_203_79 (
id number,
"year" number,
"film" text,
"publisher" text,
"director" text,
"distributor" text,
"worldwide gross" text,
"notes" text
) | SELECT "film" FROM table_203_79 WHERE "year" = 2008 AND "publisher" = 'dc comics' AND "worldwide gross" > 10000000 AND "distributor" = 'lionsgate' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
4440,
41,
3,
23,
26,
381,
6,
96,
1201,
121,
381,
6,
96,
9988,
121,
1499,
6,
96,
29337,
49,
121,
1499,
6,
96,
25982,
121,
1499,
6,
96,
26,
159,
5135,
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,
1... | [
3,
23143,
14196,
96,
9988,
121,
21680,
953,
834,
23330,
834,
4440,
549,
17444,
427,
96,
1201,
121,
3274,
2628,
3430,
96,
29337,
49,
121,
3274,
3,
31,
26,
75,
7967,
7,
31,
3430,
96,
7276,
6728,
8690,
121,
2490,
5580,
19568,
3430,
9... |
What players attended missouri? | CREATE TABLE table_16494599_3 (
player VARCHAR,
school_club_team VARCHAR
) | SELECT player FROM table_16494599_3 WHERE school_club_team = "Missouri" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2938,
3647,
2128,
3264,
834,
519,
41,
1959,
584,
4280,
28027,
6,
496,
834,
13442,
834,
11650,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
1508,
5526,
3041,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1959,
21680,
953,
834,
2938,
3647,
2128,
3264,
834,
519,
549,
17444,
427,
496,
834,
13442,
834,
11650,
3274,
96,
329,
159,
7,
32,
459,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who has a religion of and more than 1853 votes? | CREATE TABLE table_name_66 (
candidate_name VARCHAR,
votes VARCHAR,
religion VARCHAR
) | SELECT candidate_name FROM table_name_66 WHERE votes > 1853 AND religion = "☪" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3539,
41,
4775,
834,
4350,
584,
4280,
28027,
6,
11839,
584,
4280,
28027,
6,
5562,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
65,
3,
9,
5562,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4775,
834,
4350,
21680,
953,
834,
4350,
834,
3539,
549,
17444,
427,
11839,
2490,
507,
4867,
3430,
5562,
3274,
96,
2,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
count the number of patients whose drug code is vanc250l? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "VANC250L" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7690,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
2118,
23,
26,
1499,
6,
5059,
715,
1499,
6,
5692,
1499,
6,
701,
834,
15129,
1499,
6,
3783,
1499,
6,
5798,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7744,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7744,
7,
5,
8399,
51,
834,
23,
26,
549... |
what date saw the chicago bears lose in green bay earlier than 1931? | CREATE TABLE table_name_12 (
date VARCHAR,
year VARCHAR,
loser VARCHAR,
location VARCHAR
) | SELECT date FROM table_name_12 WHERE loser = "chicago bears" AND location = "green bay" AND year < 1931 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2122,
41,
833,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
6,
2615,
52,
584,
4280,
28027,
6,
1128,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
125,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
3,
23143,
14196,
833,
21680,
953,
834,
4350,
834,
2122,
549,
17444,
427,
2615,
52,
3274,
96,
1436,
658,
839,
4595,
7,
121,
3430,
1128,
3274,
96,
9423,
10210,
121,
3430,
215,
3,
2,
957,
3341,
1,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is Year(s) Won, when To Par is greater than 13? | CREATE TABLE table_name_24 (year_s__won VARCHAR, to_par INTEGER) | SELECT year_s__won FROM table_name_24 WHERE to_par > 13 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2266,
41,
1201,
834,
7,
834,
834,
210,
106,
584,
4280,
28027,
6,
12,
834,
1893,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
2929,
599,
7,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
215,
834,
7,
834,
834,
210,
106,
21680,
953,
834,
4350,
834,
2266,
549,
17444,
427,
12,
834,
1893,
2490,
1179,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.