answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k | input_ids listlengths 512 512 | labels listlengths 512 512 |
|---|---|---|---|---|
SELECT billing_country, COUNT(*) FROM invoices GROUP BY billing_country ORDER BY COUNT(*) DESC LIMIT 5 | A list of the top 5 countries by number of invoices. List country name and number of invoices. | CREATE TABLE invoices (billing_country VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
10921,
7,
41,
3727,
697,
834,
17529,
584,
4280,
28027,
61,
11860,
10,
71,
570,
13,
8,
420,
305,
1440,
57,
381,
13,
10921,
7,
5,
6792,
684,
564,
11,
381,
13,
10921,
7,
5,
11801,
10,
1,
... | [
3,
23143,
14196,
14425,
834,
17529,
6,
2847,
17161,
599,
1935,
61,
21680,
10921,
7,
350,
4630,
6880,
272,
476,
14425,
834,
17529,
4674,
11300,
272,
476,
2847,
17161,
599,
1935,
61,
309,
25067,
8729,
12604,
305,
1,
0,
0,
0,
0,
0,
0... |
SELECT demographic.marital_status, demographic.diagnosis FROM demographic WHERE demographic.subject_id = "74032" | what is marital status and primary disease of subject id 74032? | 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 te... | [
4398,
7,
10,
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,
13534,
... | [
3,
23143,
14196,
14798,
5,
1635,
9538,
834,
8547,
302,
6,
14798,
5,
25930,
4844,
159,
21680,
14798,
549,
17444,
427,
14798,
5,
7304,
11827,
834,
23,
26,
3274,
96,
940,
2445,
2668,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT party FROM table_1342218_43 WHERE district = "Texas 2" | What party is associated with Texas 2? | CREATE TABLE table_1342218_43 (party VARCHAR, district VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2884,
2606,
834,
4906,
41,
8071,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
61,
11860,
10,
363,
1088,
19,
1968,
28,
2514,
204,
58,
11801,
10,
1,
0,
0,
0,
0,
0,
0,
0,... | [
3,
23143,
14196,
1088,
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,
0,
0,
0,
... |
SELECT billing_country, SUM(total) FROM invoices GROUP BY billing_country ORDER BY SUM(total) DESC LIMIT 8 | A list of the top 8 countries by gross/total invoice size. List country name and gross invoice size. | CREATE TABLE invoices (billing_country VARCHAR, total INTEGER) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
10921,
7,
41,
3727,
697,
834,
17529,
584,
4280,
28027,
6,
792,
3,
21342,
17966,
61,
11860,
10,
71,
570,
13,
8,
420,
505,
1440,
57,
8690,
87,
235,
1947,
10921,
812,
5,
6792,
684,
564,
11,... | [
3,
23143,
14196,
14425,
834,
17529,
6,
180,
6122,
599,
235,
1947,
61,
21680,
10921,
7,
350,
4630,
6880,
272,
476,
14425,
834,
17529,
4674,
11300,
272,
476,
180,
6122,
599,
235,
1947,
61,
309,
25067,
8729,
12604,
505,
1,
0,
0,
0,
0... |
SELECT venue FROM table_name_49 WHERE competition = "friendly match" | What was the venue that had a friendly match competition? | CREATE TABLE table_name_49 (
venue VARCHAR,
competition VARCHAR
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3647,
41,
5669,
584,
4280,
28027,
6,
2259,
584,
4280,
28027,
3,
61,
11860,
10,
363,
47,
8,
5669,
24,
141,
3,
9,
2609,
1588,
2259,
58,
11801,
10,
1,
0,
0,
0,
0,
0... | [
3,
23143,
14196,
5669,
21680,
953,
834,
4350,
834,
3647,
549,
17444,
427,
2259,
3274,
96,
4905,
1588,
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... |
SELECT candidates FROM table_1342218_43 WHERE result = "Retired to run for U.S. Senate Democratic hold" | When the result is retired to run for U.S. Senate Democratic Hold, who is the candidate? | CREATE TABLE table_1342218_43 (candidates VARCHAR, result VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2884,
2606,
834,
4906,
41,
1608,
12416,
6203,
584,
4280,
28027,
6,
741,
584,
4280,
28027,
61,
11860,
10,
366,
8,
741,
19,
10611,
12,
661,
21,
412,
5,
134,
5,
7819,
10021,
... | [
3,
23143,
14196,
4341,
21680,
953,
834,
23747,
2884,
2606,
834,
4906,
549,
17444,
427,
741,
3274,
96,
1649,
11809,
26,
12,
661,
21,
412,
5,
134,
5,
7819,
10021,
1520,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT billing_country, AVG(total) FROM invoices GROUP BY billing_country ORDER BY AVG(total) DESC LIMIT 10 | A list of the top 10 countries by average invoice size. List country name and average invoice size. | CREATE TABLE invoices (billing_country VARCHAR, total INTEGER) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
10921,
7,
41,
3727,
697,
834,
17529,
584,
4280,
28027,
6,
792,
3,
21342,
17966,
61,
11860,
10,
71,
570,
13,
8,
420,
335,
1440,
57,
1348,
10921,
812,
5,
6792,
684,
564,
11,
1348,
10921,
8... | [
3,
23143,
14196,
14425,
834,
17529,
6,
71,
17217,
599,
235,
1947,
61,
21680,
10921,
7,
350,
4630,
6880,
272,
476,
14425,
834,
17529,
4674,
11300,
272,
476,
71,
17217,
599,
235,
1947,
61,
309,
25067,
8729,
12604,
335,
1,
0,
0,
0,
0... |
SELECT (SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'acute respiratory failure') AS t1) - (SELECT COUNT(DISTINCT t2.uniquepid) FROM (SELECT patient.uniqu... | count the number of patients diagnosed with acute respiratory failure who did not come back to the hospital within 2 months of the diagnosis. | CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate n... | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
583,
41,
583,
23,
26,
381,
6,
775,
12417,
1499,
6,
1868,
15878,
3734,
21545,
23,
26,
381,
6,
605,
6137,
1499,
6,
605,
23,
26,
381,
6,
1567,
715,
97,
6,
583,
381,
3,
61,
205,
4386,
60... | [
3,
23143,
14196,
41,
23143,
14196,
2847,
17161,
599,
15438,
25424,
6227,
3,
17,
5411,
202,
1495,
12417,
61,
21680,
41,
23143,
14196,
1868,
5,
202,
1495,
12417,
6,
8209,
5,
25930,
4844,
159,
715,
21680,
8209,
3,
15355,
3162,
1868,
9191... |
SELECT candidates FROM table_1342218_43 WHERE result = "Re-elected" AND district = "Texas 7" | What candidate has a result of being re-elected in the Texas 7 District? | CREATE TABLE table_1342218_43 (candidates VARCHAR, result VARCHAR, district VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2884,
2606,
834,
4906,
41,
1608,
12416,
6203,
584,
4280,
28027,
6,
741,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
61,
11860,
10,
363,
4775,
65,
3,
9,
741,
13,
271,
3,
... | [
3,
23143,
14196,
4341,
21680,
953,
834,
23747,
2884,
2606,
834,
4906,
549,
17444,
427,
741,
3274,
96,
1649,
18,
19971,
121,
3430,
3939,
3274,
96,
13598,
9,
7,
489,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT T1.first_name, T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY T2.invoice_date DESC LIMIT 5 | Find out 5 customers who most recently purchased something. List customers' first and last name. | CREATE TABLE customers (first_name VARCHAR, last_name VARCHAR, id VARCHAR); CREATE TABLE invoices (customer_id VARCHAR, invoice_date VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
722,
41,
14672,
834,
4350,
584,
4280,
28027,
6,
336,
834,
4350,
584,
4280,
28027,
6,
3,
23,
26,
584,
4280,
28027,
3670,
205,
4386,
6048,
332,
17098,
10921,
7,
41,
25697,
49,
834,
23,
26,
... | [
3,
23143,
14196,
332,
5411,
14672,
834,
4350,
6,
332,
5411,
5064,
834,
4350,
21680,
722,
6157,
332,
536,
3,
15355,
3162,
10921,
7,
6157,
332,
357,
9191,
332,
4416,
25697,
49,
834,
23,
26,
3274,
332,
5411,
23,
26,
4674,
11300,
272,
... |
SELECT All_Games, School_ID FROM basketball_match ORDER BY All_Games DESC | A bar chart shows the distribution of All_Games and School_ID , and could you list by the bars in desc? | 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 (
Scho... | [
4398,
7,
10,
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,
12988,
... | [
3,
23143,
14196,
432,
834,
23055,
7,
6,
1121,
834,
4309,
21680,
8498,
834,
19515,
4674,
11300,
272,
476,
432,
834,
23055,
7,
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,
... |
SELECT COUNT(party) FROM table_1342233_11 WHERE candidates = "Albert Sidney Camp (D) Unopposed" | Which party is associated with the candidate Albert Sidney Camp (D) unopposed? | CREATE TABLE table_1342233_11 (party VARCHAR, candidates VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
20879,
834,
2596,
41,
8071,
584,
4280,
28027,
6,
4341,
584,
4280,
28027,
61,
11860,
10,
4073,
1088,
19,
1968,
28,
8,
4775,
11375,
925,
26,
3186,
4594,
41,
308,
61,
73... | [
3,
23143,
14196,
2847,
17161,
599,
8071,
61,
21680,
953,
834,
2368,
4165,
20879,
834,
2596,
549,
17444,
427,
4341,
3274,
96,
25691,
49,
17,
925,
26,
3186,
4594,
41,
308,
61,
597,
28236,
3843,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,... |
SELECT T1.first_name, T1.last_name, COUNT(*) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 10 | Find out the top 10 customers by total number of orders. List customers' first and last name and the number of total orders. | CREATE TABLE customers (first_name VARCHAR, last_name VARCHAR, id VARCHAR); CREATE TABLE invoices (customer_id VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
722,
41,
14672,
834,
4350,
584,
4280,
28027,
6,
336,
834,
4350,
584,
4280,
28027,
6,
3,
23,
26,
584,
4280,
28027,
3670,
205,
4386,
6048,
332,
17098,
10921,
7,
41,
25697,
49,
834,
23,
26,
... | [
3,
23143,
14196,
332,
5411,
14672,
834,
4350,
6,
332,
5411,
5064,
834,
4350,
6,
2847,
17161,
599,
1935,
61,
21680,
722,
6157,
332,
536,
3,
15355,
3162,
10921,
7,
6157,
332,
357,
9191,
332,
4416,
25697,
49,
834,
23,
26,
3274,
332,
... |
SELECT activity_name, COUNT(*) FROM Activity AS T1 JOIN Faculty_Participates_in AS T2 ON T1.actid = T2.actid GROUP BY T1.actid ORDER BY COUNT(*) | How many faculty members participate in each activity? Return the activity names and the number of faculty members by a bar chart, and display Y-axis in asc order. | CREATE TABLE Faculty_Participates_in (
FacID INTEGER,
actid INTEGER
)
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 Student (
StuID INTEGER,
... | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
16896,
834,
13725,
23,
3389,
6203,
834,
77,
41,
1699,
75,
4309,
3,
21342,
17966,
6,
1810,
23,
26,
3,
21342,
17966,
3,
61,
205,
4386,
6048,
332,
17098,
16896,
41,
1699,
75,
4309,
3,
21342,
... | [
3,
23143,
14196,
1756,
834,
4350,
6,
2847,
17161,
599,
1935,
61,
21680,
22536,
6157,
332,
536,
3,
15355,
3162,
16896,
834,
13725,
23,
3389,
6203,
834,
77,
6157,
332,
357,
9191,
332,
5411,
2708,
23,
26,
3274,
332,
4416,
2708,
23,
26,... |
SELECT candidates FROM table_1342233_11 WHERE incumbent = "Carl Vinson" | Which district is associated with the incumbent Carl Vinson? | CREATE TABLE table_1342233_11 (candidates VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
20879,
834,
2596,
41,
1608,
12416,
6203,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
4073,
3939,
19,
1968,
28,
8,
28406,
7291,
8653,
739,
58,
11801,
10... | [
3,
23143,
14196,
4341,
21680,
953,
834,
2368,
4165,
20879,
834,
2596,
549,
17444,
427,
28406,
3274,
96,
6936,
40,
8653,
739,
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,
... |
SELECT T1.first_name, T1.last_name, SUM(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY SUM(T2.total) DESC LIMIT 10 | List the top 10 customers by total gross sales. List customers' first and last name and total gross sales. | CREATE TABLE invoices (total INTEGER, customer_id VARCHAR); CREATE TABLE customers (first_name VARCHAR, last_name VARCHAR, id VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
10921,
7,
41,
235,
1947,
3,
21342,
17966,
6,
884,
834,
23,
26,
584,
4280,
28027,
3670,
205,
4386,
6048,
332,
17098,
722,
41,
14672,
834,
4350,
584,
4280,
28027,
6,
336,
834,
4350,
584,
428... | [
3,
23143,
14196,
332,
5411,
14672,
834,
4350,
6,
332,
5411,
5064,
834,
4350,
6,
180,
6122,
599,
382,
4416,
235,
1947,
61,
21680,
722,
6157,
332,
536,
3,
15355,
3162,
10921,
7,
6157,
332,
357,
9191,
332,
4416,
25697,
49,
834,
23,
2... |
SELECT population__2010_ FROM table_1691800_2 WHERE municipality = "San Jacinto" | what is the population where municipality is san jacinto? | CREATE TABLE table_1691800_2 (
population__2010_ VARCHAR,
municipality VARCHAR
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2938,
4729,
6192,
834,
357,
41,
2074,
834,
834,
14926,
834,
584,
4280,
28027,
6,
27597,
584,
4280,
28027,
3,
61,
11860,
10,
125,
19,
8,
2074,
213,
27597,
19,
3,
7,
152,
2662,
7... | [
3,
23143,
14196,
2074,
834,
834,
14926,
834,
21680,
953,
834,
2938,
4729,
6192,
834,
357,
549,
17444,
427,
27597,
3274,
96,
134,
152,
2215,
75,
77,
235,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT candidates FROM table_1342233_11 WHERE district = "Georgia 7" | Which candidates are associated with the Georgia 7 district? | CREATE TABLE table_1342233_11 (candidates VARCHAR, district VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
20879,
834,
2596,
41,
1608,
12416,
6203,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
61,
11860,
10,
4073,
4341,
33,
1968,
28,
8,
5664,
489,
3939,
58,
11801,
10,
1,
0... | [
3,
23143,
14196,
4341,
21680,
953,
834,
2368,
4165,
20879,
834,
2596,
549,
17444,
427,
3939,
3274,
96,
517,
15,
1677,
23,
9,
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... |
SELECT T1.name, COUNT(*) FROM genres AS T1 JOIN tracks AS T2 ON T2.genre_id = T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 5 | List the top 5 genres by number of tracks. List genres name and total tracks. | CREATE TABLE tracks (genre_id VARCHAR); CREATE TABLE genres (name VARCHAR, id VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
6542,
41,
729,
60,
834,
23,
26,
584,
4280,
28027,
3670,
205,
4386,
6048,
332,
17098,
5349,
7,
41,
4350,
584,
4280,
28027,
6,
3,
23,
26,
584,
4280,
28027,
61,
11860,
10,
6792,
8,
420,
305... | [
3,
23143,
14196,
332,
5411,
4350,
6,
2847,
17161,
599,
1935,
61,
21680,
5349,
7,
6157,
332,
536,
3,
15355,
3162,
6542,
6157,
332,
357,
9191,
332,
4416,
729,
60,
834,
23,
26,
3274,
332,
5411,
23,
26,
350,
4630,
6880,
272,
476,
332,... |
SELECT nba_draft FROM table_name_10 WHERE school = "bishop o'connell high school" | What is the NBA Draft for the School Bishop O'Connell High School? | CREATE TABLE table_name_10 (
nba_draft VARCHAR,
school VARCHAR
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
1714,
41,
3,
29,
115,
9,
834,
26,
10913,
584,
4280,
28027,
6,
496,
584,
4280,
28027,
3,
61,
11860,
10,
363,
19,
8,
14512,
21409,
21,
8,
1121,
16098,
411,
31,
4302,
... | [
3,
23143,
14196,
3,
29,
115,
9,
834,
26,
10913,
21680,
953,
834,
4350,
834,
1714,
549,
17444,
427,
496,
3274,
96,
11514,
10776,
3,
32,
31,
1018,
10361,
306,
496,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT candidates FROM table_1342233_11 WHERE district = "Georgia 4" | What candidate is associated with the Georgia 4 district? | CREATE TABLE table_1342233_11 (candidates VARCHAR, district VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
20879,
834,
2596,
41,
1608,
12416,
6203,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
61,
11860,
10,
363,
4775,
19,
1968,
28,
8,
5664,
314,
3939,
58,
11801,
10,
1,
0,... | [
3,
23143,
14196,
4341,
21680,
953,
834,
2368,
4165,
20879,
834,
2596,
549,
17444,
427,
3939,
3274,
96,
517,
15,
1677,
23,
9,
3,
20364,
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 title FROM albums | List every album's title. | CREATE TABLE albums (title VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
14234,
41,
21869,
584,
4280,
28027,
61,
11860,
10,
6792,
334,
2306,
31,
7,
2233,
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,
0,
0,
0,
0,... | [
3,
23143,
14196,
2233,
21680,
14234,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... |
SELECT AVG("Round") FROM table_33305 WHERE "Position" = 'safety' AND "Overall" > '89' | What is the average round in which a Safety with an overall rank higher than 89 was drafted? | CREATE TABLE table_33305 (
"Round" real,
"Overall" real,
"Player" text,
"Position" text,
"College" text
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
23360,
3076,
41,
96,
448,
32,
1106,
121,
490,
6,
96,
23847,
1748,
121,
490,
6,
96,
15800,
49,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
96,
9939,
7883,
121,
1499,
3,
... | [
3,
23143,
14196,
71,
17217,
599,
121,
448,
32,
1106,
8512,
21680,
953,
834,
23360,
3076,
549,
17444,
427,
96,
345,
32,
7,
4749,
121,
3274,
3,
31,
15233,
17,
63,
31,
3430,
96,
23847,
1748,
121,
2490,
3,
31,
3914,
31,
1,
0,
0,
0... |
SELECT first_elected FROM table_1342233_17 WHERE incumbent = "Joe B. Bates" | What year was incumbent joe b. bates first elected? | CREATE TABLE table_1342233_17 (first_elected VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
20879,
834,
2517,
41,
14672,
834,
19971,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
363,
215,
47,
28406,
3,
1927,
15,
3,
115,
5,
3795,
15,
7,
166,
... | [
3,
23143,
14196,
166,
834,
19971,
21680,
953,
834,
2368,
4165,
20879,
834,
2517,
549,
17444,
427,
28406,
3274,
96,
683,
32,
15,
272,
5,
272,
6203,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT title FROM albums ORDER BY title | List every album ordered by album title in ascending order. | CREATE TABLE albums (title VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
14234,
41,
21869,
584,
4280,
28027,
61,
11860,
10,
6792,
334,
2306,
5563,
57,
2306,
2233,
16,
25200,
53,
455,
5,
11801,
10,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
3,
23143,
14196,
2233,
21680,
14234,
4674,
11300,
272,
476,
2233,
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,
0,
0,
0,
0,
... |
SELECT AVG("Worst score") FROM table_33270 WHERE "Best dancer" = 'mario lopez' AND "Dance" = 'tango' | What is the average Worst score for Mario Lopez as the Best dancer and Tango as the Dance? | CREATE TABLE table_33270 (
"Dance" text,
"Best dancer" text,
"Best score" real,
"Worst dancer" text,
"Worst score" real
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
4201,
17485,
41,
96,
308,
663,
121,
1499,
6,
96,
17278,
2595,
52,
121,
1499,
6,
96,
17278,
2604,
121,
490,
6,
96,
518,
127,
7,
17,
2595,
52,
121,
1499,
6,
96,
518,
127,
7,
... | [
3,
23143,
14196,
71,
17217,
599,
121,
518,
127,
7,
17,
2604,
8512,
21680,
953,
834,
4201,
17485,
549,
17444,
427,
96,
17278,
2595,
52,
121,
3274,
3,
31,
17289,
32,
3,
17696,
172,
31,
3430,
96,
308,
663,
121,
3274,
3,
31,
17,
179... |
SELECT party FROM table_1342233_17 WHERE incumbent = "Virgil Chapman" | What party is incumbent virgil chapman from? | CREATE TABLE table_1342233_17 (party VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
20879,
834,
2517,
41,
8071,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
363,
1088,
19,
28406,
3,
5771,
122,
173,
15064,
348,
45,
58,
11801,
10,
1,
0,... | [
3,
23143,
14196,
1088,
21680,
953,
834,
2368,
4165,
20879,
834,
2517,
549,
17444,
427,
28406,
3274,
96,
21031,
122,
173,
3643,
102,
348,
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 title FROM albums WHERE title LIKE 'A%' ORDER BY title | List every album whose title starts with A in alphabetical order. | CREATE TABLE albums (title VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
14234,
41,
21869,
584,
4280,
28027,
61,
11860,
10,
6792,
334,
2306,
3,
2544,
2233,
3511,
28,
71,
16,
20688,
1950,
455,
5,
11801,
10,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
3,
23143,
14196,
2233,
21680,
14234,
549,
17444,
427,
2233,
8729,
9914,
3,
31,
188,
1454,
31,
4674,
11300,
272,
476,
2233,
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,
... |
SELECT lab.labname FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-207754')) AND DATETIME(lab.labresulttime) >= DATETIME(CURRENT_TIME(), '-97 month') OR... | what lab test did patient 006-207754 last receive since 97 months ago? | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE vitalperiodic (
vitalperiodici... | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
23886,
41,
23886,
23,
26,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
2672,
4350,
1499,
6,
23886,
4350,
1499,
6,
23886,
715,
97,
3,
61,
205,
4386,
6048,
332,
17098,
7690,
41,
50,
9824,
3... | [
3,
23143,
14196,
7690,
5,
9339,
4350,
21680,
7690,
549,
17444,
427,
7690,
5,
10061,
15129,
21545,
23,
26,
3388,
41,
23143,
14196,
1868,
5,
10061,
15129,
21545,
23,
26,
21680,
1868,
549,
17444,
427,
1868,
5,
10061,
15878,
3734,
21545,
... |
SELECT first_elected FROM table_1342218_6 WHERE incumbent = "Clair Engle" | What year was clair engle first elected? | CREATE TABLE table_1342218_6 (first_elected VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2884,
2606,
834,
948,
41,
14672,
834,
19971,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
363,
215,
47,
3,
7997,
3,
35,
3537,
166,
8160,
58,
11801,
10,
1,
... | [
3,
23143,
14196,
166,
834,
19971,
21680,
953,
834,
23747,
2884,
2606,
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,
... |
SELECT T1.first_name, T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY total LIMIT 10 | List the customers first and last name of 10 least expensive invoices. | CREATE TABLE customers (first_name VARCHAR, last_name VARCHAR, id VARCHAR); CREATE TABLE invoices (customer_id VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
722,
41,
14672,
834,
4350,
584,
4280,
28027,
6,
336,
834,
4350,
584,
4280,
28027,
6,
3,
23,
26,
584,
4280,
28027,
3670,
205,
4386,
6048,
332,
17098,
10921,
7,
41,
25697,
49,
834,
23,
26,
... | [
3,
23143,
14196,
332,
5411,
14672,
834,
4350,
6,
332,
5411,
5064,
834,
4350,
21680,
722,
6157,
332,
536,
3,
15355,
3162,
10921,
7,
6157,
332,
357,
9191,
332,
4416,
25697,
49,
834,
23,
26,
3274,
332,
5411,
23,
26,
4674,
11300,
272,
... |
SELECT Status, COUNT(*) FROM roller_coaster GROUP BY Status | Show the different statuses and the numbers of roller coasters for each status. | CREATE TABLE roller_coaster (
Status VARCHAR
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
10866,
834,
25500,
49,
41,
19318,
584,
4280,
28027,
3,
61,
11860,
10,
3111,
8,
315,
2637,
15,
7,
11,
8,
2302,
13,
10866,
4939,
277,
21,
284,
2637,
5,
11801,
10,
1,
0,
0,
0,
0,
0,
0,
... | [
3,
23143,
14196,
19318,
6,
2847,
17161,
599,
1935,
61,
21680,
10866,
834,
25500,
49,
350,
4630,
6880,
272,
476,
19318,
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 result FROM table_1342218_6 WHERE first_elected = 1943 | what is the result of the first elected is 1943? | CREATE TABLE table_1342218_6 (result VARCHAR, first_elected VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2884,
2606,
834,
948,
41,
60,
7,
83,
17,
584,
4280,
28027,
6,
166,
834,
19971,
584,
4280,
28027,
61,
11860,
10,
125,
19,
8,
741,
13,
8,
166,
8160,
19,
26436,
58,
11801,
... | [
3,
23143,
14196,
741,
21680,
953,
834,
23747,
2884,
2606,
834,
948,
549,
17444,
427,
166,
834,
19971,
3274,
26436,
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... |
SELECT SUM(total) FROM invoices WHERE billing_city = "Chicago" AND billing_state = "IL" | List total amount of invoice from Chicago, IL. | CREATE TABLE invoices (total INTEGER, billing_city VARCHAR, billing_state VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
10921,
7,
41,
235,
1947,
3,
21342,
17966,
6,
14425,
834,
6726,
584,
4280,
28027,
6,
14425,
834,
5540,
584,
4280,
28027,
61,
11860,
10,
6792,
792,
866,
13,
10921,
45,
3715,
6,
3,
3502,
5,
... | [
3,
23143,
14196,
180,
6122,
599,
235,
1947,
61,
21680,
10921,
7,
549,
17444,
427,
14425,
834,
6726,
3274,
96,
3541,
2617,
839,
121,
3430,
14425,
834,
5540,
3274,
96,
3502,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT character FROM table_name_1 WHERE year = 2010 AND award_ceremony = "indian television academy awards" | Which character was nominated in the 2010 Indian Television Academy Awards? | CREATE TABLE table_name_1 (
character VARCHAR,
year VARCHAR,
award_ceremony VARCHAR
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
536,
41,
1848,
584,
4280,
28027,
6,
215,
584,
4280,
28027,
6,
2760,
834,
2110,
15,
21208,
584,
4280,
28027,
3,
61,
11860,
10,
4073,
1848,
47,
150,
1109,
920,
16,
8,
... | [
3,
23143,
14196,
1848,
21680,
953,
834,
4350,
834,
536,
549,
17444,
427,
215,
3274,
2735,
3430,
2760,
834,
2110,
15,
21208,
3274,
96,
77,
8603,
4390,
25990,
6120,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT COUNT(result) FROM table_1342233_3 WHERE incumbent = "Albert Rains" | what the the end number where albert rains was running | CREATE TABLE table_1342233_3 (result VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
20879,
834,
519,
41,
60,
7,
83,
17,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
125,
8,
8,
414,
381,
213,
491,
7041,
3412,
7,
47,
1180,
11801,
10,
... | [
3,
23143,
14196,
2847,
17161,
599,
60,
7,
83,
17,
61,
21680,
953,
834,
2368,
4165,
20879,
834,
519,
549,
17444,
427,
28406,
3274,
96,
25691,
49,
17,
12574,
7,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT COUNT(*) FROM invoices WHERE billing_city = "Chicago" AND billing_state = "IL" | List the number of invoices from Chicago, IL. | CREATE TABLE invoices (billing_city VARCHAR, billing_state VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
10921,
7,
41,
3727,
697,
834,
6726,
584,
4280,
28027,
6,
14425,
834,
5540,
584,
4280,
28027,
61,
11860,
10,
6792,
8,
381,
13,
10921,
7,
45,
3715,
6,
3,
3502,
5,
11801,
10,
1,
0,
0,
0,
... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
10921,
7,
549,
17444,
427,
14425,
834,
6726,
3274,
96,
3541,
2617,
839,
121,
3430,
14425,
834,
5540,
3274,
96,
3502,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT score FROM table_name_35 WHERE date = "may 3" | What was the score on May 3? | CREATE TABLE table_name_35 (
score VARCHAR,
date VARCHAR
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
2469,
41,
2604,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
3,
61,
11860,
10,
363,
47,
8,
2604,
30,
932,
220,
58,
11801,
10,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
3,
23143,
14196,
2604,
21680,
953,
834,
4350,
834,
2469,
549,
17444,
427,
833,
3274,
96,
13726,
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,
0,
0,
0,
0,
0,
0,... |
SELECT result FROM table_1342233_3 WHERE incumbent = "Frank W. Boykin" | what the was the final in which frank w. boykin was running | CREATE TABLE table_1342233_3 (result VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
20879,
834,
519,
41,
60,
7,
83,
17,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
125,
8,
47,
8,
804,
16,
84,
3,
89,
6254,
3,
210,
5,
4940,
2917,
... | [
3,
23143,
14196,
741,
21680,
953,
834,
2368,
4165,
20879,
834,
519,
549,
17444,
427,
28406,
3274,
96,
371,
6254,
549,
5,
7508,
2917,
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 billing_state, COUNT(*) FROM invoices WHERE billing_country = "USA" GROUP BY billing_state | List the number of invoices from the US, grouped by state. | CREATE TABLE invoices (billing_state VARCHAR, billing_country VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
10921,
7,
41,
3727,
697,
834,
5540,
584,
4280,
28027,
6,
14425,
834,
17529,
584,
4280,
28027,
61,
11860,
10,
6792,
8,
381,
13,
10921,
7,
45,
8,
837,
6,
3,
31801,
57,
538,
5,
11801,
10,
... | [
3,
23143,
14196,
14425,
834,
5540,
6,
2847,
17161,
599,
1935,
61,
21680,
10921,
7,
549,
17444,
427,
14425,
834,
17529,
3274,
96,
17663,
121,
350,
4630,
6880,
272,
476,
14425,
834,
5540,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT "rider" FROM table_203_166 WHERE "laps" = 21 ORDER BY "pos" DESC LIMIT 1 | which rider completed all 21 laps of the 2008 malaysian motorcycle grand prixwith the longest time ? | CREATE TABLE table_203_166 (
id number,
"pos" text,
"no" number,
"rider" text,
"manufacturer" text,
"laps" number,
"time" text,
"grid" number,
"points" number
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
26811,
41,
3,
23,
26,
381,
6,
96,
2748,
121,
1499,
6,
96,
29,
32,
121,
381,
6,
96,
4055,
49,
121,
1499,
6,
96,
348,
76,
8717,
450,
49,
121,
1499,
6,
96,
8478,
... | [
3,
23143,
14196,
96,
4055,
49,
121,
21680,
953,
834,
23330,
834,
26811,
549,
17444,
427,
96,
8478,
7,
121,
3274,
1401,
4674,
11300,
272,
476,
96,
2748,
121,
309,
25067,
8729,
12604,
209,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
SELECT COUNT(first_elected) FROM table_1342233_32 WHERE incumbent = "Sol Bloom" | Name the total number of first elected for sol bloom | CREATE TABLE table_1342233_32 (first_elected VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
20879,
834,
2668,
41,
14672,
834,
19971,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
5570,
8,
792,
381,
13,
166,
8160,
21,
9467,
13081,
11801,
10,
1,
... | [
3,
23143,
14196,
2847,
17161,
599,
14672,
834,
19971,
61,
21680,
953,
834,
2368,
4165,
20879,
834,
2668,
549,
17444,
427,
28406,
3274,
96,
5231,
40,
17762,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT billing_state, COUNT(*) FROM invoices WHERE billing_country = "USA" GROUP BY billing_state ORDER BY COUNT(*) DESC LIMIT 1 | List the state in the US with the most invoices. | CREATE TABLE invoices (billing_state VARCHAR, billing_country VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
10921,
7,
41,
3727,
697,
834,
5540,
584,
4280,
28027,
6,
14425,
834,
17529,
584,
4280,
28027,
61,
11860,
10,
6792,
8,
538,
16,
8,
837,
28,
8,
167,
10921,
7,
5,
11801,
10,
1,
0,
0,
0,
... | [
3,
23143,
14196,
14425,
834,
5540,
6,
2847,
17161,
599,
1935,
61,
21680,
10921,
7,
549,
17444,
427,
14425,
834,
17529,
3274,
96,
17663,
121,
350,
4630,
6880,
272,
476,
14425,
834,
5540,
4674,
11300,
272,
476,
2847,
17161,
599,
1935,
6... |
SELECT "Directed by" FROM table_19654 WHERE "Production code" = '176252' | Who directed the episode with the production code 176252? | CREATE TABLE table_19654 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
26937,
5062,
41,
96,
4168,
5,
16,
939,
121,
490,
6,
96,
4168,
5,
16,
774,
121,
490,
6,
96,
382,
155,
109,
121,
1499,
6,
96,
23620,
15,
26,
57,
121,
1499,
6,
96,
24965,
324,... | [
3,
23143,
14196,
96,
23620,
15,
26,
57,
121,
21680,
953,
834,
26937,
5062,
549,
17444,
427,
96,
3174,
8291,
1081,
121,
3274,
3,
31,
26782,
1828,
357,
31,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT candidates FROM table_1342233_32 WHERE incumbent = "Ellsworth B. Buck" | Name the candidates for ellsworth b. buck | CREATE TABLE table_1342233_32 (candidates VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
20879,
834,
2668,
41,
1608,
12416,
6203,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
5570,
8,
4341,
21,
3,
3820,
7,
7048,
3,
115,
5,
3,
13863,
11801,... | [
3,
23143,
14196,
4341,
21680,
953,
834,
2368,
4165,
20879,
834,
2668,
549,
17444,
427,
28406,
3274,
96,
427,
195,
7,
7048,
272,
5,
10295,
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 billing_state, COUNT(*), SUM(total) FROM invoices WHERE billing_state = "CA" | List the number of invoices and the invoice total from California. | CREATE TABLE invoices (billing_state VARCHAR, total INTEGER) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
10921,
7,
41,
3727,
697,
834,
5540,
584,
4280,
28027,
6,
792,
3,
21342,
17966,
61,
11860,
10,
6792,
8,
381,
13,
10921,
7,
11,
8,
10921,
792,
45,
1826,
5,
11801,
10,
1,
0,
0,
0,
0,
0,... | [
3,
23143,
14196,
14425,
834,
5540,
6,
2847,
17161,
599,
1935,
201,
180,
6122,
599,
235,
1947,
61,
21680,
10921,
7,
549,
17444,
427,
14425,
834,
5540,
3274,
96,
4490,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT "nation" FROM table_203_630 WHERE "nation" IN ('brazil', 'china') ORDER BY "gold" DESC LIMIT 1 | who won more gold medals , brazil or china ? | CREATE TABLE table_203_630 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
23330,
834,
26106,
41,
3,
23,
26,
381,
6,
96,
6254,
121,
381,
6,
96,
29,
257,
121,
1499,
6,
96,
14910,
121,
381,
6,
96,
7,
173,
624,
121,
381,
6,
96,
13711,
776,
121,
381,
... | [
3,
23143,
14196,
96,
29,
257,
121,
21680,
953,
834,
23330,
834,
26106,
549,
17444,
427,
96,
29,
257,
121,
3388,
41,
31,
1939,
702,
40,
31,
6,
3,
31,
5675,
9,
31,
61,
4674,
11300,
272,
476,
96,
14910,
121,
309,
25067,
8729,
12604... |
SELECT candidates FROM table_1342233_32 WHERE district = "New York 35" | What are the candidates for new york 35? | CREATE TABLE table_1342233_32 (candidates VARCHAR, district VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
20879,
834,
2668,
41,
1608,
12416,
6203,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
61,
11860,
10,
363,
33,
8,
4341,
21,
126,
25453,
3097,
58,
11801,
10,
1,
0,
0,
... | [
3,
23143,
14196,
4341,
21680,
953,
834,
2368,
4165,
20879,
834,
2668,
549,
17444,
427,
3939,
3274,
96,
6861,
1060,
3097,
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... |
SELECT T1.title FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = "Aerosmith" | List Aerosmith's albums. | CREATE TABLE artists (id VARCHAR, name VARCHAR); CREATE TABLE albums (title VARCHAR, artist_id VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
3153,
41,
23,
26,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
3670,
205,
4386,
6048,
332,
17098,
14234,
41,
21869,
584,
4280,
28027,
6,
2377,
834,
23,
26,
584,
4280,
28027,
61,
11860,
10,
... | [
3,
23143,
14196,
332,
5411,
21869,
21680,
14234,
6157,
332,
536,
3,
15355,
3162,
3153,
6157,
332,
357,
9191,
332,
5411,
1408,
343,
834,
23,
26,
3274,
332,
4416,
23,
26,
549,
17444,
427,
332,
4416,
4350,
3274,
96,
188,
49,
32,
16331,... |
SELECT Q.Id AS "post_link", Q.LastActivityDate FROM Posts AS Q WHERE Q.PostTypeId = 1 AND NOT Q.Tags LIKE @Pattern AND Q.LastActivityDate BETWEEN @SubFrom AND @SubTo AND (Q.CreationDate BETWEEN @From AND @To OR EXISTS(SELECT * FROM Posts AS A WHERE A.PostTypeId = 2 AND A.ParentId = Q.Id AND A.CreationDate BETWEEN @From... | New answers or questions from specific period. | CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId num... | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
4543,
382,
9,
7,
157,
20119,
25160,
7,
41,
27,
26,
381,
6,
5570,
1499,
6,
7726,
1499,
3,
61,
205,
4386,
6048,
332,
17098,
1844,
7,
41,
27,
26,
381,
6,
1844,
25160,
196,
26,
381,
6,
2... | [
3,
23143,
14196,
1593,
5,
196,
26,
6157,
96,
5950,
834,
4907,
1686,
1593,
5,
3612,
7,
17,
13035,
485,
308,
342,
21680,
1844,
7,
6157,
1593,
549,
17444,
427,
1593,
5,
22507,
25160,
196,
26,
3274,
209,
3430,
4486,
1593,
5,
23593,
7,... |
SELECT party FROM table_1342233_32 WHERE district = "New York 20" | What is the party for new york 20? | CREATE TABLE table_1342233_32 (party VARCHAR, district VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
20879,
834,
2668,
41,
8071,
584,
4280,
28027,
6,
3939,
584,
4280,
28027,
61,
11860,
10,
363,
19,
8,
1088,
21,
126,
25453,
460,
58,
11801,
10,
1,
0,
0,
0,
0,
0,
0,... | [
3,
23143,
14196,
1088,
21680,
953,
834,
2368,
4165,
20879,
834,
2668,
549,
17444,
427,
3939,
3274,
96,
6861,
1060,
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,
0,... |
SELECT COUNT(*) FROM albums AS T1 JOIN artists AS T2 ON T1.artist_id = T2.id WHERE T2.name = "Billy Cobham" | How many albums does Billy Cobham has? | CREATE TABLE artists (id VARCHAR, name VARCHAR); CREATE TABLE albums (artist_id VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
3153,
41,
23,
26,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
3670,
205,
4386,
6048,
332,
17098,
14234,
41,
1408,
343,
834,
23,
26,
584,
4280,
28027,
61,
11860,
10,
571,
186,
14234,
405,
1... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
14234,
6157,
332,
536,
3,
15355,
3162,
3153,
6157,
332,
357,
9191,
332,
5411,
1408,
343,
834,
23,
26,
3274,
332,
4416,
23,
26,
549,
17444,
427,
332,
4416,
4350,
3274,
96,
279,
173,... |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.gender = "F" AND lab.label = "Granular Casts" | Find the name of female patients who had a granular casts lab test. | 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 prescription... | [
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,
7690,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
7690,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
SELECT result FROM table_1342233_43 WHERE candidates = "R. Ewing Thomason (D) Unopposed" | What was the result of the election featuring r. ewing thomason (d) unopposed? | CREATE TABLE table_1342233_43 (result VARCHAR, candidates VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
20879,
834,
4906,
41,
60,
7,
83,
17,
584,
4280,
28027,
6,
4341,
584,
4280,
28027,
61,
11860,
10,
363,
47,
8,
741,
13,
8,
4356,
4767,
3,
52,
5,
3,
15,
3108,
3,
1... | [
3,
23143,
14196,
741,
21680,
953,
834,
2368,
4165,
20879,
834,
4906,
549,
17444,
427,
4341,
3274,
96,
448,
5,
262,
3108,
3576,
106,
41,
308,
61,
597,
28236,
3843,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
SELECT company FROM customers WHERE first_name = "Eduardo" AND last_name = "Martins" | Eduardo Martins is a customer at which company? | CREATE TABLE customers (company VARCHAR, first_name VARCHAR, last_name VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
722,
41,
29179,
584,
4280,
28027,
6,
166,
834,
4350,
584,
4280,
28027,
6,
336,
834,
4350,
584,
4280,
28027,
61,
11860,
10,
31176,
32,
3394,
7,
19,
3,
9,
884,
44,
84,
349,
58,
11801,
10,
... | [
3,
23143,
14196,
349,
21680,
722,
549,
17444,
427,
166,
834,
4350,
3274,
96,
427,
1259,
986,
32,
121,
3430,
336,
834,
4350,
3274,
96,
29838,
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... |
SELECT "Date" FROM table_53058 WHERE "Venue" = 'punt road oval' | What date was the game played at Punt Road Oval? | CREATE TABLE table_53058 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
26918,
3449,
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,
76,
... | [
3,
23143,
14196,
96,
308,
342,
121,
21680,
953,
834,
26918,
3449,
549,
17444,
427,
96,
553,
35,
76,
15,
121,
3274,
3,
31,
6225,
17,
1373,
17986,
31,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT district FROM table_1342233_43 WHERE incumbent = "Eugene Worley" | What district is eugene worley from? | CREATE TABLE table_1342233_43 (district VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
20879,
834,
4906,
41,
26,
23,
20066,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
363,
3939,
19,
3,
15,
76,
729,
15,
2275,
52,
1306,
45,
58,
11801,
... | [
3,
23143,
14196,
3939,
21680,
953,
834,
2368,
4165,
20879,
834,
4906,
549,
17444,
427,
28406,
3274,
96,
427,
76,
729,
15,
11287,
1306,
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 email, phone FROM customers WHERE first_name = "Astrid" AND last_name = "Gruber" | What is Astrid Gruber's email and phone number? | CREATE TABLE customers (email VARCHAR, phone VARCHAR, first_name VARCHAR, last_name VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
722,
41,
15,
1963,
584,
4280,
28027,
6,
951,
584,
4280,
28027,
6,
166,
834,
4350,
584,
4280,
28027,
6,
336,
834,
4350,
584,
4280,
28027,
61,
11860,
10,
363,
19,
282,
1788,
26,
21303,
1152,... | [
3,
23143,
14196,
791,
6,
951,
21680,
722,
549,
17444,
427,
166,
834,
4350,
3274,
96,
188,
7,
1788,
26,
121,
3430,
336,
834,
4350,
3274,
96,
517,
14446,
49,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT "Series" FROM table_3873 WHERE "High rebounds" = 'Al Horford (10)' | What is the series number when al horford (10) had the high rebounds? | CREATE TABLE table_3873 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Series" text
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
3747,
4552,
41,
96,
23055,
121,
490,
6,
96,
308,
342,
121,
1499,
6,
96,
18699,
121,
1499,
6,
96,
134,
9022,
121,
1499,
6,
96,
21417,
979,
121,
1499,
6,
96,
21417,
3,
23768,
1... | [
3,
23143,
14196,
96,
12106,
7,
121,
21680,
953,
834,
3747,
4552,
549,
17444,
427,
96,
21417,
3,
23768,
121,
3274,
3,
31,
188,
40,
6766,
2590,
41,
16968,
31,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT COUNT(result) FROM table_1342233_6 WHERE candidates = "Richard J. Welch (R) Unopposed" | how many result with candidates being richard j. welch (r) unopposed | CREATE TABLE table_1342233_6 (result VARCHAR, candidates VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
20879,
834,
948,
41,
60,
7,
83,
17,
584,
4280,
28027,
6,
4341,
584,
4280,
28027,
61,
11860,
10,
149,
186,
741,
28,
4341,
271,
2354,
986,
3,
354,
5,
62,
40,
524,
4... | [
3,
23143,
14196,
2847,
17161,
599,
60,
7,
83,
17,
61,
21680,
953,
834,
2368,
4165,
20879,
834,
948,
549,
17444,
427,
4341,
3274,
96,
448,
362,
986,
446,
5,
101,
40,
524,
41,
448,
61,
597,
28236,
3843,
121,
1,
0,
0,
0,
0,
0,
... |
SELECT COUNT(*) FROM customers WHERE city = "Prague" | How many customers live in Prague city? | CREATE TABLE customers (city VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
722,
41,
6726,
584,
4280,
28027,
61,
11860,
10,
571,
186,
722,
619,
16,
23564,
690,
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... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
722,
549,
17444,
427,
690,
3274,
96,
345,
52,
9,
5398,
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,... |
SELECT demographic.ethnicity FROM demographic WHERE demographic.subject_id = "16438" | what is ethnicity of subject id 16438? | 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 prescription... | [
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,
14798,
5,
15,
189,
2532,
485,
21680,
14798,
549,
17444,
427,
14798,
5,
7304,
11827,
834,
23,
26,
3274,
96,
26987,
3747,
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 result FROM table_1342233_6 WHERE incumbent = "Jack Z. Anderson" | what's the result with incumbent being jack z. anderson | CREATE TABLE table_1342233_6 (result VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
20879,
834,
948,
41,
60,
7,
83,
17,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
125,
31,
7,
8,
741,
28,
28406,
271,
3,
9325,
3,
172,
5,
11,
13515... | [
3,
23143,
14196,
741,
21680,
953,
834,
2368,
4165,
20879,
834,
948,
549,
17444,
427,
28406,
3274,
96,
683,
4365,
1027,
5,
11825,
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 customers WHERE state = "CA" | How many customers in state of CA? | CREATE TABLE customers (state VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
722,
41,
5540,
584,
4280,
28027,
61,
11860,
10,
571,
186,
722,
16,
538,
13,
3087,
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,
... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
722,
549,
17444,
427,
538,
3274,
96,
4490,
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 allergy.drugname FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '004-29334')) AND STRFTIME('%y-%m', allergy.allergytime) >= '2104-03' | what is the name of the drug which patient 004-29334 was allergic to since 03/2104? | 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... | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
2179,
9339,
41,
2179,
521,
9824,
381,
6,
1868,
15129,
21545,
23,
26,
381,
6,
1543,
3585,
1499,
6,
9329,
1499,
6,
1543,
4914,
29,
715,
97,
3,
61,
205,
4386,
6048,
332,
17098,
11963,
670,
... | [
3,
23143,
14196,
23886,
5,
26,
13534,
4350,
21680,
23886,
549,
17444,
427,
23886,
5,
10061,
15129,
21545,
23,
26,
3388,
41,
23143,
14196,
1868,
5,
10061,
15129,
21545,
23,
26,
21680,
1868,
549,
17444,
427,
1868,
5,
10061,
15878,
3734,
... |
SELECT district FROM table_1342233_6 WHERE result = "Re-elected" AND candidates = "Clarence F. Lea (D) Unopposed" | what's the district with result being re-elected and candidates being clarence f. lea (d) unopposed | CREATE TABLE table_1342233_6 (district VARCHAR, result VARCHAR, candidates VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
20879,
834,
948,
41,
26,
23,
20066,
584,
4280,
28027,
6,
741,
584,
4280,
28027,
6,
4341,
584,
4280,
28027,
61,
11860,
10,
125,
31,
7,
8,
3939,
28,
741,
271,
3,
60,
... | [
3,
23143,
14196,
3939,
21680,
953,
834,
2368,
4165,
20879,
834,
948,
549,
17444,
427,
741,
3274,
96,
1649,
18,
19971,
121,
3430,
4341,
3274,
96,
254,
40,
291,
1433,
377,
5,
312,
9,
41,
308,
61,
597,
28236,
3843,
121,
1,
0,
0,
0,... |
SELECT country FROM customers WHERE first_name = "Roberto" AND last_name = "Almeida" | What country does Roberto Almeida live? | CREATE TABLE customers (country VARCHAR, first_name VARCHAR, last_name VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
722,
41,
17529,
584,
4280,
28027,
6,
166,
834,
4350,
584,
4280,
28027,
6,
336,
834,
4350,
584,
4280,
28027,
61,
11860,
10,
363,
684,
405,
2715,
32,
901,
526,
23,
26,
9,
619,
58,
11801,
1... | [
3,
23143,
14196,
684,
21680,
722,
549,
17444,
427,
166,
834,
4350,
3274,
96,
24372,
49,
235,
121,
3430,
336,
834,
4350,
3274,
96,
188,
40,
526,
23,
26,
9,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT manner_of_departure FROM table_26914759_3 WHERE team = "Notts County" AND incoming_manager = "Martin Allen" | What was the manner of departure for notts county with an incoming manager of martin allen | CREATE TABLE table_26914759_3 (
manner_of_departure VARCHAR,
team VARCHAR,
incoming_manager VARCHAR
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
357,
3951,
24719,
3390,
834,
519,
41,
3107,
834,
858,
834,
221,
2274,
1462,
584,
4280,
28027,
6,
372,
584,
4280,
28027,
6,
3,
19583,
834,
24185,
584,
4280,
28027,
3,
61,
11860,
1... | [
3,
23143,
14196,
3107,
834,
858,
834,
221,
2274,
1462,
21680,
953,
834,
357,
3951,
24719,
3390,
834,
519,
549,
17444,
427,
372,
3274,
96,
10358,
17,
7,
1334,
121,
3430,
3,
19583,
834,
24185,
3274,
96,
29838,
10618,
121,
1,
0,
0,
0... |
SELECT first_elected FROM table_1342233_6 WHERE incumbent = "Clair Engle" | what's the first elected with incumbent being clair engle | CREATE TABLE table_1342233_6 (first_elected VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
20879,
834,
948,
41,
14672,
834,
19971,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
125,
31,
7,
8,
166,
8160,
28,
28406,
271,
3,
7997,
3,
35,
3537,
... | [
3,
23143,
14196,
166,
834,
19971,
21680,
953,
834,
2368,
4165,
20879,
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,
... |
SELECT T2.title FROM artists AS T1 JOIN albums AS T2 ON T1.id = T2.artist_id WHERE T1.name LIKE '%Led%' | List the name of albums that are released by aritist whose name has 'Led' | CREATE TABLE artists (id VARCHAR, name VARCHAR); CREATE TABLE albums (title VARCHAR, artist_id VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
3153,
41,
23,
26,
584,
4280,
28027,
6,
564,
584,
4280,
28027,
3670,
205,
4386,
6048,
332,
17098,
14234,
41,
21869,
584,
4280,
28027,
6,
2377,
834,
23,
26,
584,
4280,
28027,
61,
11860,
10,
... | [
3,
23143,
14196,
332,
4416,
21869,
21680,
3153,
6157,
332,
536,
3,
15355,
3162,
14234,
6157,
332,
357,
9191,
332,
5411,
23,
26,
3274,
332,
4416,
1408,
343,
834,
23,
26,
549,
17444,
427,
332,
5411,
4350,
8729,
9914,
3,
31,
1454,
2796... |
SELECT player FROM table_29572583_20 WHERE status = "Fourth round lost to Tsvetana Pironkova [32]" | which player had the status to the fourth round lost to tsvetana pironkova [32] Answers: | CREATE TABLE table_29572583_20 (
player VARCHAR,
status VARCHAR
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
3166,
3436,
1828,
4591,
834,
1755,
41,
1959,
584,
4280,
28027,
6,
2637,
584,
4280,
28027,
3,
61,
11860,
10,
84,
1959,
141,
8,
2637,
12,
8,
4509,
1751,
1513,
12,
3,
17,
7,
162,
... | [
3,
23143,
14196,
1959,
21680,
953,
834,
3166,
3436,
1828,
4591,
834,
1755,
549,
17444,
427,
2637,
3274,
96,
371,
1211,
189,
1751,
1513,
12,
332,
7,
162,
17,
152,
9,
23421,
106,
9789,
9,
784,
2668,
908,
121,
1,
0,
0,
0,
0,
0,
0... |
SELECT candidates FROM table_1342233_6 WHERE incumbent = "Alfred J. Elliott" | who is the the candidates with incumbent being alfred j. elliott | CREATE TABLE table_1342233_6 (candidates VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
20879,
834,
948,
41,
1608,
12416,
6203,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
113,
19,
8,
8,
4341,
28,
28406,
271,
491,
89,
1271,
3,
354,
5,
... | [
3,
23143,
14196,
4341,
21680,
953,
834,
2368,
4165,
20879,
834,
948,
549,
17444,
427,
28406,
3274,
96,
188,
40,
89,
1271,
446,
5,
28597,
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(*) FROM employees AS T1 JOIN customers AS T2 ON T2.support_rep_id = T1.id WHERE T1.first_name = "Steve" AND T1.last_name = "Johnson" | How many customers does Steve Johnson support? | CREATE TABLE employees (id VARCHAR, first_name VARCHAR, last_name VARCHAR); CREATE TABLE customers (support_rep_id VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
1652,
41,
23,
26,
584,
4280,
28027,
6,
166,
834,
4350,
584,
4280,
28027,
6,
336,
834,
4350,
584,
4280,
28027,
3670,
205,
4386,
6048,
332,
17098,
722,
41,
20390,
834,
60,
102,
834,
23,
26,
... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
1652,
6157,
332,
536,
3,
15355,
3162,
722,
6157,
332,
357,
9191,
332,
4416,
20390,
834,
60,
102,
834,
23,
26,
3274,
332,
5411,
23,
26,
549,
17444,
427,
332,
5411,
14672,
834,
4350,... |
SELECT home FROM table_name_44 WHERE visitor = "modo hockey" AND date = "thursday, december 11" | What is the Home team of the event on Thursday, December 11 with Visitor Modo Hockey? | CREATE TABLE table_name_44 (
home VARCHAR,
visitor VARCHAR,
date VARCHAR
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
4350,
834,
3628,
41,
234,
584,
4280,
28027,
6,
7019,
584,
4280,
28027,
6,
833,
584,
4280,
28027,
3,
61,
11860,
10,
363,
19,
8,
1210,
372,
13,
8,
605,
30,
2721,
6,
1882,
850,
... | [
3,
23143,
14196,
234,
21680,
953,
834,
4350,
834,
3628,
549,
17444,
427,
7019,
3274,
96,
7360,
32,
16528,
121,
3430,
833,
3274,
96,
189,
3589,
1135,
6,
20,
75,
18247,
850,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT incumbent FROM table_1342233_6 WHERE candidates = "Jack Z. Anderson (R) Unopposed" | who is the the incumbent with candidates being jack z. anderson (r) unopposed | CREATE TABLE table_1342233_6 (incumbent VARCHAR, candidates VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
20879,
834,
948,
41,
77,
75,
5937,
295,
584,
4280,
28027,
6,
4341,
584,
4280,
28027,
61,
11860,
10,
113,
19,
8,
8,
28406,
28,
4341,
271,
3,
9325,
3,
172,
5,
11,
1... | [
3,
23143,
14196,
28406,
21680,
953,
834,
2368,
4165,
20879,
834,
948,
549,
17444,
427,
4341,
3274,
96,
683,
4365,
1027,
5,
11825,
41,
448,
61,
597,
28236,
3843,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT title, phone, hire_date FROM employees WHERE first_name = "Nancy" AND last_name = "Edwards" | What is the title, phone and hire date of Nancy Edwards? | CREATE TABLE employees (title VARCHAR, phone VARCHAR, hire_date VARCHAR, first_name VARCHAR, last_name VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
1652,
41,
21869,
584,
4280,
28027,
6,
951,
584,
4280,
28027,
6,
3804,
834,
5522,
584,
4280,
28027,
6,
166,
834,
4350,
584,
4280,
28027,
6,
336,
834,
4350,
584,
4280,
28027,
61,
11860,
10,
... | [
3,
23143,
14196,
2233,
6,
951,
6,
3804,
834,
5522,
21680,
1652,
549,
17444,
427,
166,
834,
4350,
3274,
96,
567,
6833,
121,
3430,
336,
834,
4350,
3274,
96,
427,
26,
2239,
7,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT MIN("Round") FROM table_76383 WHERE "Overall" = '349' AND "Pick" > '11' | What is the lowest round for an overall pick of 349 with a pick number in the round over 11? | CREATE TABLE table_76383 (
"Round" real,
"Pick" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
3959,
3747,
519,
41,
96,
448,
32,
1106,
121,
490,
6,
96,
345,
3142,
121,
490,
6,
96,
23847,
1748,
121,
490,
6,
96,
23954,
121,
1499,
6,
96,
345,
32,
7,
4749,
121,
1499,
6,
... | [
3,
23143,
14196,
3,
17684,
599,
121,
448,
32,
1106,
8512,
21680,
953,
834,
3959,
3747,
519,
549,
17444,
427,
96,
23847,
1748,
121,
3274,
3,
31,
519,
3647,
31,
3430,
96,
345,
3142,
121,
2490,
3,
31,
2596,
31,
1,
0,
0,
0,
0,
0,
... |
SELECT COUNT(party) FROM table_1342249_11 WHERE incumbent = "Carl Vinson" | How many parties does incumbent carl vinson represent? | CREATE TABLE table_1342249_11 (party VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2884,
3647,
834,
2596,
41,
8071,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
571,
186,
2251,
405,
28406,
443,
40,
4671,
739,
4221,
58,
11801,
10,
1,
0,
0,... | [
3,
23143,
14196,
2847,
17161,
599,
8071,
61,
21680,
953,
834,
23747,
2884,
3647,
834,
2596,
549,
17444,
427,
28406,
3274,
96,
6936,
40,
8653,
739,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT T2.first_name, T2.last_name FROM employees AS T1 JOIN employees AS T2 ON T1.id = T2.reports_to WHERE T1.first_name = "Nancy" AND T1.last_name = "Edwards" | find the full name of employees who report to Nancy Edwards? | CREATE TABLE employees (id VARCHAR, first_name VARCHAR, last_name VARCHAR); CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, reports_to VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
1652,
41,
23,
26,
584,
4280,
28027,
6,
166,
834,
4350,
584,
4280,
28027,
6,
336,
834,
4350,
584,
4280,
28027,
3670,
205,
4386,
6048,
332,
17098,
1652,
41,
14672,
834,
4350,
584,
4280,
28027,... | [
3,
23143,
14196,
332,
4416,
14672,
834,
4350,
6,
332,
4416,
5064,
834,
4350,
21680,
1652,
6157,
332,
536,
3,
15355,
3162,
1652,
6157,
332,
357,
9191,
332,
5411,
23,
26,
3274,
332,
4416,
60,
1493,
7,
834,
235,
549,
17444,
427,
332,
... |
SELECT "Team" FROM table_38485 WHERE "Qual 2" < '59.612' AND "Best" = '59.14' | Which team has a qualifying 2 time under 59.612 and a best of 59.14? | CREATE TABLE table_38485 (
"Name" text,
"Team" text,
"Qual 1" text,
"Qual 2" real,
"Best" real
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
3747,
591,
4433,
41,
96,
23954,
121,
1499,
6,
96,
18699,
121,
1499,
6,
96,
5991,
138,
209,
121,
1499,
6,
96,
5991,
138,
204,
121,
490,
6,
96,
17278,
121,
490,
3,
61,
11860,
1... | [
3,
23143,
14196,
96,
18699,
121,
21680,
953,
834,
3747,
591,
4433,
549,
17444,
427,
96,
5991,
138,
204,
121,
3,
2,
3,
31,
3390,
5,
4241,
357,
31,
3430,
96,
17278,
121,
3274,
3,
31,
3390,
5,
2534,
31,
1,
0,
0,
0,
0,
0,
0,
0... |
SELECT COUNT(party) FROM table_1342249_11 WHERE incumbent = "Stephen Pace" | How many parties does incumbent stephen pace represent? | CREATE TABLE table_1342249_11 (party VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2884,
3647,
834,
2596,
41,
8071,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
571,
186,
2251,
405,
28406,
1147,
3225,
4974,
4221,
58,
11801,
10,
1,
0,
0,
0... | [
3,
23143,
14196,
2847,
17161,
599,
8071,
61,
21680,
953,
834,
23747,
2884,
3647,
834,
2596,
549,
17444,
427,
28406,
3274,
96,
14337,
19017,
11790,
15,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
SELECT address FROM employees WHERE first_name = "Nancy" AND last_name = "Edwards" | What is the address of employee Nancy Edwards? | CREATE TABLE employees (address VARCHAR, first_name VARCHAR, last_name VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
1652,
41,
9,
26,
12039,
584,
4280,
28027,
6,
166,
834,
4350,
584,
4280,
28027,
6,
336,
834,
4350,
584,
4280,
28027,
61,
11860,
10,
363,
19,
8,
1115,
13,
3490,
17117,
8200,
7,
58,
11801,
... | [
3,
23143,
14196,
1115,
21680,
1652,
549,
17444,
427,
166,
834,
4350,
3274,
96,
567,
6833,
121,
3430,
336,
834,
4350,
3274,
96,
427,
26,
2239,
7,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT title FROM table_18734298_1 WHERE production_code = "1ACX09" | What is the title of the production code 1acx09? | CREATE TABLE table_18734298_1 (
title VARCHAR,
production_code VARCHAR
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2606,
4552,
4165,
3916,
834,
536,
41,
2233,
584,
4280,
28027,
6,
999,
834,
4978,
584,
4280,
28027,
3,
61,
11860,
10,
363,
19,
8,
2233,
13,
8,
999,
1081,
209,
9,
75,
226,
4198,
... | [
3,
23143,
14196,
2233,
21680,
953,
834,
2606,
4552,
4165,
3916,
834,
536,
549,
17444,
427,
999,
834,
4978,
3274,
96,
536,
5173,
4,
4198,
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 candidates FROM table_1342249_13 WHERE incumbent = "Noah M. Mason" | Who were the candidates when Noah M. Mason was incumbent? | CREATE TABLE table_1342249_13 (candidates VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2884,
3647,
834,
2368,
41,
1608,
12416,
6203,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
2645,
130,
8,
4341,
116,
24384,
283,
5,
15924,
47,
28406,
58,
1180... | [
3,
23143,
14196,
4341,
21680,
953,
834,
23747,
2884,
3647,
834,
2368,
549,
17444,
427,
28406,
3274,
96,
4168,
9,
107,
283,
5,
15924,
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 T1.first_name, T1.last_name FROM employees AS T1 JOIN customers AS T2 ON T1.id = T2.support_rep_id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1 | Find the full name of employee who supported the most number of customers. | CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, id VARCHAR); CREATE TABLE customers (support_rep_id VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
1652,
41,
14672,
834,
4350,
584,
4280,
28027,
6,
336,
834,
4350,
584,
4280,
28027,
6,
3,
23,
26,
584,
4280,
28027,
3670,
205,
4386,
6048,
332,
17098,
722,
41,
20390,
834,
60,
102,
834,
23,... | [
3,
23143,
14196,
332,
5411,
14672,
834,
4350,
6,
332,
5411,
5064,
834,
4350,
21680,
1652,
6157,
332,
536,
3,
15355,
3162,
722,
6157,
332,
357,
9191,
332,
5411,
23,
26,
3274,
332,
4416,
20390,
834,
60,
102,
834,
23,
26,
350,
4630,
... |
SELECT DISTINCT aircraft_code FROM aircraft WHERE aircraft_code = 'M80' | what type of airplane is an M80 | CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
arrival_time int,
arrival_airline text,
arrival_flight_number int,
departure_time int,
departure_airline text,
departure_flight_number int,
stop_time int
)
CREATE TABLE month (
... | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
3777,
834,
7618,
41,
3777,
834,
23,
26,
16,
17,
6,
1190,
834,
5525,
1152,
16,
17,
6,
1190,
834,
1135,
7,
1499,
6,
1190,
834,
2256,
1493,
1499,
6,
6870,
834,
715,
16,
17,
6,
6870,
834,
... | [
3,
23143,
14196,
3,
15438,
25424,
6227,
6442,
834,
4978,
21680,
6442,
549,
17444,
427,
6442,
834,
4978,
3274,
3,
31,
329,
2079,
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... |
SELECT first_elected FROM table_1342249_13 WHERE incumbent = "Leo E. Allen" | In what year was Leo E. Allen first elected? | CREATE TABLE table_1342249_13 (first_elected VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2884,
3647,
834,
2368,
41,
14672,
834,
19971,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
86,
125,
215,
47,
312,
32,
262,
5,
10618,
166,
8160,
58,
11801,
... | [
3,
23143,
14196,
166,
834,
19971,
21680,
953,
834,
23747,
2884,
3647,
834,
2368,
549,
17444,
427,
28406,
3274,
96,
2796,
32,
262,
5,
10618,
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,
... |
SELECT COUNT(*) FROM employees WHERE country = "Canada" | How many employees are living in Canada? | CREATE TABLE employees (country VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
1652,
41,
17529,
584,
4280,
28027,
61,
11860,
10,
571,
186,
1652,
33,
840,
16,
1894,
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,
... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
61,
21680,
1652,
549,
17444,
427,
684,
3274,
96,
28811,
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 HIRE_DATE, SALARY FROM employees WHERE NOT FIRST_NAME LIKE '%M%' | Show me a line chart to show the change of salary for those employees whose first name does not containing the letter M over the corresponding hire date. | CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE departments (
DEPARTME... | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
6266,
41,
4083,
517,
9215,
834,
4309,
7908,
1982,
599,
11116,
632,
201,
4083,
517,
9215,
834,
567,
17683,
3,
4331,
4059,
599,
1828,
61,
3,
61,
205,
4386,
6048,
332,
17098,
3248,
41,
301,
5... | [
3,
23143,
14196,
454,
14132,
834,
308,
6048,
6,
180,
4090,
24721,
21680,
1652,
549,
17444,
427,
4486,
30085,
834,
567,
17683,
8729,
9914,
3,
31,
1454,
329,
1454,
31,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT candidates FROM table_1342249_13 WHERE incumbent = "Sid Simpson" | Who were the candidates when Sid Simpson was the incumbent? | CREATE TABLE table_1342249_13 (candidates VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
23747,
2884,
3647,
834,
2368,
41,
1608,
12416,
6203,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
2645,
130,
8,
4341,
116,
925,
26,
21965,
47,
8,
28406,
58,
11801,
... | [
3,
23143,
14196,
4341,
21680,
953,
834,
23747,
2884,
3647,
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 phone FROM employees WHERE first_name = "Nancy" AND last_name = "Edwards" | What is employee Nancy Edwards's phone number? | CREATE TABLE employees (phone VARCHAR, first_name VARCHAR, last_name VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
1652,
41,
6399,
584,
4280,
28027,
6,
166,
834,
4350,
584,
4280,
28027,
6,
336,
834,
4350,
584,
4280,
28027,
61,
11860,
10,
363,
19,
3490,
17117,
8200,
7,
31,
7,
951,
381,
58,
11801,
10,
... | [
3,
23143,
14196,
951,
21680,
1652,
549,
17444,
427,
166,
834,
4350,
3274,
96,
567,
6833,
121,
3430,
336,
834,
4350,
3274,
96,
427,
26,
2239,
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... |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND procedures.long_title = "Colostomy, not otherwise specified" | calculate the number of patients admitted to emergency who had colostomy, not otherwise specified. | 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 (
... | [
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,
4293,
9191,
14798,
5,
8399,
51,
834,
23,
26,
3274,
4293,
5,
8399,
51,
834,
23,
26,
549,
17444,... |
SELECT result FROM table_1342256_10 WHERE incumbent = "Robert L. F. Sikes" | What was the result of Robert L. F. Sikes' election bid? | CREATE TABLE table_1342256_10 (result VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
19337,
834,
1714,
41,
60,
7,
83,
17,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
363,
47,
8,
741,
13,
2715,
301,
5,
377,
5,
925,
7735,
31,
4356,
... | [
3,
23143,
14196,
741,
21680,
953,
834,
2368,
4165,
19337,
834,
1714,
549,
17444,
427,
28406,
3274,
96,
24372,
49,
17,
301,
5,
377,
5,
925,
7735,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT first_name, last_name FROM employees ORDER BY birth_date DESC LIMIT 1 | Who is the youngest employee in the company? List employee's first and last name. | CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, birth_date VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
1652,
41,
14672,
834,
4350,
584,
4280,
28027,
6,
336,
834,
4350,
584,
4280,
28027,
6,
3879,
834,
5522,
584,
4280,
28027,
61,
11860,
10,
2645,
19,
8,
19147,
3490,
16,
8,
349,
58,
6792,
3490... | [
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,
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 "Away team score" FROM table_56896 WHERE "Home team score" = '12.9 (81)' | The home team has a score of 12.9 (81) what is the score of the away team? | CREATE TABLE table_56896 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
755,
3651,
4314,
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,
... | [
3,
23143,
14196,
96,
188,
1343,
372,
2604,
121,
21680,
953,
834,
755,
3651,
4314,
549,
17444,
427,
96,
19040,
372,
2604,
121,
3274,
3,
31,
9368,
1298,
13642,
6982,
31,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... |
SELECT COUNT(district) FROM table_1342256_10 WHERE first_elected = 1940 | How many districts have an incumbent first elected in 1940? | CREATE TABLE table_1342256_10 (district VARCHAR, first_elected VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
19337,
834,
1714,
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,
15830,
58,
... | [
3,
23143,
14196,
2847,
17161,
599,
26,
23,
20066,
61,
21680,
953,
834,
2368,
4165,
19337,
834,
1714,
549,
17444,
427,
166,
834,
19971,
3274,
15830,
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 first_name, last_name FROM employees ORDER BY hire_date LIMIT 10 | List top 10 employee work longest in the company. List employee's first and last name. | CREATE TABLE employees (first_name VARCHAR, last_name VARCHAR, hire_date VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
1652,
41,
14672,
834,
4350,
584,
4280,
28027,
6,
336,
834,
4350,
584,
4280,
28027,
6,
3804,
834,
5522,
584,
4280,
28027,
61,
11860,
10,
6792,
420,
335,
3490,
161,
14783,
16,
8,
349,
5,
679... | [
3,
23143,
14196,
166,
834,
4350,
6,
336,
834,
4350,
21680,
1652,
4674,
11300,
272,
476,
3804,
834,
5522,
8729,
12604,
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,
... |
SELECT AVG("Goals Conceded (GC)") FROM table_53653 WHERE "Goals Scored (GF)" > '19' AND "Points (Pts.)" = '31' AND "Draw (PE)" > '7' | What is the average number of goals conceded where more than 19 goals were scored, the team had 31 points, and more than 7 draws? | CREATE TABLE table_53653 (
"Place (Posici\u00f3n)" real,
"Team (Equipo)" text,
"Played (PJ)" real,
"Won (PG)" real,
"Draw (PE)" real,
"Lost (PP)" real,
"Goals Scored (GF)" real,
"Goals Conceded (GC)" real,
"+/- (Dif.)" real,
"Points (Pts.)" real
) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
755,
10402,
519,
41,
96,
345,
11706,
41,
345,
32,
7,
1294,
2,
76,
1206,
89,
519,
29,
61,
121,
490,
6,
96,
18699,
41,
427,
23067,
32,
61,
121,
1499,
6,
96,
15800,
15,
26,
41... | [
3,
23143,
14196,
71,
17217,
599,
121,
6221,
5405,
1193,
565,
221,
26,
41,
11055,
61,
8512,
21680,
953,
834,
755,
10402,
519,
549,
17444,
427,
96,
6221,
5405,
17763,
26,
41,
15643,
61,
121,
2490,
3,
31,
2294,
31,
3430,
96,
22512,
7... |
SELECT COUNT(result) FROM table_1342256_10 WHERE incumbent = "Pat Cannon" | How many races involve incumbent Pat Cannon? | CREATE TABLE table_1342256_10 (result VARCHAR, incumbent VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
953,
834,
2368,
4165,
19337,
834,
1714,
41,
60,
7,
83,
17,
584,
4280,
28027,
6,
28406,
584,
4280,
28027,
61,
11860,
10,
571,
186,
10879,
7789,
28406,
5192,
205,
17805,
58,
11801,
10,
1,
0,... | [
3,
23143,
14196,
2847,
17161,
599,
60,
7,
83,
17,
61,
21680,
953,
834,
2368,
4165,
19337,
834,
1714,
549,
17444,
427,
28406,
3274,
96,
345,
144,
205,
17805,
121,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... |
SELECT COUNT(*), city FROM employees WHERE title = 'IT Staff' GROUP BY city | Find the number of employees whose title is IT Staff from each city? | CREATE TABLE employees (city VARCHAR, title VARCHAR) | [
4398,
7,
10,
205,
4386,
6048,
332,
17098,
1652,
41,
6726,
584,
4280,
28027,
6,
2233,
584,
4280,
28027,
61,
11860,
10,
2588,
8,
381,
13,
1652,
3,
2544,
2233,
19,
2344,
10071,
45,
284,
690,
58,
11801,
10,
1,
0,
0,
0,
0,
0,
0,
... | [
3,
23143,
14196,
2847,
17161,
599,
1935,
201,
690,
21680,
1652,
549,
17444,
427,
2233,
3274,
3,
31,
3177,
10071,
31,
350,
4630,
6880,
272,
476,
690,
1,
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.