NATURAL_LANG stringlengths 0 446 | SCHEMA stringlengths 27 2.21k | SQL stringlengths 18 453 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|
How many proteins are associated with an institution founded after 1880 or an institution with type "Private"? | CREATE TABLE institution (institution_id VARCHAR, founded VARCHAR, type VARCHAR); CREATE TABLE protein (institution_id VARCHAR) | SELECT COUNT(*) FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id = T2.institution_id WHERE T1.founded > 1880 OR T1.type = 'Private' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
6568,
41,
77,
17448,
834,
23,
26,
584,
4280,
28027,
6,
5710,
584,
4280,
28027,
6,
686,
584,
4280,
28027,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
3619,
41,
77,
17448,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
6568,
6157,
332,
536,
3,
15355,
3162,
3619,
6157,
332,
357,
9191,
332,
5411,
77,
17448,
834,
23,
26,
3274,
332,
4416,
77,
17448,
834,
23,
26,
549,
17444,
427,
332,
5411,
23329,
249... |
Who is the Constructor for round 5? | CREATE TABLE table_name_58 (
constructor VARCHAR,
rounds VARCHAR
) | SELECT constructor FROM table_name_58 WHERE rounds = "5" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3449,
41,
6774,
127,
584,
4280,
28027,
6,
14419,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
19,
8,
1193,
7593,
127,
21,
1751,
305,
58,
1,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
6774,
127,
21680,
953,
834,
4350,
834,
3449,
549,
17444,
427,
14419,
3274,
96,
17395,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
what's the district with incumbent being richard j. welch | CREATE TABLE table_72428 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | SELECT "District" FROM table_72428 WHERE "Incumbent" = 'Richard J. Welch' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
940,
2266,
2577,
41,
96,
308,
23,
20066,
121,
1499,
6,
96,
1570,
75,
5937,
295,
121,
1499,
6,
96,
13725,
63,
121,
1499,
6,
96,
25171,
8160,
121,
490,
6,
96,
20119,
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,
308,
23,
20066,
121,
21680,
953,
834,
940,
2266,
2577,
549,
17444,
427,
96,
1570,
75,
5937,
295,
121,
3274,
3,
31,
448,
362,
986,
446,
5,
101,
40,
524,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
A pie chart for finding the number of the name of rooms booked by some customers whose first name contains ROY. | CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
basePrice INTEGER,
decor TEXT
)
CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adults INTEGER,
Kids INTEGER
) | SELECT roomName, COUNT(roomName) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE FirstName LIKE '%ROY%' GROUP BY roomName | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4181,
7,
41,
4181,
196,
26,
3,
3463,
4,
382,
6,
562,
23954,
3,
3463,
4,
382,
6,
8326,
3,
21342,
17966,
6,
1953,
25160,
3,
3463,
4,
382,
6,
9858,
667,
75,
4658,
6833,
3,
21342,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
562,
23954,
6,
2847,
17161,
599,
3082,
23954,
61,
21680,
27659,
7,
6157,
332,
536,
3,
15355,
3162,
4181,
7,
6157,
332,
357,
9191,
332,
5411,
22778,
51,
3274,
332,
4416,
22778,
51,
196,
26,
549,
17444,
427,
1485,
239... |
Name the incorporated for principal activites of travel agency | CREATE TABLE table_name_73 (incorporated_in VARCHAR, principal_activities VARCHAR) | SELECT incorporated_in FROM table_name_73 WHERE principal_activities = "travel agency" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4552,
41,
10975,
834,
77,
584,
4280,
28027,
6,
3218,
834,
8463,
2197,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
3,
10975,
21,
3218,
5817,
7006,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
10975,
834,
77,
21680,
953,
834,
4350,
834,
4552,
549,
17444,
427,
3218,
834,
8463,
2197,
3274,
96,
25687,
3193,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
List the names of 5 users followed by the largest number of other users. | CREATE TABLE user_profiles (name VARCHAR, followers VARCHAR) | SELECT name FROM user_profiles ORDER BY followers DESC LIMIT 5 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1139,
834,
18816,
7,
41,
4350,
584,
4280,
28027,
6,
10076,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
6792,
8,
3056,
13,
305,
1105,
2348,
57,
8,
2015,
381,
13,
119,
1105,
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,
564,
21680,
1139,
834,
18816,
7,
4674,
11300,
272,
476,
10076,
309,
25067,
8729,
12604,
305,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
who also won the grammy the same year as scott rudin ? | CREATE TABLE table_204_673 (
id number,
"name" text,
"egot completed" text,
"emmy" number,
"grammy" number,
"oscar" number,
"tony" number
) | SELECT "name" FROM table_204_673 WHERE "name" <> 'scott rudin' AND "grammy" = (SELECT "grammy" FROM table_204_673 WHERE "name" = 'scott rudin') | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
3708,
519,
41,
3,
23,
26,
381,
6,
96,
4350,
121,
1499,
6,
96,
6066,
17,
2012,
121,
1499,
6,
96,
15,
635,
63,
121,
381,
6,
96,
16582,
63,
121,
381,
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,
4350,
121,
21680,
953,
834,
26363,
834,
3708,
519,
549,
17444,
427,
96,
4350,
121,
3,
2,
3155,
3,
31,
7,
10405,
3,
17237,
77,
31,
3430,
96,
16582,
63,
121,
3274,
41,
23143,
14196,
96,
16582,
63,
121,
21680,
... |
What is the highest wins for the NFL with a finish of 1st, and more than 6 losses? | CREATE TABLE table_77178 (
"Season" real,
"League" text,
"Finish" text,
"Wins" real,
"Losses" real,
"Ties" real
) | SELECT MAX("Wins") FROM table_77178 WHERE "League" = 'nfl' AND "Finish" = '1st' AND "Losses" > '6' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4013,
27640,
41,
96,
134,
15,
9,
739,
121,
490,
6,
96,
2796,
9,
5398,
121,
1499,
6,
96,
371,
77,
1273,
121,
1499,
6,
96,
18455,
7,
121,
490,
6,
96,
434,
13526,
7,
121... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
121,
18455,
7,
8512,
21680,
953,
834,
4013,
27640,
549,
17444,
427,
96,
2796,
9,
5398,
121,
3274,
3,
31,
29,
89,
40,
31,
3430,
96,
371,
77,
1273,
121,
3274,
3,
31,
536,
7,
17,
31,
3430,
96,
434,
... |
Where are the headquarters of the company whose sales were 69.2 billion? | CREATE TABLE table_1682026_3 (headquarters VARCHAR, sales__billion_$_ VARCHAR) | SELECT headquarters FROM table_1682026_3 WHERE sales__billion_$_ = "69.2" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
24274,
1755,
2688,
834,
519,
41,
3313,
19973,
7,
584,
4280,
28027,
6,
1085,
834,
834,
115,
14916,
834,
3229,
834,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2840,
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,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
13767,
21680,
953,
834,
24274,
1755,
2688,
834,
519,
549,
17444,
427,
1085,
834,
834,
115,
14916,
834,
3229,
834,
3274,
96,
3951,
5,
357,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What round was jerry corcoran drafted in as pick number 114? | CREATE TABLE table_name_63 (
round INTEGER,
pick VARCHAR,
player VARCHAR
) | SELECT MAX(round) FROM table_name_63 WHERE pick > 114 AND player = "jerry corcoran" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3891,
41,
1751,
3,
21342,
17966,
6,
1432,
584,
4280,
28027,
6,
1959,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
1751,
47,
3,
12488,
651,
4301,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7775,
61,
21680,
953,
834,
4350,
834,
3891,
549,
17444,
427,
1432,
2490,
3,
18959,
3430,
1959,
3274,
96,
12488,
651,
4301,
5715,
152,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What's the authority when the roll is 40? | CREATE TABLE table_name_7 (
authority VARCHAR,
roll VARCHAR
) | SELECT authority FROM table_name_7 WHERE roll = 40 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
940,
41,
5015,
584,
4280,
28027,
6,
3812,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
31,
7,
8,
5015,
116,
8,
3812,
19,
1283,
58,
1,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
5015,
21680,
953,
834,
4350,
834,
940,
549,
17444,
427,
3812,
3274,
1283,
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... |
How many penalties were there in the game with a G.F. of 40? | CREATE TABLE table_name_20 (penalties VARCHAR, gf VARCHAR) | SELECT penalties FROM table_name_20 WHERE gf = "40" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1755,
41,
3208,
138,
3010,
584,
4280,
28027,
6,
3,
122,
89,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
17524,
130,
132,
16,
8,
467,
28,
3,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
17524,
21680,
953,
834,
4350,
834,
1755,
549,
17444,
427,
3,
122,
89,
3274,
96,
2445,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
Who was the host team on November 17? | CREATE TABLE table_name_48 (host_team VARCHAR, date VARCHAR) | SELECT host_team FROM table_name_48 WHERE date = "november 17" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3707,
41,
12675,
834,
11650,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
8,
2290,
372,
30,
1671,
1003,
58,
1,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2290,
834,
11650,
21680,
953,
834,
4350,
834,
3707,
549,
17444,
427,
833,
3274,
96,
5326,
18247,
1003,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Give me the comparison about the average of meter_100 over the meter_200 , and group by attribute meter_200 by a bar chart, rank y axis in desc order. | CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
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 meter_200, AVG(meter_100) FROM swimmer GROUP BY meter_200 ORDER BY AVG(meter_100) DESC | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
14939,
41,
4699,
16,
17,
6,
564,
1499,
6,
4000,
9,
6726,
16,
17,
6,
896,
1499,
6,
6993,
1499,
6,
20360,
834,
1201,
16,
17,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
4401,
834,
3632,
6,
71,
17217,
599,
4401,
834,
2915,
61,
21680,
27424,
350,
4630,
6880,
272,
476,
3,
4401,
834,
3632,
4674,
11300,
272,
476,
71,
17217,
599,
4401,
834,
2915,
61,
309,
25067,
1,
-100,
-100,
-100,
... |
What is the total ranking when there are less than 16 draws, less than 1 point, and the English translation is in love with you? | CREATE TABLE table_63593 (
"Draw" real,
"Language" text,
"Artist" text,
"English translation" text,
"Place" real,
"Points" real
) | SELECT SUM("Place") FROM table_63593 WHERE "Draw" < '16' AND "English translation" = 'in love with you' AND "Points" < '1' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3891,
3390,
519,
41,
96,
308,
10936,
121,
490,
6,
96,
434,
1468,
76,
545,
121,
1499,
6,
96,
7754,
343,
121,
1499,
6,
96,
26749,
7314,
121,
1499,
6,
96,
345,
11706,
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,
180,
6122,
599,
121,
345,
11706,
8512,
21680,
953,
834,
3891,
3390,
519,
549,
17444,
427,
96,
308,
10936,
121,
3,
2,
3,
31,
2938,
31,
3430,
96,
26749,
7314,
121,
3274,
3,
31,
77,
333,
28,
25,
31,
3430,
96,
22512... |
What is the highest number won when the number of points is 31? | CREATE TABLE table_15331868_1 (won INTEGER, points VARCHAR) | SELECT MAX(won) FROM table_15331868_1 WHERE points = 31 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1808,
4201,
2606,
3651,
834,
536,
41,
210,
106,
3,
21342,
17966,
6,
979,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2030,
381,
751,
116,
8,
381,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
210,
106,
61,
21680,
953,
834,
1808,
4201,
2606,
3651,
834,
536,
549,
17444,
427,
979,
3274,
2664,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
Which city has a capacity of 41903? | CREATE TABLE table_10601843_2 (
city VARCHAR,
capacity VARCHAR
) | SELECT city FROM table_10601843_2 WHERE capacity = 41903 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
1714,
3328,
2606,
4906,
834,
357,
41,
690,
584,
4280,
28027,
6,
2614,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
690,
65,
3,
9,
2614,
13,
314,
11776,
519... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
690,
21680,
953,
834,
1714,
3328,
2606,
4906,
834,
357,
549,
17444,
427,
2614,
3274,
314,
11776,
519,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
A bar chart for what are the number of the titles of all movies that have between 3 and 5 stars?, and list X-axis in asc order please. | CREATE TABLE Reviewer (
rID int,
name text
)
CREATE TABLE Movie (
mID int,
title text,
year int,
director text
)
CREATE TABLE Rating (
rID int,
mID int,
stars int,
ratingDate date
) | SELECT title, COUNT(title) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars BETWEEN 3 AND 5 GROUP BY title ORDER BY title | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4543,
49,
41,
3,
52,
4309,
16,
17,
6,
564,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
10743,
41,
3,
51,
4309,
16,
17,
6,
2233,
1499,
6,
215,
16,
17,
6,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2233,
6,
2847,
17161,
599,
21869,
61,
21680,
21662,
6157,
332,
536,
3,
15355,
3162,
10743,
6157,
332,
357,
9191,
332,
5411,
51,
4309,
3274,
332,
4416,
51,
4309,
549,
17444,
427,
332,
5411,
3624,
7,
272,
7969,
518,
2... |
Which artist had a 4x platinum? | CREATE TABLE table_name_42 (artist VARCHAR, certification VARCHAR) | SELECT artist FROM table_name_42 WHERE certification = "4x platinum" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4165,
41,
1408,
343,
584,
4280,
28027,
6,
5151,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
4073,
2377,
141,
3,
9,
314,
226,
26325,
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,
2377,
21680,
953,
834,
4350,
834,
4165,
549,
17444,
427,
5151,
3274,
96,
591,
226,
26325,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many points did he average in 1964? | CREATE TABLE table_name_10 (
points INTEGER,
year VARCHAR
) | SELECT AVG(points) FROM table_name_10 WHERE year = 1964 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1714,
41,
979,
3,
21342,
17966,
6,
215,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
979,
410,
3,
88,
1348,
16,
18969,
58,
1,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
71,
17217,
599,
2700,
7,
61,
21680,
953,
834,
4350,
834,
1714,
549,
17444,
427,
215,
3274,
18969,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What is Record, when Location is 'Boston Garden', and when Date is 'Fri. Nov. 9'? | CREATE TABLE table_name_24 (
record VARCHAR,
location VARCHAR,
date VARCHAR
) | SELECT record FROM table_name_24 WHERE location = "boston garden" AND date = "fri. nov. 9" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2266,
41,
1368,
584,
4280,
28027,
6,
1128,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
11392,
6,
116,
10450,
19,
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,
1368,
21680,
953,
834,
4350,
834,
2266,
549,
17444,
427,
1128,
3274,
96,
115,
32,
4411,
2004,
121,
3430,
833,
3274,
96,
89,
52,
23,
5,
3,
5326,
5,
668,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the Length/Fuel of the bus with a Quantity of 30? | CREATE TABLE table_name_22 (length_fuel VARCHAR, quantity VARCHAR) | SELECT length_fuel FROM table_name_22 WHERE quantity = 30 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2884,
41,
19457,
834,
21692,
584,
4280,
28027,
6,
8708,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
312,
1725,
189,
87,
371,
76,
15,
40,
13,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2475,
834,
21692,
21680,
953,
834,
4350,
834,
2884,
549,
17444,
427,
8708,
3274,
604,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the highest game number with a record of 12-8-1? | CREATE TABLE table_name_29 (
game INTEGER,
record VARCHAR
) | SELECT MAX(game) FROM table_name_29 WHERE record = "12-8-1" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3166,
41,
467,
3,
21342,
17966,
6,
1368,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2030,
467,
381,
28,
3,
9,
1368,
13,
586,
6039,
229... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
7261,
61,
21680,
953,
834,
4350,
834,
3166,
549,
17444,
427,
1368,
3274,
96,
2122,
6039,
2292,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
what is drug type of drug name naloxone? | 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
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) | SELECT prescriptions.drug_type FROM prescriptions WHERE prescriptions.drug = "Naloxone" | [
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,
834,
6137,
21680,
7744,
7,
549,
17444,
427,
7744,
7,
5,
26,
13534,
3274,
96,
567,
9,
24938,
782,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What is the general classification of stage 3 | CREATE TABLE table_name_99 (
general_classification VARCHAR,
stage VARCHAR
) | SELECT general_classification FROM table_name_99 WHERE stage = "3" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3264,
41,
879,
834,
4057,
2420,
584,
4280,
28027,
6,
1726,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
879,
13774,
13,
1726,
220,
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,
879,
834,
4057,
2420,
21680,
953,
834,
4350,
834,
3264,
549,
17444,
427,
1726,
3274,
96,
519,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
what is the number of patients less than 70 years of age who were tested for total iron binding capacity? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "70" AND lab.label = "Iron Binding Capacity, Total" | [
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,
7690,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7690,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
On what date were 5 built with 4-4-2t wheels? | CREATE TABLE table_name_10 (date VARCHAR, no_built VARCHAR, wheels VARCHAR) | SELECT date FROM table_name_10 WHERE no_built = 5 AND wheels = "4-4-2t" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1714,
41,
5522,
584,
4280,
28027,
6,
150,
834,
16152,
584,
4280,
28027,
6,
8277,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
461,
125,
833,
130,
305,
1192... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
833,
21680,
953,
834,
4350,
834,
1714,
549,
17444,
427,
150,
834,
16152,
3274,
305,
3430,
8277,
3274,
96,
591,
4278,
4949,
17,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the total EVAs of the walk that lasted 45:34? | CREATE TABLE table_937 (
"Number" real,
"Astronaut" text,
"Agency" text,
"Total EVAs" real,
"Total Time Hours:Minutes" text
) | SELECT MAX("Total EVAs") FROM table_937 WHERE "Total Time Hours:Minutes" = '45:34' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4271,
940,
41,
96,
567,
5937,
49,
121,
490,
6,
96,
188,
6626,
15785,
121,
1499,
6,
96,
188,
122,
4392,
121,
1499,
6,
96,
3696,
1947,
262,
8230,
7,
121,
490,
6,
96,
3696... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
121,
3696,
1947,
262,
8230,
7,
8512,
21680,
953,
834,
4271,
940,
549,
17444,
427,
96,
3696,
1947,
2900,
10768,
7,
10,
12858,
2810,
7,
121,
3274,
3,
31,
2128,
10,
3710,
31,
1,
-100,
-100,
-100,
-100,
... |
How many golds were there in a game that has 17 bronze and a total of 31? | CREATE TABLE table_51492 (
"Games" text,
"Gold" text,
"Silver" text,
"Bronze" text,
"Total" text,
"Rank" text
) | SELECT "Gold" FROM table_51492 WHERE "Bronze" = '17' AND "Total" = '31' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
5553,
3647,
357,
41,
96,
23055,
7,
121,
1499,
6,
96,
23576,
121,
1499,
6,
96,
134,
173,
624,
121,
1499,
6,
96,
22780,
29,
776,
121,
1499,
6,
96,
3696,
1947,
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,
23576,
121,
21680,
953,
834,
5553,
3647,
357,
549,
17444,
427,
96,
22780,
29,
776,
121,
3274,
3,
31,
2517,
31,
3430,
96,
3696,
1947,
121,
3274,
3,
31,
3341,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What is the rank with more than 123 points, an audi r8 chassis, and a lmp900 class? | CREATE TABLE table_name_75 (
rank VARCHAR,
class VARCHAR,
points VARCHAR,
chassis VARCHAR
) | SELECT rank FROM table_name_75 WHERE points > 123 AND chassis = "audi r8" AND class = "lmp900" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3072,
41,
11003,
584,
4280,
28027,
6,
853,
584,
4280,
28027,
6,
979,
584,
4280,
28027,
6,
22836,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
11003,
21680,
953,
834,
4350,
834,
3072,
549,
17444,
427,
979,
2490,
3,
14574,
3430,
22836,
3274,
96,
9,
5291,
3,
52,
927,
121,
3430,
853,
3274,
96,
40,
1167,
7015,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Where was the game on September 12 played when the Dallas Cowboys was the visiting team? | CREATE TABLE table_11238 (
"Date" text,
"Visiting Team" text,
"Final Score" text,
"Host Team" text,
"Stadium" text
) | SELECT "Stadium" FROM table_11238 WHERE "Visiting Team" = 'dallas cowboys' AND "Date" = 'september 12' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2596,
357,
3747,
41,
96,
308,
342,
121,
1499,
6,
96,
30338,
2271,
121,
1499,
6,
96,
371,
10270,
17763,
121,
1499,
6,
96,
566,
3481,
2271,
121,
1499,
6,
96,
134,
17,
9,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
134,
17,
9,
12925,
121,
21680,
953,
834,
2596,
357,
3747,
549,
17444,
427,
96,
30338,
2271,
121,
3274,
3,
31,
26,
1748,
9,
7,
9321,
7531,
7,
31,
3430,
96,
308,
342,
121,
3274,
3,
31,
7,
6707,
18247,
586,
3... |
Show the relationship between the number of institutions and total enrollment for each type with a scatter plot. | CREATE TABLE protein (
common_name text,
protein_name text,
divergence_from_human_lineage real,
accession_number text,
sequence_length real,
sequence_identity_to_human_protein text,
Institution_id text
)
CREATE TABLE building (
building_id text,
Name text,
Street_address text,
Years_as_tallest text,
Height_feet int,
Floors int
)
CREATE TABLE Institution (
Institution_id text,
Institution text,
Location text,
Founded real,
Type text,
Enrollment int,
Team text,
Primary_Conference text,
building_id text
) | SELECT COUNT(*), SUM(Enrollment) FROM Institution GROUP BY Type | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3619,
41,
1017,
834,
4350,
1499,
6,
3619,
834,
4350,
1499,
6,
12355,
122,
1433,
834,
7152,
834,
12450,
834,
747,
545,
490,
6,
4991,
1938,
834,
5525,
1152,
1499,
6,
5932,
834,
19457,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
201,
180,
6122,
599,
8532,
4046,
297,
61,
21680,
14932,
350,
4630,
6880,
272,
476,
6632,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Who is the candidate in election where the incumbent was first elected in 1980? | CREATE TABLE table_1341598_10 (
candidates VARCHAR,
first_elected VARCHAR
) | SELECT candidates FROM table_1341598_10 WHERE first_elected = 1980 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
1808,
3916,
834,
1714,
41,
4341,
584,
4280,
28027,
6,
166,
834,
19971,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2645,
19,
8,
4775,
16,
4356,
213,
8,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4341,
21680,
953,
834,
23747,
1808,
3916,
834,
1714,
549,
17444,
427,
166,
834,
19971,
3274,
6694,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
How many goals have Lost larger than 35, and Games smaller than 80? | CREATE TABLE table_name_33 (
goals_for VARCHAR,
lost VARCHAR,
games VARCHAR
) | SELECT COUNT(goals_for) FROM table_name_33 WHERE lost > 35 AND games < 80 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4201,
41,
1766,
834,
1161,
584,
4280,
28027,
6,
1513,
584,
4280,
28027,
6,
1031,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
1766,
43,
19576,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
839,
5405,
834,
1161,
61,
21680,
953,
834,
4350,
834,
4201,
549,
17444,
427,
1513,
2490,
3097,
3430,
1031,
3,
2,
2775,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What team scored more than 572 points and had more than 29 games? | CREATE TABLE table_name_44 (team VARCHAR, points VARCHAR, games VARCHAR) | SELECT team FROM table_name_44 WHERE points > 572 AND games > 29 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3628,
41,
11650,
584,
4280,
28027,
6,
979,
584,
4280,
28027,
6,
1031,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
372,
5799,
72,
145,
305,
5865,
979,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
372,
21680,
953,
834,
4350,
834,
3628,
549,
17444,
427,
979,
2490,
305,
5865,
3430,
1031,
2490,
2838,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
how many patients whose discharge location is disch-tran to psych hosp and diagnoses short title is chest pain nec? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.discharge_location = "DISCH-TRAN TO PSYCH HOSP" AND diagnoses.short_title = "Chest pain NEC" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
14798,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
564,
1499,
6,
2774,
1947,
834,
8547,
302,
1499,
6,
1246,
1499,
6,
103,
115,
1499,
6,
7285,
1499,
6,
1612,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
5... |
What is theoriginal air date of the episode directed by timothy van patten? | CREATE TABLE table_11951237_3 (original_air_date VARCHAR, directed_by VARCHAR) | SELECT original_air_date FROM table_11951237_3 WHERE directed_by = "Timothy Van Patten" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
19993,
24163,
4118,
834,
519,
41,
21878,
834,
2256,
834,
5522,
584,
4280,
28027,
6,
6640,
834,
969,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
21878,
79... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
926,
834,
2256,
834,
5522,
21680,
953,
834,
19993,
24163,
4118,
834,
519,
549,
17444,
427,
6640,
834,
969,
3274,
96,
382,
603,
32,
189,
63,
4480,
5192,
324,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
return me all the keywords in Databases area . | CREATE TABLE author (
aid int,
homepage varchar,
name varchar,
oid int
)
CREATE TABLE domain_journal (
did int,
jid int
)
CREATE TABLE organization (
continent varchar,
homepage varchar,
name varchar,
oid int
)
CREATE TABLE journal (
homepage varchar,
jid int,
name varchar
)
CREATE TABLE cite (
cited int,
citing int
)
CREATE TABLE publication_keyword (
kid int,
pid 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_publication (
did int,
pid int
)
CREATE TABLE domain_conference (
cid int,
did int
)
CREATE TABLE writes (
aid int,
pid int
)
CREATE TABLE conference (
cid int,
homepage varchar,
name varchar
)
CREATE TABLE domain_keyword (
did int,
kid int
)
CREATE TABLE domain_author (
aid int,
did int
)
CREATE TABLE keyword (
keyword varchar,
kid int
)
CREATE TABLE domain (
did int,
name varchar
) | SELECT keyword.keyword FROM domain, domain_keyword, keyword WHERE domain.did = domain_keyword.did AND domain.name = 'Databases' AND keyword.kid = domain_keyword.kid | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
2291,
41,
3052,
16,
17,
6,
22844,
3,
4331,
4059,
6,
564,
3,
4331,
4059,
6,
3,
32,
23,
26,
16,
17,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
3303,
834,
25340,
41... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
15693,
5,
4397,
6051,
21680,
3303,
6,
3303,
834,
4397,
6051,
6,
15693,
549,
17444,
427,
3303,
5,
12416,
3274,
3303,
834,
4397,
6051,
5,
12416,
3430,
3303,
5,
4350,
3274,
3,
31,
20367,
10925,
7,
31,
3430,
15693,
5,
... |
How many losses did the Golden rivers of hay have? | CREATE TABLE table_name_2 (losses INTEGER, golden_rivers VARCHAR) | SELECT AVG(losses) FROM table_name_2 WHERE golden_rivers = "hay" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
357,
41,
2298,
2260,
3,
21342,
17966,
6,
7069,
834,
5927,
277,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
571,
186,
8467,
410,
8,
7100,
16912,
13,
3,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
71,
17217,
599,
2298,
2260,
61,
21680,
953,
834,
4350,
834,
357,
549,
17444,
427,
7069,
834,
5927,
277,
3274,
96,
12687,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the Score of the Competition with a 5-0 Result? | CREATE TABLE table_42712 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) | SELECT "Score" FROM table_42712 WHERE "Result" = '5-0' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
591,
2555,
2122,
41,
96,
308,
342,
121,
1499,
6,
96,
553,
35,
76,
15,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
20119,
121,
1499,
6,
96,
5890,
4995,
4749,
121,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
134,
9022,
121,
21680,
953,
834,
591,
2555,
2122,
549,
17444,
427,
96,
20119,
121,
3274,
3,
31,
29325,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which Silver has a Total of 7, and a Gold larger than 1? | CREATE TABLE table_48067 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | SELECT AVG("Silver") FROM table_48067 WHERE "Total" = '7' AND "Gold" > '1' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
20579,
3708,
41,
96,
22557,
121,
1499,
6,
96,
567,
257,
121,
1499,
6,
96,
23576,
121,
490,
6,
96,
134,
173,
624,
121,
490,
6,
96,
22780,
29,
776,
121,
490,
6,
96,
3696,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
71,
17217,
599,
121,
134,
173,
624,
8512,
21680,
953,
834,
20579,
3708,
549,
17444,
427,
96,
3696,
1947,
121,
3274,
3,
31,
940,
31,
3430,
96,
23576,
121,
2490,
3,
31,
536,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100... |
What's the series number of the episode whose writer is David North? | CREATE TABLE table_22078972_2 (no_in_series INTEGER, written_by VARCHAR) | SELECT MAX(no_in_series) FROM table_22078972_2 WHERE written_by = "David North" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2884,
4560,
3914,
5865,
834,
357,
41,
29,
32,
834,
77,
834,
10833,
7,
3,
21342,
17966,
6,
1545,
834,
969,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
31,
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,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
29,
32,
834,
77,
834,
10833,
7,
61,
21680,
953,
834,
2884,
4560,
3914,
5865,
834,
357,
549,
17444,
427,
1545,
834,
969,
3274,
96,
308,
9,
6961,
1117,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
When was millwall the home team? | CREATE TABLE table_name_11 (date VARCHAR, home_team VARCHAR) | SELECT date FROM table_name_11 WHERE home_team = "millwall" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2596,
41,
5522,
584,
4280,
28027,
6,
234,
834,
11650,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
366,
47,
3293,
10279,
8,
234,
372,
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,
833,
21680,
953,
834,
4350,
834,
2596,
549,
17444,
427,
234,
834,
11650,
3274,
96,
12415,
10279,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Find the department name that is in Building 'Mergenthaler'. | CREATE TABLE DEPARTMENT (
DName VARCHAR,
Building VARCHAR
) | SELECT DName FROM DEPARTMENT WHERE Building = "Mergenthaler" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
3396,
19846,
11810,
41,
309,
23954,
584,
4280,
28027,
6,
5450,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
2588,
8,
3066,
564,
24,
19,
16,
5450,
3,
31,
329,
49,
729,
1395... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
309,
23954,
21680,
3396,
19846,
11810,
549,
17444,
427,
5450,
3274,
96,
329,
49,
729,
13958,
49,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
For which jockey was the weight in kg 53.5? | CREATE TABLE table_24915874_1 (jockey VARCHAR, weight__kg_ VARCHAR) | SELECT jockey FROM table_24915874_1 WHERE weight__kg_ = "53.5" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2266,
4729,
3449,
4581,
834,
536,
41,
1927,
75,
4397,
584,
4280,
28027,
6,
1293,
834,
834,
8711,
834,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
242,
84,
8624,
4397... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8624,
4397,
21680,
953,
834,
2266,
4729,
3449,
4581,
834,
536,
549,
17444,
427,
1293,
834,
834,
8711,
834,
3274,
96,
4867,
5,
17395,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What are the first name and last name of Linda Smith's advisor? | CREATE TABLE Student (advisor VARCHAR, fname VARCHAR, lname VARCHAR); CREATE TABLE Faculty (fname VARCHAR, lname VARCHAR, FacID VARCHAR) | SELECT T1.fname, T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T2.fname = "Linda" AND T2.lname = "Smith" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
6341,
41,
9,
26,
24680,
584,
4280,
28027,
6,
3,
89,
4350,
584,
4280,
28027,
6,
3,
40,
4350,
584,
4280,
28027,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
16896,
41,
89,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
89,
4350,
6,
332,
5411,
40,
4350,
21680,
16896,
6157,
332,
536,
3,
15355,
3162,
6341,
6157,
332,
357,
9191,
332,
5411,
371,
9,
75,
4309,
3274,
332,
4416,
9,
26,
24680,
549,
17444,
427,
332,
4416,
89,
43... |
What is the total number of loses of the club with a 4 position and less than 23 goals conceded? | CREATE TABLE table_60333 (
"Position" real,
"Club" text,
"Games played" real,
"Wins" real,
"Draws" real,
"Loses" real,
"Goals scored" real,
"Goals conceded" real,
"Points" real
) | SELECT COUNT("Loses") FROM table_60333 WHERE "Position" = '4' AND "Goals conceded" < '23' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3328,
23360,
41,
96,
345,
32,
7,
4749,
121,
490,
6,
96,
254,
11158,
121,
1499,
6,
96,
23055,
7,
1944,
121,
490,
6,
96,
18455,
7,
121,
490,
6,
96,
308,
10936,
7,
121,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
434,
32,
2260,
8512,
21680,
953,
834,
3328,
23360,
549,
17444,
427,
96,
345,
32,
7,
4749,
121,
3274,
3,
31,
591,
31,
3430,
96,
6221,
5405,
28325,
26,
121,
3,
2,
3,
31,
2773,
31,
1,
-100,
... |
What is the original title of the film for which Dersu Uzala was nominated? | CREATE TABLE table_name_10 (original_title VARCHAR, film_title_used_in_nomination VARCHAR) | SELECT original_title FROM table_name_10 WHERE film_title_used_in_nomination = "dersu uzala" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1714,
41,
21878,
834,
21869,
584,
4280,
28027,
6,
814,
834,
21869,
834,
10064,
834,
77,
834,
29,
32,
14484,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
926,
834,
21869,
21680,
953,
834,
4350,
834,
1714,
549,
17444,
427,
814,
834,
21869,
834,
10064,
834,
77,
834,
29,
32,
14484,
3274,
96,
588,
7,
76,
3,
14070,
521,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What was 2009, when 2012 was A, when 2003 was A, and then the Tournament was the Madrid Masters? | CREATE TABLE table_name_18 (
tournament VARCHAR
) | SELECT 2009 FROM table_name_18 WHERE 2012 = "a" AND 2003 = "a" AND tournament = "madrid masters" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2606,
41,
5892,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
47,
2464,
6,
116,
1673,
47,
71,
6,
116,
3888,
47,
71,
6,
11,
258,
8,
20502,
47,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2464,
21680,
953,
834,
4350,
834,
2606,
549,
17444,
427,
1673,
3274,
96,
9,
121,
3430,
3888,
3274,
96,
9,
121,
3430,
5892,
3274,
96,
11374,
4055,
2325,
7,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What was Eric Dickerson's longest run? | CREATE TABLE table_143 (
"Player" text,
"Games Played" real,
"Attempts" real,
"Yards" real,
"Touchdowns" real,
"Longest run" real
) | SELECT COUNT("Longest run") FROM table_143 WHERE "Player" = 'Eric Dickerson' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
25133,
41,
96,
15800,
49,
121,
1499,
6,
96,
23055,
7,
2911,
15,
26,
121,
490,
6,
96,
31108,
7,
121,
490,
6,
96,
476,
986,
7,
121,
490,
6,
96,
3696,
2295,
3035,
7,
121... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
434,
2444,
222,
661,
8512,
21680,
953,
834,
25133,
549,
17444,
427,
96,
15800,
49,
121,
3274,
3,
31,
427,
2234,
21269,
13515,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
cardiogenic shock ( hypotension with systolic blood pressure ( sbp ) < 90 mmhg and tachycardia > 100 beats / min, not due to hypovolemia and requiring inotropic support or balloon counterpulsation ) ; | CREATE TABLE table_test_21 (
"id" int,
"gender" string,
"systolic_blood_pressure_sbp" int,
"tachycardia" int,
"body_weight" float,
"renal_disease" bool,
"anaemia" bool,
"creatinine_clearance_cl" float,
"estimated_glomerular_filtration_rate_egfr" int,
"cardiogenic_shock" bool,
"history_of_dialysis" bool,
"prior_creatinine" float,
"severe_bradycardia" bool,
"diastolic_blood_pressure_dbp" int,
"hypotension" bool,
"heart_rate" int,
"serum_creatinine" float,
"hb" float,
"renal_transplantation" bool,
"hypertension" bool,
"age" float,
"NOUSE" float
) | SELECT * FROM table_test_21 WHERE cardiogenic_shock = 1 OR (hypotension = 1 AND systolic_blood_pressure_sbp < 90 AND tachycardia > 100) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4377,
834,
2658,
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,
4377,
834,
2658,
549,
17444,
427,
16216,
17890,
834,
7,
19076,
3274,
209,
4674,
41,
13397,
32,
13177,
3274,
209,
3430,
3,
7,
63,
7,
235,
2176,
834,
27798,
834,
26866,
834,
7,
115,
102,
3,
2,... |
What is the average final with an all around greater than 19.35 and a total over 40? | CREATE TABLE table_60943 (
"Place" real,
"Nation" text,
"All Around" real,
"Final" real,
"Total" real
) | SELECT AVG("Final") FROM table_60943 WHERE "All Around" > '19.35' AND "Total" > '40' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3328,
4240,
519,
41,
96,
345,
11706,
121,
490,
6,
96,
567,
257,
121,
1499,
6,
96,
6838,
16140,
121,
490,
6,
96,
371,
10270,
121,
490,
6,
96,
3696,
1947,
121,
490,
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,
71,
17217,
599,
121,
371,
10270,
8512,
21680,
953,
834,
3328,
4240,
519,
549,
17444,
427,
96,
6838,
16140,
121,
2490,
3,
31,
2294,
5,
2469,
31,
3430,
96,
3696,
1947,
121,
2490,
3,
31,
2445,
31,
1,
-100,
-100,
-100... |
Who was the away team when the attendance was 7,891? | CREATE TABLE table_name_64 (away_team VARCHAR, attendance VARCHAR) | SELECT away_team FROM table_name_64 WHERE attendance = "7,891" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4389,
41,
8006,
834,
11650,
584,
4280,
28027,
6,
11364,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
2645,
47,
8,
550,
372,
116,
8,
11364,
47,
7973,
3914,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
550,
834,
11650,
21680,
953,
834,
4350,
834,
4389,
549,
17444,
427,
11364,
3274,
96,
940,
6,
3914,
536,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
what is minimum days of hospital stay of patients whose primary disease is chest pain? | 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 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
) | SELECT MIN(demographic.days_stay) FROM demographic WHERE demographic.diagnosis = "CHEST PAIN" | [
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,
3,
17684,
599,
1778,
16587,
5,
1135,
7,
834,
21545,
61,
21680,
14798,
549,
17444,
427,
14798,
5,
25930,
4844,
159,
3274,
96,
8360,
6038,
276,
13570,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many games have an Order of 1006, and Goals larger than 192? | CREATE TABLE table_11662 (
"Order" real,
"Name" text,
"Seasons" text,
"Games" real,
"Goals" real
) | SELECT SUM("Games") FROM table_11662 WHERE "Order" = '1006' AND "Goals" > '192' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
20159,
4056,
41,
96,
7395,
588,
121,
490,
6,
96,
23954,
121,
1499,
6,
96,
134,
15,
9,
6577,
121,
1499,
6,
96,
23055,
7,
121,
490,
6,
96,
6221,
5405,
121,
490,
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,
180,
6122,
599,
121,
23055,
7,
8512,
21680,
953,
834,
20159,
4056,
549,
17444,
427,
96,
7395,
588,
121,
3274,
3,
31,
2915,
948,
31,
3430,
96,
6221,
5405,
121,
2490,
3,
31,
19978,
31,
1,
-100,
-100,
-100,
-100,
-10... |
How many faculty members do we have for each rank? Render a bar chart. | CREATE TABLE Faculty (
FacID INTEGER,
Lname VARCHAR(15),
Fname VARCHAR(15),
Rank VARCHAR(15),
Sex VARCHAR(1),
Phone INTEGER,
Room VARCHAR(5),
Building VARCHAR(13)
)
CREATE TABLE Participates_in (
stuid INTEGER,
actid INTEGER
)
CREATE TABLE Faculty_Participates_in (
FacID INTEGER,
actid INTEGER
)
CREATE TABLE Activity (
actid INTEGER,
activity_name varchar(25)
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
) | SELECT Rank, COUNT(Rank) FROM Faculty GROUP BY Rank | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
16896,
41,
1699,
75,
4309,
3,
21342,
17966,
6,
301,
4350,
584,
4280,
28027,
599,
1808,
201,
377,
4350,
584,
4280,
28027,
599,
1808,
201,
3,
22557,
584,
4280,
28027,
599,
1808,
201,
679... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
22557,
6,
2847,
17161,
599,
22557,
61,
21680,
16896,
350,
4630,
6880,
272,
476,
3,
22557,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
What year is Jiyai Shin the champion? | CREATE TABLE table_18004 (
"Year" real,
"Dates" text,
"Champion" text,
"Score" real,
"To par" text,
"Margin of victory" text,
"Purse ( $ )" real,
"Winners share ($)" real
) | SELECT COUNT("Year") FROM table_18004 WHERE "Champion" = 'Jiyai Shin' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
20829,
6348,
41,
96,
476,
2741,
121,
490,
6,
96,
308,
6203,
121,
1499,
6,
96,
254,
1483,
12364,
121,
1499,
6,
96,
134,
9022,
121,
490,
6,
96,
3696,
260,
121,
1499,
6,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
20829,
6348,
549,
17444,
427,
96,
254,
1483,
12364,
121,
3274,
3,
31,
683,
23,
63,
9,
23,
14215,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is the country when the score is 72-68-67=207? | CREATE TABLE table_name_79 (country VARCHAR, score VARCHAR) | SELECT country FROM table_name_79 WHERE score = 72 - 68 - 67 = 207 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4440,
41,
17529,
584,
4280,
28027,
6,
2604,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
125,
19,
8,
684,
116,
8,
2604,
19,
9455,
18,
3651,
18,
3708,
242... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
684,
21680,
953,
834,
4350,
834,
4440,
549,
17444,
427,
2604,
3274,
9455,
3,
18,
3,
3651,
3,
18,
3,
3708,
3274,
3,
26426,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What date was the name Coppa Acerbo? | CREATE TABLE table_name_7 (date VARCHAR, name VARCHAR) | SELECT date FROM table_name_7 WHERE name = "coppa acerbo" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
940,
41,
5522,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
833,
47,
8,
564,
10400,
102,
9,
71,
2110,
115,
32,
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,
833,
21680,
953,
834,
4350,
834,
940,
549,
17444,
427,
564,
3274,
96,
509,
1572,
9,
3,
9,
2110,
115,
32,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which engine had a 48kw (65 ps) @ 5600 rpm power? | CREATE TABLE table_5697 (
"Model" text,
"Engine" text,
"Displacement" text,
"Power" text,
"Torque" text
) | SELECT "Engine" FROM table_5697 WHERE "Power" = '48kw (65 ps) @ 5600 rpm' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4834,
4327,
41,
96,
24663,
121,
1499,
6,
96,
31477,
121,
1499,
6,
96,
23664,
11706,
297,
121,
1499,
6,
96,
23553,
121,
1499,
6,
96,
382,
127,
835,
121,
1499,
3,
61,
3,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
31477,
121,
21680,
953,
834,
4834,
4327,
549,
17444,
427,
96,
23553,
121,
3274,
3,
31,
3707,
157,
210,
41,
4122,
3,
102,
7,
61,
3320,
305,
6007,
3,
52,
2028,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What season was played at Safeco Field, against the Boston Red Sox, with a decision of L? | CREATE TABLE table_name_60 (
season VARCHAR,
opponent VARCHAR,
location VARCHAR,
decision VARCHAR
) | SELECT season FROM table_name_60 WHERE location = "safeco field" AND decision = "l" AND opponent = "boston red sox" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3328,
41,
774,
584,
4280,
28027,
6,
15264,
584,
4280,
28027,
6,
1128,
584,
4280,
28027,
6,
1357,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
774,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
774,
21680,
953,
834,
4350,
834,
3328,
549,
17444,
427,
1128,
3274,
96,
15233,
509,
1057,
121,
3430,
1357,
3274,
96,
40,
121,
3430,
15264,
3274,
96,
115,
32,
4411,
1131,
78,
226,
121,
1,
-100,
-100,
-100,
-100,
-100... |
How many UK events won for the contestant that won under 1 US event? | CREATE TABLE table_68182 (
"Name" text,
"From" text,
"Discipline" text,
"Events won (UK Series)" real,
"Events won (US Series)" real
) | SELECT "Events won (UK Series)" FROM table_68182 WHERE "Events won (US Series)" < '1' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3651,
2606,
357,
41,
96,
23954,
121,
1499,
6,
96,
22674,
121,
1499,
6,
96,
15683,
23,
10574,
15,
121,
1499,
6,
96,
427,
2169,
7,
751,
41,
15787,
4531,
61,
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,
427,
2169,
7,
751,
41,
15787,
4531,
61,
121,
21680,
953,
834,
3651,
2606,
357,
549,
17444,
427,
96,
427,
2169,
7,
751,
41,
3063,
4531,
61,
121,
3,
2,
3,
31,
536,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
... |
How many students does LORIA ONDERSMA teaches? | CREATE TABLE list (
lastname text,
firstname text,
grade number,
classroom number
)
CREATE TABLE teachers (
lastname text,
firstname text,
classroom number
) | SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "LORIA" AND T2.lastname = "ONDERSMA" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
570,
41,
336,
4350,
1499,
6,
166,
4350,
1499,
6,
2769,
381,
6,
4858,
381,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
3081,
41,
336,
4350,
1499,
6,
166,
4350,
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,
1935,
61,
21680,
570,
6157,
332,
536,
3,
15355,
3162,
3081,
6157,
332,
357,
9191,
332,
5411,
4057,
3082,
3274,
332,
4416,
4057,
3082,
549,
17444,
427,
332,
4416,
14672,
4350,
3274,
96,
5017,
22249,
1... |
When the driver peter gethin has a grid less than 25, what is the average number of laps? | CREATE TABLE table_name_4 (
laps INTEGER,
driver VARCHAR,
grid VARCHAR
) | SELECT AVG(laps) FROM table_name_4 WHERE driver = "peter gethin" AND grid < 25 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
591,
41,
14941,
7,
3,
21342,
17966,
6,
2535,
584,
4280,
28027,
6,
8634,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
366,
8,
2535,
158,
449,
129,
2907... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
71,
17217,
599,
8478,
7,
61,
21680,
953,
834,
4350,
834,
591,
549,
17444,
427,
2535,
3274,
96,
4995,
49,
129,
2907,
121,
3430,
8634,
3,
2,
944,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
On what day is geelong the home team? | CREATE TABLE table_4770 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | SELECT "Date" FROM table_4770 WHERE "Home team" = 'geelong' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4177,
2518,
41,
96,
19040,
372,
121,
1499,
6,
96,
19040,
372,
2604,
121,
1499,
6,
96,
188,
1343,
372,
121,
1499,
6,
96,
188,
1343,
372,
2604,
121,
1499,
6,
96,
553,
35,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
308,
342,
121,
21680,
953,
834,
4177,
2518,
549,
17444,
427,
96,
19040,
372,
121,
3274,
3,
31,
397,
15,
2961,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What was the score for the away team, southport? | CREATE TABLE table_51041 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
) | SELECT "Score" FROM table_51041 WHERE "Away team" = 'southport' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
25926,
4853,
41,
96,
382,
23,
15,
150,
121,
1499,
6,
96,
19040,
372,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
188,
1343,
372,
121,
1499,
6,
96,
308,
342,
121,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
134,
9022,
121,
21680,
953,
834,
25926,
4853,
549,
17444,
427,
96,
188,
1343,
372,
121,
3274,
3,
31,
7,
670,
107,
1493,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What human gene has a yeast ortholog of RAD26? | CREATE TABLE table_name_41 (human_gene__protein_ VARCHAR, yeast_ortholog VARCHAR) | SELECT human_gene__protein_ FROM table_name_41 WHERE yeast_ortholog = "rad26" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4853,
41,
12450,
834,
729,
15,
834,
834,
23083,
834,
584,
4280,
28027,
6,
17937,
834,
127,
189,
32,
2152,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
936,
834,
729,
15,
834,
834,
23083,
834,
21680,
953,
834,
4350,
834,
4853,
549,
17444,
427,
17937,
834,
127,
189,
32,
2152,
3274,
96,
5672,
2688,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
Name the Adelaide for Sydney of yes and Perth of yes | CREATE TABLE table_name_6 (
adelaide VARCHAR,
sydney VARCHAR,
perth VARCHAR
) | SELECT adelaide FROM table_name_6 WHERE sydney = "yes" AND perth = "yes" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
948,
41,
3,
15311,
5385,
584,
4280,
28027,
6,
3,
7,
63,
26,
3186,
584,
4280,
28027,
6,
399,
189,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3,
15311,
5385,
21680,
953,
834,
4350,
834,
948,
549,
17444,
427,
3,
7,
63,
26,
3186,
3274,
96,
10070,
121,
3430,
399,
189,
3274,
96,
10070,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What is the series number for the episode written by Kristen Dunphy and David Ogilvy? | CREATE TABLE table_19517621_3 (series__number INTEGER, written_by VARCHAR) | SELECT MAX(series__number) FROM table_19517621_3 WHERE written_by = "Kristen Dunphy and David Ogilvy" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
22464,
26782,
2658,
834,
519,
41,
10833,
7,
834,
834,
5525,
1152,
3,
21342,
17966,
6,
1545,
834,
969,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
939,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
10833,
7,
834,
834,
5525,
1152,
61,
21680,
953,
834,
22464,
26782,
2658,
834,
519,
549,
17444,
427,
1545,
834,
969,
3274,
96,
439,
52,
7176,
6393,
6941,
11,
1955,
411,
122,
173,
208,
63,
121,
1,
-100... |
Visualize a bar chart about the distribution of ACC_Regular_Season and ACC_Percent , and display ACC_Percent in ascending order. | CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
) | SELECT ACC_Regular_Season, ACC_Percent FROM basketball_match ORDER BY ACC_Percent | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
8498,
834,
19515,
41,
2271,
834,
4309,
16,
17,
6,
1121,
834,
4309,
16,
17,
6,
2271,
834,
23954,
1499,
6,
3,
14775,
834,
17748,
4885,
834,
134,
15,
9,
739,
1499,
6,
3,
14775,
834,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
3,
14775,
834,
17748,
4885,
834,
134,
15,
9,
739,
6,
3,
14775,
834,
12988,
3728,
21680,
8498,
834,
19515,
4674,
11300,
272,
476,
3,
14775,
834,
12988,
3728,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
If the home team was footscray which venue did they play it? | CREATE TABLE table_name_53 (
venue VARCHAR,
home_team VARCHAR
) | SELECT venue FROM table_name_53 WHERE home_team = "footscray" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4867,
41,
5669,
584,
4280,
28027,
6,
234,
834,
11650,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
156,
8,
234,
372,
47,
2418,
7,
2935,
63,
84,
5669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
5669,
21680,
953,
834,
4350,
834,
4867,
549,
17444,
427,
234,
834,
11650,
3274,
96,
6259,
7,
2935,
63,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What is the home team at the game with an Attendance of 2,029? | CREATE TABLE table_name_85 (home_team VARCHAR, attendance VARCHAR) | SELECT home_team FROM table_name_85 WHERE attendance = "2,029" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4433,
41,
5515,
834,
11650,
584,
4280,
28027,
6,
11364,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
234,
372,
44,
8,
467,
28,
46,
22497,
663... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4433,
549,
17444,
427,
11364,
3274,
96,
4482,
632,
3166,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Which province has the soccer stadium that holds 4,000 people? | CREATE TABLE table_27369069_1 (
province VARCHAR,
stadium_capacity VARCHAR
) | SELECT province FROM table_27369069_1 WHERE stadium_capacity = "4,000" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2555,
3420,
2394,
3951,
834,
536,
41,
7985,
584,
4280,
28027,
6,
14939,
834,
4010,
9,
6726,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
4073,
7985,
65,
8,
10749,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7985,
21680,
953,
834,
2555,
3420,
2394,
3951,
834,
536,
549,
17444,
427,
14939,
834,
4010,
9,
6726,
3274,
96,
13161,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
For artist names who are not from United States, show me a stacked that the x-axis is the Year_Join and the group by name in Y. | CREATE TABLE exhibition_record (
Exhibition_ID int,
Date text,
Attendance int
)
CREATE TABLE exhibition (
Exhibition_ID int,
Year int,
Theme text,
Artist_ID int,
Ticket_Price real
)
CREATE TABLE artist (
Artist_ID int,
Name text,
Country text,
Year_Join int,
Age int
) | SELECT Year_Join, COUNT(Year_Join) FROM artist WHERE Country <> 'United States' GROUP BY Name | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
4473,
834,
60,
7621,
41,
22371,
834,
4309,
16,
17,
6,
7678,
1499,
6,
22497,
663,
16,
17,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
4473,
41,
22371,
834,
4309,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2929,
834,
683,
32,
77,
6,
2847,
17161,
599,
476,
2741,
834,
683,
32,
77,
61,
21680,
2377,
549,
17444,
427,
6993,
3,
2,
3155,
3,
31,
5110,
23,
1054,
1323,
31,
350,
4630,
6880,
272,
476,
5570,
1,
-100,
-100,
-100... |
What's the date when Yelena Isinbayeva for Russia was in Beijing, China? | CREATE TABLE table_66262 (
"Event" text,
"Performance" text,
"Athlete" text,
"Nation" text,
"Place" text,
"Date" text
) | SELECT "Date" FROM table_66262 WHERE "Nation" = 'russia' AND "Place" = 'beijing, china' AND "Athlete" = 'yelena isinbayeva' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
3539,
2688,
357,
41,
96,
427,
2169,
121,
1499,
6,
96,
12988,
2032,
663,
121,
1499,
6,
96,
188,
189,
1655,
15,
121,
1499,
6,
96,
567,
257,
121,
1499,
6,
96,
345,
11706,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
308,
342,
121,
21680,
953,
834,
3539,
2688,
357,
549,
17444,
427,
96,
567,
257,
121,
3274,
3,
31,
26165,
31,
3430,
96,
345,
11706,
121,
3274,
3,
31,
5358,
354,
53,
6,
20576,
31,
3430,
96,
188,
189,
1655,
15,... |
HOW MANY POINTS DOES ALEX SPERAFICO HAVE WITH A GRID LARGER THAN 17? | CREATE TABLE table_name_43 (points INTEGER, driver VARCHAR, grid VARCHAR) | SELECT MIN(points) FROM table_name_43 WHERE driver = "alex sperafico" AND grid > 17 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4906,
41,
2700,
7,
3,
21342,
17966,
6,
2535,
584,
4280,
28027,
6,
8634,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
25144,
3,
9312,
476,
9915,
13777,
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,
3,
17684,
599,
2700,
7,
61,
21680,
953,
834,
4350,
834,
4906,
549,
17444,
427,
2535,
3274,
96,
138,
994,
3,
4339,
9,
4638,
32,
121,
3430,
8634,
2490,
1003,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is the catalogue no when the format is cd (limited edition steel-box) and the country is germany? | CREATE TABLE table_name_12 (catalogue_no VARCHAR, format VARCHAR, country VARCHAR) | SELECT catalogue_no FROM table_name_12 WHERE format = "cd (limited edition steel-box)" AND country = "germany" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2122,
41,
2138,
9,
10384,
834,
29,
32,
584,
4280,
28027,
6,
1910,
584,
4280,
28027,
6,
684,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
125,
19,
8,
1497... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
14978,
834,
29,
32,
21680,
953,
834,
4350,
834,
2122,
549,
17444,
427,
1910,
3274,
96,
75,
26,
41,
29901,
4182,
2470,
18,
2689,
61,
121,
3430,
684,
3274,
96,
1304,
348,
63,
121,
1,
-100,
-100,
-100,
-100,
-100,
-1... |
WHen jaime aff and christine langner are the performers what is the subject? | CREATE TABLE table_191105_3 (
subject VARCHAR,
performed_by VARCHAR
) | SELECT subject FROM table_191105_3 WHERE performed_by = "Jaime Aff and Christine Langner" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2294,
536,
12869,
834,
519,
41,
1426,
584,
4280,
28027,
6,
3032,
834,
969,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
3,
15313,
35,
2662,
5445,
3,
4127,
11,
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,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
1426,
21680,
953,
834,
2294,
536,
12869,
834,
519,
549,
17444,
427,
3032,
834,
969,
3274,
96,
683,
9595,
71,
89,
89,
11,
21110,
7073,
687,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
After December 19, what is the Game number with a Record of 21 4 7? | CREATE TABLE table_38946 (
"Game" real,
"December" real,
"Opponent" text,
"Score" text,
"Record" text,
"Points" real
) | SELECT COUNT("Game") FROM table_38946 WHERE "Record" = '21–4–7' AND "December" > '19' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
519,
3914,
4448,
41,
96,
23055,
121,
490,
6,
96,
29835,
121,
490,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
1649,
7621,
121,
1499,
6,
96,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
23055,
8512,
21680,
953,
834,
519,
3914,
4448,
549,
17444,
427,
96,
1649,
7621,
121,
3274,
3,
31,
2658,
104,
591,
104,
940,
31,
3430,
96,
29835,
121,
2490,
3,
31,
2294,
31,
1,
-100,
-100,
-1... |
What is the highest value for Other that has CONCACAF value of 0 a U.S. Open Cup larger than 0? | CREATE TABLE table_name_28 (other INTEGER, us_open_cup VARCHAR, concacaf VARCHAR) | SELECT MAX(other) FROM table_name_28 WHERE us_open_cup > 0 AND concacaf = 0 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2577,
41,
9269,
3,
21342,
17966,
6,
178,
834,
8751,
834,
4658,
584,
4280,
28027,
6,
975,
658,
658,
89,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
9269,
61,
21680,
953,
834,
4350,
834,
2577,
549,
17444,
427,
178,
834,
8751,
834,
4658,
2490,
3,
632,
3430,
975,
658,
658,
89,
3274,
3,
632,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
opponent broncos faced next after unlv | CREATE TABLE table_204_219 (
id number,
"date" text,
"time" text,
"opponent#" text,
"rank#" text,
"site" text,
"tv" text,
"result" text,
"attendance" number
) | SELECT "opponent#" FROM table_204_219 WHERE "date" > (SELECT "date" FROM table_204_219 WHERE "opponent#" = 'unlv') ORDER BY "date" LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
357,
2294,
41,
3,
23,
26,
381,
6,
96,
5522,
121,
1499,
6,
96,
715,
121,
1499,
6,
96,
32,
102,
9977,
4663,
121,
1499,
6,
96,
6254,
4663,
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,
32,
102,
9977,
4663,
121,
21680,
953,
834,
26363,
834,
357,
2294,
549,
17444,
427,
96,
5522,
121,
2490,
41,
23143,
14196,
96,
5522,
121,
21680,
953,
834,
26363,
834,
357,
2294,
549,
17444,
427,
96,
32,
102,
9977... |
The player who had 145 yards had how many touchdowns? | CREATE TABLE table_24020 (
"Week" real,
"Player" text,
"Team" text,
"Opponent" text,
"Carries" real,
"Yards" real,
"Average" text,
"Touchdowns" real
) | SELECT COUNT("Touchdowns") FROM table_24020 WHERE "Yards" = '145' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
11944,
1755,
41,
96,
518,
10266,
121,
490,
6,
96,
15800,
49,
121,
1499,
6,
96,
18699,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
6936,
2593,
121,
490,
6,
96,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
121,
3696,
2295,
3035,
7,
8512,
21680,
953,
834,
11944,
1755,
549,
17444,
427,
96,
476,
986,
7,
121,
3274,
3,
31,
20987,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
What year is the result 6th in munich, west germany? | CREATE TABLE table_11120 (
"Year" real,
"Tournament" text,
"Venue" text,
"Result" text,
"Extra" text
) | SELECT SUM("Year") FROM table_11120 WHERE "Result" = '6th' AND "Venue" = 'munich, west germany' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
15866,
1755,
41,
96,
476,
2741,
121,
490,
6,
96,
382,
1211,
20205,
17,
121,
1499,
6,
96,
553,
35,
76,
15,
121,
1499,
6,
96,
20119,
121,
1499,
6,
96,
5420,
1313,
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,
180,
6122,
599,
121,
476,
2741,
8512,
21680,
953,
834,
15866,
1755,
549,
17444,
427,
96,
20119,
121,
3274,
3,
31,
948,
189,
31,
3430,
96,
553,
35,
76,
15,
121,
3274,
3,
31,
11760,
524,
6,
4653,
13692,
63,
31,
1,... |
What is the Tie no for Away Team Ipswich Town? | CREATE TABLE table_name_26 (
tie_no VARCHAR,
away_team VARCHAR
) | SELECT tie_no FROM table_name_26 WHERE away_team = "ipswich town" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2688,
41,
6177,
834,
29,
32,
584,
4280,
28027,
6,
550,
834,
11650,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
2262,
15,
150,
21,
71,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
6177,
834,
29,
32,
21680,
953,
834,
4350,
834,
2688,
549,
17444,
427,
550,
834,
11650,
3274,
96,
15432,
210,
362,
1511,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
What is the grid for the Minardi Team USA with laps smaller than 90? | CREATE TABLE table_name_42 (grid VARCHAR, laps VARCHAR, team VARCHAR) | SELECT grid FROM table_name_42 WHERE laps < 90 AND team = "minardi team usa" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4165,
41,
3496,
26,
584,
4280,
28027,
6,
14941,
7,
584,
4280,
28027,
6,
372,
584,
4280,
28027,
61,
3,
32102,
32103,
32101,
32103,
363,
19,
8,
8634,
21,
8,
4765,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8634,
21680,
953,
834,
4350,
834,
4165,
549,
17444,
427,
14941,
7,
3,
2,
2777,
3430,
372,
3274,
96,
1109,
986,
23,
372,
178,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
What were the outcomes of matches with bill tilden florence ballin as opponents? | CREATE TABLE table_2127933_3 (
outcome VARCHAR,
opponents VARCHAR
) | SELECT outcome FROM table_2127933_3 WHERE opponents = "Bill Tilden Florence Ballin" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
24837,
4440,
4201,
834,
519,
41,
6138,
584,
4280,
28027,
6,
16383,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
363,
130,
8,
6353,
13,
6407,
28,
2876,
3,
17,
173... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
6138,
21680,
953,
834,
24837,
4440,
4201,
834,
519,
549,
17444,
427,
16383,
3274,
96,
279,
1092,
332,
173,
537,
18726,
4155,
77,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
What was the grid placement for the Maserati that completed 14 laps? | CREATE TABLE table_53228 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | SELECT "Grid" FROM table_53228 WHERE "Constructor" = 'maserati' AND "Laps" = '14' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4867,
357,
2577,
41,
96,
20982,
52,
121,
1499,
6,
96,
4302,
7593,
127,
121,
1499,
6,
96,
3612,
102,
7,
121,
490,
6,
96,
13368,
87,
1649,
11809,
26,
121,
1499,
6,
96,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
13313,
26,
121,
21680,
953,
834,
4867,
357,
2577,
549,
17444,
427,
96,
4302,
7593,
127,
121,
3274,
3,
31,
2754,
15,
6850,
31,
3430,
96,
3612,
102,
7,
121,
3274,
3,
31,
2534,
31,
1,
-100,
-100,
-100,
-100,
-1... |
Name the total number of points for 44 game and january more than 15 | CREATE TABLE table_name_78 (
points VARCHAR,
game VARCHAR,
january VARCHAR
) | SELECT COUNT(points) FROM table_name_78 WHERE game = 44 AND january > 15 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3940,
41,
979,
584,
4280,
28027,
6,
467,
584,
4280,
28027,
6,
3,
7066,
76,
1208,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
5570,
8,
792,
381,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
2700,
7,
61,
21680,
953,
834,
4350,
834,
3940,
549,
17444,
427,
467,
3274,
8537,
3430,
3,
7066,
76,
1208,
2490,
627,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
what is since 10/2103 maximum prealbumin value of patient 006-143187? | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
) | SELECT MAX(lab.labresult) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-143187')) AND lab.labname = 'prealbumin' AND STRFTIME('%y-%m', lab.labresulttime) >= '2103-10' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1058,
41,
1058,
23,
26,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
1058,
4350,
1499,
6,
1058,
715,
97,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
2179,
9339,
41,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
4800,
4,
599,
9339,
5,
9339,
60,
7,
83,
17,
61,
21680,
7690,
549,
17444,
427,
7690,
5,
10061,
15129,
21545,
23,
26,
3388,
41,
23143,
14196,
1868,
5,
10061,
15129,
21545,
23,
26,
21680,
1868,
549,
17444,
427,
1868,
... |
Why did Majid bagherinia leave? | CREATE TABLE table_22297198_3 (
manner_of_departure VARCHAR,
outgoing_manager VARCHAR
) | SELECT manner_of_departure FROM table_22297198_3 WHERE outgoing_manager = "Majid Bagherinia" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
26144,
4327,
24151,
834,
519,
41,
3107,
834,
858,
834,
221,
2274,
1462,
584,
4280,
28027,
6,
91,
9545,
834,
24185,
584,
4280,
28027,
3,
61,
3,
32102,
32103,
32101,
32103,
161... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3107,
834,
858,
834,
221,
2274,
1462,
21680,
953,
834,
26144,
4327,
24151,
834,
519,
549,
17444,
427,
91,
9545,
834,
24185,
3274,
96,
329,
17815,
26,
8055,
760,
77,
23,
9,
121,
1,
-100,
-100,
-100,
-100,
-100,
-100,... |
For those records from the products and each product's manufacturer, find name and the sum of price , and group by attribute name, and visualize them by a bar chart, I want to order by the total number of price in descending. | 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 T2.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T1.Price DESC | [
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,
4416,
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,
332,
441... |
what is only season that zani -lrb- v6 -rrb- won ? | CREATE TABLE table_203_288 (
id number,
"season" text,
"premiere date" text,
"the winner" text,
"runner-up" text,
"finalists" text,
"contestants in order of elimination" text,
"number of contestants" text,
"number of concerts" number
) | SELECT "season" FROM table_203_288 WHERE "the winner" = 'zani (v6)' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
357,
4060,
41,
3,
23,
26,
381,
6,
96,
9476,
121,
1499,
6,
96,
2026,
2720,
60,
833,
121,
1499,
6,
96,
532,
4668,
121,
1499,
6,
96,
10806,
18,
413,
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,
9476,
121,
21680,
953,
834,
23330,
834,
357,
4060,
549,
17444,
427,
96,
532,
4668,
121,
3274,
3,
31,
10241,
23,
41,
208,
10938,
31,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
What si the youngest employee's first and last name? | CREATE TABLE invoice_lines (
id number,
invoice_id number,
track_id number,
unit_price number,
quantity number
)
CREATE TABLE sqlite_sequence (
name text,
seq text
)
CREATE TABLE artists (
id number,
name text
)
CREATE TABLE media_types (
id number,
name text
)
CREATE TABLE albums (
id number,
title text,
artist_id number
)
CREATE TABLE employees (
id number,
last_name text,
first_name text,
title text,
reports_to number,
birth_date time,
hire_date time,
address text,
city text,
state text,
country text,
postal_code text,
phone text,
fax text,
email text
)
CREATE TABLE customers (
id number,
first_name text,
last_name text,
company text,
address text,
city text,
state text,
country text,
postal_code text,
phone text,
fax text,
email text,
support_rep_id number
)
CREATE TABLE playlist_tracks (
playlist_id number,
track_id number
)
CREATE TABLE tracks (
id number,
name text,
album_id number,
media_type_id number,
genre_id number,
composer text,
milliseconds number,
bytes number,
unit_price number
)
CREATE TABLE invoices (
id number,
customer_id number,
invoice_date time,
billing_address text,
billing_city text,
billing_state text,
billing_country text,
billing_postal_code text,
total number
)
CREATE TABLE genres (
id number,
name text
)
CREATE TABLE playlists (
id number,
name text
) | SELECT first_name, last_name FROM employees ORDER BY birth_date DESC LIMIT 1 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
10921,
834,
6972,
41,
3,
23,
26,
381,
6,
10921,
834,
23,
26,
381,
6,
1463,
834,
23,
26,
381,
6,
1745,
834,
102,
4920,
381,
6,
8708,
381,
3,
61,
3,
32102,
32103,
32102,
205,
4386,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
166,
834,
4350,
6,
336,
834,
4350,
21680,
1652,
4674,
11300,
272,
476,
3879,
834,
5522,
309,
25067,
8729,
12604,
209,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Can you return all detailed info of jobs which was done by any of the employees who is presently earning a salary on and above 12000? | CREATE TABLE regions (
region_id number,
region_name text
)
CREATE TABLE departments (
department_id number,
department_name text,
manager_id number,
location_id number
)
CREATE TABLE locations (
location_id number,
street_address text,
postal_code text,
city text,
state_province text,
country_id text
)
CREATE TABLE countries (
country_id text,
country_name text,
region_id number
)
CREATE TABLE job_history (
employee_id number,
start_date time,
end_date time,
job_id text,
department_id number
)
CREATE TABLE employees (
employee_id number,
first_name text,
last_name text,
email text,
phone_number text,
hire_date time,
job_id text,
salary number,
commission_pct number,
manager_id number,
department_id number
)
CREATE TABLE jobs (
job_id text,
job_title text,
min_salary number,
max_salary number
) | SELECT * FROM job_history AS T1 JOIN employees AS T2 ON T1.employee_id = T2.employee_id WHERE T2.salary >= 12000 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
6266,
41,
1719,
834,
23,
26,
381,
6,
1719,
834,
4350,
1499,
3,
61,
3,
32102,
32103,
32102,
205,
4386,
6048,
332,
17098,
10521,
41,
3066,
834,
23,
26,
381,
6,
3066,
834,
4350,
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,
1429,
21680,
613,
834,
10193,
10972,
6157,
332,
536,
3,
15355,
3162,
1652,
6157,
332,
357,
9191,
332,
5411,
15,
51,
7379,
63,
15,
15,
834,
23,
26,
3274,
332,
4416,
15,
51,
7379,
63,
15,
15,
834,
23,
26,
549,
174... |
what is diagnoses long title of subject name alice nixon? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) | SELECT diagnoses.long_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Alice Nixon" | [
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,
18730,
7,
5,
2961,
834,
21869,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
549,
17444,
427,
14798,
5,
4350,
3274,
96,
188,
... |
Which Notes have a Distance larger than 7, and a Location of aplin? | CREATE TABLE table_64573 (
"County" text,
"Location" text,
"Distance" real,
"Total" real,
"Notes" text
) | SELECT "Notes" FROM table_64573 WHERE "Distance" > '7' AND "Location" = 'aplin' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
4389,
3436,
519,
41,
96,
10628,
63,
121,
1499,
6,
96,
434,
32,
75,
257,
121,
1499,
6,
96,
308,
23,
8389,
121,
490,
6,
96,
3696,
1947,
121,
490,
6,
96,
10358,
15,
7,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
96,
10358,
15,
7,
121,
21680,
953,
834,
4389,
3436,
519,
549,
17444,
427,
96,
308,
23,
8389,
121,
2490,
3,
31,
940,
31,
3430,
96,
434,
32,
75,
257,
121,
3274,
3,
31,
9,
10574,
31,
1,
-100,
-100,
-100,
-100,
-1... |
Where 19 seats were won, what was the minimum number of forfeited seats? | CREATE TABLE table_22582663_1 (forfeited_in_seats INTEGER, seats_won VARCHAR) | SELECT MIN(forfeited_in_seats) FROM table_22582663_1 WHERE seats_won = 19 | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2884,
3449,
2688,
3891,
834,
536,
41,
1161,
89,
15,
23,
1054,
834,
77,
834,
7,
1544,
7,
3,
21342,
17966,
6,
6116,
834,
210,
106,
584,
4280,
28027,
61,
3,
32102,
32103,
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,
3,
17684,
599,
1161,
89,
15,
23,
1054,
834,
77,
834,
7,
1544,
7,
61,
21680,
953,
834,
2884,
3449,
2688,
3891,
834,
536,
549,
17444,
427,
6116,
834,
210,
106,
3274,
957,
1,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
how many patients are admitted under clinic referral/premature and diagnosed with icd9 code 2800? | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_location = "CLINIC REFERRAL/PREMATURE" AND diagnoses.icd9_code = "2800" | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
7744,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
23,
1071,
21545,
834,
23,
26,
1499,
6,
2672,
834,
6137,
1499,
6,
2672,
1499,
6,
5403,
651,
834,
26,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
18730,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
18730,
7,
5,
8399,
51,
834,
23,
26,
5... |
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, draw a bar chart about the distribution of hire_date and the average of salary bin hire_date by weekday, and display by the total number from low to high. | CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
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 departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
) | SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY AVG(SALARY) | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
1440,
41,
2847,
17161,
11824,
834,
4309,
3,
4331,
4059,
16426,
6,
2847,
17161,
11824,
834,
567,
17683,
3,
4331,
4059,
599,
2445,
201,
4083,
517,
9215,
834,
4309,
7908,
1982,
599,
1714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
3,
23143,
14196,
454,
14132,
834,
308,
6048,
6,
71,
17217,
599,
134,
4090,
24721,
61,
21680,
1652,
549,
17444,
427,
180,
4090,
24721,
272,
7969,
518,
23394,
3,
25129,
3430,
586,
2313,
3430,
3,
6657,
329,
16994,
9215,
834,
4051,
382,
... |
How many Liberal candidates have Seats in House smaller than 245, and a Popular vote larger than 350,512, and Seats won smaller than 139, and a Seat Change of +28? | CREATE TABLE table_35586 (
"Year" text,
"Seats in House" real,
"Liberal candidates" real,
"Seats won" real,
"Seat Change" text,
"Popular vote" real,
"% of popular vote" text,
"Result" text,
"Liberal leader" text
) | SELECT COUNT("Liberal candidates") FROM table_35586 WHERE "Seats in House" < '245' AND "Popular vote" > '350,512' AND "Seats won" < '139' AND "Seat Change" = '+28' | [
32100,
32103,
32102,
205,
4386,
6048,
332,
17098,
953,
834,
2469,
755,
3840,
41,
96,
476,
2741,
121,
1499,
6,
96,
134,
1544,
7,
16,
1384,
121,
490,
6,
96,
14615,
49,
138,
4341,
121,
490,
6,
96,
134,
1544,
7,
751,
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,
2847,
17161,
599,
121,
14615,
49,
138,
4341,
8512,
21680,
953,
834,
2469,
755,
3840,
549,
17444,
427,
96,
134,
1544,
7,
16,
1384,
121,
3,
2,
3,
31,
357,
2128,
31,
3430,
96,
27773,
4885,
2902,
121,
2490,
3,
31,
1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.