NATURAL_LANG stringlengths 0 446 | SCHEMA stringlengths 27 2.21k | SQL stringlengths 18 453 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|
What are the codes corresponding to document types for which there are less than 3 documents? | CREATE TABLE ref_document_types (
document_type_code text,
document_type_name text,
document_type_description text
)
CREATE TABLE documents_with_expenses (
document_id number,
budget_type_code text,
document_details text
)
CREATE TABLE projects (
project_id number,
project_details text
)
CREATE TABLE documents (
document_id number,
document_type_code text,
project_id number,
document_date time,
document_name text,
document_description text,
other_details text
)
CREATE TABLE ref_budget_codes (
budget_type_code text,
budget_type_description text
)
CREATE TABLE statements (
statement_id number,
statement_details text
)
CREATE TABLE accounts (
account_id number,
statement_id number,
account_details text
) | SELECT document_type_code FROM documents GROUP BY document_type_code HAVING COUNT(*) < 3 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
6273,
834,
28244,
834,
6137,
7,
41,
1708,
834,
6137,
834,
4978,
1499,
6,
1708,
834,
6137,
834,
4350,
1499,
6,
1708,
834,
6137,
834,
221,
11830,
1499,
3,
61,
3,
32102,
32103,
32102,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
1708,
834,
6137,
834,
4978,
21680,
2691,
350,
4630,
6880,
272,
476,
1708,
834,
6137,
834,
4978,
454,
6968,
2365,
2847,
17161,
599,
1935,
61,
3,
2,
220,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the circuit for Team Peter Jackson Racing in the ATCC Round 4 series? | CREATE TABLE table_name_64 (
circuit VARCHAR,
team VARCHAR,
series VARCHAR
) | SELECT circuit FROM table_name_64 WHERE team = "peter jackson racing" AND series = "atcc round 4" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4389,
41,
4558,
584,
4280,
28027,
6,
372,
584,
4280,
28027,
6,
939,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
4558,
21,
2271,
2737,
771... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4558,
21680,
953,
834,
4350,
834,
4389,
549,
17444,
427,
372,
3274,
96,
4995,
49,
3,
9325,
739,
8191,
121,
3430,
939,
3274,
96,
144,
75,
75,
1751,
3,
20364,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name the state and federal when property taxes is 17,199,210 | CREATE TABLE table_11608735_3 (state_ VARCHAR, _federal VARCHAR, property_taxes VARCHAR) | SELECT state_ & _federal FROM table_11608735_3 WHERE property_taxes = "17,199,210" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2596,
3328,
4225,
2469,
834,
519,
41,
5540,
834,
584,
4280,
28027,
6,
3,
834,
16812,
138,
584,
4280,
28027,
6,
785,
834,
14727,
15,
7,
584,
4280,
28027,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
538,
834,
3,
184,
3,
834,
16812,
138,
21680,
953,
834,
2596,
3328,
4225,
2469,
834,
519,
549,
17444,
427,
785,
834,
14727,
15,
7,
3274,
96,
2517,
6,
19479,
6,
15239,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What are the details and opening hours of the museums? | CREATE TABLE TOURIST_ATTRACTIONS (
Opening_Hours VARCHAR,
Tourist_Attraction_ID VARCHAR
)
CREATE TABLE MUSEUMS (
Museum_Details VARCHAR,
Museum_ID VARCHAR
) | SELECT T1.Museum_Details, T2.Opening_Hours FROM MUSEUMS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Museum_ID = T2.Tourist_Attraction_ID | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
332,
9131,
13582,
834,
24642,
448,
30518,
134,
41,
20360,
834,
4489,
3589,
584,
4280,
28027,
6,
21375,
834,
188,
17,
10559,
834,
4309,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
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,
332,
5411,
329,
1074,
440,
834,
2962,
5756,
7,
6,
332,
4416,
22696,
53,
834,
4489,
3589,
21680,
283,
11927,
6122,
134,
6157,
332,
536,
3,
15355,
3162,
332,
9131,
13582,
834,
24642,
448,
30518,
134,
6157,
332,
357,
9... |
What is Russia's time with a heat higher than 3? | CREATE TABLE table_name_21 (time VARCHAR, nationality VARCHAR, heat VARCHAR) | SELECT time FROM table_name_21 WHERE nationality = "russia" AND heat > 3 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2658,
41,
715,
584,
4280,
28027,
6,
1157,
485,
584,
4280,
28027,
6,
1678,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
4623,
31,
7,
97,
28,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
97,
21680,
953,
834,
4350,
834,
2658,
549,
17444,
427,
1157,
485,
3274,
96,
26165,
121,
3430,
1678,
2490,
220,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What are all the instruments used? | CREATE TABLE Instruments (instrument VARCHAR) | SELECT DISTINCT instrument FROM Instruments | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
13507,
7,
41,
25232,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
33,
66,
8,
7778,
261,
58,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
15438,
25424,
6227,
5009,
21680,
13507,
7,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the points number when rebounds is 4.4? | CREATE TABLE table_20107762_1 (
points VARCHAR,
rebounds VARCHAR
) | SELECT points FROM table_20107762_1 WHERE rebounds = "4.4" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
14926,
4013,
4056,
834,
536,
41,
979,
584,
4280,
28027,
6,
3,
23768,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
979,
381,
116,
3,
23768,
19,
3,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
979,
21680,
953,
834,
14926,
4013,
4056,
834,
536,
549,
17444,
427,
3,
23768,
3274,
96,
23444,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what was the first opera composed in the 1900s ? | CREATE TABLE table_204_354 (
id number,
"opus" text,
"title" text,
"genre" text,
"sub\u00addivisions" text,
"libretto" text,
"composition" text,
"premiere date" text,
"place, theatre" text
) | SELECT "title" FROM table_204_354 WHERE "composition" >= 1900 ORDER BY "composition" LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
2469,
591,
41,
3,
23,
26,
381,
6,
96,
32,
7800,
121,
1499,
6,
96,
21869,
121,
1499,
6,
96,
729,
60,
121,
1499,
6,
96,
7304,
2,
76,
1206,
13039,
23,
6610,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
21869,
121,
21680,
953,
834,
26363,
834,
2469,
591,
549,
17444,
427,
96,
287,
4718,
121,
2490,
2423,
19036,
4674,
11300,
272,
476,
96,
287,
4718,
121,
8729,
12604,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Name the sum of points with games less than 5 | CREATE TABLE table_name_25 (points INTEGER, games INTEGER) | SELECT SUM(points) FROM table_name_25 WHERE games < 5 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1828,
41,
2700,
7,
3,
21342,
17966,
6,
1031,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
4505,
13,
979,
28,
1031,
705,
145,
305,
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,
180,
6122,
599,
2700,
7,
61,
21680,
953,
834,
4350,
834,
1828,
549,
17444,
427,
1031,
3,
2,
305,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
On what Date is West Ham United the Home team? | CREATE TABLE table_name_35 (
date VARCHAR,
home_team VARCHAR
) | SELECT date FROM table_name_35 WHERE home_team = "west ham united" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2469,
41,
833,
584,
4280,
28027,
6,
234,
834,
11650,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
461,
125,
7678,
19,
1244,
5845,
907,
8,
1210,
372,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
833,
21680,
953,
834,
4350,
834,
2469,
549,
17444,
427,
234,
834,
11650,
3274,
96,
12425,
3,
1483,
18279,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
For those records from the products and each product's manufacturer, show me about the distribution of name and revenue , and group by attribute founder in a bar chart. | CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | SELECT T1.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
15248,
7,
41,
3636,
3,
21342,
17966,
6,
5570,
584,
4280,
28027,
599,
25502,
201,
3642,
19973,
584,
4280,
28027,
599,
25502,
201,
3,
19145,
584,
4280,
28027,
599,
25502,
201,
19764,
17833... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
332,
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,
3,
191... |
Provide me the number of patients on collagenase ointment prescription who stayed in the hospital for more than 6 days. | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "6" AND prescriptions.drug = "Collagenase Ointment" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
14798,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
564,
1499,
6,
2774,
1947,
834,
8547,
302,
1499,
6,
1246,
1499,
6,
103,
115,
1499,
6,
7285,
1499,
6,
1612,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7744,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7744,
7,
5,
8399,
51,
834,
23,
26,
549... |
What is the lowest average for number 2? | CREATE TABLE table_name_12 (
average_score INTEGER,
number VARCHAR
) | SELECT MIN(average_score) FROM table_name_12 WHERE number = 2 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2122,
41,
1348,
834,
7,
9022,
3,
21342,
17966,
6,
381,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
7402,
1348,
21,
381,
204,
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,
3,
17684,
599,
28951,
834,
7,
9022,
61,
21680,
953,
834,
4350,
834,
2122,
549,
17444,
427,
381,
3274,
204,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Which Emission (in nanometers) has an absorbtion of 593 nm? | CREATE TABLE table_name_6 (
emit__nm_ VARCHAR,
absorb__nm_ VARCHAR
) | SELECT emit__nm_ FROM table_name_6 WHERE absorb__nm_ = "593" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
948,
41,
15685,
834,
834,
29,
51,
834,
584,
4280,
28027,
6,
8074,
834,
834,
29,
51,
834,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
262,
5451,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
15685,
834,
834,
29,
51,
834,
21680,
953,
834,
4350,
834,
948,
549,
17444,
427,
8074,
834,
834,
29,
51,
834,
3274,
96,
3390,
519,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Which Matches have a Tally of 1-38? | CREATE TABLE table_64993 (
"Rank" real,
"Player" text,
"County" text,
"Tally" text,
"Total" real,
"Matches" real,
"Average" real
) | SELECT "Matches" FROM table_64993 WHERE "Tally" = '1-38' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4389,
3264,
519,
41,
96,
22557,
121,
490,
6,
96,
15800,
49,
121,
1499,
6,
96,
10628,
63,
121,
1499,
6,
96,
382,
1427,
121,
1499,
6,
96,
3696,
1947,
121,
490,
6,
96,
329... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
329,
144,
2951,
121,
21680,
953,
834,
4389,
3264,
519,
549,
17444,
427,
96,
382,
1427,
121,
3274,
3,
31,
16737,
927,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
How many scorecards are there for the match on October 28? | CREATE TABLE table_23080 (
"Scorecard" real,
"Date" text,
"Venue" text,
"Team 1" text,
"Team 2" text,
"Result" text,
"Man of the Match" text
) | SELECT COUNT("Scorecard") FROM table_23080 WHERE "Date" = 'October 28' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
13427,
2079,
41,
96,
134,
9022,
6043,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
553,
35,
76,
15,
121,
1499,
6,
96,
18699,
209,
121,
1499,
6,
96,
18699,
204,
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,
134,
9022,
6043,
8512,
21680,
953,
834,
13427,
2079,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
28680,
2059,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
During what year was Wicked associated with the Green Room Awards? | CREATE TABLE table_name_44 (year VARCHAR, production VARCHAR, award VARCHAR) | SELECT year FROM table_name_44 WHERE production = "wicked" AND award = "green room awards" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3628,
41,
1201,
584,
4280,
28027,
6,
999,
584,
4280,
28027,
6,
2760,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
3,
2092,
125,
215,
47,
18602,
15,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
215,
21680,
953,
834,
4350,
834,
3628,
549,
17444,
427,
999,
3274,
96,
5981,
15,
26,
121,
3430,
2760,
3274,
96,
9423,
562,
6120,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the highest points value for 1962, in the 125cc class, and with 0 wins? | CREATE TABLE table_name_66 (points INTEGER, wins VARCHAR, year VARCHAR, class VARCHAR) | SELECT MAX(points) FROM table_name_66 WHERE year = 1962 AND class = "125cc" AND wins < 0 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3539,
41,
2700,
7,
3,
21342,
17966,
6,
9204,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
6,
853,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
2700,
7,
61,
21680,
953,
834,
4350,
834,
3539,
549,
17444,
427,
215,
3274,
20236,
3430,
853,
3274,
96,
10124,
75,
75,
121,
3430,
9204,
3,
2,
3,
632,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Name the total number of date for 10 | CREATE TABLE table_3069 (
"Round" real,
"Date" text,
"Country" text,
"Circuit" text,
"Sprint Winner" text,
"Main Winner" text,
"Report" text
) | SELECT COUNT("Date") FROM table_3069 WHERE "Round" = '10' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1458,
3951,
41,
96,
448,
32,
1106,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
254,
23,
52,
21560,
121,
1499,
6,
96,
134,
7260,
18125,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
308,
342,
8512,
21680,
953,
834,
1458,
3951,
549,
17444,
427,
96,
448,
32,
1106,
121,
3274,
3,
31,
1714,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
what is the number of patients with marital status single with the procedure insertion of one vascular stent? | 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 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
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "SINGLE" AND procedures.long_title = "Insertion of one vascular stent" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
What is the bowling style of the player whose first class team is Islamabad and has a date of birth of 28 February 1975? | CREATE TABLE table_name_72 (bowling_style VARCHAR, first_class_team VARCHAR, date_of_birth VARCHAR) | SELECT bowling_style FROM table_name_72 WHERE first_class_team = "islamabad" AND date_of_birth = "28 february 1975" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5865,
41,
17710,
697,
834,
4084,
584,
4280,
28027,
6,
166,
834,
4057,
834,
11650,
584,
4280,
28027,
6,
833,
834,
858,
834,
20663,
584,
4280,
28027,
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,
3047,
53,
834,
4084,
21680,
953,
834,
4350,
834,
5865,
549,
17444,
427,
166,
834,
4057,
834,
11650,
3274,
96,
20290,
9,
5514,
121,
3430,
833,
834,
858,
834,
20663,
3274,
96,
2577,
29976,
76,
1208,
16312,
121,
1,
-10... |
which cfl team has the most picks in round four ? | CREATE TABLE table_203_676 (
id number,
"pick #" number,
"cfl team" text,
"player" text,
"position" text,
"college" text
) | SELECT "cfl team" FROM table_203_676 GROUP BY "cfl team" ORDER BY COUNT(*) DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
3708,
948,
41,
3,
23,
26,
381,
6,
96,
17967,
1713,
121,
381,
6,
96,
75,
89,
40,
372,
121,
1499,
6,
96,
20846,
121,
1499,
6,
96,
4718,
121,
1499,
6,
96,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
75,
89,
40,
372,
121,
21680,
953,
834,
23330,
834,
3708,
948,
350,
4630,
6880,
272,
476,
96,
75,
89,
40,
372,
121,
4674,
11300,
272,
476,
2847,
17161,
599,
1935,
61,
309,
25067,
8729,
12604,
209,
1,
-100,
-100... |
How many points have pittsburgh as the visitor, and philadelphia as the home? | CREATE TABLE table_name_38 (
points VARCHAR,
visitor VARCHAR,
home VARCHAR
) | SELECT COUNT(points) FROM table_name_38 WHERE visitor = "pittsburgh" AND home = "philadelphia" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3747,
41,
979,
584,
4280,
28027,
6,
7019,
584,
4280,
28027,
6,
234,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
979,
43,
7688,
17,
7289,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2847,
17161,
599,
2700,
7,
61,
21680,
953,
834,
4350,
834,
3747,
549,
17444,
427,
7019,
3274,
96,
5230,
17,
7289,
107,
121,
3430,
234,
3274,
96,
18118,
15311,
11692,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
After the 2013 season, what was the fewest number of games that Willis McGahee played in a single season? | CREATE TABLE table_name_81 (games INTEGER, year INTEGER) | SELECT MIN(games) FROM table_name_81 WHERE year > 2013 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4959,
41,
7261,
7,
3,
21342,
17966,
6,
215,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
621,
8,
2038,
774,
6,
125,
47,
8,
360,
222,
381,
13,
1031,
24,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
7261,
7,
61,
21680,
953,
834,
4350,
834,
4959,
549,
17444,
427,
215,
2490,
2038,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Evening gown scores of participants with 8.988 swimsuit score | CREATE TABLE table_21279 (
"Country" text,
"Preliminary" text,
"Interview" text,
"Swimsuit" text,
"Evening Gown" text,
"Average" text
) | SELECT "Evening Gown" FROM table_21279 WHERE "Swimsuit" = '8.988' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
24837,
4440,
41,
96,
10628,
651,
121,
1499,
6,
96,
10572,
4941,
77,
1208,
121,
1499,
6,
96,
17555,
4576,
121,
1499,
6,
96,
134,
210,
603,
7628,
121,
1499,
6,
96,
427,
192... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
427,
1926,
53,
350,
9197,
121,
21680,
953,
834,
24837,
4440,
549,
17444,
427,
96,
134,
210,
603,
7628,
121,
3274,
3,
31,
927,
5,
3916,
927,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What are the lowest points for the engines of the Lamborghini v12 and the Chassis on Minardi m191b? | CREATE TABLE table_name_48 (
points INTEGER,
engine VARCHAR,
chassis VARCHAR
) | SELECT MIN(points) FROM table_name_48 WHERE engine = "lamborghini v12" AND chassis = "minardi m191b" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3707,
41,
979,
3,
21342,
17966,
6,
1948,
584,
4280,
28027,
6,
22836,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
33,
8,
7402,
979,
21,
8,
7277,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2700,
7,
61,
21680,
953,
834,
4350,
834,
3707,
549,
17444,
427,
1948,
3274,
96,
40,
265,
23685,
2907,
23,
3,
208,
2122,
121,
3430,
22836,
3274,
96,
1109,
986,
23,
3,
51,
2294,
536,
115,
121,
1,
-1... |
How many appearances for psv eindhoven ranked above 11? | CREATE TABLE table_10876 (
"Rank" real,
"Name" text,
"Team" text,
"Goals" real,
"Appearances" real,
"Minutes played" text
) | SELECT SUM("Appearances") FROM table_10876 WHERE "Team" = 'psv eindhoven' AND "Rank" < '11' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
16169,
3959,
41,
96,
22557,
121,
490,
6,
96,
23954,
121,
1499,
6,
96,
18699,
121,
1499,
6,
96,
6221,
5405,
121,
490,
6,
96,
9648,
2741,
663,
7,
121,
490,
6,
96,
12858,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
121,
9648,
2741,
663,
7,
8512,
21680,
953,
834,
16169,
3959,
549,
17444,
427,
96,
18699,
121,
3274,
3,
31,
102,
7,
208,
236,
26,
23304,
35,
31,
3430,
96,
22557,
121,
3,
2,
3,
31,
2596,
31,
1,
-... |
How many values of top 10 for 5th position? | CREATE TABLE table_2597876_2 (
top_10 VARCHAR,
position VARCHAR
) | SELECT COUNT(top_10) FROM table_2597876_2 WHERE position = "5th" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
21441,
3959,
834,
357,
41,
420,
834,
1714,
584,
4280,
28027,
6,
1102,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
2620,
13,
420,
335,
21,
305,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
2916,
834,
16968,
21680,
953,
834,
1828,
21441,
3959,
834,
357,
549,
17444,
427,
1102,
3274,
96,
755,
189,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What's the title of the episode with a production code 136? | CREATE TABLE table_12226390_6 (title VARCHAR, production_code VARCHAR) | SELECT title FROM table_12226390_6 WHERE production_code = 136 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2122,
2884,
3891,
2394,
834,
948,
41,
21869,
584,
4280,
28027,
6,
999,
834,
4978,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
31,
7,
8,
2233,
13,
8,
5640,
28,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2233,
21680,
953,
834,
2122,
2884,
3891,
2394,
834,
948,
549,
17444,
427,
999,
834,
4978,
3274,
3,
23459,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many innings had a total of 2 catches and 0 stumpings? | CREATE TABLE table_13337302_16 (
innings VARCHAR,
catches VARCHAR,
stumpings VARCHAR
) | SELECT COUNT(innings) FROM table_13337302_16 WHERE catches = 2 AND stumpings = 0 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
22974,
4118,
1458,
357,
834,
2938,
41,
19714,
584,
4280,
28027,
6,
3,
23386,
584,
4280,
28027,
6,
27879,
53,
7,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
10503,
7,
61,
21680,
953,
834,
22974,
4118,
1458,
357,
834,
2938,
549,
17444,
427,
3,
23386,
3274,
204,
3430,
27879,
53,
7,
3274,
3,
632,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
what is the number of patients whose admission type is urgent and drug type is base? | 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
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "URGENT" AND prescriptions.drug_type = "BASE" | [
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,
7744,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7744,
7,
5,
8399,
51,
834,
23,
26,
549... |
When thomas l fkvist is the general classification who is the winner? | CREATE TABLE table_73046 (
"Stage" real,
"Winner" text,
"General classification" text,
"Points classification" text,
"Mountains classification" text,
"Young rider classification" text
) | SELECT "Winner" FROM table_73046 WHERE "General classification" = 'Thomas Löfkvist' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
940,
1458,
4448,
41,
96,
134,
6505,
121,
490,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
18455,
687,
121,
21680,
953,
834,
940,
1458,
4448,
549,
17444,
427,
96,
20857,
13774,
121,
3274,
3,
31,
8991,
32,
2754,
301,
1872,
89,
157,
3466,
17,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What position was the player who was inducted into the Pro Football Hall of Fame in 1980? | CREATE TABLE table_29500 (
"Number" real,
"Player" text,
"Position" text,
"Seasons by team" text,
"Year of induction into Pro Football Hall of Fame" text
) | SELECT "Position" FROM table_29500 WHERE "Year of induction into Pro Football Hall of Fame" = '1980' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3166,
2560,
41,
96,
567,
5937,
49,
121,
490,
6,
96,
15800,
49,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
134,
15,
9,
6577,
57,
372,
121,
1499,
6,
96,
476,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
345,
32,
7,
4749,
121,
21680,
953,
834,
3166,
2560,
549,
17444,
427,
96,
476,
2741,
13,
16,
8291,
139,
749,
10929,
2501,
13,
20758,
121,
3274,
3,
31,
2294,
2079,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the to par of the player with a t4 place and a score of 75-69-74-72=290? | CREATE TABLE table_name_46 (to_par VARCHAR, place VARCHAR, score VARCHAR) | SELECT to_par FROM table_name_46 WHERE place = "t4" AND score = 75 - 69 - 74 - 72 = 290 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4448,
41,
235,
834,
1893,
584,
4280,
28027,
6,
286,
584,
4280,
28027,
6,
2604,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
12,
260,
13,
8,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
12,
834,
1893,
21680,
953,
834,
4350,
834,
4448,
549,
17444,
427,
286,
3274,
96,
17,
20364,
3430,
2604,
3274,
6374,
3,
18,
3,
3951,
3,
18,
3,
4581,
3,
18,
9455,
3274,
3,
23838,
1,
-100,
-100,
-100,
-100,
-100,
-... |
What is the average year joined of the 277 county? | CREATE TABLE table_name_43 (
year_joined INTEGER,
county VARCHAR
) | SELECT AVG(year_joined) FROM table_name_43 WHERE county = 277 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4906,
41,
215,
834,
1927,
630,
26,
3,
21342,
17966,
6,
5435,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1348,
215,
3311,
13,
8,
204,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
71,
17217,
599,
1201,
834,
1927,
630,
26,
61,
21680,
953,
834,
4350,
834,
4906,
549,
17444,
427,
5435,
3274,
204,
4013,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Draw a bar chart about the distribution of All_Home and School_ID , and group by attribute ACC_Road, rank in desc by the x axis. | CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
) | SELECT All_Home, School_ID FROM basketball_match GROUP BY ACC_Road, All_Home ORDER BY All_Home DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3819,
41,
1121,
834,
4309,
16,
17,
6,
1121,
1499,
6,
10450,
1499,
6,
3,
20100,
490,
6,
71,
89,
8027,
23,
257,
1499,
6,
695,
4046,
297,
490,
6,
7486,
4350,
1499,
6,
14542,
834,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
432,
834,
19040,
6,
1121,
834,
4309,
21680,
8498,
834,
19515,
350,
4630,
6880,
272,
476,
3,
14775,
834,
448,
32,
9,
26,
6,
432,
834,
19040,
4674,
11300,
272,
476,
432,
834,
19040,
309,
25067,
1,
-100,
-100,
-100,
... |
What is the total number of positions with less than 10 points, more than 7 qualifying, ret value in Race 1, and Jonathan Grant driving? | CREATE TABLE table_name_51 (pos VARCHAR, driver VARCHAR, race_1 VARCHAR, points VARCHAR, qualifying VARCHAR) | SELECT COUNT(pos) FROM table_name_51 WHERE points < 10 AND qualifying > 7 AND race_1 = "ret" AND driver = "jonathan grant" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5553,
41,
2748,
584,
4280,
28027,
6,
2535,
584,
4280,
28027,
6,
1964,
834,
536,
584,
4280,
28027,
6,
979,
584,
4280,
28027,
6,
18002,
584,
4280,
28027,
61,
3,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
2748,
61,
21680,
953,
834,
4350,
834,
5553,
549,
17444,
427,
979,
3,
2,
335,
3430,
18002,
2490,
489,
3430,
1964,
834,
536,
3274,
96,
60,
17,
121,
3430,
2535,
3274,
96,
15429,
9,
6736,
5334,
121,
... |
What was the venue when Jerran Hart won? | CREATE TABLE table_name_20 (
venue VARCHAR,
winner VARCHAR
) | SELECT venue FROM table_name_20 WHERE winner = "jerran hart" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1755,
41,
5669,
584,
4280,
28027,
6,
4668,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
5669,
116,
446,
49,
2002,
10498,
751,
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,
5669,
21680,
953,
834,
4350,
834,
1755,
549,
17444,
427,
4668,
3274,
96,
12488,
2002,
12479,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Tell me the total number of years for wins less than 2 and class of 50cc with points of 15 | CREATE TABLE table_name_4 (year VARCHAR, points VARCHAR, wins VARCHAR, class VARCHAR) | SELECT COUNT(year) FROM table_name_4 WHERE wins < 2 AND class = "50cc" AND points = 15 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
591,
41,
1201,
584,
4280,
28027,
6,
979,
584,
4280,
28027,
6,
9204,
584,
4280,
28027,
6,
853,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
8779,
140,
8,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
1201,
61,
21680,
953,
834,
4350,
834,
591,
549,
17444,
427,
9204,
3,
2,
204,
3430,
853,
3274,
96,
1752,
75,
75,
121,
3430,
979,
3274,
627,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which contestant was sponsored by Yogurt Vita Slim? | CREATE TABLE table_30271 (
"Represent" real,
"Contestant" text,
"Age" real,
"Height" text,
"Hometown" text,
"Sponsor" text
) | SELECT "Contestant" FROM table_30271 WHERE "Sponsor" = 'Yogurt Vita Slim' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1458,
2555,
536,
41,
96,
1649,
12640,
121,
490,
6,
96,
4302,
4377,
288,
121,
1499,
6,
96,
188,
397,
121,
490,
6,
96,
3845,
2632,
121,
1499,
6,
96,
19040,
3540,
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,
4302,
4377,
288,
121,
21680,
953,
834,
1458,
2555,
536,
549,
17444,
427,
96,
134,
5041,
7,
127,
121,
3274,
3,
31,
476,
32,
7840,
17,
11491,
9,
24486,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What station on the network is tv3? | CREATE TABLE table_160728_4 (network VARCHAR, station VARCHAR) | SELECT network FROM table_160728_4 WHERE station = "TV3" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2938,
4560,
2577,
834,
591,
41,
1582,
1981,
584,
4280,
28027,
6,
2478,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
2478,
30,
8,
1229,
19,
3,
17,
208,
519,
58,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1229,
21680,
953,
834,
2938,
4560,
2577,
834,
591,
549,
17444,
427,
2478,
3274,
96,
4562,
519,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the Score that has a Winnipeg Jets as Visitor on april 7? | CREATE TABLE table_70440 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Record" text
) | SELECT "Score" FROM table_70440 WHERE "Visitor" = 'winnipeg jets' AND "Date" = 'april 7' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2518,
22335,
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,
3,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
134,
9022,
121,
21680,
953,
834,
2518,
22335,
549,
17444,
427,
96,
553,
159,
155,
127,
121,
3274,
3,
31,
3757,
29,
23,
855,
122,
8757,
7,
31,
3430,
96,
308,
342,
121,
3274,
3,
31,
9,
2246,
40,
489,
31,
1,
... |
How many grids had a Time/Retired of +4 laps? | CREATE TABLE table_name_72 (grid VARCHAR, time_retired VARCHAR) | SELECT COUNT(grid) FROM table_name_72 WHERE time_retired = "+4 laps" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
5865,
41,
3496,
26,
584,
4280,
28027,
6,
97,
834,
10682,
1271,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
8634,
7,
141,
3,
9,
2900,
87,
1649,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3496,
26,
61,
21680,
953,
834,
4350,
834,
5865,
549,
17444,
427,
97,
834,
10682,
1271,
3274,
96,
1220,
591,
14941,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Show all book categories and the number of books in each category. | CREATE TABLE book_club (
book_club_id int,
Year int,
Author_or_Editor text,
Book_Title text,
Publisher text,
Category text,
Result text
)
CREATE TABLE movie (
movie_id int,
Title text,
Year int,
Director text,
Budget_million real,
Gross_worldwide int
)
CREATE TABLE culture_company (
Company_name text,
Type text,
Incorporated_in text,
Group_Equity_Shareholding real,
book_club_id text,
movie_id text
) | SELECT Category, COUNT(*) FROM book_club GROUP BY Category | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
484,
834,
13442,
41,
484,
834,
13442,
834,
23,
26,
16,
17,
6,
2929,
16,
17,
6,
10236,
834,
127,
834,
26527,
127,
1499,
6,
3086,
834,
382,
155,
109,
1499,
6,
19816,
1499,
6,
17459,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
17459,
6,
2847,
17161,
599,
1935,
61,
21680,
484,
834,
13442,
350,
4630,
6880,
272,
476,
17459,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What sport in the 1960 Rome Games did Pakistan play in the Men's Freestyle Welterweight? | CREATE TABLE table_name_56 (
sport VARCHAR,
games VARCHAR,
event VARCHAR
) | SELECT sport FROM table_name_56 WHERE games = "1960 rome" AND event = "men's freestyle welterweight" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4834,
41,
2600,
584,
4280,
28027,
6,
1031,
584,
4280,
28027,
6,
605,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
2600,
16,
8,
8754,
7332,
5880,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2600,
21680,
953,
834,
4350,
834,
4834,
549,
17444,
427,
1031,
3274,
96,
2294,
3328,
3,
11956,
121,
3430,
605,
3274,
96,
904,
31,
7,
339,
4084,
3,
9304,
49,
9378,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which January has a Record of 28–14–8? | CREATE TABLE table_name_17 (january VARCHAR, record VARCHAR) | SELECT january FROM table_name_17 WHERE record = "28–14–8" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2517,
41,
7066,
76,
1208,
584,
4280,
28027,
6,
1368,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
1762,
65,
3,
9,
11392,
13,
2059,
104,
2534,
104,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
7066,
76,
1208,
21680,
953,
834,
4350,
834,
2517,
549,
17444,
427,
1368,
3274,
96,
2577,
104,
2534,
104,
927,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
When 5 is the number what is the japanese title? | CREATE TABLE table_2144389_9 (japanese_title VARCHAR, _number VARCHAR) | SELECT japanese_title FROM table_2144389_9 WHERE _number = 5 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
27357,
4906,
3914,
834,
1298,
41,
1191,
2837,
15,
7,
15,
834,
21869,
584,
4280,
28027,
6,
3,
834,
5525,
1152,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
366,
305,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2662,
2837,
15,
7,
15,
834,
21869,
21680,
953,
834,
27357,
4906,
3914,
834,
1298,
549,
17444,
427,
3,
834,
5525,
1152,
3274,
305,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is the lowest top 5 when the year is after 1995, team(s) is #15 billy ballew motorsports, and starts is more than 4? | CREATE TABLE table_name_45 (
top_5 INTEGER,
starts VARCHAR,
year VARCHAR,
team_s_ VARCHAR
) | SELECT MIN(top_5) FROM table_name_45 WHERE year > 1995 AND team_s_ = "#15 billy ballew motorsports" AND starts > 4 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2128,
41,
420,
834,
755,
3,
21342,
17966,
6,
3511,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
6,
372,
834,
7,
834,
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,
3,
17684,
599,
2916,
834,
9120,
21680,
953,
834,
4350,
834,
2128,
549,
17444,
427,
215,
2490,
7273,
3430,
372,
834,
7,
834,
3274,
96,
4663,
1808,
2876,
63,
1996,
15,
210,
2340,
6661,
7,
121,
3430,
3511,
2490,
314,
... |
Which driver has a Time/Retired of +1 lap? | CREATE TABLE table_name_66 (driver VARCHAR, time_retired VARCHAR) | SELECT driver FROM table_name_66 WHERE time_retired = "+1 lap" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3539,
41,
13739,
52,
584,
4280,
28027,
6,
97,
834,
10682,
1271,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
2535,
65,
3,
9,
2900,
87,
1649,
11809,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2535,
21680,
953,
834,
4350,
834,
3539,
549,
17444,
427,
97,
834,
10682,
1271,
3274,
96,
18446,
14941,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Name the english name for | CREATE TABLE table_1638437_2 (
english_name VARCHAR,
simplified VARCHAR
) | SELECT english_name FROM table_1638437_2 WHERE simplified = "崖城镇" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2938,
3747,
591,
4118,
834,
357,
41,
22269,
834,
4350,
584,
4280,
28027,
6,
24687,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
22269,
564,
21,
1,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
22269,
834,
4350,
21680,
953,
834,
2938,
3747,
591,
4118,
834,
357,
549,
17444,
427,
24687,
3274,
96,
2,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
According to the August 2008 poll that reported 36% New Demcratic, what percentage aligned with the Liberal party? | CREATE TABLE table_name_37 (liberal VARCHAR, new_democratic VARCHAR, dates VARCHAR) | SELECT liberal FROM table_name_37 WHERE new_democratic = "36%" AND dates = "august 2008" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4118,
41,
10661,
138,
584,
4280,
28027,
6,
126,
834,
23319,
447,
584,
4280,
28027,
6,
5128,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2150,
12,
8,
1660,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
10215,
21680,
953,
834,
4350,
834,
4118,
549,
17444,
427,
126,
834,
23319,
447,
3274,
96,
519,
6370,
121,
3430,
5128,
3274,
96,
402,
17198,
2628,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Name the womens doubles when mixed doubles is potten ruth scott | CREATE TABLE table_19673 (
"Year" real,
"Mens singles" text,
"Womens singles" text,
"Mens doubles" text,
"Womens doubles" text,
"Mixed doubles" text
) | SELECT "Womens doubles" FROM table_19673 WHERE "Mixed doubles" = 'Potten Ruth Scott' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26937,
4552,
41,
96,
476,
2741,
121,
490,
6,
96,
329,
35,
7,
712,
7,
121,
1499,
6,
96,
518,
32,
904,
7,
712,
7,
121,
1499,
6,
96,
329,
35,
7,
1486,
7,
121,
1499,
6,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
518,
32,
904,
7,
1486,
7,
121,
21680,
953,
834,
26937,
4552,
549,
17444,
427,
96,
329,
2407,
15,
26,
1486,
7,
121,
3274,
3,
31,
345,
14708,
29,
15874,
4972,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Which Player has Goals larger than 10, and a Debut year smaller than 1993, and Years at club of 1990 1993? | CREATE TABLE table_name_71 (
player VARCHAR,
years_at_club VARCHAR,
goals VARCHAR,
debut_year VARCHAR
) | SELECT player FROM table_name_71 WHERE goals > 10 AND debut_year < 1993 AND years_at_club = "1990–1993" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4450,
41,
1959,
584,
4280,
28027,
6,
203,
834,
144,
834,
13442,
584,
4280,
28027,
6,
1766,
584,
4280,
28027,
6,
5695,
834,
1201,
584,
4280,
28027,
3,
61,
3,
3210... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
1959,
21680,
953,
834,
4350,
834,
4450,
549,
17444,
427,
1766,
2490,
335,
3430,
5695,
834,
1201,
3,
2,
8388,
3430,
203,
834,
144,
834,
13442,
3274,
96,
2294,
2394,
104,
2294,
4271,
121,
1,
-100,
-100,
-100,
-100,
-1... |
Which player was drafted after round 9 and number 464 overall? | CREATE TABLE table_32181 (
"Round" real,
"Overall" real,
"Player" text,
"Position" text,
"School/Club Team" text
) | SELECT "Player" FROM table_32181 WHERE "Round" > '9' AND "Overall" = '464' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2668,
2606,
536,
41,
96,
448,
32,
1106,
121,
490,
6,
96,
23847,
1748,
121,
490,
6,
96,
15800,
49,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
29364,
87,
254,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
15800,
49,
121,
21680,
953,
834,
2668,
2606,
536,
549,
17444,
427,
96,
448,
32,
1106,
121,
2490,
3,
31,
1298,
31,
3430,
96,
23847,
1748,
121,
3274,
3,
31,
591,
4389,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Show different ways to get to attractions and the number of attractions that can be accessed in the corresponding way. | CREATE TABLE Tourist_Attractions (How_to_Get_There VARCHAR) | SELECT How_to_Get_There, COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
21375,
834,
188,
17,
10559,
7,
41,
7825,
834,
235,
834,
20361,
834,
7238,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
3111,
315,
1155,
12,
129,
12,
10108,
11,
8,
381,
13,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
571,
834,
235,
834,
20361,
834,
7238,
6,
2847,
17161,
599,
1935,
61,
21680,
21375,
834,
188,
17,
10559,
7,
350,
4630,
6880,
272,
476,
571,
834,
235,
834,
20361,
834,
7238,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the away team when solon was the home team? | CREATE TABLE table_name_63 (
away_team VARCHAR,
home_team VARCHAR
) | SELECT away_team FROM table_name_63 WHERE home_team = "solon" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3891,
41,
550,
834,
11650,
584,
4280,
28027,
6,
234,
834,
11650,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
550,
372,
116,
6729,
29,
47,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
550,
834,
11650,
21680,
953,
834,
4350,
834,
3891,
549,
17444,
427,
234,
834,
11650,
3274,
96,
4099,
106,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the sum of the area values for districts having density over 462 and websites of http://krishna.nic.in/? | CREATE TABLE table_name_19 (
area__km²_ INTEGER,
density___km²_ VARCHAR,
official_website VARCHAR
) | SELECT SUM(area__km²_) FROM table_name_19 WHERE density___km²_ > 462 AND official_website = "http://krishna.nic.in/" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2294,
41,
616,
834,
834,
5848,
357,
834,
3,
21342,
17966,
6,
11048,
834,
834,
834,
5848,
357,
834,
584,
4280,
28027,
6,
2314,
834,
8398,
3585,
584,
4280,
28027,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
498,
834,
834,
5848,
357,
834,
61,
21680,
953,
834,
4350,
834,
2294,
549,
17444,
427,
11048,
834,
834,
834,
5848,
357,
834,
2490,
314,
4056,
3430,
2314,
834,
8398,
3585,
3274,
96,
5948,
1303,
10648,
... |
Which player's results were T6 in the PGA Ch., T4 in the Masters and T8 at the U.S. Open? | CREATE TABLE table_1506950_9 (
player VARCHAR,
us_open VARCHAR,
pga_ch VARCHAR,
masters VARCHAR
) | SELECT player FROM table_1506950_9 WHERE pga_ch = "T6" AND masters = "T4" AND us_open = "T8" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
12278,
3951,
1752,
834,
1298,
41,
1959,
584,
4280,
28027,
6,
178,
834,
8751,
584,
4280,
28027,
6,
3,
102,
122,
9,
834,
524,
584,
4280,
28027,
6,
2325,
7,
584,
4280,
28027,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
1959,
21680,
953,
834,
12278,
3951,
1752,
834,
1298,
549,
17444,
427,
3,
102,
122,
9,
834,
524,
3274,
96,
382,
948,
121,
3430,
2325,
7,
3274,
96,
382,
20364,
3430,
178,
834,
8751,
3274,
96,
382,
927,
121,
1,
-100,... |
For those records from the products and each product's manufacturer, draw a bar chart about the distribution of name and the average of revenue , and group by attribute name, and could you list by the x axis in ascending please? | CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) | SELECT T2.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7554,
41,
3636,
3,
21342,
17966,
6,
5570,
584,
4280,
28027,
599,
25502,
201,
5312,
3396,
254,
26330,
434,
6,
15248,
3,
21342,
17966,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
332,
4416,
23954,
6,
332,
4416,
1649,
15098,
21680,
7554,
6157,
332,
536,
3,
15355,
3162,
15248,
7,
6157,
332,
357,
9191,
332,
5411,
7296,
76,
8717,
450,
49,
3274,
332,
4416,
22737,
350,
4630,
6880,
272,
476,
332,
4... |
Find the names of the top 3 departments that provide the largest amount of courses? | CREATE TABLE course (
dept_name VARCHAR
) | SELECT dept_name FROM course GROUP BY dept_name ORDER BY COUNT(*) DESC LIMIT 3 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
503,
41,
20,
102,
17,
834,
4350,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2588,
8,
3056,
13,
8,
420,
220,
10521,
24,
370,
8,
2015,
866,
13,
2996,
58,
1,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
20,
102,
17,
834,
4350,
21680,
503,
350,
4630,
6880,
272,
476,
20,
102,
17,
834,
4350,
4674,
11300,
272,
476,
2847,
17161,
599,
1935,
61,
309,
25067,
8729,
12604,
220,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
what is ethnicity of subject id 55094? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE 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 demographic.ethnicity FROM demographic WHERE demographic.subject_id = "55094" | [
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,
14798,
5,
15,
189,
2532,
485,
21680,
14798,
549,
17444,
427,
14798,
5,
7304,
11827,
834,
23,
26,
3274,
96,
17147,
4240,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What was the Score where Goal is larger than 11, and a Competition of 2009 nehru cup, and had a Date of 24 august 2009? | CREATE TABLE table_name_37 (
score VARCHAR,
date VARCHAR,
goal VARCHAR,
competition VARCHAR
) | SELECT score FROM table_name_37 WHERE goal > 11 AND competition = "2009 nehru cup" AND date = "24 august 2009" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4118,
41,
2604,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
6,
1288,
584,
4280,
28027,
6,
2259,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2604,
21680,
953,
834,
4350,
834,
4118,
549,
17444,
427,
1288,
2490,
850,
3430,
2259,
3274,
96,
16660,
3,
29,
7392,
76,
4119,
121,
3430,
833,
3274,
96,
2266,
14663,
2464,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many directors were in Season 2? | CREATE TABLE table_23827 (
"Series #" real,
"Season #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"U.S. viewers (in millions)" text
) | SELECT COUNT("Directed by") FROM table_23827 WHERE "Season #" = '2' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
3747,
2555,
41,
96,
12106,
7,
1713,
121,
490,
6,
96,
134,
15,
9,
739,
1713,
121,
490,
6,
96,
382,
155,
109,
121,
1499,
6,
96,
23620,
15,
26,
57,
121,
1499,
6,
96... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
23620,
15,
26,
57,
8512,
21680,
953,
834,
357,
3747,
2555,
549,
17444,
427,
96,
134,
15,
9,
739,
1713,
121,
3274,
3,
31,
357,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Who wrote episode 11? | CREATE TABLE table_21730 (
"Series #" real,
"Episode #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"U.S. viewers (million)" text,
"Original airdate" text,
"Production Code" text
) | SELECT "Written by" FROM table_21730 WHERE "Episode #" = '11' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
357,
2517,
1458,
41,
96,
12106,
7,
1713,
121,
490,
6,
96,
427,
102,
159,
32,
221,
1713,
121,
490,
6,
96,
382,
155,
109,
121,
1499,
6,
96,
23620,
15,
26,
57,
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,
24965,
324,
57,
121,
21680,
953,
834,
357,
2517,
1458,
549,
17444,
427,
96,
427,
102,
159,
32,
221,
1713,
121,
3274,
3,
31,
2596,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
For those employees who did not have any job in the past, draw a scatter chart about the correlation between employee_id and department_id . | CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE 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 employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
) | SELECT EMPLOYEE_ID, DEPARTMENT_ID FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
6266,
41,
4083,
517,
9215,
834,
4309,
7908,
1982,
599,
11116,
632,
201,
4083,
517,
9215,
834,
567,
17683,
3,
4331,
4059,
599,
1828,
61,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
262,
5244,
5017,
476,
5080,
834,
4309,
6,
3396,
19846,
11810,
834,
4309,
21680,
1652,
549,
17444,
427,
4486,
262,
5244,
5017,
476,
5080,
834,
4309,
3388,
41,
23143,
14196,
262,
5244,
5017,
476,
5080,
834,
4309,
21680,
... |
Who had the overall pick of 72? | CREATE TABLE table_name_36 (name VARCHAR, overall VARCHAR) | SELECT name FROM table_name_36 WHERE overall = 72 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3420,
41,
4350,
584,
4280,
28027,
6,
1879,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
141,
8,
1879,
1432,
13,
9455,
58,
1,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
564,
21680,
953,
834,
4350,
834,
3420,
549,
17444,
427,
1879,
3274,
9455,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What was the number of the game against Charlotte? | CREATE TABLE table_50255 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | SELECT SUM("Game") FROM table_50255 WHERE "Team" = 'charlotte' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1752,
25502,
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,
3,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
180,
6122,
599,
121,
23055,
8512,
21680,
953,
834,
1752,
25502,
549,
17444,
427,
96,
18699,
121,
3274,
3,
31,
4059,
21538,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the Home team in the Game with a Score of 1 0? | CREATE TABLE table_62593 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
) | SELECT "Home team" FROM table_62593 WHERE "Score" = '1–0' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4056,
3390,
519,
41,
96,
382,
23,
15,
150,
121,
1499,
6,
96,
19040,
372,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
188,
1343,
372,
121,
1499,
6,
96,
308,
342,
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,
19040,
372,
121,
21680,
953,
834,
4056,
3390,
519,
549,
17444,
427,
96,
134,
9022,
121,
3274,
3,
31,
536,
104,
632,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the proportion of the average base price of the rooms for each different decor? Show me a pie chart! | CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
basePrice INTEGER,
decor TEXT
)
CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adults INTEGER,
Kids INTEGER
) | SELECT decor, AVG(basePrice) FROM Rooms GROUP BY decor | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4181,
7,
41,
4181,
196,
26,
3,
3463,
4,
382,
6,
562,
23954,
3,
3463,
4,
382,
6,
8326,
3,
21342,
17966,
6,
1953,
25160,
3,
3463,
4,
382,
6,
9858,
667,
75,
4658,
6833,
3,
21342,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4469,
6,
71,
17217,
599,
10925,
345,
4920,
61,
21680,
4181,
7,
350,
4630,
6880,
272,
476,
4469,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
has patient 031-22988 been admitted to an emergency room until 2 years ago? | CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
) | SELECT COUNT(*) > 0 FROM patient WHERE patient.uniquepid = '031-22988' AND patient.hospitaladmitsource = 'emergency department' AND DATETIME(patient.unitadmittime) <= DATETIME(CURRENT_TIME(), '-2 year') | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7757,
41,
7757,
23,
26,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
2672,
4350,
1499,
6,
17166,
1499,
6,
2981,
20466,
29,
1499,
6,
2672,
10208,
715,
97,
6,
4845,
2916,
715,
97,
3,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
2490,
3,
632,
21680,
1868,
549,
17444,
427,
1868,
5,
202,
1495,
12417,
3274,
3,
31,
4928,
9596,
3166,
4060,
31,
3430,
1868,
5,
31386,
20466,
17,
7928,
3274,
3,
31,
15,
935,
122,
4392,
3... |
How many years Joined have a Size smaller than 417, and an IHSAA Class of A, and a School of jac-cen-del? | CREATE TABLE table_65968 (
"School" text,
"Location" text,
"Mascot" text,
"Size" real,
"IHSAA Class" text,
"County" text,
"Year Joined" real,
"Previous Conference" text
) | SELECT COUNT("Year Joined") FROM table_65968 WHERE "Size" < '417' AND "IHSAA Class" = 'a' AND "School" = 'jac-cen-del' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
948,
3390,
3651,
41,
96,
29364,
121,
1499,
6,
96,
434,
32,
75,
257,
121,
1499,
6,
96,
329,
9,
7,
4310,
121,
1499,
6,
96,
134,
1737,
121,
490,
6,
96,
196,
4950,
5498,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
476,
2741,
5279,
15,
26,
8512,
21680,
953,
834,
948,
3390,
3651,
549,
17444,
427,
96,
134,
1737,
121,
3,
2,
3,
31,
591,
2517,
31,
3430,
96,
196,
4950,
5498,
4501,
121,
3274,
3,
31,
9,
31,
... |
What was the stats of Trinidad and Tobago | CREATE TABLE table_1231316_4 (
wind__m_s_ VARCHAR,
country VARCHAR
) | SELECT wind__m_s_ FROM table_1231316_4 WHERE country = "Trinidad and Tobago" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
14574,
2368,
2938,
834,
591,
41,
2943,
834,
834,
51,
834,
7,
834,
584,
4280,
28027,
6,
684,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
3089,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2943,
834,
834,
51,
834,
7,
834,
21680,
953,
834,
14574,
2368,
2938,
834,
591,
549,
17444,
427,
684,
3274,
96,
19310,
29,
15644,
11,
304,
7893,
32,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What race did Bobby Unser win? | CREATE TABLE table_4766 (
"Name" text,
"Pole Position" text,
"Fastest Lap" text,
"Winning driver" text,
"Winning team" text,
"Report" text
) | SELECT "Name" FROM table_4766 WHERE "Winning driver" = 'bobby unser' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4177,
3539,
41,
96,
23954,
121,
1499,
6,
96,
8931,
15,
14258,
121,
1499,
6,
96,
371,
9,
7,
4377,
325,
102,
121,
1499,
6,
96,
518,
10503,
2535,
121,
1499,
6,
96,
518,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
23954,
121,
21680,
953,
834,
4177,
3539,
549,
17444,
427,
96,
518,
10503,
2535,
121,
3274,
3,
31,
17396,
969,
5122,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What's the roles of the Bionic Woman? | CREATE TABLE table_name_4 (
role VARCHAR,
program VARCHAR
) | SELECT role FROM table_name_4 WHERE program = "the bionic woman" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
591,
41,
1075,
584,
4280,
28027,
6,
478,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
31,
7,
8,
6270,
13,
8,
3318,
2532,
18604,
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,
1075,
21680,
953,
834,
4350,
834,
591,
549,
17444,
427,
478,
3274,
96,
532,
2392,
2532,
2335,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
How many paper types did Ian Drolet design stamps on? | CREATE TABLE table_11900773_6 (paper_type VARCHAR, design VARCHAR) | SELECT COUNT(paper_type) FROM table_11900773_6 WHERE design = "Ian Drolet" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2596,
7015,
4013,
519,
834,
948,
41,
19587,
834,
6137,
584,
4280,
28027,
6,
408,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
1040,
1308,
410,
15498,
707,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
19587,
834,
6137,
61,
21680,
953,
834,
2596,
7015,
4013,
519,
834,
948,
549,
17444,
427,
408,
3274,
96,
196,
152,
707,
32,
1655,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the total number of Post, when Trainer is 'Steve Asmussen', and when Time/ Behind is 19 ? | CREATE TABLE table_name_22 (
post VARCHAR,
trainer VARCHAR,
time__behind VARCHAR
) | SELECT COUNT(post) FROM table_name_22 WHERE trainer = "steve asmussen" AND time__behind = "19 ½" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2884,
41,
442,
584,
4280,
28027,
6,
8813,
584,
4280,
28027,
6,
97,
834,
834,
346,
2907,
26,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
5950,
61,
21680,
953,
834,
4350,
834,
2884,
549,
17444,
427,
8813,
3274,
96,
849,
162,
38,
3252,
7,
35,
121,
3430,
97,
834,
834,
346,
2907,
26,
3274,
96,
2294,
209,
2,
357,
121,
1,
-100,
-100,
... |
List the creation year, name and budget of each department. | CREATE TABLE department (
department_id number,
name text,
creation text,
ranking number,
budget_in_billions number,
num_employees number
)
CREATE TABLE management (
department_id number,
head_id number,
temporary_acting text
)
CREATE TABLE head (
head_id number,
name text,
born_state text,
age number
) | SELECT creation, name, budget_in_billions FROM department | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3066,
41,
3066,
834,
23,
26,
381,
6,
564,
1499,
6,
3409,
1499,
6,
11592,
381,
6,
1487,
834,
77,
834,
115,
14916,
7,
381,
6,
3,
5525,
834,
15,
51,
7379,
63,
15,
15,
7,
381,
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,
3409,
6,
564,
6,
1487,
834,
77,
834,
115,
14916,
7,
21680,
3066,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Can you tell me the Location that has the Mascot of lakers? | CREATE TABLE table_name_69 (location VARCHAR, mascot VARCHAR) | SELECT location FROM table_name_69 WHERE mascot = "lakers" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3951,
41,
14836,
584,
4280,
28027,
6,
3,
2754,
4310,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
1072,
25,
817,
140,
8,
10450,
24,
65,
8,
6664,
4310,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1128,
21680,
953,
834,
4350,
834,
3951,
549,
17444,
427,
3,
2754,
4310,
3274,
96,
521,
11758,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What was the week number when they played on Dec. 19? | CREATE TABLE table_name_79 (
week VARCHAR,
date VARCHAR
) | SELECT COUNT(week) FROM table_name_79 WHERE date = "dec. 19" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4440,
41,
471,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
471,
381,
116,
79,
1944,
30,
4451,
5,
957,
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,
0... | [
3,
23143,
14196,
2847,
17161,
599,
8041,
61,
21680,
953,
834,
4350,
834,
4440,
549,
17444,
427,
833,
3274,
96,
221,
75,
5,
957,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the lowest Population per km (2009) that has a Solomon Islands province, with an Area (km ) smaller than 28,400? | CREATE TABLE table_name_21 (
population_per_km²__2009_ INTEGER,
province VARCHAR,
area__km²_ VARCHAR
) | SELECT MIN(population_per_km²__2009_) FROM table_name_21 WHERE province = "solomon islands" AND area__km²_ < 28 OFFSET 400 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2658,
41,
2074,
834,
883,
834,
5848,
357,
834,
834,
16660,
834,
3,
21342,
17966,
6,
7985,
584,
4280,
28027,
6,
616,
834,
834,
5848,
357,
834,
584,
4280,
28027,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
9791,
7830,
834,
883,
834,
5848,
357,
834,
834,
16660,
834,
61,
21680,
953,
834,
4350,
834,
2658,
549,
17444,
427,
7985,
3274,
96,
4099,
32,
2157,
12098,
121,
3430,
616,
834,
834,
5848,
357,
834,
3,
... |
what is the total number of patients who had brain mass, intracranial hemorrhage as primary disease and had a lab test for ascites? | 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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "BRAIN MASS;INTRACRANIAL HEMORRHAGE" AND lab.fluid = "Ascites" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
14798,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
564,
1499,
6,
2774,
1947,
834,
8547,
302,
1499,
6,
1246,
1499,
6,
103,
115,
1499,
6,
7285,
1499,
6,
1612,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7690,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7690,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
When aaron afflalo (9) has the highest amount of rebounds what is the score? | CREATE TABLE table_23285849_10 (score VARCHAR, high_rebounds VARCHAR) | SELECT score FROM table_23285849_10 WHERE high_rebounds = "Aaron Afflalo (9)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2773,
2577,
3449,
3647,
834,
1714,
41,
7,
9022,
584,
4280,
28027,
6,
306,
834,
23768,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
366,
3,
9,
291,
106,
3,
4127,
40,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2604,
21680,
953,
834,
2773,
2577,
3449,
3647,
834,
1714,
549,
17444,
427,
306,
834,
23768,
3274,
96,
188,
291,
106,
71,
89,
89,
40,
138,
32,
41,
11728,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What year was communications and corporate affairs held by Jeff Rotman? | CREATE TABLE table_12113818_1 (year VARCHAR, communications_and_corporate_affairs VARCHAR) | SELECT year FROM table_12113818_1 WHERE communications_and_corporate_affairs = "Jeff Rotman" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
22011,
22744,
2606,
834,
536,
41,
1201,
584,
4280,
28027,
6,
5030,
834,
232,
834,
25762,
834,
4127,
2256,
7,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
215,
47... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
215,
21680,
953,
834,
22011,
22744,
2606,
834,
536,
549,
17444,
427,
5030,
834,
232,
834,
25762,
834,
4127,
2256,
7,
3274,
96,
7851,
89,
89,
8704,
348,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Who is the constituency when the runner-up was d. Venugopal? | CREATE TABLE table_22753245_1 (constituency VARCHAR, runner_up_a VARCHAR) | SELECT constituency FROM table_22753245_1 WHERE runner_up_a = "D. Venugopal" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2884,
3072,
2668,
2128,
834,
536,
41,
8056,
17,
155,
76,
4392,
584,
4280,
28027,
6,
3,
10806,
834,
413,
834,
9,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6439,
4392,
21680,
953,
834,
2884,
3072,
2668,
2128,
834,
536,
549,
17444,
427,
3,
10806,
834,
413,
834,
9,
3274,
96,
308,
5,
7281,
76,
839,
6459,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which address has both members younger than 30 and members older than 40? | CREATE TABLE member (address VARCHAR, age INTEGER) | SELECT address FROM member WHERE age < 30 INTERSECT SELECT address FROM member WHERE age > 40 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1144,
41,
9,
26,
12039,
584,
4280,
28027,
6,
1246,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
4073,
1115,
65,
321,
724,
5868,
145,
604,
11,
724,
2749,
145,
1283,
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,
1115,
21680,
1144,
549,
17444,
427,
1246,
3,
2,
604,
3,
21342,
5249,
14196,
3,
23143,
14196,
1115,
21680,
1144,
549,
17444,
427,
1246,
2490,
1283,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
how many times is the host country the same country that won silver ? | CREATE TABLE table_204_360 (
id number,
"year" number,
"host" text,
"gold" text,
"silver" text,
"bronze" text
) | SELECT COUNT(*) FROM table_204_360 WHERE "host" = "silver" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
19208,
41,
3,
23,
26,
381,
6,
96,
1201,
121,
381,
6,
96,
12675,
121,
1499,
6,
96,
14910,
121,
1499,
6,
96,
7,
173,
624,
121,
1499,
6,
96,
13711,
776,
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,
1935,
61,
21680,
953,
834,
26363,
834,
19208,
549,
17444,
427,
96,
12675,
121,
3274,
96,
7,
173,
624,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Can you tell me the Score that has the Date of 05 dec? | CREATE TABLE table_name_28 (score VARCHAR, date VARCHAR) | SELECT score FROM table_name_28 WHERE date = "05 dec" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2577,
41,
7,
9022,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
1072,
25,
817,
140,
8,
17763,
24,
65,
8,
7678,
13,
3,
3076,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2604,
21680,
953,
834,
4350,
834,
2577,
549,
17444,
427,
833,
3274,
96,
3076,
20,
75,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Playing against the Seattle Seahawks in a week after week 1 before 69,149 people what was the result of the game? | CREATE TABLE table_name_63 (result VARCHAR, opponent VARCHAR, week VARCHAR, attendance VARCHAR) | SELECT result FROM table_name_63 WHERE week > 1 AND attendance = "69,149" AND opponent = "seattle seahawks" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3891,
41,
60,
7,
83,
17,
584,
4280,
28027,
6,
15264,
584,
4280,
28027,
6,
471,
584,
4280,
28027,
6,
11364,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
741,
21680,
953,
834,
4350,
834,
3891,
549,
17444,
427,
471,
2490,
209,
3430,
11364,
3274,
96,
3951,
6,
24816,
121,
3430,
15264,
3274,
96,
7,
15,
9,
8692,
2805,
14400,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who was the road team on May 2? | CREATE TABLE table_name_24 (road_team VARCHAR, date VARCHAR) | SELECT road_team FROM table_name_24 WHERE date = "may 2" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2266,
41,
8635,
834,
11650,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
8,
1373,
372,
30,
932,
204,
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,
1373,
834,
11650,
21680,
953,
834,
4350,
834,
2266,
549,
17444,
427,
833,
3274,
96,
13726,
204,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the lowest Loss, when Long is less than 0? | CREATE TABLE table_name_41 (loss INTEGER, long INTEGER) | SELECT MIN(loss) FROM table_name_41 WHERE long < 0 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4853,
41,
2298,
7,
3,
21342,
17966,
6,
307,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
7402,
3144,
7,
6,
116,
3230,
19,
705,
145,
3,
632,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
2298,
7,
61,
21680,
953,
834,
4350,
834,
4853,
549,
17444,
427,
307,
3,
2,
3,
632,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is the number of patients whose drug route is im? | 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 INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.route = "IM" | [
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,
7744,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7744,
7,
5,
8399,
51,
834,
23,
26,
549... |
On what Date was the Meet of 2007 Pan American Games with a Time of 1:07.78? | CREATE TABLE table_name_66 (date VARCHAR, meet VARCHAR, time VARCHAR) | SELECT date FROM table_name_66 WHERE meet = "2007 pan american games" AND time = "1:07.78" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3539,
41,
5522,
584,
4280,
28027,
6,
942,
584,
4280,
28027,
6,
97,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
461,
125,
7678,
47,
8,
12325,
13,
4101,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
833,
21680,
953,
834,
4350,
834,
3539,
549,
17444,
427,
942,
3274,
96,
20615,
2131,
10211,
1031,
121,
3430,
97,
3274,
96,
536,
10,
14681,
3940,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
what is the number of patients whose year of death is less than or equal to 2183? | 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
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.dod_year <= "2183.0" | [
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,
26,
32,
26,
834,
1201,
3,
2,
2423,
96,
2658,
4591,
5,
632,
121,
1,
-100,
-100,
-100,
-100,
-10... |
did patient 006-83264 in 2105 get an total protein lab test? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
) | SELECT COUNT(*) > 0 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-83264')) AND lab.labname = 'total protein' AND STRFTIME('%y', lab.labresulttime) = '2105' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2179,
9339,
41,
2179,
521,
9824,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
1543,
3585,
1499,
6,
9329,
1499,
6,
1543,
4914,
29,
715,
97,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
2490,
3,
632,
21680,
7690,
549,
17444,
427,
7690,
5,
10061,
15129,
21545,
23,
26,
3388,
41,
23143,
14196,
1868,
5,
10061,
15129,
21545,
23,
26,
21680,
1868,
549,
17444,
427,
1868,
5,
10061,... |
What day(s) did they play on week 2? | CREATE TABLE table_1639689_2 (date VARCHAR, week VARCHAR) | SELECT date FROM table_1639689_2 WHERE week = 2 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2938,
519,
4314,
3914,
834,
357,
41,
5522,
584,
4280,
28027,
6,
471,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
239,
599,
7,
61,
410,
79,
577,
30,
471,
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,
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,
2938,
519,
4314,
3914,
834,
357,
549,
17444,
427,
471,
3274,
204,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Can you tell me the Combined that has the Victories of 14? | CREATE TABLE table_name_53 (
combined VARCHAR,
victories VARCHAR
) | SELECT combined FROM table_name_53 WHERE victories = 14 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4867,
41,
3334,
584,
4280,
28027,
6,
19900,
7,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
1072,
25,
817,
140,
8,
3,
28257,
24,
65,
8,
8884,
725,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3334,
21680,
953,
834,
4350,
834,
4867,
549,
17444,
427,
19900,
7,
3274,
968,
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 was the name of the winner or 2nd when the result was –, and weight was 6.7? | CREATE TABLE table_name_91 (winner_or_2nd VARCHAR, result VARCHAR, weight VARCHAR) | SELECT winner_or_2nd FROM table_name_91 WHERE result = "–" AND weight = 6.7 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4729,
41,
3757,
687,
834,
127,
834,
357,
727,
584,
4280,
28027,
6,
741,
584,
4280,
28027,
6,
1293,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4668,
834,
127,
834,
357,
727,
21680,
953,
834,
4350,
834,
4729,
549,
17444,
427,
741,
3274,
96,
104,
121,
3430,
1293,
3274,
3,
29045,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
specify the death status of patients named paul edwards | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) | SELECT demographic.expire_flag FROM demographic WHERE demographic.name = "Paul Edwards" | [
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,
14798,
5,
994,
2388,
15,
834,
89,
5430,
21680,
14798,
549,
17444,
427,
14798,
5,
4350,
3274,
96,
23183,
8200,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What are the ids of documents with the type code CV that do not have expenses. | CREATE TABLE documents (
document_id number,
document_type_code text,
project_id number,
document_date time,
document_name text,
document_description text,
other_details text
)
CREATE TABLE accounts (
account_id number,
statement_id number,
account_details text
)
CREATE TABLE projects (
project_id number,
project_details text
)
CREATE TABLE statements (
statement_id number,
statement_details text
)
CREATE TABLE ref_document_types (
document_type_code text,
document_type_name text,
document_type_description text
)
CREATE TABLE ref_budget_codes (
budget_type_code text,
budget_type_description text
)
CREATE TABLE documents_with_expenses (
document_id number,
budget_type_code text,
document_details text
) | SELECT document_id FROM documents WHERE document_type_code = "CV" EXCEPT SELECT document_id FROM documents_with_expenses | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2691,
41,
1708,
834,
23,
26,
381,
6,
1708,
834,
6137,
834,
4978,
1499,
6,
516,
834,
23,
26,
381,
6,
1708,
834,
5522,
97,
6,
1708,
834,
4350,
1499,
6,
1708,
834,
221,
11830,
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,
1708,
834,
23,
26,
21680,
2691,
549,
17444,
427,
1708,
834,
6137,
834,
4978,
3274,
96,
20410,
121,
262,
4,
30416,
3,
23143,
14196,
1708,
834,
23,
26,
21680,
2691,
834,
4065,
834,
994,
3801,
15,
7,
1,
-100,
-100,
-... |
What is the transfer fee for the country that has the name McCartney listed? | CREATE TABLE table_65619 (
"Name" text,
"Country" text,
"Status" text,
"Moving to" text,
"Transfer fee" text
) | SELECT "Transfer fee" FROM table_65619 WHERE "Name" = 'mccartney' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4122,
948,
2294,
41,
96,
23954,
121,
1499,
6,
96,
10628,
651,
121,
1499,
6,
96,
134,
17,
144,
302,
121,
1499,
6,
96,
329,
32,
3745,
12,
121,
1499,
6,
96,
18474,
1010,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
18474,
1010,
2572,
121,
21680,
953,
834,
4122,
948,
2294,
549,
17444,
427,
96,
23954,
121,
3274,
3,
31,
51,
75,
1720,
17,
3186,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.