NATURAL_LANG stringlengths 0 446 | SCHEMA stringlengths 27 2.21k | SQL stringlengths 18 453 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|
WHAT IS THE RESULT FOR THE SONG WHERE THE ORIGINAL ARTIST IS BETTY EVERETT? | CREATE TABLE table_1323 (
"Week #" text,
"Theme" text,
"Song choice" text,
"Original artist" text,
"Order #" real,
"Result" text
) | SELECT "Result" FROM table_1323 WHERE "Original artist" = 'Betty Everett' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
2773,
41,
96,
518,
10266,
1713,
121,
1499,
6,
96,
634,
526,
121,
1499,
6,
96,
134,
2444,
1160,
121,
1499,
6,
96,
667,
3380,
10270,
2377,
121,
1499,
6,
96,
7395,
588... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
20119,
121,
21680,
953,
834,
2368,
2773,
549,
17444,
427,
96,
667,
3380,
10270,
2377,
121,
3274,
3,
31,
279,
16142,
6381,
15,
17,
17,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Show the names of schools with a total budget amount greater than 100 or a total endowment greater than 10. | CREATE TABLE endowment (school_id VARCHAR, amount INTEGER); CREATE TABLE budget (school_id VARCHAR, budgeted INTEGER); CREATE TABLE school (school_name VARCHAR, school_id VARCHAR) | SELECT T2.school_name FROM budget AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id JOIN endowment AS T3 ON T2.school_id = T3.school_id GROUP BY T2.school_name HAVING SUM(T1.budgeted) > 100 OR SUM(T3.amount) > 10 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
414,
2381,
297,
41,
6646,
834,
23,
26,
584,
4280,
28027,
6,
866,
3,
21342,
17966,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
1487,
41,
6646,
834,
23,
26,
584,
4280,
280... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6646,
834,
4350,
21680,
1487,
6157,
332,
536,
3,
15355,
3162,
496,
6157,
332,
357,
9191,
332,
5411,
6646,
834,
23,
26,
3274,
332,
4416,
6646,
834,
23,
26,
3,
15355,
3162,
414,
2381,
297,
6157,
332,
519,
... |
Which show returns april 3 with a Previous Network of lifetime? | CREATE TABLE table_50876 (
"Show" text,
"Last Aired" real,
"Previous Network" text,
"Retitled as/Same" text,
"New/Returning/Same Network" text,
"Returning" text
) | SELECT "Retitled as/Same" FROM table_50876 WHERE "Returning" = 'april 3' AND "Previous Network" = 'lifetime' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1752,
927,
3959,
41,
96,
134,
4067,
121,
1499,
6,
96,
3612,
7,
17,
1761,
15,
26,
121,
490,
6,
96,
10572,
19117,
3426,
121,
1499,
6,
96,
1649,
10920,
38,
87,
134,
265,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
1649,
10920,
38,
87,
134,
265,
15,
121,
21680,
953,
834,
1752,
927,
3959,
549,
17444,
427,
96,
1649,
7535,
53,
121,
3274,
3,
31,
9,
2246,
40,
220,
31,
3430,
96,
10572,
19117,
3426,
121,
3274,
3,
31,
4597,
71... |
Which Competition has a Venue of jan breydel, bruges, belgium? | CREATE TABLE table_name_37 (competition VARCHAR, venue VARCHAR) | SELECT competition FROM table_name_37 WHERE venue = "jan breydel, bruges, belgium" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4118,
41,
287,
4995,
4749,
584,
4280,
28027,
6,
5669,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
15571,
65,
3,
9,
29940,
13,
3,
7066,
3,
1999,
63... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2259,
21680,
953,
834,
4350,
834,
4118,
549,
17444,
427,
5669,
3274,
96,
7066,
3,
1999,
63,
221,
40,
6,
3,
9052,
2897,
6,
36,
40,
122,
2552,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What league apps with 1 flt apps, 0 goals, and more than 1 league goals? | CREATE TABLE table_65388 (
"Name" text,
"Position" text,
"League Apps" text,
"League Goals" real,
"FA Cup Apps" text,
"FA Cup Goals" real,
"League Cup Apps" text,
"League Cup Goals" real,
"FLT Apps" text,
"FLT Goals" real,
"Total Apps" text,
"Total Goals" real
) | SELECT "League Apps" FROM table_65388 WHERE "FLT Apps" = '1' AND "Total Goals" > '0' AND "League Goals" > '1' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4122,
519,
4060,
41,
96,
23954,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
2796,
9,
5398,
2276,
7,
121,
1499,
6,
96,
2796,
9,
5398,
17916,
7,
121,
490,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
2796,
9,
5398,
2276,
7,
121,
21680,
953,
834,
4122,
519,
4060,
549,
17444,
427,
96,
371,
9012,
2276,
7,
121,
3274,
3,
31,
536,
31,
3430,
96,
3696,
1947,
17916,
7,
121,
2490,
3,
31,
632,
31,
3430,
96,
2796,
... |
Which Week 7 Oct 12 has a Week 11 Nov 9 of week 11 nov 9? | CREATE TABLE table_name_15 (week_7_oct_12 VARCHAR, week_11_nov_9 VARCHAR) | SELECT week_7_oct_12 FROM table_name_15 WHERE week_11_nov_9 = "week 11 nov 9" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1808,
41,
8041,
834,
940,
834,
32,
75,
17,
834,
2122,
584,
4280,
28027,
6,
471,
834,
2596,
834,
5326,
834,
1298,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
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,
0... | [
3,
23143,
14196,
471,
834,
940,
834,
32,
75,
17,
834,
2122,
21680,
953,
834,
4350,
834,
1808,
549,
17444,
427,
471,
834,
2596,
834,
5326,
834,
1298,
3274,
96,
8041,
850,
3,
5326,
668,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the record on June 13? | CREATE TABLE table_name_57 (
record VARCHAR,
date VARCHAR
) | SELECT record FROM table_name_57 WHERE date = "june 13" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3436,
41,
1368,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1368,
30,
1515,
1179,
58,
1,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1368,
21680,
953,
834,
4350,
834,
3436,
549,
17444,
427,
833,
3274,
96,
6959,
15,
1179,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Which Round was F picked? | CREATE TABLE table_name_5 (
round VARCHAR,
position VARCHAR
) | SELECT round FROM table_name_5 WHERE position = "f" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
755,
41,
1751,
584,
4280,
28027,
6,
1102,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
9609,
47,
377,
4758,
58,
1,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1751,
21680,
953,
834,
4350,
834,
755,
549,
17444,
427,
1102,
3274,
96,
89,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What time was Opponent Fredson Paix o beaten in? | CREATE TABLE table_name_68 (
time VARCHAR,
opponent VARCHAR
) | SELECT time FROM table_name_68 WHERE opponent = "fredson paixão" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3651,
41,
97,
584,
4280,
28027,
6,
15264,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
97,
47,
4495,
9977,
12264,
739,
14697,
226,
3,
32,
3,
1734... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
97,
21680,
953,
834,
4350,
834,
3651,
549,
17444,
427,
15264,
3274,
96,
89,
1271,
739,
25060,
2,
32,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is Date, when Opponent is @ Carolina Hurricanes? | CREATE TABLE table_name_84 (
date VARCHAR,
opponent VARCHAR
) | SELECT date FROM table_name_84 WHERE opponent = "@ carolina hurricanes" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4608,
41,
833,
584,
4280,
28027,
6,
15264,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
7678,
6,
116,
4495,
9977,
19,
3320,
5089,
19927,
7,
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,
4608,
549,
17444,
427,
15264,
3274,
96,
1741,
443,
12057,
9,
20818,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Film of um sol alaranjado director is what nationality? | CREATE TABLE table_name_65 (
nationality_of_director VARCHAR,
film VARCHAR
) | SELECT nationality_of_director FROM table_name_65 WHERE film = "um sol alaranjado" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4122,
41,
1157,
485,
834,
858,
834,
25982,
584,
4280,
28027,
6,
814,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
3417,
13,
561,
9467,
491,
9,
2002,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1157,
485,
834,
858,
834,
25982,
21680,
953,
834,
4350,
834,
4122,
549,
17444,
427,
814,
3274,
96,
440,
9467,
491,
9,
2002,
1191,
26,
32,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
How much Overall has a Name of bob anderson? | CREATE TABLE table_name_30 (overall VARCHAR, name VARCHAR) | SELECT COUNT(overall) FROM table_name_30 WHERE name = "bob anderson" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1458,
41,
1890,
1748,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
231,
9126,
65,
3,
9,
5570,
13,
3,
17396,
11,
13515,
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,
2847,
17161,
599,
1890,
1748,
61,
21680,
953,
834,
4350,
834,
1458,
549,
17444,
427,
564,
3274,
96,
17396,
11,
13515,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
return me the number of the keywords of ' Making database systems usable ' . | CREATE TABLE domain_journal (
did int,
jid int
)
CREATE TABLE publication (
abstract varchar,
cid int,
citation_num int,
jid int,
pid int,
reference_num int,
title varchar,
year int
)
CREATE TABLE domain (
did int,
name varchar
)
CREATE TABLE author (
aid int,
homepage varchar,
name varchar,
oid int
)
CREATE TABLE publication_keyword (
kid int,
pid int
)
CREATE TABLE conference (
cid int,
homepage varchar,
name varchar
)
CREATE TABLE cite (
cited int,
citing int
)
CREATE TABLE keyword (
keyword varchar,
kid int
)
CREATE TABLE journal (
homepage varchar,
jid int,
name varchar
)
CREATE TABLE domain_conference (
cid int,
did int
)
CREATE TABLE organization (
continent varchar,
homepage varchar,
name varchar,
oid int
)
CREATE TABLE writes (
aid int,
pid int
)
CREATE TABLE domain_keyword (
did int,
kid int
)
CREATE TABLE domain_author (
aid int,
did int
)
CREATE TABLE domain_publication (
did int,
pid int
) | SELECT COUNT(DISTINCT (keyword.keyword)) FROM keyword, publication, publication_keyword WHERE publication_keyword.kid = keyword.kid AND publication.pid = publication_keyword.pid AND publication.title = 'Making database systems usable' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3303,
834,
25340,
41,
410,
16,
17,
6,
3,
354,
23,
26,
16,
17,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
5707,
41,
9838,
3,
4331,
4059,
6,
3,
10812,
16,
17,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
41,
4397,
6051,
5,
4397,
6051,
61,
61,
21680,
15693,
6,
5707,
6,
5707,
834,
4397,
6051,
549,
17444,
427,
5707,
834,
4397,
6051,
5,
2168,
26,
3274,
15693,
5,
2168,
26,
3430,
5707... |
Which school has a state authority and a roll of 318? | CREATE TABLE table_58187 (
"Name" text,
"Years" text,
"Area" text,
"Authority" text,
"Decile" text,
"Roll" real
) | SELECT "Name" FROM table_58187 WHERE "Authority" = 'state' AND "Roll" = '318' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3449,
25828,
41,
96,
23954,
121,
1499,
6,
96,
476,
2741,
7,
121,
1499,
6,
96,
188,
864,
121,
1499,
6,
96,
23602,
127,
485,
121,
1499,
6,
96,
2962,
75,
699,
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,
23954,
121,
21680,
953,
834,
3449,
25828,
549,
17444,
427,
96,
23602,
127,
485,
121,
3274,
3,
31,
5540,
31,
3430,
96,
29807,
121,
3274,
3,
31,
519,
2606,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the away team score at kardinia park? | CREATE TABLE table_name_40 (away_team VARCHAR, venue VARCHAR) | SELECT away_team AS score FROM table_name_40 WHERE venue = "kardinia park" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2445,
41,
8006,
834,
11650,
584,
4280,
28027,
6,
5669,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
550,
372,
2604,
44,
3,
4031,
2644,
23,
9,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
550,
834,
11650,
6157,
2604,
21680,
953,
834,
4350,
834,
2445,
549,
17444,
427,
5669,
3274,
96,
4031,
2644,
23,
9,
2447,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Show me the total number by country in a histogram, and could you display by the x axis in asc? | CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text,
meter_300 text,
meter_400 text,
meter_500 text,
meter_600 text,
meter_700 text,
Time text
) | SELECT Country, COUNT(*) FROM stadium GROUP BY Country ORDER BY Country | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
605,
41,
4699,
16,
17,
6,
5570,
1499,
6,
12750,
834,
4309,
16,
17,
6,
2929,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
1368,
41,
4699,
16,
17,
6,
3,
20119,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
6993,
6,
2847,
17161,
599,
1935,
61,
21680,
14939,
350,
4630,
6880,
272,
476,
6993,
4674,
11300,
272,
476,
6993,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the Score of the game larger than 57 with a Record of 4–55? | CREATE TABLE table_name_15 (score VARCHAR, game VARCHAR, record VARCHAR) | SELECT score FROM table_name_15 WHERE game > 57 AND record = "4–55" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1808,
41,
7,
9022,
584,
4280,
28027,
6,
467,
584,
4280,
28027,
6,
1368,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
17763,
13,
8,
467,
2186,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2604,
21680,
953,
834,
4350,
834,
1808,
549,
17444,
427,
467,
2490,
3,
3436,
3430,
1368,
3274,
96,
591,
104,
3769,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Find the number of students in each department with a bar chart. | CREATE TABLE section (
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0),
building varchar(15),
room_number varchar(7),
time_slot_id varchar(4)
)
CREATE TABLE advisor (
s_ID varchar(5),
i_ID varchar(5)
)
CREATE TABLE time_slot (
time_slot_id varchar(4),
day varchar(1),
start_hr numeric(2),
start_min numeric(2),
end_hr numeric(2),
end_min numeric(2)
)
CREATE TABLE department (
dept_name varchar(20),
building varchar(15),
budget numeric(12,2)
)
CREATE TABLE prereq (
course_id varchar(8),
prereq_id varchar(8)
)
CREATE TABLE course (
course_id varchar(8),
title varchar(50),
dept_name varchar(20),
credits numeric(2,0)
)
CREATE TABLE takes (
ID varchar(5),
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0),
grade varchar(2)
)
CREATE TABLE student (
ID varchar(5),
name varchar(20),
dept_name varchar(20),
tot_cred numeric(3,0)
)
CREATE TABLE classroom (
building varchar(15),
room_number varchar(7),
capacity numeric(4,0)
)
CREATE TABLE teaches (
ID varchar(5),
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0)
)
CREATE TABLE instructor (
ID varchar(5),
name varchar(20),
dept_name varchar(20),
salary numeric(8,2)
) | SELECT dept_name, COUNT(dept_name) FROM student GROUP BY dept_name ORDER BY tot_cred | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1375,
41,
503,
834,
23,
26,
3,
4331,
4059,
28007,
6,
4220,
834,
23,
26,
3,
4331,
4059,
28007,
6,
10542,
3,
4331,
4059,
18669,
6,
215,
206,
17552,
599,
8525,
632,
201,
740,
3,
4331,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
20,
102,
17,
834,
4350,
6,
2847,
17161,
599,
26,
6707,
834,
4350,
61,
21680,
1236,
350,
4630,
6880,
272,
476,
20,
102,
17,
834,
4350,
4674,
11300,
272,
476,
12,
17,
834,
17216,
1,
-100,
-100,
-100,
-100,
-100,
-10... |
Which characters were portrayed by reed garrett? | CREATE TABLE table_16566 (
"Character" text,
"Portrayed by" text,
"Relationship" text,
"First appearance" text,
"Last appearance" text
) | SELECT "Portrayed by" FROM table_16566 WHERE "Character" = 'Reed Garrett' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
22823,
3539,
41,
96,
18947,
2708,
49,
121,
1499,
6,
96,
14714,
2866,
15,
26,
57,
121,
1499,
6,
96,
1649,
6105,
2009,
121,
1499,
6,
96,
25171,
3179,
121,
1499,
6,
96,
3612... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
14714,
2866,
15,
26,
57,
121,
21680,
953,
834,
22823,
3539,
549,
17444,
427,
96,
18947,
2708,
49,
121,
3274,
3,
31,
448,
6958,
27099,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
how many of the patients on elective admission had icd9 code 9744? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND procedures.icd9_code = "9744" | [
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,... |
How many different positions did Sherbrooke Faucons (qmjhl) provide in the draft? | CREATE TABLE table_7 (
"Pick" real,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
) | SELECT COUNT("Position") FROM table_7 WHERE "College/junior/club team" = 'Sherbrooke Faucons (QMJHL)' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
940,
41,
96,
345,
3142,
121,
490,
6,
96,
15800,
49,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
24732,
485,
121,
1499,
6,
96,
15743,
434,
372,
121,
1499,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
345,
32,
7,
4749,
8512,
21680,
953,
834,
940,
549,
17444,
427,
96,
9939,
7883,
87,
6959,
23,
127,
87,
13442,
372,
121,
3274,
3,
31,
134,
760,
14370,
15,
1699,
76,
8056,
41,
2247,
25047,
1364... |
What is the Tenure of the Officer who died in a helicopter accident with Badge/Serial Number 16805? | CREATE TABLE table_name_95 (tenure VARCHAR, cause_of_death VARCHAR, badge_serial_number VARCHAR) | SELECT tenure FROM table_name_95 WHERE cause_of_death = "helicopter accident" AND badge_serial_number = "16805" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3301,
41,
324,
1462,
584,
4280,
28027,
6,
1137,
834,
858,
834,
221,
9,
189,
584,
4280,
28027,
6,
13402,
834,
7,
15,
12042,
834,
5525,
1152,
584,
4280,
28027,
61,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
20752,
21680,
953,
834,
4350,
834,
3301,
549,
17444,
427,
1137,
834,
858,
834,
221,
9,
189,
3274,
96,
88,
2176,
19893,
3125,
121,
3430,
13402,
834,
7,
15,
12042,
834,
5525,
1152,
3274,
96,
24274,
3076,
121,
1,
-100,... |
What pick number did the buffalo bills get? | CREATE TABLE table_2508633_5 (pick__number VARCHAR, nfl_team VARCHAR) | SELECT pick__number FROM table_2508633_5 WHERE nfl_team = "Buffalo Bills" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
11434,
3840,
4201,
834,
755,
41,
17967,
834,
834,
5525,
1152,
584,
4280,
28027,
6,
3,
29,
89,
40,
834,
11650,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
1432,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1432,
834,
834,
5525,
1152,
21680,
953,
834,
11434,
3840,
4201,
834,
755,
549,
17444,
427,
3,
29,
89,
40,
834,
11650,
3274,
96,
279,
2999,
138,
32,
3259,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is the 2008 when 2007 is A, 2011 is A and tournament is san jose? | CREATE TABLE table_name_5 (
tournament VARCHAR
) | SELECT 2008 FROM table_name_5 WHERE 2007 = "a" AND 2011 = "a" AND tournament = "san jose" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
755,
41,
5892,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
125,
19,
8,
2628,
116,
4101,
19,
71,
6,
2722,
19,
71,
11,
5892,
19,
3,
7,
152,
7406,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2628,
21680,
953,
834,
4350,
834,
755,
549,
17444,
427,
4101,
3274,
96,
9,
121,
3430,
2722,
3274,
96,
9,
121,
3430,
5892,
3274,
96,
7,
152,
7406,
15,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Who was the winning driver of the Savio Circuit with the constructor Itala? | CREATE TABLE table_15139 (
"Name" text,
"Circuit" text,
"Date" text,
"Winning driver" text,
"Winning constructor" text,
"Report" text
) | SELECT "Winning driver" FROM table_15139 WHERE "Winning constructor" = 'itala' AND "Name" = 'savio circuit' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1808,
24090,
41,
96,
23954,
121,
1499,
6,
96,
254,
23,
52,
21560,
121,
1499,
6,
96,
308,
342,
121,
1499,
6,
96,
518,
10503,
2535,
121,
1499,
6,
96,
518,
10503,
6774,
127,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
518,
10503,
2535,
121,
21680,
953,
834,
1808,
24090,
549,
17444,
427,
96,
518,
10503,
6774,
127,
121,
3274,
3,
31,
9538,
9,
31,
3430,
96,
23954,
121,
3274,
3,
31,
7,
2960,
32,
4558,
31,
1,
-100,
-100,
-100,
... |
Who was the home team when walsall was the away team? | CREATE TABLE table_name_8 (home_team VARCHAR, away_team VARCHAR) | SELECT home_team FROM table_name_8 WHERE away_team = "walsall" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
927,
41,
5515,
834,
11650,
584,
4280,
28027,
6,
550,
834,
11650,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
8,
234,
372,
116,
3,
5380,
7,
174... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
234,
834,
11650,
21680,
953,
834,
4350,
834,
927,
549,
17444,
427,
550,
834,
11650,
3274,
96,
5380,
7,
1748,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the 1st leg for team 2 Portol Drac Palma Mallorca? | CREATE TABLE table_name_27 (team_2 VARCHAR) | SELECT 1 AS st_leg FROM table_name_27 WHERE team_2 = "portol drac palma mallorca" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2555,
41,
11650,
834,
357,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
209,
7,
17,
4553,
21,
372,
204,
3625,
32,
40,
309,
3738,
8005,
9,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
209,
6157,
3,
7,
17,
834,
5772,
21680,
953,
834,
4350,
834,
2555,
549,
17444,
427,
372,
834,
357,
3274,
96,
1493,
32,
40,
3,
26,
3738,
8466,
9,
1460,
322,
658,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
If the points were 0, what were the tries for? | CREATE TABLE table_75123 (
"Club" text,
"Played" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text,
"Losing bonus" text,
"Points" text
) | SELECT "Tries for" FROM table_75123 WHERE "Points for" = '0' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3072,
14574,
41,
96,
254,
11158,
121,
1499,
6,
96,
15800,
15,
26,
121,
1499,
6,
96,
308,
10936,
29,
121,
1499,
6,
96,
434,
3481,
121,
1499,
6,
96,
22512,
7,
21,
121,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
382,
2593,
21,
121,
21680,
953,
834,
3072,
14574,
549,
17444,
427,
96,
22512,
7,
21,
121,
3274,
3,
31,
632,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the highest rank from the year greater than 2010 with 430 main span metres? | CREATE TABLE table_name_69 (
rank INTEGER,
year_opened VARCHAR,
main_span_metres VARCHAR
) | SELECT MAX(rank) FROM table_name_69 WHERE year_opened > 2010 AND main_span_metres = "430" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3951,
41,
11003,
3,
21342,
17966,
6,
215,
834,
26940,
584,
4280,
28027,
6,
711,
834,
7,
2837,
834,
22404,
7,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
321... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
6254,
61,
21680,
953,
834,
4350,
834,
3951,
549,
17444,
427,
215,
834,
26940,
2490,
2735,
3430,
711,
834,
7,
2837,
834,
22404,
7,
3274,
96,
25449,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
what is the number of patients whose year of birth is less than 2121 and lab test fluid is blood? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2121" AND lab.fluid = "Blood" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7690,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
2118,
23,
26,
1499,
6,
5059,
715,
1499,
6,
5692,
1499,
6,
701,
834,
15129,
1499,
6,
3783,
1499,
6,
5798,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7690,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7690,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
What season number was assigned to the episode identified with the production code 401? | CREATE TABLE table_30278 (
"Series no." real,
"Season no." real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real,
"U.S. viewers (millions)" text
) | SELECT "Season no." FROM table_30278 WHERE "Production code" = '401' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1458,
357,
3940,
41,
96,
12106,
7,
150,
535,
490,
6,
96,
134,
15,
9,
739,
150,
535,
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,
96,
134,
15,
9,
739,
150,
535,
21680,
953,
834,
1458,
357,
3940,
549,
17444,
427,
96,
3174,
8291,
1081,
121,
3274,
3,
31,
20016,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What did Xavier Doherty (Tasmania) set as his highest Overs? | CREATE TABLE table_name_25 (
overs INTEGER,
player VARCHAR
) | SELECT MAX(overs) FROM table_name_25 WHERE player = "xavier doherty (tasmania)" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1828,
41,
147,
7,
3,
21342,
17966,
6,
1959,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
410,
3,
4,
9,
5144,
531,
760,
17,
63,
41,
382,
9,
7,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
1890,
7,
61,
21680,
953,
834,
4350,
834,
1828,
549,
17444,
427,
1959,
3274,
96,
226,
9,
5144,
103,
760,
17,
63,
41,
17,
9,
7,
22463,
61,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Which Silver has a Total of 11, and a Gold smaller than 8? | CREATE TABLE table_name_31 (silver INTEGER, total VARCHAR, gold VARCHAR) | SELECT MIN(silver) FROM table_name_31 WHERE total = 11 AND gold < 8 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3341,
41,
7,
173,
624,
3,
21342,
17966,
6,
792,
584,
4280,
28027,
6,
2045,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
5642,
65,
3,
9,
9273,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
7,
173,
624,
61,
21680,
953,
834,
4350,
834,
3341,
549,
17444,
427,
792,
3274,
850,
3430,
2045,
3,
2,
505,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the lowest Races, when Podiums is greater than 1? | CREATE TABLE table_name_53 (races INTEGER, podiums INTEGER) | SELECT MIN(races) FROM table_name_53 WHERE podiums > 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4867,
41,
12614,
7,
3,
21342,
17966,
6,
22828,
7,
3,
21342,
17966,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
7402,
10949,
7,
6,
116,
1908,
12925,
7,
19,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
12614,
7,
61,
21680,
953,
834,
4350,
834,
4867,
549,
17444,
427,
22828,
7,
2490,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
name the team for 36-29 record | CREATE TABLE table_27902171_8 (
team VARCHAR,
record VARCHAR
) | SELECT team FROM table_27902171_8 WHERE record = "36-29" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2555,
2394,
2658,
4450,
834,
927,
41,
372,
584,
4280,
28027,
6,
1368,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
564,
8,
372,
21,
4475,
18,
3166,
1368,
1,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
372,
21680,
953,
834,
2555,
2394,
2658,
4450,
834,
927,
549,
17444,
427,
1368,
3274,
96,
3420,
18,
3166,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Which decile has an Area of welcome bay, and an Authority of state? | CREATE TABLE table_name_62 (decile VARCHAR, area VARCHAR, authority VARCHAR) | SELECT decile FROM table_name_62 WHERE area = "welcome bay" AND authority = "state" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4056,
41,
24223,
109,
584,
4280,
28027,
6,
616,
584,
4280,
28027,
6,
5015,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
7908,
109,
65,
46,
5690,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
7908,
109,
21680,
953,
834,
4350,
834,
4056,
549,
17444,
427,
616,
3274,
96,
9803,
287,
15,
10210,
121,
3430,
5015,
3274,
96,
5540,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
When Jean Alesi had laps less than 24, what was his highest grid? | CREATE TABLE table_name_75 (grid INTEGER, driver VARCHAR, laps VARCHAR) | SELECT MAX(grid) FROM table_name_75 WHERE driver = "jean alesi" AND laps < 24 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3072,
41,
3496,
26,
3,
21342,
17966,
6,
2535,
584,
4280,
28027,
6,
14941,
7,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
366,
3966,
15345,
7,
23,
141,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
3496,
26,
61,
21680,
953,
834,
4350,
834,
3072,
549,
17444,
427,
2535,
3274,
96,
26459,
4620,
23,
121,
3430,
14941,
7,
3,
2,
997,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Return a bar graph for the name of the school that has the smallest enrollment in each state. | CREATE TABLE Tryout (
pID numeric(5,0),
cName varchar(20),
pPos varchar(8),
decision varchar(3)
)
CREATE TABLE Player (
pID numeric(5,0),
pName varchar(20),
yCard varchar(3),
HS numeric(5,0)
)
CREATE TABLE College (
cName varchar(20),
state varchar(2),
enr numeric(5,0)
) | SELECT cName, MIN(enr) FROM College GROUP BY state | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
5263,
670,
41,
3,
102,
4309,
206,
17552,
599,
11116,
632,
201,
3,
75,
23954,
3,
4331,
4059,
599,
1755,
201,
3,
102,
345,
32,
7,
3,
4331,
4059,
28007,
6,
1357,
3,
4331,
4059,
17867,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
75,
23954,
6,
3,
17684,
599,
35,
52,
61,
21680,
1888,
350,
4630,
6880,
272,
476,
538,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
On what date did a save of ||54,918||50–36 occur? | CREATE TABLE table_name_73 (date VARCHAR, save VARCHAR) | SELECT date FROM table_name_73 WHERE save = "||54,918||50–36" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4552,
41,
5522,
584,
4280,
28027,
6,
1097,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
461,
125,
833,
410,
3,
9,
1097,
13,
1820,
9175,
5062,
6,
1298,
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... | [
3,
23143,
14196,
833,
21680,
953,
834,
4350,
834,
4552,
549,
17444,
427,
1097,
3274,
96,
9175,
9175,
5062,
6,
1298,
2606,
9175,
9175,
1752,
104,
3420,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What was the attendance of the game on December 13, 1970? | CREATE TABLE table_33754 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) | SELECT COUNT("Attendance") FROM table_33754 WHERE "Date" = 'december 13, 1970' AND "Week" > '13' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4201,
3072,
591,
41,
96,
518,
10266,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
20119,
121,
1499,
6,
96,
188,
17,
324,
26,
663,
121,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
188,
17,
324,
26,
663,
8512,
21680,
953,
834,
4201,
3072,
591,
549,
17444,
427,
96,
308,
342,
121,
3274,
3,
31,
221,
75,
18247,
10670,
7434,
31,
3430,
96,
518,
10266,
121,
2490,
3,
31,
2368,... |
How many Goals did Matt Cook have? | CREATE TABLE table_name_89 (
goals VARCHAR,
player VARCHAR
) | SELECT goals FROM table_name_89 WHERE player = "matt cook" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3914,
41,
1766,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
17916,
7,
410,
5199,
6176,
43,
58,
1,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1766,
21680,
953,
834,
4350,
834,
3914,
549,
17444,
427,
1959,
3274,
96,
3357,
17,
3989,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What date did VFL play MCG? | CREATE TABLE table_name_87 (date VARCHAR, venue VARCHAR) | SELECT date FROM table_name_87 WHERE venue = "mcg" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4225,
41,
5522,
584,
4280,
28027,
6,
5669,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
833,
410,
584,
10765,
577,
283,
12150,
58,
1,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
833,
21680,
953,
834,
4350,
834,
4225,
549,
17444,
427,
5669,
3274,
96,
51,
75,
122,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
hdl _ c > 40 mg / dl for male , > 50 mg / dl for female | CREATE TABLE table_dev_48 (
"id" int,
"gender" string,
"systolic_blood_pressure_sbp" int,
"hiv_infection" bool,
"body_weight" float,
"diabetic" string,
"active_hepatitis" bool,
"diastolic_blood_pressure_dbp" int,
"liver_disease" bool,
"high_density_lipoprotein_cholesterol_hdl_c" int,
"kidney_disease" bool,
"body_mass_index_bmi" float,
"hypertension" bool,
"age" float,
"NOUSE" float
) | SELECT * FROM table_dev_48 WHERE (high_density_lipoprotein_cholesterol_hdl_c > 40 AND gender = 'male') OR (high_density_lipoprotein_cholesterol_hdl_c > 50 AND gender = 'female') | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
9776,
834,
3707,
41,
96,
23,
26,
121,
16,
17,
6,
96,
122,
3868,
121,
6108,
6,
96,
7,
63,
7,
235,
2176,
834,
27798,
834,
26866,
834,
7,
115,
102,
121,
16,
17,
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,
1429,
21680,
953,
834,
9776,
834,
3707,
549,
17444,
427,
41,
6739,
834,
537,
7,
485,
834,
7446,
32,
23083,
834,
14297,
2613,
3491,
834,
107,
26,
40,
834,
75,
2490,
1283,
3430,
7285,
3274,
3,
31,
13513,
31,
61,
467... |
What's the pick number of the player from New Mexico? | CREATE TABLE table_16322 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
) | SELECT MAX("Pick #") FROM table_16322 WHERE "College" = 'New Mexico' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2938,
2668,
357,
41,
96,
345,
3142,
1713,
121,
490,
6,
96,
254,
10765,
2271,
121,
1499,
6,
96,
15800,
49,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
9939,
78... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
121,
345,
3142,
1713,
8512,
21680,
953,
834,
2938,
2668,
357,
549,
17444,
427,
96,
9939,
7883,
121,
3274,
3,
31,
6861,
4726,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Which player has a score of 70-68-69-73=280 and a place of t4? | CREATE TABLE table_name_28 (player VARCHAR, place VARCHAR, score VARCHAR) | SELECT player FROM table_name_28 WHERE place = "t4" AND score = 70 - 68 - 69 - 73 = 280 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2577,
41,
20846,
584,
4280,
28027,
6,
286,
584,
4280,
28027,
6,
2604,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
1959,
65,
3,
9,
2604,
13,
2861,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1959,
21680,
953,
834,
4350,
834,
2577,
549,
17444,
427,
286,
3274,
96,
17,
20364,
3430,
2604,
3274,
2861,
3,
18,
3,
3651,
3,
18,
3,
3951,
3,
18,
3,
4552,
3274,
3,
17518,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
what is the number of patients whose days of hospital stay is greater than 2 and lab test name is prostate specific antigen? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "2" AND lab.label = "Prostate Specific Antigen" | [
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,... |
Show the dates of transactions if the share count is bigger than 100 or the amount is bigger than 1000. | CREATE TABLE TRANSACTIONS (date_of_transaction VARCHAR, share_count VARCHAR, amount_of_transaction VARCHAR) | SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count > 100 OR amount_of_transaction > 1000 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
26585,
30518,
134,
41,
5522,
834,
858,
834,
7031,
4787,
584,
4280,
28027,
6,
698,
834,
13362,
584,
4280,
28027,
6,
866,
834,
858,
834,
7031,
4787,
584,
4280,
28027,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
833,
834,
858,
834,
7031,
4787,
21680,
26585,
30518,
134,
549,
17444,
427,
698,
834,
13362,
2490,
910,
4674,
866,
834,
858,
834,
7031,
4787,
2490,
5580,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Which DOB has Bats of s, and a Position of inf? | CREATE TABLE table_name_8 (dob VARCHAR, bats VARCHAR, position VARCHAR) | SELECT dob FROM table_name_8 WHERE bats = "s" AND position = "inf" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
927,
41,
26,
32,
115,
584,
4280,
28027,
6,
3795,
7,
584,
4280,
28027,
6,
1102,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
6054,
279,
65,
8897,
7,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
103,
115,
21680,
953,
834,
4350,
834,
927,
549,
17444,
427,
3795,
7,
3274,
96,
7,
121,
3430,
1102,
3274,
96,
77,
89,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Visualize a bar chart about the distribution of All_Games and ACC_Percent . | CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
) | SELECT All_Games, ACC_Percent FROM basketball_match | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
8498,
834,
19515,
41,
2271,
834,
4309,
16,
17,
6,
1121,
834,
4309,
16,
17,
6,
2271,
834,
23954,
1499,
6,
3,
14775,
834,
17748,
4885,
834,
134,
15,
9,
739,
1499,
6,
3,
14775,
834,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
432,
834,
23055,
7,
6,
3,
14775,
834,
12988,
3728,
21680,
8498,
834,
19515,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Show the number of documents in different ending date and group by ending date with a line chart, and sort in ascending by the x-axis. | CREATE TABLE Documents_to_be_Destroyed (
Document_ID INTEGER,
Destruction_Authorised_by_Employee_ID INTEGER,
Destroyed_by_Employee_ID INTEGER,
Planned_Destruction_Date DATETIME,
Actual_Destruction_Date DATETIME,
Other_Details VARCHAR(255)
)
CREATE TABLE Ref_Locations (
Location_Code CHAR(15),
Location_Name VARCHAR(255),
Location_Description VARCHAR(255)
)
CREATE TABLE Roles (
Role_Code CHAR(15),
Role_Name VARCHAR(255),
Role_Description VARCHAR(255)
)
CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_Type_Name VARCHAR(255),
Document_Type_Description VARCHAR(255)
)
CREATE TABLE Ref_Calendar (
Calendar_Date DATETIME,
Day_Number INTEGER
)
CREATE TABLE Employees (
Employee_ID INTEGER,
Role_Code CHAR(15),
Employee_Name VARCHAR(255),
Gender_MFU CHAR(1),
Date_of_Birth DATETIME,
Other_Details VARCHAR(255)
)
CREATE TABLE All_Documents (
Document_ID INTEGER,
Date_Stored DATETIME,
Document_Type_Code CHAR(15),
Document_Name CHAR(255),
Document_Description CHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Document_Locations (
Document_ID INTEGER,
Location_Code CHAR(15),
Date_in_Location_From DATETIME,
Date_in_Locaton_To DATETIME
) | SELECT Date_in_Locaton_To, COUNT(Date_in_Locaton_To) FROM Document_Locations GROUP BY Date_in_Locaton_To ORDER BY Date_in_Locaton_To | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
11167,
7,
834,
235,
834,
346,
834,
2962,
6626,
10093,
41,
11167,
834,
4309,
3,
21342,
17966,
6,
2973,
26853,
834,
23602,
127,
3375,
834,
969,
834,
427,
51,
7379,
63,
15,
15,
834,
430... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
7678,
834,
77,
834,
434,
32,
2138,
106,
834,
3696,
6,
2847,
17161,
599,
308,
342,
834,
77,
834,
434,
32,
2138,
106,
834,
3696,
61,
21680,
11167,
834,
434,
32,
75,
1628,
350,
4630,
6880,
272,
476,
7678,
834,
77,
... |
How many against on the date of 08/06/1985? | CREATE TABLE table_name_64 (
against INTEGER,
date VARCHAR
) | SELECT SUM(against) FROM table_name_64 WHERE date = "08/06/1985" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4389,
41,
581,
3,
21342,
17966,
6,
833,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
581,
30,
8,
833,
13,
12046,
87,
5176,
13523,
4433,
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,
180,
6122,
599,
9,
16720,
7,
17,
61,
21680,
953,
834,
4350,
834,
4389,
549,
17444,
427,
833,
3274,
96,
4018,
87,
5176,
13523,
4433,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
what is the number of patients whose diagnoses long title is diabetes with ketoacidosis, type i [juvenile type], not stated as uncontrolled and lab test category is chemistry? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Diabetes with ketoacidosis, type I [juvenile type], not stated as uncontrolled" AND lab."CATEGORY" = "Chemistry" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4293,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
32103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
3... |
Name the incumbent for lost renomination republican hold | CREATE TABLE table_19753079_4 (
incumbent VARCHAR,
result VARCHAR
) | SELECT incumbent FROM table_19753079_4 WHERE result = "Lost renomination Republican hold" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
27181,
26918,
4440,
834,
591,
41,
28406,
584,
4280,
28027,
6,
741,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
28406,
21,
1513,
3,
1536,
32,
14484,
20237... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
28406,
21680,
953,
834,
27181,
26918,
4440,
834,
591,
549,
17444,
427,
741,
3274,
96,
434,
3481,
3,
1536,
32,
14484,
8994,
1520,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the lowest poles of team comtec racing, which has a nc position? | CREATE TABLE table_13933 (
"Season" real,
"Series" text,
"Team" text,
"Races" real,
"Wins" real,
"Poles" real,
"F/Laps" real,
"Points" real,
"Position" text
) | SELECT MIN("Poles") FROM table_13933 WHERE "Position" = 'nc' AND "Team" = 'comtec racing' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
24090,
4201,
41,
96,
134,
15,
9,
739,
121,
490,
6,
96,
12106,
7,
121,
1499,
6,
96,
18699,
121,
1499,
6,
96,
448,
9,
2319,
121,
490,
6,
96,
18455,
7,
121,
490,
6,
96,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
17684,
599,
121,
8931,
15,
7,
8512,
21680,
953,
834,
24090,
4201,
549,
17444,
427,
96,
345,
32,
7,
4749,
121,
3274,
3,
31,
29,
75,
31,
3430,
96,
18699,
121,
3274,
3,
31,
287,
5822,
8191,
31,
1,
-100,
-100,
... |
What's the HDR output of Photovista Panorama? | CREATE TABLE table_name_35 (
hdr_output___exr_ VARCHAR,
_hdr VARCHAR,
_logluv_ VARCHAR,
_etc_ VARCHAR,
name VARCHAR
) | SELECT hdr_output___exr_, _hdr, _logluv_, _etc_ FROM table_name_35 WHERE name = "photovista panorama" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2469,
41,
3,
107,
26,
52,
834,
670,
2562,
834,
834,
834,
994,
52,
834,
584,
4280,
28027,
6,
3,
834,
107,
26,
52,
584,
4280,
28027,
6,
3,
834,
2152,
40,
76,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
107,
26,
52,
834,
670,
2562,
834,
834,
834,
994,
52,
834,
6,
3,
834,
107,
26,
52,
6,
3,
834,
2152,
40,
76,
208,
834,
6,
3,
834,
21117,
834,
21680,
953,
834,
4350,
834,
2469,
549,
17444,
427,
564,
3274,
96... |
How many times is the new entries this round is none? | CREATE TABLE table_27973624_1 (number_of_fixtures VARCHAR, new_entries_this_round VARCHAR) | SELECT COUNT(number_of_fixtures) FROM table_27973624_1 WHERE new_entries_this_round = "none" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2555,
4327,
3420,
2266,
834,
536,
41,
5525,
1152,
834,
858,
834,
12304,
10471,
584,
4280,
28027,
6,
126,
834,
35,
9000,
834,
8048,
834,
7775,
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,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
5525,
1152,
834,
858,
834,
12304,
10471,
61,
21680,
953,
834,
2555,
4327,
3420,
2266,
834,
536,
549,
17444,
427,
126,
834,
35,
9000,
834,
8048,
834,
7775,
3274,
96,
29,
782,
121,
1,
-100,
-100,
-10... |
what is drug name and drug route of subject name colton andrade? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT prescriptions.drug, prescriptions.route FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.name = "Colton Andrade" | [
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,
7744,
7,
5,
26,
13534,
6,
7744,
7,
5,
20300,
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,
17444,
427,
14798,
5,
4350,
... |
Name the attendance for loss result and salford city reds | CREATE TABLE table_21269143_1 (attendance VARCHAR, result VARCHAR, opponent VARCHAR) | SELECT attendance FROM table_21269143_1 WHERE result = "Loss" AND opponent = "Salford City Reds" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
24837,
3951,
25133,
834,
536,
41,
15116,
663,
584,
4280,
28027,
6,
741,
584,
4280,
28027,
6,
15264,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
11364,
21,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
11364,
21680,
953,
834,
24837,
3951,
25133,
834,
536,
549,
17444,
427,
741,
3274,
96,
434,
32,
7,
7,
121,
3430,
15264,
3274,
96,
134,
138,
2590,
896,
1624,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the total number of years that Scuderia Guastalla was an entrant? | CREATE TABLE table_69546 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" text
) | SELECT COUNT("Year") FROM table_69546 WHERE "Entrant" = 'scuderia guastalla' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3951,
755,
4448,
41,
96,
476,
2741,
121,
490,
6,
96,
16924,
3569,
121,
1499,
6,
96,
3541,
6500,
7,
121,
1499,
6,
96,
31477,
121,
1499,
6,
96,
22512,
7,
121,
1499,
3,
61... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
476,
2741,
8512,
21680,
953,
834,
3951,
755,
4448,
549,
17444,
427,
96,
16924,
3569,
121,
3274,
3,
31,
7,
1071,
26,
4476,
3,
1744,
9,
9176,
9,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the place in 2007 for the song ' work your magic '? | CREATE TABLE table_59852 (
"Year" real,
"Song" text,
"Artist" text,
"Place" text,
"Points" text,
"Composer" text
) | SELECT "Place" FROM table_59852 WHERE "Year" = '2007' AND "Song" = ' work your magic ' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3390,
4433,
357,
41,
96,
476,
2741,
121,
490,
6,
96,
134,
2444,
121,
1499,
6,
96,
7754,
343,
121,
1499,
6,
96,
345,
11706,
121,
1499,
6,
96,
22512,
7,
121,
1499,
6,
96,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
345,
11706,
121,
21680,
953,
834,
3390,
4433,
357,
549,
17444,
427,
96,
476,
2741,
121,
3274,
3,
31,
20615,
31,
3430,
96,
134,
2444,
121,
3274,
3,
31,
161,
39,
5189,
3,
31,
1,
-100,
-100,
-100,
-100,
-100,
-... |
What is the total number of Rolls of State schools in Hapuku with a Decile greater than 4? | CREATE TABLE table_name_56 (
roll VARCHAR,
decile VARCHAR,
authority VARCHAR,
area VARCHAR
) | SELECT COUNT(roll) FROM table_name_56 WHERE authority = "state" AND area = "hapuku" AND decile > 4 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4834,
41,
3812,
584,
4280,
28027,
6,
7908,
109,
584,
4280,
28027,
6,
5015,
584,
4280,
28027,
6,
616,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
4046,
61,
21680,
953,
834,
4350,
834,
4834,
549,
17444,
427,
5015,
3274,
96,
5540,
121,
3430,
616,
3274,
96,
9516,
1598,
76,
121,
3430,
7908,
109,
2490,
314,
1,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was the score for home team AFC Hornchurch? | CREATE TABLE table_78761 (
"Tie no" real,
"Home team" text,
"Score" text,
"Away team" text,
"Attendance" real
) | SELECT "Score" FROM table_78761 WHERE "Home team" = 'afc hornchurch' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3940,
3959,
536,
41,
96,
382,
23,
15,
150,
121,
490,
6,
96,
19040,
372,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
188,
1343,
372,
121,
1499,
6,
96,
188,
17,
324,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3940,
3959,
536,
549,
17444,
427,
96,
19040,
372,
121,
3274,
3,
31,
9,
89,
75,
3,
6293,
28854,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
Stacked bar chart of how many nationality for with each Type in each nationality, and show by the names in ascending. | CREATE TABLE mission (
Mission_ID int,
Ship_ID int,
Code text,
Launched_Year int,
Location text,
Speed_knots int,
Fate text
)
CREATE TABLE ship (
Ship_ID int,
Name text,
Type text,
Nationality text,
Tonnage int
) | SELECT Nationality, COUNT(Nationality) FROM ship GROUP BY Type, Nationality ORDER BY Nationality | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2253,
41,
8960,
834,
4309,
16,
17,
6,
15508,
834,
4309,
16,
17,
6,
3636,
1499,
6,
17113,
15,
26,
834,
476,
2741,
16,
17,
6,
10450,
1499,
6,
9913,
834,
157,
2264,
7,
16,
17,
6,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
868,
485,
6,
2847,
17161,
599,
24732,
485,
61,
21680,
4383,
350,
4630,
6880,
272,
476,
6632,
6,
868,
485,
4674,
11300,
272,
476,
868,
485,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Just show the first name of the employee and list their manager's id in the Y-axis of the bar chart, and display in descending by the bar please. | CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
) | SELECT FIRST_NAME, MANAGER_ID FROM employees ORDER BY FIRST_NAME DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2476,
41,
446,
10539,
834,
4309,
3,
4331,
4059,
599,
16968,
6,
446,
10539,
834,
382,
3177,
3765,
3,
4331,
4059,
599,
2469,
201,
3,
17684,
834,
134,
4090,
24721,
7908,
1982,
599,
11071,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
30085,
834,
567,
17683,
6,
283,
15610,
17966,
834,
4309,
21680,
1652,
4674,
11300,
272,
476,
30085,
834,
567,
17683,
309,
25067,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the Retail name with a Chipset based on with radeon 9200? | CREATE TABLE table_name_1 (
retail_name VARCHAR,
chipset_based_on VARCHAR
) | SELECT retail_name FROM table_name_1 WHERE chipset_based_on = "radeon 9200" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
536,
41,
3549,
834,
4350,
584,
4280,
28027,
6,
8852,
15,
17,
834,
390,
834,
106,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
14530,
564,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3549,
834,
4350,
21680,
953,
834,
4350,
834,
536,
549,
17444,
427,
8852,
15,
17,
834,
390,
834,
106,
3274,
96,
15530,
106,
668,
3632,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the lowest Laps for mike spence, with a Grid smaller than 8? | CREATE TABLE table_name_36 (
laps INTEGER,
driver VARCHAR,
grid VARCHAR
) | SELECT MIN(laps) FROM table_name_36 WHERE driver = "mike spence" AND grid < 8 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3420,
41,
14941,
7,
3,
21342,
17966,
6,
2535,
584,
4280,
28027,
6,
8634,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
7402,
325,
102,
7,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
8478,
7,
61,
21680,
953,
834,
4350,
834,
3420,
549,
17444,
427,
2535,
3274,
96,
20068,
15,
15142,
3772,
121,
3430,
8634,
3,
2,
505,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Who was the winning team in 2008? | CREATE TABLE table_name_22 (winning_team VARCHAR, year VARCHAR) | SELECT winning_team FROM table_name_22 WHERE year = 2008 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2884,
41,
8163,
834,
11650,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
8,
3447,
372,
16,
2628,
58,
1,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3447,
834,
11650,
21680,
953,
834,
4350,
834,
2884,
549,
17444,
427,
215,
3274,
2628,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
Which days have a stage of ss11? | CREATE TABLE table_24442 (
"Day" text,
"Stage" text,
"Time (CET)" text,
"Name" text,
"Length" text,
"Winner" text,
"Time" text,
"Avg. spd." text,
"Rally leader" text
) | SELECT "Day" FROM table_24442 WHERE "Stage" = 'SS11' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2266,
3628,
357,
41,
96,
16803,
121,
1499,
6,
96,
134,
6505,
121,
1499,
6,
96,
13368,
41,
4770,
382,
61,
121,
1499,
6,
96,
23954,
121,
1499,
6,
96,
434,
4606,
189,
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,
16803,
121,
21680,
953,
834,
2266,
3628,
357,
549,
17444,
427,
96,
134,
6505,
121,
3274,
3,
31,
4256,
2596,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is the average fa cup goals when the fa cup apps is 0, total goals is less than 1 and position is df? | CREATE TABLE table_name_80 (fa_cup_goals INTEGER, position VARCHAR, fa_cup_apps VARCHAR, total_goals VARCHAR) | SELECT AVG(fa_cup_goals) FROM table_name_80 WHERE fa_cup_apps = "0" AND total_goals < 1 AND position = "df" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2079,
41,
89,
9,
834,
4658,
834,
839,
5405,
3,
21342,
17966,
6,
1102,
584,
4280,
28027,
6,
3,
89,
9,
834,
4658,
834,
3096,
7,
584,
4280,
28027,
6,
792,
834,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
89,
9,
834,
4658,
834,
839,
5405,
61,
21680,
953,
834,
4350,
834,
2079,
549,
17444,
427,
3,
89,
9,
834,
4658,
834,
3096,
7,
3274,
96,
632,
121,
3430,
792,
834,
839,
5405,
3,
2,
209,
3430,
1102,
... |
What was the score for the match were the opponent in the final was james cerretani todd perry? | CREATE TABLE table_name_95 (score VARCHAR, opponents_in_the_final VARCHAR) | SELECT score FROM table_name_95 WHERE opponents_in_the_final = "james cerretani todd perry" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3301,
41,
7,
9022,
584,
4280,
28027,
6,
16383,
834,
77,
834,
532,
834,
12406,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
8,
2604,
21,
8,
1588,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2604,
21680,
953,
834,
4350,
834,
3301,
549,
17444,
427,
16383,
834,
77,
834,
532,
834,
12406,
3274,
96,
1191,
2687,
3,
2110,
60,
17,
2738,
12,
26,
26,
399,
651,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
what is the polluntant when the regulatory citation is 40 cfr 50.7(a) and the type is primary? | CREATE TABLE table_name_27 (
pollutant VARCHAR,
regulatory_citation VARCHAR,
type VARCHAR
) | SELECT pollutant FROM table_name_27 WHERE regulatory_citation = "40 cfr 50.7(a)" AND type = "primary" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2555,
41,
5492,
76,
3672,
584,
4280,
28027,
6,
8253,
834,
13903,
584,
4280,
28027,
6,
686,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
125,
19,
8,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
5492,
76,
3672,
21680,
953,
834,
4350,
834,
2555,
549,
17444,
427,
8253,
834,
13903,
3274,
96,
2445,
3,
75,
89,
52,
305,
22426,
599,
9,
61,
121,
3430,
686,
3274,
96,
8234,
1208,
121,
1,
-100,
-100,
-100,
-100,
-10... |
Which club has the most losses with 10 matches played and more than 1 draw? | CREATE TABLE table_name_29 (losses INTEGER, matches VARCHAR, draws VARCHAR) | SELECT MAX(losses) FROM table_name_29 WHERE matches = 10 AND draws > 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3166,
41,
2298,
2260,
3,
21342,
17966,
6,
6407,
584,
4280,
28027,
6,
14924,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
1886,
65,
8,
167,
8467,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
2298,
2260,
61,
21680,
953,
834,
4350,
834,
3166,
549,
17444,
427,
6407,
3274,
335,
3430,
14924,
2490,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What position is mentioned for Rice school? | CREATE TABLE table_name_34 (position VARCHAR, school_club_team VARCHAR) | SELECT position FROM table_name_34 WHERE school_club_team = "rice" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3710,
41,
4718,
584,
4280,
28027,
6,
496,
834,
13442,
834,
11650,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
1102,
19,
2799,
21,
16869,
496,
58,
1,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1102,
21680,
953,
834,
4350,
834,
3710,
549,
17444,
427,
496,
834,
13442,
834,
11650,
3274,
96,
4920,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many Airlines have a total distance of 705 (km)? | CREATE TABLE table_name_76 (
_number_of_airlines VARCHAR,
distance__km_ VARCHAR
) | SELECT COUNT(_number_of_airlines) FROM table_name_76 WHERE distance__km_ = 705 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3959,
41,
3,
834,
5525,
1152,
834,
858,
834,
2256,
6972,
584,
4280,
28027,
6,
2357,
834,
834,
5848,
834,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
834,
5525,
1152,
834,
858,
834,
2256,
6972,
61,
21680,
953,
834,
4350,
834,
3959,
549,
17444,
427,
2357,
834,
834,
5848,
834,
3274,
489,
3076,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is 2001, when 1987 is N/A, and when Career SR is N/A? | CREATE TABLE table_41089 (
"Tournament" text,
"1987" text,
"1988" text,
"1989" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text,
"1997" text,
"1998" text,
"1999" text,
"2000" text,
"2001" text,
"2002" text,
"2003" text,
"Career SR" text,
"Career Win-Loss" text
) | SELECT "2001" FROM table_41089 WHERE "1987" = 'n/a' AND "Career SR" = 'n/a' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
24175,
3914,
41,
96,
382,
1211,
20205,
17,
121,
1499,
6,
96,
2294,
4225,
121,
1499,
6,
96,
2294,
4060,
121,
1499,
6,
96,
2294,
3914,
121,
1499,
6,
96,
2294,
2394,
121,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
23658,
121,
21680,
953,
834,
24175,
3914,
549,
17444,
427,
96,
2294,
4225,
121,
3274,
3,
31,
29,
87,
9,
31,
3430,
96,
6936,
15,
49,
3,
6857,
121,
3274,
3,
31,
29,
87,
9,
31,
1,
-100,
-100,
-100,
-100,
-100... |
how many patients whose gender is f and lab test name is mcv? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.gender = "F" AND lab.label = "MCV" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7690,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
2118,
23,
26,
1499,
6,
5059,
715,
1499,
6,
5692,
1499,
6,
701,
834,
15129,
1499,
6,
3783,
1499,
6,
5798,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7690,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7690,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
What is the played number when the high checkout is 135? | CREATE TABLE table_name_32 (played INTEGER, high_checkout VARCHAR) | SELECT SUM(played) FROM table_name_32 WHERE high_checkout = 135 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2668,
41,
4895,
15,
26,
3,
21342,
17966,
6,
306,
834,
10031,
670,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
1944,
381,
116,
8,
306,
15912,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
180,
6122,
599,
4895,
15,
26,
61,
21680,
953,
834,
4350,
834,
2668,
549,
17444,
427,
306,
834,
10031,
670,
3274,
209,
2469,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the lowest rank that has university park, pa as the location? | CREATE TABLE table_name_68 (
rank INTEGER,
location VARCHAR
) | SELECT MIN(rank) FROM table_name_68 WHERE location = "university park, pa" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3651,
41,
11003,
3,
21342,
17966,
6,
1128,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
7402,
11003,
24,
65,
3819,
2447,
6,
2576,
38,
8,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
17684,
599,
6254,
61,
21680,
953,
834,
4350,
834,
3651,
549,
17444,
427,
1128,
3274,
96,
7846,
485,
2447,
6,
2576,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the score for a game after 34 with a record of 31-11? | CREATE TABLE table_name_53 (score VARCHAR, game VARCHAR, record VARCHAR) | SELECT score FROM table_name_53 WHERE game > 34 AND record = "31-11" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4867,
41,
7,
9022,
584,
4280,
28027,
6,
467,
584,
4280,
28027,
6,
1368,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2604,
21,
3,
9,
467,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2604,
21680,
953,
834,
4350,
834,
4867,
549,
17444,
427,
467,
2490,
6154,
3430,
1368,
3274,
96,
3341,
9169,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Show the capacity for each cinema in a bar chart, and rank by the names from low to high. | CREATE TABLE schedule (
Cinema_ID int,
Film_ID int,
Date text,
Show_times_per_day int,
Price float
)
CREATE TABLE cinema (
Cinema_ID int,
Name text,
Openning_year int,
Capacity int,
Location text
)
CREATE TABLE film (
Film_ID int,
Rank_in_series int,
Number_in_season int,
Title text,
Directed_by text,
Original_air_date text,
Production_code text
) | SELECT Name, Capacity FROM cinema ORDER BY Name | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2023,
41,
17544,
834,
4309,
16,
17,
6,
3417,
834,
4309,
16,
17,
6,
7678,
1499,
6,
3111,
834,
715,
7,
834,
883,
834,
1135,
16,
17,
6,
5312,
3,
12660,
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,
5570,
6,
4000,
9,
6726,
21680,
10276,
4674,
11300,
272,
476,
5570,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Which motor's quantity was more than 8, and a class of bs 1915? | CREATE TABLE table_41252 (
"Class" text,
"Quantity" real,
"Manufacturer" text,
"Motor" text,
"Seats" real
) | SELECT "Motor" FROM table_41252 WHERE "Quantity" > '8' AND "Class" = 'bs 1915' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
10124,
357,
41,
96,
21486,
121,
1499,
6,
96,
5991,
288,
485,
121,
490,
6,
96,
7296,
76,
8717,
450,
49,
121,
1499,
6,
96,
329,
32,
17,
127,
121,
1499,
6,
96,
134,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
329,
32,
17,
127,
121,
21680,
953,
834,
591,
10124,
357,
549,
17444,
427,
96,
5991,
288,
485,
121,
2490,
3,
31,
927,
31,
3430,
96,
21486,
121,
3274,
3,
31,
115,
7,
957,
1808,
31,
1,
-100,
-100,
-100,
-100,
... |
For those records from the products and each product's manufacturer, show me about the distribution of name and price , and group by attribute headquarter 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, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, 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,
5411,
345,
4920,
21680,
7554,
6157,
332,
536,
3,
15355,
3162,
15248,
7,
6157,
332,
357,
9191,
332,
5411,
7296,
76,
8717,
450,
49,
3274,
332,
4416,
22737,
350,
4630,
6880,
272,
476,
3642,
19... |
How many yards for the player with 1 solo tackle and over 0 sacks? | CREATE TABLE table_52380 (
"Player" text,
"Tackles" real,
"Solo" real,
"Assisted" real,
"Sack" real,
"Yards" real,
"TD's" real
) | SELECT MAX("Yards") FROM table_52380 WHERE "Solo" = '1' AND "Sack" > '0' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
5373,
22671,
41,
96,
15800,
49,
121,
1499,
6,
96,
382,
4365,
965,
121,
490,
6,
96,
5231,
40,
32,
121,
490,
6,
96,
31606,
121,
490,
6,
96,
134,
4365,
121,
490,
6,
96,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
121,
476,
986,
7,
8512,
21680,
953,
834,
5373,
22671,
549,
17444,
427,
96,
5231,
40,
32,
121,
3274,
3,
31,
536,
31,
3430,
96,
134,
4365,
121,
2490,
3,
31,
632,
31,
1,
-100,
-100,
-100,
-100,
-100,
... |
How many vehicle in total? | CREATE TABLE Vehicles (
Id VARCHAR
) | SELECT COUNT(*) FROM Vehicles | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
15095,
7,
41,
27,
26,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
1689,
16,
792,
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,
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... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
15095,
7,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the lowest geohash length when the lat bits are less than 7, and the km error of 2500? | CREATE TABLE table_name_94 (
geohash_length INTEGER,
lat_bits VARCHAR,
km_error VARCHAR
) | SELECT MIN(geohash_length) FROM table_name_94 WHERE lat_bits < 7 AND km_error = "±2500" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4240,
41,
9502,
107,
3198,
834,
19457,
3,
21342,
17966,
6,
50,
17,
834,
2360,
7,
584,
4280,
28027,
6,
2280,
834,
17262,
584,
4280,
28027,
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,
3,
17684,
599,
397,
32,
107,
3198,
834,
19457,
61,
21680,
953,
834,
4350,
834,
4240,
549,
17444,
427,
50,
17,
834,
2360,
7,
3,
2,
489,
3430,
2280,
834,
17262,
3274,
96,
2,
357,
2560,
121,
1,
-100,
-100,
-100,
-1... |
What day was kibawe created? | CREATE TABLE table_261222_1 (date_of_creation VARCHAR, city___municipality VARCHAR) | SELECT date_of_creation FROM table_261222_1 WHERE city___municipality = "Kibawe" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2688,
2122,
2884,
834,
536,
41,
5522,
834,
858,
834,
5045,
257,
584,
4280,
28027,
6,
690,
834,
834,
834,
11760,
3389,
10355,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
321... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
833,
834,
858,
834,
5045,
257,
21680,
953,
834,
2688,
2122,
2884,
834,
536,
549,
17444,
427,
690,
834,
834,
834,
11760,
3389,
10355,
3274,
96,
439,
23,
115,
9,
1123,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the Outcome when the partner was kristof vliegen? | CREATE TABLE table_name_20 (
outcome VARCHAR,
partner VARCHAR
) | SELECT outcome FROM table_name_20 WHERE partner = "kristof vliegen" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1755,
41,
6138,
584,
4280,
28027,
6,
2397,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
3387,
287,
15,
116,
8,
2397,
47,
3,
157,
17149,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6138,
21680,
953,
834,
4350,
834,
1755,
549,
17444,
427,
2397,
3274,
96,
157,
17149,
89,
3,
208,
15342,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Which Reserved for has a District of khargone, and a Number of electorates (2009) larger than 151,814, and a Name of kasrawad? | CREATE TABLE table_13682 (
"Constituency number" text,
"Name" text,
"Reserved for ( SC / ST /None)" text,
"District" text,
"Number of electorates (2009)" real
) | SELECT "Reserved for ( SC / ST /None)" FROM table_13682 WHERE "District" = 'khargone' AND "Number of electorates (2009)" > '151,814' AND "Name" = 'kasrawad' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23459,
4613,
41,
96,
4302,
2248,
17,
76,
4392,
381,
121,
1499,
6,
96,
23954,
121,
1499,
6,
96,
1649,
3473,
15,
26,
21,
41,
6508,
3,
87,
5097,
3,
87,
567,
782,
61,
121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
1649,
3473,
15,
26,
21,
41,
6508,
3,
87,
5097,
3,
87,
567,
782,
61,
121,
21680,
953,
834,
23459,
4613,
549,
17444,
427,
96,
308,
23,
20066,
121,
3274,
3,
31,
157,
3272,
16967,
31,
3430,
96,
567,
5937,
49,
... |
how many patients are admitted as newborn and are born before the year 2071? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "NEWBORN" AND demographic.dob_year < "2071" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
3,
32102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
9,
26,
5451,
834,
6137,
3274,
96,
4171,
518,
8471,
14151,
121,
3430,
14798,
5,
26,
32,
115,
834,... |
give me the number of patients whose drug code is atro1i? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "ATRO1I" | [
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... |
How much January has a Record of 26 12 6, and Points smaller than 58? | CREATE TABLE table_75089 (
"Game" real,
"January" real,
"Opponent" text,
"Score" text,
"Record" text,
"Points" real
) | SELECT SUM("January") FROM table_75089 WHERE "Record" = '26–12–6' AND "Points" < '58' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
9979,
3914,
41,
96,
23055,
121,
490,
6,
96,
30404,
121,
490,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
1649,
7621,
121,
1499,
6,
96,
22512,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
30404,
8512,
21680,
953,
834,
9979,
3914,
549,
17444,
427,
96,
1649,
7621,
121,
3274,
3,
31,
2688,
104,
2122,
104,
948,
31,
3430,
96,
22512,
7,
121,
3,
2,
3,
31,
3449,
31,
1,
-100,
-100,
-10... |
provide the number of patients whose diagnoses short title is hx of gi malignancy nos and drug route is sc? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Hx of GI malignancy NOS" AND prescriptions.route = "SC" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
14798,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
564,
1499,
6,
2774,
1947,
834,
8547,
302,
1499,
6,
1246,
1499,
6,
103,
115,
1499,
6,
7285,
1499,
6,
1612,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
3... |
Which Bronze has a Gold larger than 1, and a Total larger than 11, and a Silver larger than 5? | CREATE TABLE table_65825 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT AVG("Bronze") FROM table_65825 WHERE "Gold" > '1' AND "Total" > '11' AND "Silver" > '5' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
948,
3449,
1828,
41,
96,
22557,
121,
490,
6,
96,
567,
257,
121,
1499,
6,
96,
23576,
121,
490,
6,
96,
134,
173,
624,
121,
490,
6,
96,
22780,
29,
776,
121,
490,
6,
96,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
121,
22780,
29,
776,
8512,
21680,
953,
834,
948,
3449,
1828,
549,
17444,
427,
96,
23576,
121,
2490,
3,
31,
536,
31,
3430,
96,
3696,
1947,
121,
2490,
3,
31,
2596,
31,
3430,
96,
134,
173,
624,
121,
... |
What is the value in 1988 when it is 2R in 1997 and SF in 1993? | CREATE TABLE table_9744 (
"Tournament" text,
"1985" text,
"1986" text,
"1987" text,
"1988" text,
"1989" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text,
"1997" text,
"1998" text,
"1999" text,
"2010" text,
"2011" text
) | SELECT "1988" FROM table_9744 WHERE "1997" = '2r' AND "1993" = 'sf' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4327,
3628,
41,
96,
382,
1211,
20205,
17,
121,
1499,
6,
96,
24151,
17395,
1499,
6,
96,
2294,
3840,
121,
1499,
6,
96,
2294,
4225,
121,
1499,
6,
96,
2294,
4060,
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,
2294,
4060,
121,
21680,
953,
834,
4327,
3628,
549,
17444,
427,
96,
2294,
4327,
121,
3274,
3,
31,
357,
52,
31,
3430,
96,
2294,
4271,
121,
3274,
3,
31,
7,
89,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Which Local authority has a Zone 2007 of outside zones, and a Zone 2008 of outside zones, and a Zone 2010 of outside zones, and a Station of waltham cross? | CREATE TABLE table_name_46 (
local_authority VARCHAR,
station VARCHAR,
zone_2010 VARCHAR,
zone_2007 VARCHAR,
zone_2008 VARCHAR
) | SELECT local_authority FROM table_name_46 WHERE zone_2007 = "outside zones" AND zone_2008 = "outside zones" AND zone_2010 = "outside zones" AND station = "waltham cross" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4448,
41,
415,
834,
17415,
485,
584,
4280,
28027,
6,
2478,
584,
4280,
28027,
6,
2901,
834,
14926,
584,
4280,
28027,
6,
2901,
834,
20615,
584,
4280,
28027,
6,
2901,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
415,
834,
17415,
485,
21680,
953,
834,
4350,
834,
4448,
549,
17444,
427,
2901,
834,
20615,
3274,
96,
670,
1583,
10029,
121,
3430,
2901,
834,
16128,
3274,
96,
670,
1583,
10029,
121,
3430,
2901,
834,
14926,
3274,
96,
67... |
What Hanyu Pinyin is in the Jinning Township? | CREATE TABLE table_47847 (
"Name" text,
"Chinese" text,
"Hanyu Pinyin" text,
"Wade\u2013Giles" text,
"Hokkien Pe\u030dh-\u014de-j\u012b" text,
"English meaning" text
) | SELECT "Hanyu Pinyin" FROM table_47847 WHERE "Name" = 'jinning township' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
3940,
4177,
41,
96,
23954,
121,
1499,
6,
96,
3541,
4477,
15,
121,
1499,
6,
96,
566,
6820,
76,
8050,
63,
77,
121,
1499,
6,
96,
518,
9,
221,
2,
76,
11138,
517,
699,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
566,
6820,
76,
8050,
63,
77,
121,
21680,
953,
834,
591,
3940,
4177,
549,
17444,
427,
96,
23954,
121,
3274,
3,
31,
354,
10503,
1511,
2009,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the highest crowd at arden street oval? | CREATE TABLE table_name_7 (
crowd INTEGER,
venue VARCHAR
) | SELECT MAX(crowd) FROM table_name_7 WHERE venue = "arden street oval" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
940,
41,
4374,
3,
21342,
17966,
6,
5669,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2030,
4374,
44,
3,
986,
35,
2815,
17986,
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,
4800,
4,
599,
75,
3623,
26,
61,
21680,
953,
834,
4350,
834,
940,
549,
17444,
427,
5669,
3274,
96,
986,
35,
2815,
17986,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Who is the head coach of the team who's venue is Lokomotiv? | CREATE TABLE table_2220 (
"Team" text,
"Location" text,
"Head Coach" text,
"Team Captain" text,
"Venue" text,
"Capacity" real,
"Position in 2008" text
) | SELECT "Head Coach" FROM table_2220 WHERE "Venue" = 'Lokomotiv' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2884,
1755,
41,
96,
18699,
121,
1499,
6,
96,
434,
32,
75,
257,
121,
1499,
6,
96,
3845,
9,
26,
9493,
121,
1499,
6,
96,
18699,
12202,
121,
1499,
6,
96,
553,
35,
76,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
3845,
9,
26,
9493,
121,
21680,
953,
834,
2884,
1755,
549,
17444,
427,
96,
553,
35,
76,
15,
121,
3274,
3,
31,
434,
12948,
17732,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is the traditional Chinese name for the record Beautiful? | CREATE TABLE table_name_84 (
chinese__traditional_ VARCHAR,
english_title VARCHAR
) | SELECT chinese__traditional_ FROM table_name_84 WHERE english_title = "beautiful" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4608,
41,
3,
1436,
1496,
15,
834,
834,
26374,
834,
584,
4280,
28027,
6,
22269,
834,
21869,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
1436,
1496,
15,
834,
834,
26374,
834,
21680,
953,
834,
4350,
834,
4608,
549,
17444,
427,
22269,
834,
21869,
3274,
96,
346,
402,
17,
99,
83,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
what was the difference in placing between the 1988/89 season and the last season before it ? | CREATE TABLE table_204_79 (
id number,
"season" text,
"tier" number,
"division" text,
"place" text
) | SELECT ABS((SELECT "place" FROM table_204_79 WHERE "season" = '1988/89') - (SELECT "place" FROM table_204_79 WHERE "season" < '1988/89' ORDER BY "season" DESC LIMIT 1)) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
4440,
41,
3,
23,
26,
381,
6,
96,
9476,
121,
1499,
6,
96,
3276,
121,
381,
6,
96,
26,
23,
6610,
121,
1499,
6,
96,
4687,
121,
1499,
3,
61,
3,
32102,
32103,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
20798,
599,
599,
23143,
14196,
96,
4687,
121,
21680,
953,
834,
26363,
834,
4440,
549,
17444,
427,
96,
9476,
121,
3274,
3,
31,
2294,
4060,
87,
3914,
31,
61,
3,
18,
41,
23143,
14196,
96,
4687,
121,
21680,
953,
834,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.