answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k | input_ids listlengths 512 512 | labels listlengths 512 512 |
|---|---|---|---|---|
SELECT COUNT(result) FROM table_1342149_6 WHERE district = "California 29" | How many results does the California 29 voting district have? | CREATE TABLE table_1342149_6 (result VARCHAR, district VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2658,
3647,
834,
948,
41,
60,
7,
83,
17,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
61,
11860,
10,
571,
186,
772,
405,
8,
1826,
2838,
10601,
3939,
43,
58,
11801,
10,
1... | [
3,
23143,
14196,
2847,
17161,
599,
60,
7,
83,
17,
61,
21680,
953,
834,
23747,
2658,
3647,
834,
948,
549,
17444,
427,
3939,
3274,
96,
14318,
99,
127,
29,
23,
9,
2838,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT StuID FROM Student WHERE Sex = 'M' | Show student ids for all male students. | CREATE TABLE Student (StuID VARCHAR, Sex VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
6341,
41,
13076,
4309,
584,
4280,
28027,
6,
679,
226,
584,
4280,
28027,
61,
11860,
10,
3111,
1236,
3,
23,
26,
7,
21,
66,
5069,
481,
5,
11801,
10,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
3,
23143,
14196,
3,
13076,
4309,
21680,
6341,
549,
17444,
427,
679,
226,
3274,
3,
31,
329,
31,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2180" AND prescriptions.route = "IVPCA" | give the number of patients who are born before 2180 with a ivpca drug route. | 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 lab (
subject_id text,
hadm_id text,
... | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
18730,
7,
41,
1426,
834,
23,
26,
1499,
6,
141,
51,
834,
23,
26,
1499,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
710,
834,
21869,
1499,
6,
307,
834,
21869,
1499,
3,
61,
205,
4386,
6048,
... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7744,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7744,
7,
5,
8399,
51,
834,
23,
26,
549... |
SELECT party FROM table_1342149_6 WHERE incumbent = "Clair Engle" | Which party had Clair Engle as an incumbent? | CREATE TABLE table_1342149_6 (party VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2658,
3647,
834,
948,
41,
8071,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
4073,
1088,
141,
4779,
2256,
19650,
109,
38,
46,
28406,
58,
11801,
10,
1,
0,
0... | [
3,
23143,
14196,
1088,
21680,
953,
834,
23747,
2658,
3647,
834,
948,
549,
17444,
427,
28406,
3274,
96,
254,
40,
2256,
19650,
109,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT COUNT(*) FROM Student WHERE age = 18 | How many students are age 18? | CREATE TABLE Student (age VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
6341,
41,
545,
584,
4280,
28027,
61,
11860,
10,
571,
186,
481,
33,
1246,
507,
58,
11801,
10,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
6341,
549,
17444,
427,
1246,
3274,
507,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... |
SELECT FIRST_NAME, SALARY FROM employees ORDER BY SALARY DESC | You can return a bar chart with employees' first names and their salaries, display by the y axis from high to low. | CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,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),
... | [
4398,
7,
10,
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,
6,
63... | [
3,
23143,
14196,
30085,
834,
567,
17683,
6,
180,
4090,
24721,
21680,
1652,
4674,
11300,
272,
476,
180,
4090,
24721,
309,
25067,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT party FROM table_1342198_13 WHERE incumbent = "Sid Simpson" | What party does sid simpson represent? | CREATE TABLE table_1342198_13 (party VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
24151,
834,
2368,
41,
8071,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
363,
1088,
405,
108,
26,
108,
1167,
739,
4221,
58,
11801,
10,
1,
0,
0,
0,
0... | [
3,
23143,
14196,
1088,
21680,
953,
834,
2368,
4165,
24151,
834,
2368,
549,
17444,
427,
28406,
3274,
96,
134,
23,
26,
21965,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
SELECT StuID FROM Student WHERE age > 20 | Show all student ids who are older than 20. | CREATE TABLE Student (StuID VARCHAR, age INTEGER) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
6341,
41,
13076,
4309,
584,
4280,
28027,
6,
1246,
3,
21342,
17966,
61,
11860,
10,
3111,
66,
1236,
3,
23,
26,
7,
113,
33,
2749,
145,
460,
5,
11801,
10,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
3,
23143,
14196,
3,
13076,
4309,
21680,
6341,
549,
17444,
427,
1246,
2490,
460,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT scores FROM table_23292220_17 WHERE seans_team = "Chris Ramsey and Carol Vorderman" | Name the scores for chris ramsey and carol vorderman | CREATE TABLE table_23292220_17 (
scores VARCHAR,
seans_team VARCHAR
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2773,
3166,
2884,
1755,
834,
2517,
41,
7586,
584,
4280,
28027,
6,
142,
3247,
834,
11650,
584,
4280,
28027,
3,
61,
11860,
10,
5570,
8,
7586,
21,
3,
524,
52,
159,
3,
2375,
7,
15,... | [
3,
23143,
14196,
7586,
21680,
953,
834,
2773,
3166,
2884,
1755,
834,
2517,
549,
17444,
427,
142,
3247,
834,
11650,
3274,
96,
3541,
52,
159,
31730,
11,
12526,
1526,
588,
348,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT COUNT(candidates) FROM table_1342198_13 WHERE incumbent = "Barratt O'Hara" | How many candidates ran against barratt o'hara? | CREATE TABLE table_1342198_13 (candidates VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
24151,
834,
2368,
41,
1608,
12416,
6203,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
571,
186,
4341,
4037,
581,
1207,
1795,
17,
3,
32,
31,
14888,
58,
... | [
3,
23143,
14196,
2847,
17161,
599,
1608,
12416,
6203,
61,
21680,
953,
834,
2368,
4165,
24151,
834,
2368,
549,
17444,
427,
28406,
3274,
96,
14851,
1795,
17,
411,
31,
15537,
9,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... |
SELECT city_code FROM Student WHERE LName = "Kim" | Which city does the student whose last name is "Kim" live in? | CREATE TABLE Student (city_code VARCHAR, LName VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
6341,
41,
6726,
834,
4978,
584,
4280,
28027,
6,
301,
23954,
584,
4280,
28027,
61,
11860,
10,
4073,
690,
405,
8,
1236,
3,
2544,
336,
564,
19,
96,
439,
603,
121,
619,
16,
58,
11801,
10,
1,... | [
3,
23143,
14196,
690,
834,
4978,
21680,
6341,
549,
17444,
427,
301,
23954,
3274,
96,
439,
603,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT games FROM table_name_86 WHERE tied = 10 | What is the number of games for the season with 10 ties? | CREATE TABLE table_name_86 (
games VARCHAR,
tied VARCHAR
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3840,
41,
1031,
584,
4280,
28027,
6,
10422,
584,
4280,
28027,
3,
61,
11860,
10,
363,
19,
8,
381,
13,
1031,
21,
8,
774,
28,
335,
3,
3010,
58,
11801,
10,
1,
0,
0,
... | [
3,
23143,
14196,
1031,
21680,
953,
834,
4350,
834,
3840,
549,
17444,
427,
10422,
3274,
335,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... |
SELECT first_elected FROM table_1342198_13 WHERE incumbent = "Barratt O'Hara" | What year was incumbent barratt o'hara first elected? | CREATE TABLE table_1342198_13 (first_elected VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
24151,
834,
2368,
41,
14672,
834,
19971,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
363,
215,
47,
28406,
1207,
1795,
17,
3,
32,
31,
14888,
166,
8160,
... | [
3,
23143,
14196,
166,
834,
19971,
21680,
953,
834,
2368,
4165,
24151,
834,
2368,
549,
17444,
427,
28406,
3274,
96,
14851,
1795,
17,
411,
31,
15537,
9,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT Advisor FROM Student WHERE StuID = 1004 | Who is the advisor of student with ID 1004? | CREATE TABLE Student (Advisor VARCHAR, StuID VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
6341,
41,
188,
26,
24680,
584,
4280,
28027,
6,
3,
13076,
4309,
584,
4280,
28027,
61,
11860,
10,
2645,
19,
8,
8815,
13,
1236,
28,
4699,
910,
591,
58,
11801,
10,
1,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
17228,
21680,
6341,
549,
17444,
427,
3,
13076,
4309,
3274,
910,
591,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT year FROM table_name_9 WHERE event = "junior race" AND position = "8th" | What year did she place 8th in the junior race? | CREATE TABLE table_name_9 (
year VARCHAR,
event VARCHAR,
position VARCHAR
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1298,
41,
215,
584,
4280,
28027,
6,
605,
584,
4280,
28027,
6,
1102,
584,
4280,
28027,
3,
61,
11860,
10,
363,
215,
410,
255,
286,
505,
189,
16,
8,
9212,
1964,
58,
118... | [
3,
23143,
14196,
215,
21680,
953,
834,
4350,
834,
1298,
549,
17444,
427,
605,
3274,
96,
6959,
23,
127,
1964,
121,
3430,
1102,
3274,
96,
927,
189,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT MIN(first_elected) FROM table_1342198_17 WHERE incumbent = "Noble Jones Gregory" | How many results for minimum first elected incumbent Noble Jones Gregory? | CREATE TABLE table_1342198_17 (first_elected INTEGER, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
24151,
834,
2517,
41,
14672,
834,
19971,
3,
21342,
17966,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
571,
186,
772,
21,
2559,
166,
8160,
28406,
24708,
6193,
25431,
58,
... | [
3,
23143,
14196,
3,
17684,
599,
14672,
834,
19971,
61,
21680,
953,
834,
2368,
4165,
24151,
834,
2517,
549,
17444,
427,
28406,
3274,
96,
4168,
2296,
6193,
25431,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... |
SELECT COUNT(*) FROM Student WHERE city_code = "HKG" OR city_code = "CHI" | How many students live in HKG or CHI? | CREATE TABLE Student (city_code VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
6341,
41,
6726,
834,
4978,
584,
4280,
28027,
61,
11860,
10,
571,
186,
481,
619,
16,
454,
18256,
42,
3,
17226,
58,
11801,
10,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
6341,
549,
17444,
427,
690,
834,
4978,
3274,
96,
566,
18256,
121,
4674,
690,
834,
4978,
3274,
96,
17226,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
SELECT product_category_description, COUNT(product_category_description) FROM Ref_Product_Categories AS T1 JOIN Products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_description LIKE '%t%' GROUP BY product_category_description ORDER BY COUNT(product_category_description) | A bar chart for what are the number of the descriptions of the categories that products with product descriptions that contain the letter t are in?, and rank y-axis in ascending order. | CREATE TABLE Ref_Characteristic_Types (
characteristic_type_code VARCHAR(15),
characteristic_type_description VARCHAR(80)
)
CREATE TABLE Products (
product_id INTEGER,
color_code VARCHAR(15),
product_category_code VARCHAR(15),
product_name VARCHAR(80),
typical_buying_price VARCHAR(20),
... | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
419,
89,
834,
18947,
2708,
49,
3040,
834,
25160,
7,
41,
16115,
834,
6137,
834,
4978,
584,
4280,
28027,
599,
1808,
201,
16115,
834,
6137,
834,
221,
11830,
584,
4280,
28027,
599,
2079,
61,
3,
... | [
3,
23143,
14196,
556,
834,
8367,
839,
651,
834,
221,
11830,
6,
2847,
17161,
599,
15892,
834,
8367,
839,
651,
834,
221,
11830,
61,
21680,
419,
89,
834,
3174,
7472,
834,
18610,
6066,
2593,
6157,
332,
536,
3,
15355,
3162,
7554,
6157,
3... |
SELECT COUNT(district) FROM table_1342198_17 WHERE incumbent = "Noble Jones Gregory" | How many results for incumbent Noble Jones Gregory? | CREATE TABLE table_1342198_17 (district VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
24151,
834,
2517,
41,
26,
23,
20066,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
571,
186,
772,
21,
28406,
24708,
6193,
25431,
58,
11801,
10,
1,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
26,
23,
20066,
61,
21680,
953,
834,
2368,
4165,
24151,
834,
2517,
549,
17444,
427,
28406,
3274,
96,
4168,
2296,
6193,
25431,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT MIN(age), AVG(age), MAX(age) FROM Student | Show the minimum, average, and maximum age of all students. | CREATE TABLE Student (age INTEGER) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
6341,
41,
545,
3,
21342,
17966,
61,
11860,
10,
3111,
8,
2559,
6,
1348,
6,
11,
2411,
1246,
13,
66,
481,
5,
11801,
10,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
3,
23143,
14196,
3,
17684,
599,
545,
201,
71,
17217,
599,
545,
201,
4800,
4,
599,
545,
61,
21680,
6341,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... |
SELECT MIN("Earnings ($)") FROM table_56530 WHERE "Money list rank" = '6' AND "Starts" < '22' | What is the smallest Earnings that has a Money list rank of 6 and Starts smaller than 22? | CREATE TABLE table_56530 (
"Year" text,
"Starts" real,
"Cuts made" real,
"Wins" real,
"Top 10" real,
"Top 25" real,
"Earnings ($)" real,
"Money list rank" text
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
4834,
26918,
41,
96,
476,
2741,
121,
1499,
6,
96,
7681,
17,
7,
121,
490,
6,
96,
15784,
17,
7,
263,
121,
490,
6,
96,
18455,
7,
121,
490,
6,
96,
22481,
335,
121,
490,
6,
96,
... | [
3,
23143,
14196,
3,
17684,
599,
121,
427,
291,
29,
53,
7,
8785,
61,
8512,
21680,
953,
834,
4834,
26918,
549,
17444,
427,
96,
9168,
15,
63,
570,
11003,
121,
3274,
3,
31,
948,
31,
3430,
96,
7681,
17,
7,
121,
3,
2,
3,
31,
2884,
... |
SELECT candidates FROM table_1342198_18 WHERE district = "Louisiana 1" | Who is the candidate wehre district is louisiana 1? | CREATE TABLE table_1342198_18 (candidates VARCHAR, district VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
24151,
834,
2606,
41,
1608,
12416,
6203,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
61,
11860,
10,
2645,
19,
8,
4775,
3,
15966,
15,
3939,
19,
16585,
159,
13662,
209,
... | [
3,
23143,
14196,
4341,
21680,
953,
834,
2368,
4165,
24151,
834,
2606,
549,
17444,
427,
3939,
3274,
96,
28365,
13662,
209,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT LName FROM Student WHERE age = (SELECT MIN(age) FROM Student) | What is the last name of the youngest student? | CREATE TABLE Student (LName VARCHAR, age INTEGER) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
6341,
41,
434,
23954,
584,
4280,
28027,
6,
1246,
3,
21342,
17966,
61,
11860,
10,
363,
19,
8,
336,
564,
13,
8,
19147,
1236,
58,
11801,
10,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
301,
23954,
21680,
6341,
549,
17444,
427,
1246,
3274,
41,
23143,
14196,
3,
17684,
599,
545,
61,
21680,
6341,
61,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT SUM("Year") FROM table_8509 WHERE "Moves" = '32' | What year had 32 moves? | CREATE TABLE table_8509 (
"White" text,
"Black" text,
"Year" real,
"Result" text,
"Moves" real,
"Tournament" text,
"Opening" text
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
4433,
4198,
41,
96,
25571,
121,
1499,
6,
96,
20096,
121,
1499,
6,
96,
476,
2741,
121,
490,
6,
96,
20119,
121,
1499,
6,
96,
329,
32,
162,
7,
121,
490,
6,
96,
382,
1211,
20205,... | [
3,
23143,
14196,
180,
6122,
599,
121,
476,
2741,
8512,
21680,
953,
834,
4433,
4198,
549,
17444,
427,
96,
329,
32,
162,
7,
121,
3274,
3,
31,
2668,
31,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT party FROM table_1342198_18 WHERE incumbent = "Overton Brooks" | What is the party where the incumbent is overton brooks? | CREATE TABLE table_1342198_18 (party VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
24151,
834,
2606,
41,
8071,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
363,
19,
8,
1088,
213,
8,
28406,
19,
147,
17,
106,
3,
14370,
7,
58,
11801,
... | [
3,
23143,
14196,
1088,
21680,
953,
834,
2368,
4165,
24151,
834,
2606,
549,
17444,
427,
28406,
3274,
96,
23847,
17,
106,
9083,
7,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT StuID FROM Student WHERE age = (SELECT MAX(age) FROM Student) | Show the student id of the oldest student. | CREATE TABLE Student (StuID VARCHAR, age INTEGER) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
6341,
41,
13076,
4309,
584,
4280,
28027,
6,
1246,
3,
21342,
17966,
61,
11860,
10,
3111,
8,
1236,
3,
23,
26,
13,
8,
10043,
1236,
5,
11801,
10,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
3,
23143,
14196,
3,
13076,
4309,
21680,
6341,
549,
17444,
427,
1246,
3274,
41,
23143,
14196,
4800,
4,
599,
545,
61,
21680,
6341,
61,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT "barrel length" FROM table_204_343 WHERE "model" = 'm1894 rifle' | how long was the m1894 rifle 's barrel ? | CREATE TABLE table_204_343 (
id number,
"nation" text,
"model" text,
"length" text,
"barrel length" text,
"weight" text
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
26363,
834,
3710,
519,
41,
3,
23,
26,
381,
6,
96,
29,
257,
121,
1499,
6,
96,
21770,
121,
1499,
6,
96,
19457,
121,
1499,
6,
96,
1047,
60,
40,
2475,
121,
1499,
6,
96,
9378,
1... | [
3,
23143,
14196,
96,
1047,
60,
40,
2475,
121,
21680,
953,
834,
26363,
834,
3710,
519,
549,
17444,
427,
96,
21770,
121,
3274,
3,
31,
51,
2606,
4240,
18371,
31,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... |
SELECT party FROM table_1342198_18 WHERE district = "Louisiana 2" | who athe party where district is louisiana 2? | CREATE TABLE table_1342198_18 (party VARCHAR, district VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
24151,
834,
2606,
41,
8071,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
61,
11860,
10,
113,
44,
88,
1088,
213,
3939,
19,
16585,
159,
13662,
204,
58,
11801,
10,
1,
0,... | [
3,
23143,
14196,
1088,
21680,
953,
834,
2368,
4165,
24151,
834,
2606,
549,
17444,
427,
3939,
3274,
96,
28365,
13662,
204,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT major, COUNT(*) FROM Student GROUP BY major | Show all majors and corresponding number of students. | CREATE TABLE Student (major VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
6341,
41,
16547,
127,
584,
4280,
28027,
61,
11860,
10,
3111,
66,
779,
7,
11,
3,
9921,
381,
13,
481,
5,
11801,
10,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
3,
23143,
14196,
779,
6,
2847,
17161,
599,
1935,
61,
21680,
6341,
350,
4630,
6880,
272,
476,
779,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... |
SELECT SUM(att) FROM table_name_65 WHERE yards = 43 AND long > 43 | How many Atts that have Yards of 43 and a Long larger than 43? | CREATE TABLE table_name_65 (
att INTEGER,
yards VARCHAR,
long VARCHAR
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4122,
41,
44,
17,
3,
21342,
17966,
6,
6460,
584,
4280,
28027,
6,
307,
584,
4280,
28027,
3,
61,
11860,
10,
571,
186,
486,
17,
7,
24,
43,
16093,
7,
13,
8838,
11,
3,
... | [
3,
23143,
14196,
180,
6122,
599,
144,
17,
61,
21680,
953,
834,
4350,
834,
4122,
549,
17444,
427,
6460,
3274,
8838,
3430,
307,
2490,
8838,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT candidates FROM table_1342198_18 WHERE district = "Louisiana 3" | who is the candidate where district is louisiana 3? | CREATE TABLE table_1342198_18 (candidates VARCHAR, district VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
24151,
834,
2606,
41,
1608,
12416,
6203,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
61,
11860,
10,
113,
19,
8,
4775,
213,
3939,
19,
16585,
159,
13662,
220,
58,
11801,... | [
3,
23143,
14196,
4341,
21680,
953,
834,
2368,
4165,
24151,
834,
2606,
549,
17444,
427,
3939,
3274,
96,
28365,
13662,
220,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT major FROM Student GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1 | Which major has most number of students? | CREATE TABLE Student (major VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
6341,
41,
16547,
127,
584,
4280,
28027,
61,
11860,
10,
4073,
779,
65,
167,
381,
13,
481,
58,
11801,
10,
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,
779,
21680,
6341,
350,
4630,
6880,
272,
476,
779,
4674,
11300,
272,
476,
2847,
17161,
599,
1935,
61,
309,
25067,
8729,
12604,
209,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
SELECT COUNT(mon_31_may) FROM table_25220821_4 WHERE rank = 5 | How many times are listed for 31 May for the rider ranked 5? | CREATE TABLE table_25220821_4 (
mon_31_may VARCHAR,
rank VARCHAR
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
1828,
2884,
4018,
2658,
834,
591,
41,
1911,
834,
3341,
834,
13726,
584,
4280,
28027,
6,
11003,
584,
4280,
28027,
3,
61,
11860,
10,
571,
186,
648,
33,
2616,
21,
2664,
932,
21,
8,
... | [
3,
23143,
14196,
2847,
17161,
599,
2157,
834,
3341,
834,
13726,
61,
21680,
953,
834,
1828,
2884,
4018,
2658,
834,
591,
549,
17444,
427,
11003,
3274,
305,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT MIN(first_elected) FROM table_1342198_18 WHERE district = "Louisiana 5" | what is the minimum number first elected to district louisiana 5? | CREATE TABLE table_1342198_18 (first_elected INTEGER, district VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
24151,
834,
2606,
41,
14672,
834,
19971,
3,
21342,
17966,
6,
3939,
584,
4280,
28027,
61,
11860,
10,
125,
19,
8,
2559,
381,
166,
8160,
12,
3939,
16585,
159,
13662,
305,
... | [
3,
23143,
14196,
3,
17684,
599,
14672,
834,
19971,
61,
21680,
953,
834,
2368,
4165,
24151,
834,
2606,
549,
17444,
427,
3939,
3274,
96,
28365,
13662,
3,
17395,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
SELECT age, COUNT(*) FROM Student GROUP BY age | Show all ages and corresponding number of students. | CREATE TABLE Student (age VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
6341,
41,
545,
584,
4280,
28027,
61,
11860,
10,
3111,
66,
3,
2568,
11,
3,
9921,
381,
13,
481,
5,
11801,
10,
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,
1246,
6,
2847,
17161,
599,
1935,
61,
21680,
6341,
350,
4630,
6880,
272,
476,
1246,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT name, COUNT(name) FROM train GROUP BY name ORDER BY COUNT(name) DESC | Plot how many name by grouped by name as a bar graph, and sort by the total number in descending. | CREATE TABLE train (
id int,
train_number int,
name text,
origin text,
destination text,
time text,
interval text
)
CREATE TABLE weekly_weather (
station_id int,
day_of_week text,
high_temperature int,
low_temperature int,
precipitation real,
wind_speed_mph int
)
CR... | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
2412,
41,
3,
23,
26,
16,
17,
6,
2412,
834,
5525,
1152,
16,
17,
6,
564,
1499,
6,
5233,
1499,
6,
3954,
1499,
6,
97,
1499,
6,
8572,
1499,
3,
61,
205,
4386,
6048,
332,
17098,
5547,
834,
... | [
3,
23143,
14196,
564,
6,
2847,
17161,
599,
4350,
61,
21680,
2412,
350,
4630,
6880,
272,
476,
564,
4674,
11300,
272,
476,
2847,
17161,
599,
4350,
61,
309,
25067,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... |
SELECT result FROM table_1342198_36 WHERE incumbent = "Tom Steed" | What was the result when incumbent Tom Steed was elected? | CREATE TABLE table_1342198_36 (result VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
24151,
834,
3420,
41,
60,
7,
83,
17,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
363,
47,
8,
741,
116,
28406,
3059,
472,
6958,
47,
8160,
58,
11801,
... | [
3,
23143,
14196,
741,
21680,
953,
834,
2368,
4165,
24151,
834,
3420,
549,
17444,
427,
28406,
3274,
96,
3696,
51,
472,
6958,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
SELECT AVG(age), sex FROM Student GROUP BY sex | Show the average age for male and female students. | CREATE TABLE Student (sex VARCHAR, age INTEGER) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
6341,
41,
7,
994,
584,
4280,
28027,
6,
1246,
3,
21342,
17966,
61,
11860,
10,
3111,
8,
1348,
1246,
21,
5069,
11,
3955,
481,
5,
11801,
10,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
3,
23143,
14196,
71,
17217,
599,
545,
201,
3,
7,
994,
21680,
6341,
350,
4630,
6880,
272,
476,
3,
7,
994,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT "Constructor" FROM table_56316 WHERE "Time/Retired" = '+37.311' | Which constructor has a Time/Retired of +37.311? | CREATE TABLE table_56316 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
4834,
25946,
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,
13313,
26,
1... | [
3,
23143,
14196,
96,
4302,
7593,
127,
121,
21680,
953,
834,
4834,
25946,
549,
17444,
427,
96,
13368,
87,
1649,
11809,
26,
121,
3274,
3,
31,
1220,
519,
27914,
2596,
31,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
SELECT candidates FROM table_1342198_38 WHERE incumbent = "Hardie Scott" | What was the candidates for hardie scott | CREATE TABLE table_1342198_38 (candidates VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
24151,
834,
3747,
41,
1608,
12416,
6203,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
363,
47,
8,
4341,
21,
614,
23,
15,
3,
7,
10405,
11801,
10,
1,
... | [
3,
23143,
14196,
4341,
21680,
953,
834,
2368,
4165,
24151,
834,
3747,
549,
17444,
427,
28406,
3274,
96,
15537,
2498,
4972,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT city_code, COUNT(*) FROM Student GROUP BY city_code | Show all cities and corresponding number of students. | CREATE TABLE Student (city_code VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
6341,
41,
6726,
834,
4978,
584,
4280,
28027,
61,
11860,
10,
3111,
66,
3119,
11,
3,
9921,
381,
13,
481,
5,
11801,
10,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
3,
23143,
14196,
690,
834,
4978,
6,
2847,
17161,
599,
1935,
61,
21680,
6341,
350,
4630,
6880,
272,
476,
690,
834,
4978,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... |
SELECT 2007 FROM table_name_91 WHERE 2010 = "2r" AND tournament = "us open" | What is the 2007 result when the 2010 result was 2r, at the US Open? | CREATE TABLE table_name_91 (
tournament VARCHAR
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4729,
41,
5892,
584,
4280,
28027,
3,
61,
11860,
10,
363,
19,
8,
4101,
741,
116,
8,
2735,
741,
47,
204,
52,
6,
44,
8,
837,
2384,
58,
11801,
10,
1,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
4101,
21680,
953,
834,
4350,
834,
4729,
549,
17444,
427,
2735,
3274,
96,
357,
52,
121,
3430,
5892,
3274,
96,
302,
539,
121,
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,
... |
SELECT COUNT(candidates) FROM table_1342198_38 WHERE district = "Pennsylvania 3" | What is the number of candidates for pennsylvania 3 | CREATE TABLE table_1342198_38 (candidates VARCHAR, district VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
24151,
834,
3747,
41,
1608,
12416,
6203,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
61,
11860,
10,
363,
19,
8,
381,
13,
4341,
21,
4550,
29,
7,
63,
40,
16658,
9,
2... | [
3,
23143,
14196,
2847,
17161,
599,
1608,
12416,
6203,
61,
21680,
953,
834,
2368,
4165,
24151,
834,
3747,
549,
17444,
427,
3939,
3274,
96,
345,
35,
29,
7,
63,
40,
16658,
9,
220,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
SELECT advisor, COUNT(*) FROM Student GROUP BY advisor | Show all advisors and corresponding number of students. | CREATE TABLE Student (advisor VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
6341,
41,
9,
26,
24680,
584,
4280,
28027,
61,
11860,
10,
3111,
66,
8815,
7,
11,
3,
9921,
381,
13,
481,
5,
11801,
10,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
3,
23143,
14196,
8815,
6,
2847,
17161,
599,
1935,
61,
21680,
6341,
350,
4630,
6880,
272,
476,
8815,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT "Departure" FROM table_22277 WHERE "Going to" = 'Bourne' AND "Arrival" = '11.45' | when does the train arriving at bourne at 11.45 departure | CREATE TABLE table_22277 (
"Departure" text,
"Going to" text,
"Calling at" text,
"Arrival" text,
"Operator" text
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
26144,
4013,
41,
96,
2962,
2274,
1462,
121,
1499,
6,
96,
6221,
53,
12,
121,
1499,
6,
96,
14318,
697,
44,
121,
1499,
6,
96,
188,
52,
25295,
121,
1499,
6,
96,
667,
883,
1016,
1... | [
3,
23143,
14196,
96,
2962,
2274,
1462,
121,
21680,
953,
834,
26144,
4013,
549,
17444,
427,
96,
6221,
53,
12,
121,
3274,
3,
31,
279,
1211,
29,
15,
31,
3430,
96,
188,
52,
25295,
121,
3274,
3,
31,
10032,
2128,
31,
1,
0,
0,
0,
0,
... |
SELECT COUNT(candidates) FROM table_1342198_38 WHERE district = "Pennsylvania 21" | What is the number of candidates for pennsylvania 21 | CREATE TABLE table_1342198_38 (candidates VARCHAR, district VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
24151,
834,
3747,
41,
1608,
12416,
6203,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
61,
11860,
10,
363,
19,
8,
381,
13,
4341,
21,
4550,
29,
7,
63,
40,
16658,
9,
1... | [
3,
23143,
14196,
2847,
17161,
599,
1608,
12416,
6203,
61,
21680,
953,
834,
2368,
4165,
24151,
834,
3747,
549,
17444,
427,
3939,
3274,
96,
345,
35,
29,
7,
63,
40,
16658,
9,
1401,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT advisor FROM Student GROUP BY advisor ORDER BY COUNT(*) DESC LIMIT 1 | Which advisor has most number of students? | CREATE TABLE Student (advisor VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
6341,
41,
9,
26,
24680,
584,
4280,
28027,
61,
11860,
10,
4073,
8815,
65,
167,
381,
13,
481,
58,
11801,
10,
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,
8815,
21680,
6341,
350,
4630,
6880,
272,
476,
8815,
4674,
11300,
272,
476,
2847,
17161,
599,
1935,
61,
309,
25067,
8729,
12604,
209,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT ROW_NUMBER() OVER (ORDER BY LastAccessDate DESC) AS " ", Id AS "user_link", LastAccessDate FROM Users WHERE Reputation > 3000 ORDER BY LastAccessDate DESC | Users with close-vote privileges ordered by last access date.. | CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDat... | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
4543,
382,
9,
7,
157,
25160,
7,
41,
27,
26,
381,
6,
5570,
1499,
6,
7726,
1499,
3,
61,
205,
4386,
6048,
332,
17098,
9084,
1649,
9,
739,
25160,
7,
41,
27,
26,
381,
6,
5570,
1499,
6,
77... | [
3,
23143,
14196,
3,
26011,
834,
567,
6122,
12920,
9960,
3,
23288,
41,
2990,
11300,
272,
476,
2506,
31679,
308,
342,
309,
25067,
61,
6157,
96,
96,
6,
27,
26,
6157,
96,
10041,
834,
4907,
1686,
2506,
31679,
308,
342,
21680,
13504,
549,... |
SELECT party FROM table_1342198_38 WHERE first_elected = 1948 AND incumbent = "William T. Granahan" | What is the party for first elected 1948 for william t. granahan | CREATE TABLE table_1342198_38 (party VARCHAR, first_elected VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
24151,
834,
3747,
41,
8071,
584,
4280,
28027,
6,
166,
834,
19971,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
363,
19,
8,
1088,
21,
166,
8160,
21474,
... | [
3,
23143,
14196,
1088,
21680,
953,
834,
2368,
4165,
24151,
834,
3747,
549,
17444,
427,
166,
834,
19971,
3274,
21474,
3430,
28406,
3274,
96,
518,
1092,
23,
265,
332,
5,
12102,
9,
2618,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT COUNT(*) FROM Has_allergy WHERE Allergy = "Cat" | How many students have cat allergies? | CREATE TABLE Has_allergy (Allergy VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
4498,
834,
11211,
122,
63,
41,
6838,
49,
122,
63,
584,
4280,
28027,
61,
11860,
10,
571,
186,
481,
43,
1712,
18500,
58,
11801,
10,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
4498,
834,
11211,
122,
63,
549,
17444,
427,
432,
49,
122,
63,
3274,
96,
18610,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT time_retired FROM table_name_58 WHERE grid < 3 AND driver = "mika häkkinen" | Which Time/Retired has a Grid smaller than 3, and a Driver of mika h kkinen? | CREATE TABLE table_name_58 (
time_retired VARCHAR,
grid VARCHAR,
driver VARCHAR
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3449,
41,
97,
834,
10682,
1271,
584,
4280,
28027,
6,
8634,
584,
4280,
28027,
6,
2535,
584,
4280,
28027,
3,
61,
11860,
10,
4073,
2900,
87,
1649,
11809,
26,
65,
3,
9,
... | [
3,
23143,
14196,
97,
834,
10682,
1271,
21680,
953,
834,
4350,
834,
3449,
549,
17444,
427,
8634,
3,
2,
220,
3430,
2535,
3274,
96,
20068,
9,
3,
10926,
157,
2917,
35,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT COUNT(candidates) FROM table_1342198_6 WHERE incumbent = "Cecil R. King" | How many candidates were there in the race where Cecil R. King is the incumbent? | CREATE TABLE table_1342198_6 (candidates VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
24151,
834,
948,
41,
1608,
12416,
6203,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
571,
186,
4341,
130,
132,
16,
8,
1964,
213,
21937,
40,
391,
5,
26... | [
3,
23143,
14196,
2847,
17161,
599,
1608,
12416,
6203,
61,
21680,
953,
834,
2368,
4165,
24151,
834,
948,
549,
17444,
427,
28406,
3274,
96,
254,
15,
75,
173,
391,
5,
2671,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... |
SELECT StuID FROM Has_allergy GROUP BY StuID HAVING COUNT(*) >= 2 | Show all student IDs who have at least two allergies. | CREATE TABLE Has_allergy (StuID VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
4498,
834,
11211,
122,
63,
41,
13076,
4309,
584,
4280,
28027,
61,
11860,
10,
3111,
66,
1236,
4699,
7,
113,
43,
44,
709,
192,
18500,
5,
11801,
10,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
3,
13076,
4309,
21680,
4498,
834,
11211,
122,
63,
350,
4630,
6880,
272,
476,
3,
13076,
4309,
454,
6968,
2365,
2847,
17161,
599,
1935,
61,
2490,
2423,
204,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... |
SELECT MAX(attendance) FROM table_name_4 WHERE date = "november 9, 1958" | What was the higest attendance on November 9, 1958? | CREATE TABLE table_name_4 (
attendance INTEGER,
date VARCHAR
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
591,
41,
11364,
3,
21342,
17966,
6,
833,
584,
4280,
28027,
3,
61,
11860,
10,
363,
47,
8,
7102,
122,
222,
11364,
30,
1671,
9902,
22306,
58,
11801,
10,
1,
0,
0,
0,
0... | [
3,
23143,
14196,
4800,
4,
599,
15116,
663,
61,
21680,
953,
834,
4350,
834,
591,
549,
17444,
427,
833,
3274,
96,
5326,
18247,
9902,
22306,
121,
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... |
SELECT COUNT(district) FROM table_1342198_6 WHERE first_elected = 1944 | How many districts have an incumbent first elected in 1944? | CREATE TABLE table_1342198_6 (district VARCHAR, first_elected VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
24151,
834,
948,
41,
26,
23,
20066,
584,
4280,
28027,
6,
166,
834,
19971,
584,
4280,
28027,
61,
11860,
10,
571,
186,
14126,
43,
46,
28406,
166,
8160,
16,
21930,
58,
1... | [
3,
23143,
14196,
2847,
17161,
599,
26,
23,
20066,
61,
21680,
953,
834,
2368,
4165,
24151,
834,
948,
549,
17444,
427,
166,
834,
19971,
3274,
21930,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... |
SELECT StuID FROM Student EXCEPT SELECT StuID FROM Has_allergy | What are the student ids of students who don't have any allergies? | CREATE TABLE Has_allergy (StuID VARCHAR); CREATE TABLE Student (StuID VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
4498,
834,
11211,
122,
63,
41,
13076,
4309,
584,
4280,
28027,
3670,
205,
4386,
6048,
332,
17098,
6341,
41,
13076,
4309,
584,
4280,
28027,
61,
11860,
10,
363,
33,
8,
1236,
3,
23,
26,
7,
13,... | [
3,
23143,
14196,
3,
13076,
4309,
21680,
6341,
262,
4,
30416,
3,
23143,
14196,
3,
13076,
4309,
21680,
4498,
834,
11211,
122,
63,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... |
SELECT COUNT("Losses") FROM table_78521 WHERE "Goals For" = '22' AND "Games Played" > '8' | How many losses did the team with 22 goals for andmore than 8 games played have? | CREATE TABLE table_78521 (
"Team" text,
"Games Played" real,
"Wins" real,
"Losses" real,
"Ties" real,
"Goals For" real,
"Goals Against" real
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
3940,
755,
2658,
41,
96,
18699,
121,
1499,
6,
96,
23055,
7,
2911,
15,
26,
121,
490,
6,
96,
18455,
7,
121,
490,
6,
96,
434,
13526,
7,
121,
490,
6,
96,
382,
725,
121,
490,
6,... | [
3,
23143,
14196,
2847,
17161,
599,
121,
434,
13526,
7,
8512,
21680,
953,
834,
3940,
755,
2658,
549,
17444,
427,
96,
6221,
5405,
242,
121,
3274,
3,
31,
2884,
31,
3430,
96,
23055,
7,
2911,
15,
26,
121,
2490,
3,
31,
927,
31,
1,
0,
... |
SELECT incumbent FROM table_1342218_13 WHERE district = "Illinois 17" | Who was the incumbent in the Illinois 17 district? | CREATE TABLE table_1342218_13 (incumbent VARCHAR, district VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2884,
2606,
834,
2368,
41,
77,
75,
5937,
295,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
61,
11860,
10,
2645,
47,
8,
28406,
16,
8,
7659,
1003,
3939,
58,
11801,
10,
1,
... | [
3,
23143,
14196,
28406,
21680,
953,
834,
23747,
2884,
2606,
834,
2368,
549,
17444,
427,
3939,
3274,
96,
196,
195,
77,
32,
159,
1003,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT COUNT(*) FROM has_allergy AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T2.sex = "F" AND T1.allergy = "Milk" OR T1.allergy = "Eggs" | How many female students have milk or egg allergies? | CREATE TABLE Student (StuID VARCHAR, sex VARCHAR); CREATE TABLE has_allergy (StuID VARCHAR, allergy VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
6341,
41,
13076,
4309,
584,
4280,
28027,
6,
3,
7,
994,
584,
4280,
28027,
3670,
205,
4386,
6048,
332,
17098,
65,
834,
11211,
122,
63,
41,
13076,
4309,
584,
4280,
28027,
6,
23886,
584,
4280,
... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
65,
834,
11211,
122,
63,
6157,
332,
536,
3,
15355,
3162,
6341,
6157,
332,
357,
9191,
332,
5411,
13076,
4309,
3274,
332,
4416,
13076,
4309,
549,
17444,
427,
332,
4416,
7,
994,
3274,
... |
SELECT MAX(number_of_major_hurricanes) FROM table_2930244_3 | What is the largest overall number of major hurricanes? | CREATE TABLE table_2930244_3 (
number_of_major_hurricanes INTEGER
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
3166,
1458,
357,
3628,
834,
519,
41,
381,
834,
858,
834,
16547,
127,
834,
10666,
2234,
9,
1496,
3,
21342,
17966,
3,
61,
11860,
10,
363,
19,
8,
2015,
1879,
381,
13,
779,
20818,
... | [
3,
23143,
14196,
4800,
4,
599,
5525,
1152,
834,
858,
834,
16547,
127,
834,
10666,
2234,
9,
1496,
61,
21680,
953,
834,
3166,
1458,
357,
3628,
834,
519,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT COUNT(candidates) FROM table_1342218_24 WHERE incumbent = "Thomas Abernethy" | How many people on this list are named thomas abernethy? | CREATE TABLE table_1342218_24 (candidates VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2884,
2606,
834,
2266,
41,
1608,
12416,
6203,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
571,
186,
151,
30,
48,
570,
33,
2650,
3,
189,
32,
2754,
862,
158... | [
3,
23143,
14196,
2847,
17161,
599,
1608,
12416,
6203,
61,
21680,
953,
834,
23747,
2884,
2606,
834,
2266,
549,
17444,
427,
28406,
3274,
96,
8991,
32,
2754,
4098,
1582,
107,
63,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
SELECT COUNT(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy WHERE T2.allergytype = "food" | How many students have a food allergy? | CREATE TABLE Has_allergy (allergy VARCHAR); CREATE TABLE Allergy_type (allergy VARCHAR, allergytype VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
4498,
834,
11211,
122,
63,
41,
11211,
122,
63,
584,
4280,
28027,
3670,
205,
4386,
6048,
332,
17098,
432,
49,
122,
63,
834,
6137,
41,
11211,
122,
63,
584,
4280,
28027,
6,
23886,
6137,
584,
... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
4498,
834,
11211,
122,
63,
6157,
332,
536,
3,
15355,
3162,
432,
49,
122,
63,
834,
6137,
6157,
332,
357,
9191,
332,
5411,
11211,
122,
63,
3274,
332,
4416,
11211,
122,
63,
549,
17444... |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.diagnosis = "MORBID OBESITY/SDA" AND prescriptions.drug = "Soln." | count the number of patients whose primary disease is morbid obesity/sda and drug name is soln.? | 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,
... | [
4398,
7,
10,
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,
205,
4386,
6048,
332,... | [
3,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
14798,
5,
7304,
11827,
834,
23,
26,
61,
21680,
14798,
3388,
18206,
3,
15355,
3162,
7744,
7,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7744,
7,
5,
8399,
51,
834,
23,
26,
549... |
SELECT COUNT(first_elected) FROM table_1342218_24 WHERE incumbent = "W. Arthur Winstead" | How many times was w. arthur winstead first elected? | CREATE TABLE table_1342218_24 (first_elected VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2884,
2606,
834,
2266,
41,
14672,
834,
19971,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
571,
186,
648,
47,
3,
210,
5,
768,
10666,
1369,
11931,
166,
8160,
... | [
3,
23143,
14196,
2847,
17161,
599,
14672,
834,
19971,
61,
21680,
953,
834,
23747,
2884,
2606,
834,
2266,
549,
17444,
427,
28406,
3274,
96,
518,
5,
13962,
4871,
11931,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT Allergy FROM Has_allergy GROUP BY Allergy ORDER BY COUNT(*) DESC LIMIT 1 | Which allergy has most number of students affected? | CREATE TABLE Has_allergy (Allergy VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
4498,
834,
11211,
122,
63,
41,
6838,
49,
122,
63,
584,
4280,
28027,
61,
11860,
10,
4073,
23886,
65,
167,
381,
13,
481,
4161,
58,
11801,
10,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
3,
23143,
14196,
432,
49,
122,
63,
21680,
4498,
834,
11211,
122,
63,
350,
4630,
6880,
272,
476,
432,
49,
122,
63,
4674,
11300,
272,
476,
2847,
17161,
599,
1935,
61,
309,
25067,
8729,
12604,
209,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT "Position" FROM table_41531 WHERE "Caps" = 'example' AND "Player" = 'shane kelly' | What is Position, when Caps is Example, and When Player is Shane Kelly? | CREATE TABLE table_41531 (
"Player" text,
"Position" text,
"Date of Birth (Age)" text,
"Caps" text,
"Province / Club" text
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
591,
1808,
3341,
41,
96,
15800,
49,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
308,
342,
13,
26337,
41,
188,
397,
61,
121,
1499,
6,
96,
19566,
7,
121,
1499,
6,
9... | [
3,
23143,
14196,
96,
345,
32,
7,
4749,
121,
21680,
953,
834,
591,
1808,
3341,
549,
17444,
427,
96,
19566,
7,
121,
3274,
3,
31,
994,
9,
9208,
31,
3430,
96,
15800,
49,
121,
3274,
3,
31,
7,
2618,
15,
3,
5768,
120,
31,
1,
0,
0,
... |
SELECT COUNT(first_elected) FROM table_1342218_24 WHERE incumbent = "William M. Colmer" | How many times was william m. colmer winstead first elected? | CREATE TABLE table_1342218_24 (first_elected VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2884,
2606,
834,
2266,
41,
14672,
834,
19971,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
571,
186,
648,
47,
56,
23,
265,
3,
51,
5,
7632,
935,
1369,
11931... | [
3,
23143,
14196,
2847,
17161,
599,
14672,
834,
19971,
61,
21680,
953,
834,
23747,
2884,
2606,
834,
2266,
549,
17444,
427,
28406,
3274,
96,
518,
1092,
23,
265,
283,
5,
3043,
935,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... |
SELECT Allergy, COUNT(*) FROM Has_allergy GROUP BY Allergy | Show all allergies with number of students affected. | CREATE TABLE Has_allergy (Allergy VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
4498,
834,
11211,
122,
63,
41,
6838,
49,
122,
63,
584,
4280,
28027,
61,
11860,
10,
3111,
66,
18500,
28,
381,
13,
481,
4161,
5,
11801,
10,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
432,
49,
122,
63,
6,
2847,
17161,
599,
1935,
61,
21680,
4498,
834,
11211,
122,
63,
350,
4630,
6880,
272,
476,
432,
49,
122,
63,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT proto_austronesian FROM table_name_97 WHERE proto_oceanic = "*lima" | Which Proto-Austronesian has a Proto-Oceanic of *lima? | CREATE TABLE table_name_97 (
proto_austronesian VARCHAR,
proto_oceanic VARCHAR
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4327,
41,
23844,
834,
2064,
6255,
15,
10488,
584,
4280,
28027,
6,
23844,
834,
32,
8433,
2532,
584,
4280,
28027,
3,
61,
11860,
10,
4073,
749,
235,
18,
14934,
6255,
15,
... | [
3,
23143,
14196,
23844,
834,
2064,
6255,
15,
10488,
21680,
953,
834,
4350,
834,
4327,
549,
17444,
427,
23844,
834,
32,
8433,
2532,
3274,
96,
1935,
4941,
9,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... |
SELECT result FROM table_1342218_24 WHERE incumbent = "Jamie L. Whitten" | What was the result of the election with jamie l. whitten? | CREATE TABLE table_1342218_24 (result VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2884,
2606,
834,
2266,
41,
60,
7,
83,
17,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
363,
47,
8,
741,
13,
8,
4356,
28,
2662,
2720,
3,
40,
5,
3,
12124... | [
3,
23143,
14196,
741,
21680,
953,
834,
23747,
2884,
2606,
834,
2266,
549,
17444,
427,
28406,
3274,
96,
683,
9,
2720,
301,
5,
13334,
324,
121,
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,... |
SELECT T2.allergytype, COUNT(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy GROUP BY T2.allergytype | Show all allergy type with number of students affected. | CREATE TABLE Has_allergy (allergy VARCHAR); CREATE TABLE Allergy_type (allergytype VARCHAR, allergy VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
4498,
834,
11211,
122,
63,
41,
11211,
122,
63,
584,
4280,
28027,
3670,
205,
4386,
6048,
332,
17098,
432,
49,
122,
63,
834,
6137,
41,
11211,
122,
63,
6137,
584,
4280,
28027,
6,
23886,
584,
... | [
3,
23143,
14196,
332,
4416,
11211,
122,
63,
6137,
6,
2847,
17161,
599,
1935,
61,
21680,
4498,
834,
11211,
122,
63,
6157,
332,
536,
3,
15355,
3162,
432,
49,
122,
63,
834,
6137,
6157,
332,
357,
9191,
332,
5411,
11211,
122,
63,
3274,
... |
SELECT "Away team" FROM table_60349 WHERE "Score" = '2–0' AND "Home team" = 'wolverhampton wanderers' | What is the Away team at the Wolverhampton Wanderers Home game with a Score of 2 0? | CREATE TABLE table_60349 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
3328,
519,
3647,
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,
1499,... | [
3,
23143,
14196,
96,
188,
1343,
372,
121,
21680,
953,
834,
3328,
519,
3647,
549,
17444,
427,
96,
134,
9022,
121,
3274,
3,
31,
357,
104,
632,
31,
3430,
96,
19040,
372,
121,
3274,
3,
31,
210,
32,
40,
624,
1483,
11632,
10735,
277,
... |
SELECT candidates FROM table_1342218_35 WHERE result = "Re-elected" AND first_elected = 1942 | What candidate was re-elected and was first elected in 1942? | CREATE TABLE table_1342218_35 (candidates VARCHAR, result VARCHAR, first_elected VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2884,
2606,
834,
2469,
41,
1608,
12416,
6203,
584,
4280,
28027,
6,
741,
584,
4280,
28027,
6,
166,
834,
19971,
584,
4280,
28027,
61,
11860,
10,
363,
4775,
47,
3,
60,
18,
19... | [
3,
23143,
14196,
4341,
21680,
953,
834,
23747,
2884,
2606,
834,
2469,
549,
17444,
427,
741,
3274,
96,
1649,
18,
19971,
121,
3430,
166,
834,
19971,
3274,
24466,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT lname, age FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = "Milk" INTERSECT SELECT StuID FROM Has_allergy WHERE Allergy = "Cat") | Find the last name and age of the student who has allergy to both milk and cat. | CREATE TABLE Has_allergy (lname VARCHAR, age VARCHAR, StuID VARCHAR, Allergy VARCHAR); CREATE TABLE Student (lname VARCHAR, age VARCHAR, StuID VARCHAR, Allergy VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
4498,
834,
11211,
122,
63,
41,
40,
4350,
584,
4280,
28027,
6,
1246,
584,
4280,
28027,
6,
3,
13076,
4309,
584,
4280,
28027,
6,
432,
49,
122,
63,
584,
4280,
28027,
3670,
205,
4386,
6048,
332... | [
3,
23143,
14196,
3,
40,
4350,
6,
1246,
21680,
6341,
549,
17444,
427,
3,
13076,
4309,
3388,
41,
23143,
14196,
3,
13076,
4309,
21680,
4498,
834,
11211,
122,
63,
549,
17444,
427,
432,
49,
122,
63,
3274,
96,
329,
173,
157,
121,
3,
213... |
SELECT res FROM table_name_19 WHERE opponent = "oleg taktarov" | The match against Oleg Taktarov had what result? | CREATE TABLE table_name_19 (
res VARCHAR,
opponent VARCHAR
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2294,
41,
3,
60,
7,
584,
4280,
28027,
6,
15264,
584,
4280,
28027,
3,
61,
11860,
10,
37,
1588,
581,
411,
5772,
18973,
17,
9,
8843,
141,
125,
741,
58,
11801,
10,
1,
... | [
3,
23143,
14196,
3,
60,
7,
21680,
953,
834,
4350,
834,
2294,
549,
17444,
427,
15264,
3274,
96,
32,
5772,
3,
17,
7935,
9,
8843,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... |
SELECT candidates FROM table_1342218_35 WHERE district = "Ohio 9" | Who are the candidates in the election in the Ohio 9 district? | CREATE TABLE table_1342218_35 (candidates VARCHAR, district VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2884,
2606,
834,
2469,
41,
1608,
12416,
6203,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
61,
11860,
10,
2645,
33,
8,
4341,
16,
8,
4356,
16,
8,
6167,
668,
3939,
58,
11801... | [
3,
23143,
14196,
4341,
21680,
953,
834,
23747,
2884,
2606,
834,
2469,
549,
17444,
427,
3939,
3274,
96,
15046,
23,
32,
668,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... |
SELECT T1.Allergy, T1.AllergyType FROM Allergy_type AS T1 JOIN Has_allergy AS T2 ON T1.Allergy = T2.Allergy JOIN Student AS T3 ON T3.StuID = T2.StuID WHERE T3.Fname = "Lisa" ORDER BY T1.Allergy | What are the allergies and their types that the student with first name Lisa has? And order the result by name of allergies. | CREATE TABLE Has_allergy (Allergy VARCHAR, StuID VARCHAR); CREATE TABLE Student (StuID VARCHAR, Fname VARCHAR); CREATE TABLE Allergy_type (Allergy VARCHAR, AllergyType VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
4498,
834,
11211,
122,
63,
41,
6838,
49,
122,
63,
584,
4280,
28027,
6,
3,
13076,
4309,
584,
4280,
28027,
3670,
205,
4386,
6048,
332,
17098,
6341,
41,
13076,
4309,
584,
4280,
28027,
6,
377,
... | [
3,
23143,
14196,
332,
5411,
6838,
49,
122,
63,
6,
332,
5411,
6838,
49,
122,
63,
25160,
21680,
432,
49,
122,
63,
834,
6137,
6157,
332,
536,
3,
15355,
3162,
4498,
834,
11211,
122,
63,
6157,
332,
357,
9191,
332,
5411,
6838,
49,
122,
... |
SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 40 AND 49) GROUP BY treatment.treatmentname) AS t1 WHERE t1.c1 <= 4 | what is the four most frequently ordered procedure for a patient with an age 40s? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtim... | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
8209,
41,
8209,
23,
26,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
8209,
4350,
1499,
6,
8209,
715,
97,
6,
3,
447,
26,
1298,
4978,
1499,
3,
61,
205,
4386,
6048,
332,
17098,
11963,
670,
... | [
3,
23143,
14196,
3,
17,
5411,
26889,
4350,
21680,
41,
23143,
14196,
1058,
5,
26889,
4350,
6,
3,
22284,
4132,
834,
16375,
439,
9960,
3,
23288,
41,
2990,
11300,
272,
476,
2847,
17161,
599,
1935,
61,
309,
25067,
61,
6157,
3,
75,
536,
... |
SELECT MIN(first_elected) FROM table_1342218_35 WHERE incumbent = "Michael A. Feighan" | What year was incumbent Michael A. Feighan first elected? | CREATE TABLE table_1342218_35 (first_elected INTEGER, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2884,
2606,
834,
2469,
41,
14672,
834,
19971,
3,
21342,
17966,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
363,
215,
47,
28406,
2457,
71,
5,
4163,
23,
22637,
166,
8160,
58,
... | [
3,
23143,
14196,
3,
17684,
599,
14672,
834,
19971,
61,
21680,
953,
834,
23747,
2884,
2606,
834,
2469,
549,
17444,
427,
28406,
3274,
96,
329,
362,
9,
15,
40,
71,
5,
4163,
23,
22637,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT fname, sex FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = "Milk" EXCEPT SELECT StuID FROM Has_allergy WHERE Allergy = "Cat") | Find the first name and gender of the student who has allergy to milk but not cat. | CREATE TABLE Student (fname VARCHAR, sex VARCHAR, StuID VARCHAR, Allergy VARCHAR); CREATE TABLE Has_allergy (fname VARCHAR, sex VARCHAR, StuID VARCHAR, Allergy VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
6341,
41,
89,
4350,
584,
4280,
28027,
6,
3,
7,
994,
584,
4280,
28027,
6,
3,
13076,
4309,
584,
4280,
28027,
6,
432,
49,
122,
63,
584,
4280,
28027,
3670,
205,
4386,
6048,
332,
17098,
4498,
... | [
3,
23143,
14196,
3,
89,
4350,
6,
3,
7,
994,
21680,
6341,
549,
17444,
427,
3,
13076,
4309,
3388,
41,
23143,
14196,
3,
13076,
4309,
21680,
4498,
834,
11211,
122,
63,
549,
17444,
427,
432,
49,
122,
63,
3274,
96,
329,
173,
157,
121,
... |
SELECT "Engine" FROM table_55779 WHERE "Rounds" = '10-13' | What was the featured in Engine through rounds 10-13? | CREATE TABLE table_55779 (
"Entrant" text,
"Constructor" text,
"Chassis" text,
"Engine" text,
"Tyres" text,
"Driver" text,
"Rounds" text
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
755,
3436,
4440,
41,
96,
16924,
3569,
121,
1499,
6,
96,
4302,
7593,
127,
121,
1499,
6,
96,
3541,
6500,
7,
121,
1499,
6,
96,
31477,
121,
1499,
6,
96,
382,
63,
60,
7,
121,
1499... | [
3,
23143,
14196,
96,
31477,
121,
21680,
953,
834,
755,
3436,
4440,
549,
17444,
427,
96,
448,
32,
1106,
7,
121,
3274,
3,
31,
1714,
13056,
31,
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... |
SELECT party FROM table_1342218_35 WHERE district = "Ohio 5" | What party does the incumbent from the Ohio 5 district belong to? | CREATE TABLE table_1342218_35 (party VARCHAR, district VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2884,
2606,
834,
2469,
41,
8071,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
61,
11860,
10,
363,
1088,
405,
8,
28406,
45,
8,
6167,
305,
3939,
13000,
12,
58,
11801,
10,
1,... | [
3,
23143,
14196,
1088,
21680,
953,
834,
23747,
2884,
2606,
834,
2469,
549,
17444,
427,
3939,
3274,
96,
15046,
23,
32,
3,
17395,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... |
SELECT AVG(age) FROM Student WHERE StuID IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "food" INTERSECT SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "animal") | Find the average age of the students who have allergies with food and animal types. | CREATE TABLE Student (age INTEGER, StuID VARCHAR); CREATE TABLE Allergy_Type (Allergy VARCHAR, allergytype VARCHAR); CREATE TABLE Has_allergy (StuID VARCHAR, Allergy VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
6341,
41,
545,
3,
21342,
17966,
6,
3,
13076,
4309,
584,
4280,
28027,
3670,
205,
4386,
6048,
332,
17098,
432,
49,
122,
63,
834,
25160,
41,
6838,
49,
122,
63,
584,
4280,
28027,
6,
23886,
613... | [
3,
23143,
14196,
71,
17217,
599,
545,
61,
21680,
6341,
549,
17444,
427,
3,
13076,
4309,
3388,
41,
23143,
14196,
332,
5411,
13076,
4309,
21680,
4498,
834,
11211,
122,
63,
6157,
332,
536,
3,
15355,
3162,
432,
49,
122,
63,
834,
25160,
... |
SELECT "Division Record" FROM table_67113 WHERE "School" = 'laurel' | What was Laurel's division record? | CREATE TABLE table_67113 (
"School" text,
"Team" text,
"Division Record" text,
"Overall Record" text,
"Season Outcome" text
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
3708,
20522,
41,
96,
29364,
121,
1499,
6,
96,
18699,
121,
1499,
6,
96,
308,
23,
6610,
11392,
121,
1499,
6,
96,
23847,
1748,
11392,
121,
1499,
6,
96,
134,
15,
9,
739,
3387,
287,... | [
3,
23143,
14196,
96,
308,
23,
6610,
11392,
121,
21680,
953,
834,
3708,
20522,
549,
17444,
427,
96,
29364,
121,
3274,
3,
31,
521,
1462,
40,
31,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT party FROM table_1342218_35 WHERE district = "Ohio 20" | What party does the incumbent from the Ohio 20 district belong to? | CREATE TABLE table_1342218_35 (party VARCHAR, district VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2884,
2606,
834,
2469,
41,
8071,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
61,
11860,
10,
363,
1088,
405,
8,
28406,
45,
8,
6167,
460,
3939,
13000,
12,
58,
11801,
10,
1,... | [
3,
23143,
14196,
1088,
21680,
953,
834,
23747,
2884,
2606,
834,
2469,
549,
17444,
427,
3939,
3274,
96,
15046,
23,
32,
460,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... |
SELECT fname, lname FROM Student WHERE NOT StuID IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "food") | List the first and last name of the students who do not have any food type allergy. | CREATE TABLE Student (fname VARCHAR, lname VARCHAR, StuID VARCHAR); CREATE TABLE Allergy_Type (Allergy VARCHAR, allergytype VARCHAR); CREATE TABLE Has_allergy (StuID VARCHAR, Allergy VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
6341,
41,
89,
4350,
584,
4280,
28027,
6,
3,
40,
4350,
584,
4280,
28027,
6,
3,
13076,
4309,
584,
4280,
28027,
3670,
205,
4386,
6048,
332,
17098,
432,
49,
122,
63,
834,
25160,
41,
6838,
49,
... | [
3,
23143,
14196,
3,
89,
4350,
6,
3,
40,
4350,
21680,
6341,
549,
17444,
427,
4486,
3,
13076,
4309,
3388,
41,
23143,
14196,
332,
5411,
13076,
4309,
21680,
4498,
834,
11211,
122,
63,
6157,
332,
536,
3,
15355,
3162,
432,
49,
122,
63,
... |
SELECT MIN(games) FROM table_name_91 WHERE name = "jeremiah massey" AND points < 340 | What is the lowest Games, when Name is Jeremiah Massey, and when Points is less than 340? | CREATE TABLE table_name_91 (
games INTEGER,
name VARCHAR,
points VARCHAR
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
4729,
41,
1031,
3,
21342,
17966,
6,
564,
584,
4280,
28027,
6,
979,
584,
4280,
28027,
3,
61,
11860,
10,
363,
19,
8,
7402,
5880,
6,
116,
5570,
19,
446,
49,
11658,
107,... | [
3,
23143,
14196,
3,
17684,
599,
7261,
7,
61,
21680,
953,
834,
4350,
834,
4729,
549,
17444,
427,
564,
3274,
96,
12488,
11658,
107,
3294,
15,
63,
121,
3430,
979,
3,
2,
3,
21129,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... |
SELECT party FROM table_1342218_35 WHERE district = "Ohio 7" | What party does the incumbent from the Ohio 7 district belong to? | CREATE TABLE table_1342218_35 (party VARCHAR, district VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2884,
2606,
834,
2469,
41,
8071,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
61,
11860,
10,
363,
1088,
405,
8,
28406,
45,
8,
6167,
489,
3939,
13000,
12,
58,
11801,
10,
1,... | [
3,
23143,
14196,
1088,
21680,
953,
834,
23747,
2884,
2606,
834,
2469,
549,
17444,
427,
3939,
3274,
96,
15046,
23,
32,
489,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... |
SELECT COUNT(*) FROM Student WHERE sex = "M" AND StuID IN (SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "food") | Find the number of male (sex is 'M') students who have some food type allery. | CREATE TABLE Has_allergy (Allergy VARCHAR); CREATE TABLE Allergy_Type (Allergy VARCHAR, allergytype VARCHAR); CREATE TABLE Student (sex VARCHAR, StuID VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
4498,
834,
11211,
122,
63,
41,
6838,
49,
122,
63,
584,
4280,
28027,
3670,
205,
4386,
6048,
332,
17098,
432,
49,
122,
63,
834,
25160,
41,
6838,
49,
122,
63,
584,
4280,
28027,
6,
23886,
6137... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
6341,
549,
17444,
427,
3,
7,
994,
3274,
96,
329,
121,
3430,
3,
13076,
4309,
3388,
41,
23143,
14196,
3,
13076,
4309,
21680,
4498,
834,
11211,
122,
63,
6157,
332,
536,
3,
15355,
3162... |
SELECT COUNT(written_by) FROM table_30030227_1 WHERE directed_by = "Arvin Brown" | How many people wrote the episode directed by Arvin Brown? | CREATE TABLE table_30030227_1 (
written_by VARCHAR,
directed_by VARCHAR
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
5426,
1458,
357,
2555,
834,
536,
41,
1545,
834,
969,
584,
4280,
28027,
6,
6640,
834,
969,
584,
4280,
28027,
3,
61,
11860,
10,
571,
186,
151,
2832,
8,
5640,
6640,
57,
1533,
2494,
... | [
3,
23143,
14196,
2847,
17161,
599,
14973,
834,
969,
61,
21680,
953,
834,
5426,
1458,
357,
2555,
834,
536,
549,
17444,
427,
6640,
834,
969,
3274,
96,
188,
52,
2494,
3899,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... |
SELECT candidates FROM table_1342218_5 WHERE district = "Arkansas 2" | Who is the candidate for the district Arkansas 2? | CREATE TABLE table_1342218_5 (candidates VARCHAR, district VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2884,
2606,
834,
755,
41,
1608,
12416,
6203,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
61,
11860,
10,
2645,
19,
8,
4775,
21,
8,
3939,
16622,
204,
58,
11801,
10,
1,
0,
... | [
3,
23143,
14196,
4341,
21680,
953,
834,
23747,
2884,
2606,
834,
755,
549,
17444,
427,
3939,
3274,
96,
188,
52,
3304,
7,
9,
7,
204,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT DISTINCT T1.fname, T1.city_code FROM Student AS T1 JOIN Has_Allergy AS T2 ON T1.stuid = T2.stuid WHERE T2.Allergy = "Milk" OR T2.Allergy = "Cat" | Find the different first names and cities of the students who have allergy to milk or cat. | CREATE TABLE Has_Allergy (stuid VARCHAR, Allergy VARCHAR); CREATE TABLE Student (fname VARCHAR, city_code VARCHAR, stuid VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
4498,
834,
6838,
49,
122,
63,
41,
7,
17,
76,
23,
26,
584,
4280,
28027,
6,
432,
49,
122,
63,
584,
4280,
28027,
3670,
205,
4386,
6048,
332,
17098,
6341,
41,
89,
4350,
584,
4280,
28027,
6,
... | [
3,
23143,
14196,
3,
15438,
25424,
6227,
332,
5411,
89,
4350,
6,
332,
5411,
6726,
834,
4978,
21680,
6341,
6157,
332,
536,
3,
15355,
3162,
4498,
834,
6838,
49,
122,
63,
6157,
332,
357,
9191,
332,
5411,
7,
17,
76,
23,
26,
3274,
332,
... |
SELECT SUM("Year") FROM table_70406 WHERE "Points" = '4' AND "Chassis" = 'ensign n180b' | How many years was ensign n180b a Chassis with 4 points? | CREATE TABLE table_70406 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" real
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2518,
2445,
948,
41,
96,
476,
2741,
121,
490,
6,
96,
16924,
3569,
121,
1499,
6,
96,
3541,
6500,
7,
121,
1499,
6,
96,
31477,
121,
1499,
6,
96,
22512,
7,
121,
490,
3,
61,
11860... | [
3,
23143,
14196,
180,
6122,
599,
121,
476,
2741,
8512,
21680,
953,
834,
2518,
2445,
948,
549,
17444,
427,
96,
22512,
7,
121,
3274,
3,
31,
591,
31,
3430,
96,
3541,
6500,
7,
121,
3274,
3,
31,
35,
6732,
3,
29,
20829,
115,
31,
1,
... |
SELECT district FROM table_1342218_5 WHERE result = "Re-elected" AND incumbent = "Wilbur Mills" | Which district has the incumbent Wilbur Mills and a re-elected result? | CREATE TABLE table_1342218_5 (district VARCHAR, result VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2884,
2606,
834,
755,
41,
26,
23,
20066,
584,
4280,
28027,
6,
741,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
4073,
3939,
65,
8,
28406,
8540,
5808,
4185,
... | [
3,
23143,
14196,
3939,
21680,
953,
834,
23747,
2884,
2606,
834,
755,
549,
17444,
427,
741,
3274,
96,
1649,
18,
19971,
121,
3430,
28406,
3274,
96,
518,
173,
5808,
4185,
7,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
SELECT COUNT(*) FROM Student WHERE age > 18 AND NOT StuID IN (SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.allergytype = "food" OR T2.allergytype = "animal") | Find the number of students who are older than 18 and do not have allergy to either food or animal. | CREATE TABLE Allergy_Type (Allergy VARCHAR, allergytype VARCHAR); CREATE TABLE Has_allergy (Allergy VARCHAR); CREATE TABLE Student (age VARCHAR, StuID VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
432,
49,
122,
63,
834,
25160,
41,
6838,
49,
122,
63,
584,
4280,
28027,
6,
23886,
6137,
584,
4280,
28027,
3670,
205,
4386,
6048,
332,
17098,
4498,
834,
11211,
122,
63,
41,
6838,
49,
122,
63... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
6341,
549,
17444,
427,
1246,
2490,
507,
3430,
4486,
3,
13076,
4309,
3388,
41,
23143,
14196,
3,
13076,
4309,
21680,
4498,
834,
11211,
122,
63,
6157,
332,
536,
3,
15355,
3162,
432,
49,... |
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissi... | among patients who were diagnosed with routine circumcision during a year before, what are the top three most frequent procedures that followed afterwards within 2 months? | CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
d... | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
18730,
7,
834,
447,
26,
41,
7358,
834,
23,
26,
381,
6,
1426,
834,
23,
26,
381,
6,
141,
51,
834,
23,
26,
381,
6,
3,
447,
26,
1298,
834,
4978,
1499,
6,
5059,
715,
97,
3,
61,
205,
438... | [
3,
23143,
14196,
3,
26,
834,
447,
26,
834,
1409,
565,
26,
7665,
5,
7,
14184,
834,
21869,
21680,
3,
26,
834,
447,
26,
834,
1409,
565,
26,
7665,
549,
17444,
427,
3,
26,
834,
447,
26,
834,
1409,
565,
26,
7665,
5,
447,
26,
1298,
... |
SELECT first_elected FROM table_1342218_43 WHERE district = "Texas 2" | What year was first-elected for the row of Texas 2? | CREATE TABLE table_1342218_43 (first_elected VARCHAR, district VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2884,
2606,
834,
4906,
41,
14672,
834,
19971,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
61,
11860,
10,
363,
215,
47,
166,
18,
19971,
21,
8,
7358,
13,
2514,
204,
58,
118... | [
3,
23143,
14196,
166,
834,
19971,
21680,
953,
834,
23747,
2884,
2606,
834,
4906,
549,
17444,
427,
3939,
3274,
96,
13598,
9,
7,
204,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT fname, major FROM Student WHERE NOT StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy = "Soy") | Find the first name and major of the students who are not allegry to soy. | CREATE TABLE Has_allergy (fname VARCHAR, major VARCHAR, StuID VARCHAR, Allergy VARCHAR); CREATE TABLE Student (fname VARCHAR, major VARCHAR, StuID VARCHAR, Allergy VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
4498,
834,
11211,
122,
63,
41,
89,
4350,
584,
4280,
28027,
6,
779,
584,
4280,
28027,
6,
3,
13076,
4309,
584,
4280,
28027,
6,
432,
49,
122,
63,
584,
4280,
28027,
3670,
205,
4386,
6048,
332,... | [
3,
23143,
14196,
3,
89,
4350,
6,
779,
21680,
6341,
549,
17444,
427,
4486,
3,
13076,
4309,
3388,
41,
23143,
14196,
3,
13076,
4309,
21680,
4498,
834,
11211,
122,
63,
549,
17444,
427,
432,
49,
122,
63,
3274,
96,
5231,
63,
8512,
1,
0,... |
SELECT "Opponent" FROM table_75827 WHERE "Away" = '1–1' AND "Home" = '3–3' | Which Opponent has an Away of 1 1, and a Home of 3 3? | CREATE TABLE table_75827 (
"Season" text,
"Competition" text,
"Round" text,
"Opponent" text,
"Home" text,
"Away" text,
"Series" text
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
3072,
927,
2555,
41,
96,
134,
15,
9,
739,
121,
1499,
6,
96,
5890,
4995,
4749,
121,
1499,
6,
96,
448,
32,
1106,
121,
1499,
6,
96,
667,
102,
9977,
121,
1499,
6,
96,
19040,
121,... | [
3,
23143,
14196,
96,
667,
102,
9977,
121,
21680,
953,
834,
3072,
927,
2555,
549,
17444,
427,
96,
188,
1343,
121,
3274,
3,
31,
536,
104,
536,
31,
3430,
96,
19040,
121,
3274,
3,
31,
519,
104,
519,
31,
1,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT result FROM table_1342218_43 WHERE incumbent = "Milton H. West" | What was the result for the incumbent Milton H. West? | CREATE TABLE table_1342218_43 (result VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2884,
2606,
834,
4906,
41,
60,
7,
83,
17,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
363,
47,
8,
741,
21,
8,
28406,
26805,
454,
5,
1244,
58,
11801,
10,... | [
3,
23143,
14196,
741,
21680,
953,
834,
23747,
2884,
2606,
834,
4906,
549,
17444,
427,
28406,
3274,
96,
329,
23,
7377,
454,
5,
1244,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.