answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
input_ids
listlengths
512
512
labels
listlengths
512
512
SELECT party FROM table_1341884_20 WHERE incumbent = "Hale Boggs"
What party did Hale Boggs belong to?
CREATE TABLE table_1341884_20 (party VARCHAR, incumbent VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2606, 4608, 834, 1755, 41, 8071, 584, 4280, 28027, 6, 28406, 584, 4280, 28027, 61, 11860, 10, 363, 1088, 410, 5648, 15, 24586, 122, 7, 13000, 12, 58, 11801, 10, 1, 0, 0, ...
[ 3, 23143, 14196, 1088, 21680, 953, 834, 23747, 2606, 4608, 834, 1755, 549, 17444, 427, 28406, 3274, 96, 566, 9, 109, 24586, 122, 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, ...
SELECT T1.name, T1.email FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f1 GROUP BY T2.f1 HAVING COUNT(*) > 1
Find the name and email for the users who have more than one follower.
CREATE TABLE follows (f1 VARCHAR); CREATE TABLE user_profiles (name VARCHAR, email VARCHAR, uid VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 6963, 41, 89, 536, 584, 4280, 28027, 3670, 205, 4386, 6048, 332, 17098, 1139, 834, 18816, 7, 41, 4350, 584, 4280, 28027, 6, 791, 584, 4280, 28027, 6, 3, 76, 23, 26, 584, 4280, 28027, 61, ...
[ 3, 23143, 14196, 332, 5411, 4350, 6, 332, 5411, 15, 1963, 21680, 1139, 834, 18816, 7, 6157, 332, 536, 3, 15355, 3162, 6963, 6157, 332, 357, 9191, 332, 5411, 76, 23, 26, 3274, 332, 4416, 89, 536, 350, 4630, 6880, 272, 476, 332, 441...
SELECT "Song" FROM table_64035 WHERE "Place" > '4'
What song placed higher than#4?
CREATE TABLE table_64035 ( "Draw" real, "Artist" text, "Song" text, "Percentage" text, "Place" real )
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23714, 2469, 41, 96, 308, 10936, 121, 490, 6, 96, 7754, 343, 121, 1499, 6, 96, 134, 2444, 121, 1499, 6, 96, 12988, 3728, 545, 121, 1499, 6, 96, 345, 11706, 121, 490, 3, 61, 1...
[ 3, 23143, 14196, 96, 134, 2444, 121, 21680, 953, 834, 23714, 2469, 549, 17444, 427, 96, 345, 11706, 121, 2490, 3, 31, 591, 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...
SELECT party FROM table_1341884_45 WHERE district = "Texas 12"
what is the political affiliation of the texas 12 district
CREATE TABLE table_1341884_45 (party VARCHAR, district VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2606, 4608, 834, 2128, 41, 8071, 584, 4280, 28027, 6, 3939, 584, 4280, 28027, 61, 11860, 10, 125, 19, 8, 1827, 24405, 13, 8, 3, 10354, 9, 7, 586, 3939, 11801, 10, 1, 0, ...
[ 3, 23143, 14196, 1088, 21680, 953, 834, 23747, 2606, 4608, 834, 2128, 549, 17444, 427, 3939, 3274, 96, 13598, 9, 7, 586, 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.name FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid HAVING COUNT(*) > 1
Find the names of users who have more than one tweet.
CREATE TABLE tweets (uid VARCHAR); CREATE TABLE user_profiles (name VARCHAR, uid VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 10657, 7, 41, 76, 23, 26, 584, 4280, 28027, 3670, 205, 4386, 6048, 332, 17098, 1139, 834, 18816, 7, 41, 4350, 584, 4280, 28027, 6, 3, 76, 23, 26, 584, 4280, 28027, 61, 11860, 10, 2588, 8...
[ 3, 23143, 14196, 332, 5411, 4350, 21680, 1139, 834, 18816, 7, 6157, 332, 536, 3, 15355, 3162, 10657, 7, 6157, 332, 357, 9191, 332, 5411, 76, 23, 26, 3274, 332, 4416, 76, 23, 26, 350, 4630, 6880, 272, 476, 332, 4416, 76, 23, 26, ...
SELECT founded FROM table_name_95 WHERE suburb = "beaudesert"
What year was the Beaudesert suburb club founded
CREATE TABLE table_name_95 ( founded VARCHAR, suburb VARCHAR )
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 4350, 834, 3301, 41, 5710, 584, 4280, 28027, 6, 16432, 584, 4280, 28027, 3, 61, 11860, 10, 363, 215, 47, 8, 12433, 1395, 49, 17, 16432, 1886, 5710, 11801, 10, 1, 0, 0, 0, 0, ...
[ 3, 23143, 14196, 5710, 21680, 953, 834, 4350, 834, 3301, 549, 17444, 427, 16432, 3274, 96, 346, 402, 1395, 49, 17, 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,...
SELECT first_elected FROM table_1341884_45 WHERE district = "Texas 6"
how many voted in the texas 6 section
CREATE TABLE table_1341884_45 (first_elected VARCHAR, district VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2606, 4608, 834, 2128, 41, 14672, 834, 19971, 584, 4280, 28027, 6, 3939, 584, 4280, 28027, 61, 11860, 10, 149, 186, 3, 11060, 16, 8, 3, 10354, 9, 7, 431, 1375, 11801, 10, ...
[ 3, 23143, 14196, 166, 834, 19971, 21680, 953, 834, 23747, 2606, 4608, 834, 2128, 549, 17444, 427, 3939, 3274, 96, 13598, 9, 7, 431, 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 T2.f1 FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f2 WHERE T1.name = "Mary" INTERSECT SELECT T2.f1 FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f2 WHERE T1.name = "Susan"
Find the id of users who are followed by Mary and Susan.
CREATE TABLE follows (f1 VARCHAR, f2 VARCHAR); CREATE TABLE user_profiles (uid VARCHAR, name VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 6963, 41, 89, 536, 584, 4280, 28027, 6, 3, 89, 357, 584, 4280, 28027, 3670, 205, 4386, 6048, 332, 17098, 1139, 834, 18816, 7, 41, 76, 23, 26, 584, 4280, 28027, 6, 564, 584, 4280, 28027, ...
[ 3, 23143, 14196, 332, 4416, 89, 536, 21680, 1139, 834, 18816, 7, 6157, 332, 536, 3, 15355, 3162, 6963, 6157, 332, 357, 9191, 332, 5411, 76, 23, 26, 3274, 332, 4416, 89, 357, 549, 17444, 427, 332, 5411, 4350, 3274, 96, 7286, 63, 12...
SELECT date_address_to, COUNT(date_address_to) FROM Student_Addresses GROUP BY other_details ORDER BY monthly_rental DESC
Visualize a bar chart about the distribution of date_address_to and the amount of date_address_to , and group by attribute other_details and bin date_address_to by weekday.
CREATE TABLE Ref_Detention_Type ( detention_type_code VARCHAR(10), detention_type_description VARCHAR(80) ) CREATE TABLE Detention ( detention_id INTEGER, detention_type_code VARCHAR(10), teacher_id INTEGER, datetime_detention_start DATETIME, datetime_detention_end DATETIME, detention_s...
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 419, 89, 834, 2962, 9174, 834, 25160, 41, 20, 9174, 834, 6137, 834, 4978, 584, 4280, 28027, 599, 16968, 6, 20, 9174, 834, 6137, 834, 221, 11830, 584, 4280, 28027, 599, 2079, 61, 3, 61, 205...
[ 3, 23143, 14196, 833, 834, 9, 26, 12039, 834, 235, 6, 2847, 17161, 599, 5522, 834, 9, 26, 12039, 834, 235, 61, 21680, 6341, 834, 20773, 9377, 15, 7, 350, 4630, 6880, 272, 476, 119, 834, 221, 5756, 7, 4674, 11300, 272, 476, 3718, ...
SELECT party FROM table_1341884_45 WHERE incumbent = "Ray Roberts"
what is the political affiliation of ray roberts
CREATE TABLE table_1341884_45 (party VARCHAR, incumbent VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2606, 4608, 834, 2128, 41, 8071, 584, 4280, 28027, 6, 28406, 584, 4280, 28027, 61, 11860, 10, 125, 19, 8, 1827, 24405, 13, 3, 2866, 3, 5840, 49, 17, 7, 11801, 10, 1, 0, ...
[ 3, 23143, 14196, 1088, 21680, 953, 834, 23747, 2606, 4608, 834, 2128, 549, 17444, 427, 28406, 3274, 96, 25619, 2715, 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, 0, 0, 0,...
SELECT T2.f1 FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f2 WHERE T1.name = "Mary" OR T1.name = "Susan"
Find the id of users who are followed by Mary or Susan.
CREATE TABLE follows (f1 VARCHAR, f2 VARCHAR); CREATE TABLE user_profiles (uid VARCHAR, name VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 6963, 41, 89, 536, 584, 4280, 28027, 6, 3, 89, 357, 584, 4280, 28027, 3670, 205, 4386, 6048, 332, 17098, 1139, 834, 18816, 7, 41, 76, 23, 26, 584, 4280, 28027, 6, 564, 584, 4280, 28027, ...
[ 3, 23143, 14196, 332, 4416, 89, 536, 21680, 1139, 834, 18816, 7, 6157, 332, 536, 3, 15355, 3162, 6963, 6157, 332, 357, 9191, 332, 5411, 76, 23, 26, 3274, 332, 4416, 89, 357, 549, 17444, 427, 332, 5411, 4350, 3274, 96, 7286, 63, 12...
SELECT "Acquisition via" FROM table_41725 WHERE "Position" = 'center'
How was the player in the position of Center acquired?
CREATE TABLE table_41725 ( "Name" text, "Position" text, "Number" real, "School/Club Team" text, "Season" text, "Acquisition via" text )
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 591, 2517, 1828, 41, 96, 23954, 121, 1499, 6, 96, 345, 32, 7, 4749, 121, 1499, 6, 96, 567, 5937, 49, 121, 490, 6, 96, 29364, 87, 254, 11158, 2271, 121, 1499, 6, 96, 134, 15, ...
[ 3, 23143, 14196, 96, 188, 75, 1169, 7, 4749, 1009, 121, 21680, 953, 834, 591, 2517, 1828, 549, 17444, 427, 96, 345, 32, 7, 4749, 121, 3274, 3, 31, 13866, 31, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
SELECT district FROM table_1341884_40 WHERE candidates = "James A. Byrne (D) 59.3% Joseph R. Burns (R) 40.7%"
What district featured an election between james a. byrne (d) 59.3% joseph r. burns (r) 40.7%?
CREATE TABLE table_1341884_40 (district VARCHAR, candidates VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2606, 4608, 834, 2445, 41, 26, 23, 20066, 584, 4280, 28027, 6, 4341, 584, 4280, 28027, 61, 11860, 10, 363, 3939, 4510, 46, 4356, 344, 7620, 15, 7, 3, 9, 5, 57, 52, 29, ...
[ 3, 23143, 14196, 3939, 21680, 953, 834, 23747, 2606, 4608, 834, 2445, 549, 17444, 427, 4341, 3274, 96, 683, 9, 2687, 71, 5, 938, 52, 29, 15, 41, 308, 61, 3, 3390, 5, 5170, 6187, 391, 5, 10846, 7, 41, 448, 61, 1283, 5, 6170, 12...
SELECT name FROM user_profiles ORDER BY followers DESC LIMIT 1
Find the name of the user who has the largest number of followers.
CREATE TABLE user_profiles (name VARCHAR, followers VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 1139, 834, 18816, 7, 41, 4350, 584, 4280, 28027, 6, 10076, 584, 4280, 28027, 61, 11860, 10, 2588, 8, 564, 13, 8, 1139, 113, 65, 8, 2015, 381, 13, 10076, 5, 11801, 10, 1, 0, 0, 0, 0, ...
[ 3, 23143, 14196, 564, 21680, 1139, 834, 18816, 7, 4674, 11300, 272, 476, 10076, 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, 0, 0, 0, 0, 0, 0, 0, ...
SELECT "Date" FROM table_39879 WHERE "Catalog" = 'nebdj068'
Catalog Nebdj068 was released when?
CREATE TABLE table_39879 ( "Region" text, "Date" text, "Label" text, "Format" text, "Catalog" text )
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 519, 3916, 4440, 41, 96, 17748, 23, 106, 121, 1499, 6, 96, 308, 342, 121, 1499, 6, 96, 434, 10333, 121, 1499, 6, 96, 3809, 3357, 121, 1499, 6, 96, 18610, 9, 2152, 121, 1499, ...
[ 3, 23143, 14196, 96, 308, 342, 121, 21680, 953, 834, 519, 3916, 4440, 549, 17444, 427, 96, 18610, 9, 2152, 121, 3274, 3, 31, 29, 15, 115, 26, 354, 632, 3651, 31, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
SELECT candidates FROM table_1341897_23 WHERE district = "Massachusetts 6"
Name the candidates for massachusetts 6
CREATE TABLE table_1341897_23 (candidates VARCHAR, district VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2606, 4327, 834, 2773, 41, 1608, 12416, 6203, 584, 4280, 28027, 6, 3939, 584, 4280, 28027, 61, 11860, 10, 5570, 8, 4341, 21, 3294, 1836, 1074, 17, 17, 7, 431, 11801, 10, 1...
[ 3, 23143, 14196, 4341, 21680, 953, 834, 23747, 2606, 4327, 834, 2773, 549, 17444, 427, 3939, 3274, 96, 27189, 1836, 1074, 17, 17, 7, 431, 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 name, email FROM user_profiles ORDER BY followers LIMIT 1
Find the name and email of the user followed by the least number of people.
CREATE TABLE user_profiles (name VARCHAR, email VARCHAR, followers VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 1139, 834, 18816, 7, 41, 4350, 584, 4280, 28027, 6, 791, 584, 4280, 28027, 6, 10076, 584, 4280, 28027, 61, 11860, 10, 2588, 8, 564, 11, 791, 13, 8, 1139, 2348, 57, 8, 709, 381, 13, 151, ...
[ 3, 23143, 14196, 564, 6, 791, 21680, 1139, 834, 18816, 7, 4674, 11300, 272, 476, 10076, 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, 0, 0, 0, 0, 0, 0, 0, 0,...
SELECT job, AVG(age) FROM Person GROUP BY job ORDER BY job
What is average age for different job title Visualize by bar chart, I want to rank by the bars from low to high.
CREATE TABLE Person ( name varchar(20), age INTEGER, city TEXT, gender TEXT, job TEXT ) CREATE TABLE PersonFriend ( name varchar(20), friend varchar(20), year INTEGER )
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 5780, 41, 564, 3, 4331, 4059, 599, 1755, 201, 1246, 3, 21342, 17966, 6, 690, 3, 3463, 4, 382, 6, 7285, 3, 3463, 4, 382, 6, 613, 3, 3463, 4, 382, 3, 61, 205, 4386, 6048, 332, 17098, 5...
[ 3, 23143, 14196, 613, 6, 71, 17217, 599, 545, 61, 21680, 5780, 350, 4630, 6880, 272, 476, 613, 4674, 11300, 272, 476, 613, 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 result FROM table_1341897_23 WHERE district = "Massachusetts 3"
Name the result for massachusetts 3
CREATE TABLE table_1341897_23 (result VARCHAR, district VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2606, 4327, 834, 2773, 41, 60, 7, 83, 17, 584, 4280, 28027, 6, 3939, 584, 4280, 28027, 61, 11860, 10, 5570, 8, 741, 21, 3294, 1836, 1074, 17, 17, 7, 220, 11801, 10, 1, ...
[ 3, 23143, 14196, 741, 21680, 953, 834, 23747, 2606, 4327, 834, 2773, 549, 17444, 427, 3939, 3274, 96, 27189, 1836, 1074, 17, 17, 7, 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,...
SELECT name, followers FROM user_profiles ORDER BY followers DESC
List the name and number of followers for each user, and sort the results by the number of followers in descending order.
CREATE TABLE user_profiles (name VARCHAR, followers VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 1139, 834, 18816, 7, 41, 4350, 584, 4280, 28027, 6, 10076, 584, 4280, 28027, 61, 11860, 10, 6792, 8, 564, 11, 381, 13, 10076, 21, 284, 1139, 6, 11, 1843, 8, 772, 57, 8, 381, 13, 10076, ...
[ 3, 23143, 14196, 564, 6, 10076, 21680, 1139, 834, 18816, 7, 4674, 11300, 272, 476, 10076, 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, 0, 0, 0, 0, 0, 0, 0, ...
SELECT "To par" FROM table_40653 WHERE "Margin of victory" = '1 stroke'
What was the To par score for the tournament with a margin of victory of 1 stroke?
CREATE TABLE table_40653 ( "Date" text, "Tournament" text, "Winning score" text, "To par" text, "Margin of victory" text, "Runner(s)-up" text )
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 2445, 4122, 519, 41, 96, 308, 342, 121, 1499, 6, 96, 382, 1211, 20205, 17, 121, 1499, 6, 96, 518, 10503, 2604, 121, 1499, 6, 96, 3696, 260, 121, 1499, 6, 96, 7286, 122, 77, 1...
[ 3, 23143, 14196, 96, 3696, 260, 121, 21680, 953, 834, 2445, 4122, 519, 549, 17444, 427, 96, 7286, 122, 77, 13, 6224, 121, 3274, 3, 31, 536, 9529, 31, 1, 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_1341897_23 WHERE first_elected = 1942
Name the candidate first elected in 1942
CREATE TABLE table_1341897_23 (candidates VARCHAR, first_elected VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2606, 4327, 834, 2773, 41, 1608, 12416, 6203, 584, 4280, 28027, 6, 166, 834, 19971, 584, 4280, 28027, 61, 11860, 10, 5570, 8, 4775, 166, 8160, 16, 24466, 11801, 10, 1, 0, ...
[ 3, 23143, 14196, 4341, 21680, 953, 834, 23747, 2606, 4327, 834, 2773, 549, 17444, 427, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
SELECT name FROM user_profiles ORDER BY followers DESC LIMIT 5
List the names of 5 users followed by the largest number of other users.
CREATE TABLE user_profiles (name VARCHAR, followers VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 1139, 834, 18816, 7, 41, 4350, 584, 4280, 28027, 6, 10076, 584, 4280, 28027, 61, 11860, 10, 6792, 8, 3056, 13, 305, 1105, 2348, 57, 8, 2015, 381, 13, 119, 1105, 5, 11801, 10, 1, 0, 0, ...
[ 3, 23143, 14196, 564, 21680, 1139, 834, 18816, 7, 4674, 11300, 272, 476, 10076, 309, 25067, 8729, 12604, 305, 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 "Cup FinalDate" FROM table_56418 WHERE "WinningTeam" = 'brisbane lions (1)'
On what date did the Brisbane Lions (1) win?
CREATE TABLE table_56418 ( "Season" text, "Cup FinalDate" text, "WinningTeam" text, "Score" text, "LosingTeam" text, "Cup Final Attendance" text )
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 4834, 591, 2606, 41, 96, 134, 15, 9, 739, 121, 1499, 6, 96, 254, 413, 6514, 308, 342, 121, 1499, 6, 96, 518, 10503, 18699, 121, 1499, 6, 96, 134, 9022, 121, 1499, 6, 96, 434,...
[ 3, 23143, 14196, 96, 254, 413, 6514, 308, 342, 121, 21680, 953, 834, 4834, 591, 2606, 549, 17444, 427, 96, 518, 10503, 18699, 121, 3274, 3, 31, 2160, 7, 3478, 15, 3, 7325, 7, 5637, 31, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
SELECT party FROM table_1341897_23 WHERE district = "Massachusetts 3"
Name the party for massachusetts 3
CREATE TABLE table_1341897_23 (party VARCHAR, district VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2606, 4327, 834, 2773, 41, 8071, 584, 4280, 28027, 6, 3939, 584, 4280, 28027, 61, 11860, 10, 5570, 8, 1088, 21, 3294, 1836, 1074, 17, 17, 7, 220, 11801, 10, 1, 0, 0, 0, ...
[ 3, 23143, 14196, 1088, 21680, 953, 834, 23747, 2606, 4327, 834, 2773, 549, 17444, 427, 3939, 3274, 96, 27189, 1836, 1074, 17, 17, 7, 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...
SELECT text FROM tweets ORDER BY createdate
List the text of all tweets in the order of date.
CREATE TABLE tweets (text VARCHAR, createdate VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 10657, 7, 41, 6327, 584, 4280, 28027, 6, 990, 342, 584, 4280, 28027, 61, 11860, 10, 6792, 8, 1499, 13, 66, 10657, 7, 16, 8, 455, 13, 833, 5, 11801, 10, 1, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 3, 23143, 14196, 1499, 21680, 10657, 7, 4674, 11300, 272, 476, 990, 342, 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,...
SELECT "Winning span" FROM table_23078 WHERE "Name" = 'Bernard Gallacher'
What is the winning span for the name of bernard gallacher?
CREATE TABLE table_23078 ( "Rank" text, "Name" text, "Lifespan" text, "Country" text, "Wins" real, "Majors" real, "Winning span" text, "Span (years)" real )
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 13427, 3940, 41, 96, 22557, 121, 1499, 6, 96, 23954, 121, 1499, 6, 96, 16427, 7, 2837, 121, 1499, 6, 96, 10628, 651, 121, 1499, 6, 96, 18455, 7, 121, 490, 6, 96, 329, 9, 1277...
[ 3, 23143, 14196, 96, 518, 10503, 8438, 121, 21680, 953, 834, 13427, 3940, 549, 17444, 427, 96, 23954, 121, 3274, 3, 31, 279, 49, 29, 986, 10987, 9, 1703, 31, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
SELECT district FROM table_1341897_3 WHERE incumbent = "Albert Rains"
What district is incumbent albert rains from?
CREATE TABLE table_1341897_3 (district VARCHAR, incumbent VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2606, 4327, 834, 519, 41, 26, 23, 20066, 584, 4280, 28027, 6, 28406, 584, 4280, 28027, 61, 11860, 10, 363, 3939, 19, 28406, 491, 7041, 3412, 7, 45, 58, 11801, 10, 1, 0, ...
[ 3, 23143, 14196, 3939, 21680, 953, 834, 23747, 2606, 4327, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
SELECT T1.name, COUNT(*) FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid
Find the name of each user and number of tweets tweeted by each of them.
CREATE TABLE tweets (uid VARCHAR); CREATE TABLE user_profiles (name VARCHAR, uid VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 10657, 7, 41, 76, 23, 26, 584, 4280, 28027, 3670, 205, 4386, 6048, 332, 17098, 1139, 834, 18816, 7, 41, 4350, 584, 4280, 28027, 6, 3, 76, 23, 26, 584, 4280, 28027, 61, 11860, 10, 2588, 8...
[ 3, 23143, 14196, 332, 5411, 4350, 6, 2847, 17161, 599, 1935, 61, 21680, 1139, 834, 18816, 7, 6157, 332, 536, 3, 15355, 3162, 10657, 7, 6157, 332, 357, 9191, 332, 5411, 76, 23, 26, 3274, 332, 4416, 76, 23, 26, 350, 4630, 6880, 272,...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/AFRICAN AMERICAN" AND demographic.dob_year < "2076"
count the number of patients whose ethnicity is black/african american and year of birth is less than 2076?
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 14798, 41, 1426, 834, 23, 26, 1499, 6, 141, 51, 834, 23, 26, 1499, 6, 564, 1499, 6, 2774, 1947, 834, 8547, 302, 1499, 6, 1246, 1499, 6, 103, 115, 1499, 6, 7285, 1499, 6, 1612, 1499, 6,...
[ 3, 23143, 14196, 2847, 17161, 599, 15438, 25424, 6227, 14798, 5, 7304, 11827, 834, 23, 26, 61, 21680, 14798, 549, 17444, 427, 14798, 5, 15, 189, 2532, 485, 3274, 96, 8775, 15339, 87, 6282, 5593, 11425, 3, 17683, 5593, 11425, 121, 3430...
SELECT COUNT(candidates) FROM table_1341897_3 WHERE incumbent = "Kenneth A. Roberts"
How many candidates represent the district of kenneth a. roberts?
CREATE TABLE table_1341897_3 (candidates VARCHAR, incumbent VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2606, 4327, 834, 519, 41, 1608, 12416, 6203, 584, 4280, 28027, 6, 28406, 584, 4280, 28027, 61, 11860, 10, 571, 186, 4341, 4221, 8, 3939, 13, 3, 9376, 15, 189, 3, 9, 5, 3...
[ 3, 23143, 14196, 2847, 17161, 599, 1608, 12416, 6203, 61, 21680, 953, 834, 23747, 2606, 4327, 834, 519, 549, 17444, 427, 28406, 3274, 96, 439, 5990, 189, 71, 5, 2715, 7, 121, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
SELECT T1.name, T1.partitionid FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid HAVING COUNT(*) < 2
Find the name and partition id for users who tweeted less than twice.
CREATE TABLE user_profiles (name VARCHAR, partitionid VARCHAR, uid VARCHAR); CREATE TABLE tweets (uid VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 1139, 834, 18816, 7, 41, 4350, 584, 4280, 28027, 6, 16540, 23, 26, 584, 4280, 28027, 6, 3, 76, 23, 26, 584, 4280, 28027, 3670, 205, 4386, 6048, 332, 17098, 10657, 7, 41, 76, 23, 26, 584,...
[ 3, 23143, 14196, 332, 5411, 4350, 6, 332, 5411, 2274, 4749, 23, 26, 21680, 1139, 834, 18816, 7, 6157, 332, 536, 3, 15355, 3162, 10657, 7, 6157, 332, 357, 9191, 332, 5411, 76, 23, 26, 3274, 332, 4416, 76, 23, 26, 350, 4630, 6880, ...
SELECT year FROM table_23235767_1 WHERE opponent_in_the_final = "John McEnroe" AND championship = "Wimbledon"
What is every year where opponent in the final is John Mcenroe at Wimbledon?
CREATE TABLE table_23235767_1 ( year VARCHAR, opponent_in_the_final VARCHAR, championship VARCHAR )
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 2773, 2773, 3436, 3708, 834, 536, 41, 215, 584, 4280, 28027, 6, 15264, 834, 77, 834, 532, 834, 12406, 584, 4280, 28027, 6, 10183, 584, 4280, 28027, 3, 61, 11860, 10, 363, 19, 334...
[ 3, 23143, 14196, 215, 21680, 953, 834, 2773, 2773, 3436, 3708, 834, 536, 549, 17444, 427, 15264, 834, 77, 834, 532, 834, 12406, 3274, 96, 18300, 3038, 8532, 52, 32, 15, 121, 3430, 10183, 3274, 96, 518, 603, 2296, 2029, 121, 1, 0, ...
SELECT incumbent FROM table_1341897_6 WHERE district = "Arkansas 2"
Who was the incumbent in the Arkansas 2 district election?
CREATE TABLE table_1341897_6 (incumbent VARCHAR, district VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2606, 4327, 834, 948, 41, 77, 75, 5937, 295, 584, 4280, 28027, 6, 3939, 584, 4280, 28027, 61, 11860, 10, 2645, 47, 8, 28406, 16, 8, 16622, 204, 3939, 4356, 58, 11801, 10, ...
[ 3, 23143, 14196, 28406, 21680, 953, 834, 23747, 2606, 4327, 834, 948, 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 T1.name, COUNT(*) FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid HAVING COUNT(*) > 1
Find the name of the user who tweeted more than once, and number of tweets tweeted by them.
CREATE TABLE tweets (uid VARCHAR); CREATE TABLE user_profiles (name VARCHAR, uid VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 10657, 7, 41, 76, 23, 26, 584, 4280, 28027, 3670, 205, 4386, 6048, 332, 17098, 1139, 834, 18816, 7, 41, 4350, 584, 4280, 28027, 6, 3, 76, 23, 26, 584, 4280, 28027, 61, 11860, 10, 2588, 8...
[ 3, 23143, 14196, 332, 5411, 4350, 6, 2847, 17161, 599, 1935, 61, 21680, 1139, 834, 18816, 7, 6157, 332, 536, 3, 15355, 3162, 10657, 7, 6157, 332, 357, 9191, 332, 5411, 76, 23, 26, 3274, 332, 4416, 76, 23, 26, 350, 4630, 6880, 272,...
SELECT "Home team" FROM table_33727 WHERE "Crowd" > '25,000'
What was the home team for the game with more than 25,000 crowd?
CREATE TABLE table_33727 ( "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, 519, 4118, 2555, 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, 19040, 372, 121, 21680, 953, 834, 519, 4118, 2555, 549, 17444, 427, 96, 254, 3623, 26, 121, 2490, 3, 31, 24338, 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,...
SELECT first_elected FROM table_1341897_6 WHERE district = "Arkansas 5"
When was Dale Alford first elected in the Arkansas 5 district?
CREATE TABLE table_1341897_6 (first_elected VARCHAR, district VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2606, 4327, 834, 948, 41, 14672, 834, 19971, 584, 4280, 28027, 6, 3939, 584, 4280, 28027, 61, 11860, 10, 366, 47, 10729, 15, 901, 2590, 166, 8160, 16, 8, 16622, 305, 3939, ...
[ 3, 23143, 14196, 166, 834, 19971, 21680, 953, 834, 23747, 2606, 4327, 834, 948, 549, 17444, 427, 3939, 3274, 96, 188, 52, 3304, 7, 9, 7, 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, ...
SELECT AVG(followers) FROM user_profiles WHERE NOT UID IN (SELECT UID FROM tweets)
Find the average number of followers for the users who do not have any tweet.
CREATE TABLE user_profiles (followers INTEGER, UID VARCHAR); CREATE TABLE tweets (followers INTEGER, UID VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 1139, 834, 18816, 7, 41, 25278, 277, 3, 21342, 17966, 6, 412, 4309, 584, 4280, 28027, 3670, 205, 4386, 6048, 332, 17098, 10657, 7, 41, 25278, 277, 3, 21342, 17966, 6, 412, 4309, 584, 4280, ...
[ 3, 23143, 14196, 71, 17217, 599, 25278, 277, 61, 21680, 1139, 834, 18816, 7, 549, 17444, 427, 4486, 412, 4309, 3388, 41, 23143, 14196, 412, 4309, 21680, 10657, 7, 61, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
SELECT performance FROM table_name_89 WHERE athlete = "dire tune"
What's the performance of Dire Tune?
CREATE TABLE table_name_89 ( performance VARCHAR, athlete VARCHAR )
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 4350, 834, 3914, 41, 821, 584, 4280, 28027, 6, 17893, 584, 4280, 28027, 3, 61, 11860, 10, 363, 31, 7, 8, 821, 13, 7454, 15, 16008, 15, 58, 11801, 10, 1, 0, 0, 0, 0, 0, 0, ...
[ 3, 23143, 14196, 821, 21680, 953, 834, 4350, 834, 3914, 549, 17444, 427, 17893, 3274, 96, 10258, 7368, 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, ...
SELECT MIN(first_elected) FROM table_1341897_6 WHERE district = "Arkansas 3"
When was James William Trimble first elected in the Arkansas 3 district?
CREATE TABLE table_1341897_6 (first_elected INTEGER, district VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2606, 4327, 834, 948, 41, 14672, 834, 19971, 3, 21342, 17966, 6, 3939, 584, 4280, 28027, 61, 11860, 10, 366, 47, 2549, 4599, 21917, 2296, 166, 8160, 16, 8, 16622, 220, 3939,...
[ 3, 23143, 14196, 3, 17684, 599, 14672, 834, 19971, 61, 21680, 953, 834, 23747, 2606, 4327, 834, 948, 549, 17444, 427, 3939, 3274, 96, 188, 52, 3304, 7, 9, 7, 220, 121, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
SELECT AVG(followers) FROM user_profiles WHERE UID IN (SELECT UID FROM tweets)
Find the average number of followers for the users who had some tweets.
CREATE TABLE user_profiles (followers INTEGER, UID VARCHAR); CREATE TABLE tweets (followers INTEGER, UID VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 1139, 834, 18816, 7, 41, 25278, 277, 3, 21342, 17966, 6, 412, 4309, 584, 4280, 28027, 3670, 205, 4386, 6048, 332, 17098, 10657, 7, 41, 25278, 277, 3, 21342, 17966, 6, 412, 4309, 584, 4280, ...
[ 3, 23143, 14196, 71, 17217, 599, 25278, 277, 61, 21680, 1139, 834, 18816, 7, 549, 17444, 427, 412, 4309, 3388, 41, 23143, 14196, 412, 4309, 21680, 10657, 7, 61, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
SELECT LAST_NAME, SALARY FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY LAST_NAME DESC
For those employees who do not work in departments with managers that have ids between 100 and 200, draw a bar chart about the distribution of last_name and salary , show in descending by the X.
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25...
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 10521, 41, 3396, 19846, 11810, 834, 4309, 7908, 1982, 599, 8525, 632, 201, 3396, 19846, 11810, 834, 567, 17683, 3, 4331, 4059, 599, 1458, 201, 283, 15610, 17966, 834, 4309, 7908, 1982, 599, 11...
[ 3, 23143, 14196, 301, 12510, 834, 567, 17683, 6, 180, 4090, 24721, 21680, 1652, 549, 17444, 427, 4486, 3396, 19846, 11810, 834, 4309, 3388, 41, 23143, 14196, 3396, 19846, 11810, 834, 4309, 21680, 10521, 549, 17444, 427, 283, 15610, 17966,...
SELECT party FROM table_1341897_6 WHERE district = "Arkansas 5"
When party did the incumbent in the Arkansas 5 district belong to?
CREATE TABLE table_1341897_6 (party VARCHAR, district VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2606, 4327, 834, 948, 41, 8071, 584, 4280, 28027, 6, 3939, 584, 4280, 28027, 61, 11860, 10, 366, 1088, 410, 8, 28406, 16, 8, 16622, 305, 3939, 13000, 12, 58, 11801, 10, 1,...
[ 3, 23143, 14196, 1088, 21680, 953, 834, 23747, 2606, 4327, 834, 948, 549, 17444, 427, 3939, 3274, 96, 188, 52, 3304, 7, 9, 7, 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, ...
SELECT MAX(followers), SUM(followers) FROM user_profiles
Find the maximum and total number of followers of all users.
CREATE TABLE user_profiles (followers INTEGER)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 1139, 834, 18816, 7, 41, 25278, 277, 3, 21342, 17966, 61, 11860, 10, 2588, 8, 2411, 11, 792, 381, 13, 10076, 13, 66, 1105, 5, 11801, 10, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 3, 23143, 14196, 4800, 4, 599, 25278, 277, 201, 180, 6122, 599, 25278, 277, 61, 21680, 1139, 834, 18816, 7, 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 "Circuit" FROM table_26503 WHERE "Rnd" = '3'
What circuit had rnd 3?
CREATE TABLE table_26503 ( "Rnd" real, "Circuit" text, "LMP Winning Team" text, "LMPC Winning Team" text, "GT Winning Team" text, "GTC Winning Team" text, "Results" text )
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 2688, 1752, 519, 41, 96, 448, 727, 121, 490, 6, 96, 254, 23, 52, 21560, 121, 1499, 6, 96, 434, 5244, 549, 10503, 2271, 121, 1499, 6, 96, 11160, 4051, 549, 10503, 2271, 121, 149...
[ 3, 23143, 14196, 96, 254, 23, 52, 21560, 121, 21680, 953, 834, 2688, 1752, 519, 549, 17444, 427, 96, 448, 727, 121, 3274, 3, 31, 519, 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 result FROM table_1341897_6 WHERE district = "Arkansas 5"
What was the result in the Arkansas 5 district election?
CREATE TABLE table_1341897_6 (result VARCHAR, district VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2606, 4327, 834, 948, 41, 60, 7, 83, 17, 584, 4280, 28027, 6, 3939, 584, 4280, 28027, 61, 11860, 10, 363, 47, 8, 741, 16, 8, 16622, 305, 3939, 4356, 58, 11801, 10, 1, ...
[ 3, 23143, 14196, 741, 21680, 953, 834, 23747, 2606, 4327, 834, 948, 549, 17444, 427, 3939, 3274, 96, 188, 52, 3304, 7, 9, 7, 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, ...
SELECT DISTINCT (catalog_entry_name) FROM catalog_contents
Find the names of all the catalog entries.
CREATE TABLE catalog_contents (catalog_entry_name VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 10173, 834, 14819, 7, 41, 2138, 9, 2152, 834, 295, 651, 834, 4350, 584, 4280, 28027, 61, 11860, 10, 2588, 8, 3056, 13, 66, 8, 10173, 10066, 5, 11801, 10, 1, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 41, 2138, 9, 2152, 834, 295, 651, 834, 4350, 61, 21680, 10173, 834, 14819, 7, 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 "Date(s) Released" FROM table_66678 WHERE "Democratic Alternative" = '1%' AND "Labour" = '34%'
Which date released had a Democratic Alternative value of 1% and Labour of 34%?
CREATE TABLE table_66678 ( "Date(s) Released" text, "Polling institute" text, "Nationalist" text, "Labour" text, "Democratic Alternative" text, "Undecided/ No answer" text, "Lead" text )
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 3539, 3708, 927, 41, 96, 308, 342, 599, 7, 61, 13048, 26, 121, 1499, 6, 96, 8931, 697, 13681, 121, 1499, 6, 96, 24732, 343, 121, 1499, 6, 96, 18506, 1211, 121, 1499, 6, 96, 1...
[ 3, 23143, 14196, 96, 308, 342, 599, 7, 61, 13048, 26, 121, 21680, 953, 834, 3539, 3708, 927, 549, 17444, 427, 96, 19679, 447, 13661, 121, 3274, 3, 31, 4704, 31, 3430, 96, 18506, 1211, 121, 3274, 3, 31, 519, 5988, 31, 1, 0, 0, ...
SELECT party FROM table_1341897_6 WHERE district = "Arkansas 2"
What party did the incumbent in the Arkansas 2 district belong to?
CREATE TABLE table_1341897_6 (party VARCHAR, district VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2606, 4327, 834, 948, 41, 8071, 584, 4280, 28027, 6, 3939, 584, 4280, 28027, 61, 11860, 10, 363, 1088, 410, 8, 28406, 16, 8, 16622, 204, 3939, 13000, 12, 58, 11801, 10, 1,...
[ 3, 23143, 14196, 1088, 21680, 953, 834, 23747, 2606, 4327, 834, 948, 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 attribute_data_type FROM Attribute_Definitions GROUP BY attribute_data_type HAVING COUNT(*) > 3
Find the list of attribute data types possessed by more than 3 attribute definitions.
CREATE TABLE Attribute_Definitions (attribute_data_type VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 486, 5135, 17, 15, 834, 2962, 5582, 10872, 41, 144, 5135, 17, 15, 834, 6757, 834, 6137, 584, 4280, 28027, 61, 11860, 10, 2588, 8, 570, 13, 15816, 331, 1308, 3, 27345, 57, 72, 145, 220, 1...
[ 3, 23143, 14196, 15816, 834, 6757, 834, 6137, 21680, 486, 5135, 17, 15, 834, 2962, 5582, 10872, 350, 4630, 6880, 272, 476, 15816, 834, 6757, 834, 6137, 454, 6968, 2365, 2847, 17161, 599, 1935, 61, 2490, 220, 1, 0, 0, 0, 0, 0, 0, ...
SELECT "Score" FROM table_68453 WHERE "Opponent" = 'kim tiilikainen'
What was the score in the match against Kim Tiilikainen?
CREATE TABLE table_68453 ( "Date" text, "Tournament" text, "Surface" text, "Opponent" text, "Score" text )
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 3651, 2128, 519, 41, 96, 308, 342, 121, 1499, 6, 96, 382, 1211, 20205, 17, 121, 1499, 6, 96, 134, 450, 4861, 121, 1499, 6, 96, 667, 102, 9977, 121, 1499, 6, 96, 134, 9022, 12...
[ 3, 23143, 14196, 96, 134, 9022, 121, 21680, 953, 834, 3651, 2128, 519, 549, 17444, 427, 96, 667, 102, 9977, 121, 3274, 3, 31, 19754, 3, 17, 23, 173, 5561, 77, 35, 31, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
SELECT COUNT(candidates) FROM table_1341897_42 WHERE incumbent = "William Jennings Bryan Dorn"
How many candidates were there in the election for William Jennings Bryan Dorn's seat?
CREATE TABLE table_1341897_42 (candidates VARCHAR, incumbent VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2606, 4327, 834, 4165, 41, 1608, 12416, 6203, 584, 4280, 28027, 6, 28406, 584, 4280, 28027, 61, 11860, 10, 571, 186, 4341, 130, 132, 16, 8, 4356, 21, 4599, 1022, 9416, 7, ...
[ 3, 23143, 14196, 2847, 17161, 599, 1608, 12416, 6203, 61, 21680, 953, 834, 23747, 2606, 4327, 834, 4165, 549, 17444, 427, 28406, 3274, 96, 518, 1092, 23, 265, 1022, 9416, 7, 15961, 6200, 29, 121, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
SELECT attribute_data_type FROM Attribute_Definitions WHERE attribute_name = "Green"
What is the attribute data type of the attribute with name "Green"?
CREATE TABLE Attribute_Definitions (attribute_data_type VARCHAR, attribute_name VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 486, 5135, 17, 15, 834, 2962, 5582, 10872, 41, 144, 5135, 17, 15, 834, 6757, 834, 6137, 584, 4280, 28027, 6, 15816, 834, 4350, 584, 4280, 28027, 61, 11860, 10, 363, 19, 8, 15816, 331, 686,...
[ 3, 23143, 14196, 15816, 834, 6757, 834, 6137, 21680, 486, 5135, 17, 15, 834, 2962, 5582, 10872, 549, 17444, 427, 15816, 834, 4350, 3274, 96, 22918, 121, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
SELECT "TDP" FROM table_26575 WHERE "Model (list)" = '4x0'
What is the wattage/TDP associated with model name 4x0?
CREATE TABLE table_26575 ( "Processor" text, "Brand name" text, "Model (list)" text, "Cores" real, "L2 Cache" text, "Socket" text, "TDP" text )
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 357, 4122, 3072, 41, 96, 3174, 75, 24901, 121, 1499, 6, 96, 18304, 727, 564, 121, 1499, 6, 96, 24663, 41, 3350, 61, 121, 1499, 6, 96, 254, 14846, 121, 490, 6, 96, 434, 357, 2...
[ 3, 23143, 14196, 96, 382, 7410, 121, 21680, 953, 834, 357, 4122, 3072, 549, 17444, 427, 96, 24663, 41, 3350, 61, 121, 3274, 3, 31, 591, 226, 632, 31, 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_1341897_42
What is the earliest year that a candidate was first elected?
CREATE TABLE table_1341897_42 (first_elected INTEGER)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2606, 4327, 834, 4165, 41, 14672, 834, 19971, 3, 21342, 17966, 61, 11860, 10, 363, 19, 8, 3, 16454, 215, 24, 3, 9, 4775, 47, 166, 8160, 58, 11801, 10, 1, 0, 0, 0, 0, ...
[ 3, 23143, 14196, 3, 17684, 599, 14672, 834, 19971, 61, 21680, 953, 834, 23747, 2606, 4327, 834, 4165, 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 catalog_level_name, catalog_level_number FROM Catalog_Structure WHERE catalog_level_number BETWEEN 5 AND 10
Find the name and level of catalog structure with level between 5 and 10.
CREATE TABLE Catalog_Structure (catalog_level_name VARCHAR, catalog_level_number INTEGER)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 22424, 834, 134, 17, 11783, 2693, 41, 2138, 9, 2152, 834, 4563, 834, 4350, 584, 4280, 28027, 6, 10173, 834, 4563, 834, 5525, 1152, 3, 21342, 17966, 61, 11860, 10, 2588, 8, 564, 11, 593, 13...
[ 3, 23143, 14196, 10173, 834, 4563, 834, 4350, 6, 10173, 834, 4563, 834, 5525, 1152, 21680, 22424, 834, 134, 17, 11783, 2693, 549, 17444, 427, 10173, 834, 4563, 834, 5525, 1152, 272, 7969, 518, 23394, 305, 3430, 335, 1, 0, 0, 0, 0, ...
SELECT music_director FROM table_name_86 WHERE year > 2003
Name a music director, belonging to a year after 2003?
CREATE TABLE table_name_86 ( music_director VARCHAR, year INTEGER )
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 4350, 834, 3840, 41, 723, 834, 25982, 584, 4280, 28027, 6, 215, 3, 21342, 17966, 3, 61, 11860, 10, 5570, 3, 9, 723, 2090, 6, 12770, 12, 3, 9, 215, 227, 3888, 58, 11801, 10, 1...
[ 3, 23143, 14196, 723, 834, 25982, 21680, 953, 834, 4350, 834, 3840, 549, 17444, 427, 215, 2490, 3888, 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 result FROM table_1341897_45 WHERE incumbent = "Lindley Beckworth"
What was the result of the election in which Lindley Beckworth was the incumbent?
CREATE TABLE table_1341897_45 (result VARCHAR, incumbent VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2606, 4327, 834, 2128, 41, 60, 7, 83, 17, 584, 4280, 28027, 6, 28406, 584, 4280, 28027, 61, 11860, 10, 363, 47, 8, 741, 13, 8, 4356, 16, 84, 14482, 1306, 9864, 7048, 47,...
[ 3, 23143, 14196, 741, 21680, 953, 834, 23747, 2606, 4327, 834, 2128, 549, 17444, 427, 28406, 3274, 96, 434, 77, 26, 1306, 9864, 7048, 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 (catalog_publisher) FROM catalogs WHERE catalog_publisher LIKE "%Murray%"
Find all the catalog publishers whose name contains "Murray"
CREATE TABLE catalogs (catalog_publisher VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 10173, 7, 41, 2138, 9, 2152, 834, 29337, 49, 584, 4280, 28027, 61, 11860, 10, 2588, 66, 8, 10173, 18902, 3, 2544, 564, 2579, 96, 329, 450, 2866, 121, 11801, 10, 1, 0, 0, 0, 0, 0, 0, ...
[ 3, 23143, 14196, 3, 15438, 25424, 6227, 41, 2138, 9, 2152, 834, 29337, 49, 61, 21680, 10173, 7, 549, 17444, 427, 10173, 834, 29337, 49, 8729, 9914, 96, 1454, 329, 450, 2866, 1454, 121, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
SELECT city_code, AVG(Age) FROM Student GROUP BY city_code
Find the average age of students living in each city with a bar chart.
CREATE TABLE Lives_in ( stuid INTEGER, dormid INTEGER, room_number INTEGER ) CREATE TABLE Dorm ( dormid INTEGER, dorm_name VARCHAR(20), student_capacity INTEGER, gender VARCHAR(1) ) CREATE TABLE Has_amenity ( dormid INTEGER, amenid INTEGER ) CREATE TABLE Student ( StuID INTEGE...
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 3306, 7, 834, 77, 41, 21341, 23, 26, 3, 21342, 17966, 6, 103, 52, 6983, 3, 21342, 17966, 6, 562, 834, 5525, 1152, 3, 21342, 17966, 3, 61, 205, 4386, 6048, 332, 17098, 6200, 51, 41, 103, ...
[ 3, 23143, 14196, 690, 834, 4978, 6, 71, 17217, 599, 188, 397, 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, ...
SELECT incumbent FROM table_1341897_45 WHERE first_elected = 1936
Which incumbent was first elected in 1936?
CREATE TABLE table_1341897_45 (incumbent VARCHAR, first_elected VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2606, 4327, 834, 2128, 41, 77, 75, 5937, 295, 584, 4280, 28027, 6, 166, 834, 19971, 584, 4280, 28027, 61, 11860, 10, 4073, 28406, 47, 166, 8160, 16, 27598, 58, 11801, 10, ...
[ 3, 23143, 14196, 28406, 21680, 953, 834, 23747, 2606, 4327, 834, 2128, 549, 17444, 427, 166, 834, 19971, 3274, 27598, 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, ...
SELECT catalog_publisher FROM catalogs GROUP BY catalog_publisher ORDER BY COUNT(*) DESC LIMIT 1
Which catalog publisher has published the most catalogs?
CREATE TABLE catalogs (catalog_publisher VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 10173, 7, 41, 2138, 9, 2152, 834, 29337, 49, 584, 4280, 28027, 61, 11860, 10, 4073, 10173, 14859, 65, 1790, 8, 167, 10173, 7, 58, 11801, 10, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 3, 23143, 14196, 10173, 834, 29337, 49, 21680, 10173, 7, 350, 4630, 6880, 272, 476, 10173, 834, 29337, 49, 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,...
SELECT reign, days_held FROM wrestler
What are the reigns and days held of all wrestlers?
CREATE TABLE elimination ( elimination_id text, wrestler_id text, team text, eliminated_by text, elimination_move text, time text ) CREATE TABLE wrestler ( wrestler_id number, name text, reign text, days_held text, location text, event text )
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 23458, 41, 23458, 834, 23, 26, 1499, 6, 26033, 52, 834, 23, 26, 1499, 6, 372, 1499, 6, 17809, 834, 969, 1499, 6, 23458, 834, 7168, 15, 1499, 6, 97, 1499, 3, 61, 205, 4386, 6048, 332, 1...
[ 3, 23143, 14196, 17367, 6, 477, 834, 14796, 21680, 26033, 52, 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,...
SELECT result FROM table_1341897_45 WHERE incumbent = "Walter E. Rogers"
What was the result of the election in which Walter E. Rogers was the incumbent?
CREATE TABLE table_1341897_45 (result VARCHAR, incumbent VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2606, 4327, 834, 2128, 41, 60, 7, 83, 17, 584, 4280, 28027, 6, 28406, 584, 4280, 28027, 61, 11860, 10, 363, 47, 8, 741, 13, 8, 4356, 16, 84, 13171, 262, 5, 9099, 7, 47...
[ 3, 23143, 14196, 741, 21680, 953, 834, 23747, 2606, 4327, 834, 2128, 549, 17444, 427, 28406, 3274, 96, 518, 8818, 262, 5, 9099, 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, ...
SELECT t1.catalog_name, t1.date_of_publication FROM catalogs AS t1 JOIN catalog_structure AS t2 ON t1.catalog_id = t2.catalog_id WHERE catalog_level_number > 5
Find the names and publication dates of all catalogs that have catalog level number greater than 5.
CREATE TABLE catalogs (catalog_name VARCHAR, date_of_publication VARCHAR, catalog_id VARCHAR); CREATE TABLE catalog_structure (catalog_id VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 10173, 7, 41, 2138, 9, 2152, 834, 4350, 584, 4280, 28027, 6, 833, 834, 858, 834, 15727, 257, 584, 4280, 28027, 6, 10173, 834, 23, 26, 584, 4280, 28027, 3670, 205, 4386, 6048, 332, 17098, 1...
[ 3, 23143, 14196, 3, 17, 5411, 2138, 9, 2152, 834, 4350, 6, 3, 17, 5411, 5522, 834, 858, 834, 15727, 257, 21680, 10173, 7, 6157, 3, 17, 536, 3, 15355, 3162, 10173, 834, 16180, 6157, 3, 17, 357, 9191, 3, 17, 5411, 2138, 9, 2152, ...
SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-56105')) AND medication.routeadmin = 'im' AND DATETIME(medicati...
what was the first drug that was prescribed to patient 030-56105 through im route in 03/last year?
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, ...
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 11963, 670, 2562, 41, 11963, 670, 2562, 23, 26, 381, 6, 1868, 15129, 21545, 23, 26, 381, 6, 2358, 8292, 1499, 6, 2358, 40, 10333, 1499, 6, 2358, 7480, 35, 76, 17552, 381, 6, 11963, 670, ...
[ 3, 23143, 14196, 7757, 5, 26, 13534, 4350, 21680, 7757, 549, 17444, 427, 7757, 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, 21...
SELECT first_elected FROM table_1341930_10 WHERE incumbent = "Paul Rogers"
When was Paul Rogers first elected?
CREATE TABLE table_1341930_10 (first_elected VARCHAR, incumbent VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2294, 1458, 834, 1714, 41, 14672, 834, 19971, 584, 4280, 28027, 6, 28406, 584, 4280, 28027, 61, 11860, 10, 366, 47, 1838, 9099, 7, 166, 8160, 58, 11801, 10, 1, 0, 0, 0, ...
[ 3, 23143, 14196, 166, 834, 19971, 21680, 953, 834, 23747, 2294, 1458, 834, 1714, 549, 17444, 427, 28406, 3274, 96, 23183, 9099, 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 t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.attribute_value = (SELECT attribute_value FROM Catalog_Contents_Additional_Attributes GROUP BY attribute_value ORDER BY COUNT(*) DESC LIMIT 1)
What are the entry names of catalog with the attribute possessed by most entries.
CREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id VARCHAR, attribute_value VARCHAR); CREATE TABLE Catalog_Contents (catalog_entry_name VARCHAR, catalog_entry_id VARCHAR); CREATE TABLE Catalog_Contents_Additional_Attributes (attribute_value VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 22424, 834, 4302, 4669, 7, 834, 20773, 4749, 138, 834, 188, 17, 5135, 1422, 41, 2138, 9, 2152, 834, 295, 651, 834, 23, 26, 584, 4280, 28027, 6, 15816, 834, 12097, 584, 4280, 28027, 3670, 2...
[ 3, 23143, 14196, 3, 17, 5411, 2138, 9, 2152, 834, 295, 651, 834, 4350, 21680, 22424, 834, 4302, 4669, 7, 6157, 3, 17, 536, 3, 15355, 3162, 22424, 834, 4302, 4669, 7, 834, 20773, 4749, 138, 834, 188, 17, 5135, 1422, 6157, 3, 17, ...
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', labevents.charttime)) FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'creatinine') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 14671 AND admissio...
how many days has passed since patient 14671 had a creatinine laboratory test for the last time in the current hospital encounter?
CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime t...
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 5059, 15, 2169, 7, 41, 7358, 834, 23, 26, 381, 6, 1426, 834, 23, 26, 381, 6, 141, 51, 834, 23, 26, 381, 6, 3, 23, 1071, 21545, 834, 23, 26, 381, 6, 2118, 23, 26, 381, 6, 5059, 715,...
[ 3, 23143, 14196, 209, 1429, 41, 13733, 6245, 15382, 599, 31, 1454, 354, 31, 6, 3, 5211, 12224, 6431, 834, 382, 15382, 9960, 61, 3, 18, 3, 13733, 6245, 15382, 599, 31, 1454, 354, 31, 6, 50, 346, 2169, 7, 5, 4059, 17, 715, 61, 6...
SELECT district FROM table_1341930_10 WHERE incumbent = "James A. Haley"
Which district is James A. Haley from?
CREATE TABLE table_1341930_10 (district VARCHAR, incumbent VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2294, 1458, 834, 1714, 41, 26, 23, 20066, 584, 4280, 28027, 6, 28406, 584, 4280, 28027, 61, 11860, 10, 4073, 3939, 19, 2549, 71, 5, 1626, 1306, 45, 58, 11801, 10, 1, 0, ...
[ 3, 23143, 14196, 3939, 21680, 953, 834, 23747, 2294, 1458, 834, 1714, 549, 17444, 427, 28406, 3274, 96, 683, 9, 2687, 71, 5, 1626, 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,...
SELECT catalog_entry_name FROM catalog_contents ORDER BY price_in_dollars DESC LIMIT 1
What is the entry name of the most expensive catalog (in USD)?
CREATE TABLE catalog_contents (catalog_entry_name VARCHAR, price_in_dollars VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 10173, 834, 14819, 7, 41, 2138, 9, 2152, 834, 295, 651, 834, 4350, 584, 4280, 28027, 6, 594, 834, 77, 834, 26748, 7, 584, 4280, 28027, 61, 11860, 10, 363, 19, 8, 1764, 564, 13, 8, 167, ...
[ 3, 23143, 14196, 10173, 834, 295, 651, 834, 4350, 21680, 10173, 834, 14819, 7, 4674, 11300, 272, 476, 594, 834, 77, 834, 26748, 7, 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,...
SELECT t1.drug FROM (SELECT prescriptions.drug, COUNT(prescriptions.startdate) AS c1 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 27172) AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 ye...
what was the prescription drug that patient 27172 had received two or more times in 10/this year?
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE icust...
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 50, 346, 2169, 7, 41, 7358, 834, 23, 26, 381, 6, 1426, 834, 23, 26, 381, 6, 141, 51, 834, 23, 26, 381, 6, 2118, 23, 26, 381, 6, 5059, 715, 97, 6, 701, 5525, 381, 6, 701, 76, 32, ...
[ 3, 23143, 14196, 3, 17, 5411, 26, 13534, 21680, 41, 23143, 14196, 7744, 7, 5, 26, 13534, 6, 2847, 17161, 599, 2026, 11830, 7, 5, 10208, 5522, 61, 6157, 3, 75, 536, 21680, 7744, 7, 549, 17444, 427, 7744, 7, 5, 8399, 51, 834, 23, ...
SELECT MAX(first_elected) FROM table_1341930_10
What year were the latest elections?
CREATE TABLE table_1341930_10 (first_elected INTEGER)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2294, 1458, 834, 1714, 41, 14672, 834, 19971, 3, 21342, 17966, 61, 11860, 10, 363, 215, 130, 8, 1251, 9768, 58, 11801, 10, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 3, 23143, 14196, 4800, 4, 599, 14672, 834, 19971, 61, 21680, 953, 834, 23747, 2294, 1458, 834, 1714, 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 t2.catalog_level_name FROM catalog_contents AS t1 JOIN catalog_structure AS t2 ON t1.catalog_level_number = t2.catalog_level_number ORDER BY t1.price_in_dollars LIMIT 1
What is the level name of the cheapest catalog (in USD)?
CREATE TABLE catalog_structure (catalog_level_name VARCHAR, catalog_level_number VARCHAR); CREATE TABLE catalog_contents (catalog_level_number VARCHAR, price_in_dollars VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 10173, 834, 16180, 41, 2138, 9, 2152, 834, 4563, 834, 4350, 584, 4280, 28027, 6, 10173, 834, 4563, 834, 5525, 1152, 584, 4280, 28027, 3670, 205, 4386, 6048, 332, 17098, 10173, 834, 14819, 7, ...
[ 3, 23143, 14196, 3, 17, 4416, 2138, 9, 2152, 834, 4563, 834, 4350, 21680, 10173, 834, 14819, 7, 6157, 3, 17, 536, 3, 15355, 3162, 10173, 834, 16180, 6157, 3, 17, 357, 9191, 3, 17, 5411, 2138, 9, 2152, 834, 4563, 834, 5525, 1152, ...
SELECT "Verb meaning" FROM table_44583 WHERE "Part 1" = 'saugen'
What is the verb meaning for Saugen in part 1?
CREATE TABLE table_44583 ( "Class" text, "Part 1" text, "Part 2" text, "Part 3" text, "Part 4" text, "Verb meaning" text )
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 591, 2128, 4591, 41, 96, 21486, 121, 1499, 6, 96, 13725, 209, 121, 1499, 6, 96, 13725, 204, 121, 1499, 6, 96, 13725, 220, 121, 1499, 6, 96, 13725, 3, 20364, 1499, 6, 96, 5000, ...
[ 3, 23143, 14196, 96, 5000, 115, 2530, 121, 21680, 953, 834, 591, 2128, 4591, 549, 17444, 427, 96, 13725, 209, 121, 3274, 3, 31, 7348, 729, 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 district FROM table_1341930_24 WHERE incumbent = "John Bell Williams"
In what district is the incumbent John Bell Williams?
CREATE TABLE table_1341930_24 (district VARCHAR, incumbent VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2294, 1458, 834, 2266, 41, 26, 23, 20066, 584, 4280, 28027, 6, 28406, 584, 4280, 28027, 61, 11860, 10, 86, 125, 3939, 19, 8, 28406, 1079, 5377, 6060, 58, 11801, 10, 1, 0, ...
[ 3, 23143, 14196, 3939, 21680, 953, 834, 23747, 2294, 1458, 834, 2266, 549, 17444, 427, 28406, 3274, 96, 18300, 5377, 6060, 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(price_in_euros), MIN(price_in_euros) FROM catalog_contents
What are the average and minimum price (in Euro) of all products?
CREATE TABLE catalog_contents (price_in_euros INTEGER)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 10173, 834, 14819, 7, 41, 102, 4920, 834, 77, 834, 18985, 3, 21342, 17966, 61, 11860, 10, 363, 33, 8, 1348, 11, 2559, 594, 41, 77, 2430, 61, 13, 66, 494, 58, 11801, 10, 1, 0, 0, 0, 0...
[ 3, 23143, 14196, 71, 17217, 599, 102, 4920, 834, 77, 834, 18985, 201, 3, 17684, 599, 102, 4920, 834, 77, 834, 18985, 61, 21680, 10173, 834, 14819, 7, 1, 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_name_56 WHERE away_team = "mansfield town"
What date did the away team Mansfield Town play?
CREATE TABLE table_name_56 ( date VARCHAR, away_team VARCHAR )
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 4350, 834, 4834, 41, 833, 584, 4280, 28027, 6, 550, 834, 11650, 584, 4280, 28027, 3, 61, 11860, 10, 363, 833, 410, 8, 550, 372, 1140, 7, 1846, 4463, 577, 58, 11801, 10, 1, 0, ...
[ 3, 23143, 14196, 833, 21680, 953, 834, 4350, 834, 4834, 549, 17444, 427, 550, 834, 11650, 3274, 96, 348, 7, 1846, 1511, 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 first_elected FROM table_1341930_24 WHERE incumbent = "John Bell Williams"
In what year was John Bell Williams first elected?
CREATE TABLE table_1341930_24 (first_elected VARCHAR, incumbent VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2294, 1458, 834, 2266, 41, 14672, 834, 19971, 584, 4280, 28027, 6, 28406, 584, 4280, 28027, 61, 11860, 10, 86, 125, 215, 47, 1079, 5377, 6060, 166, 8160, 58, 11801, 10, 1, ...
[ 3, 23143, 14196, 166, 834, 19971, 21680, 953, 834, 23747, 2294, 1458, 834, 2266, 549, 17444, 427, 28406, 3274, 96, 18300, 5377, 6060, 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 catalog_entry_name FROM catalog_contents ORDER BY height DESC LIMIT 1
What is the product with the highest height? Give me the catalog entry name.
CREATE TABLE catalog_contents (catalog_entry_name VARCHAR, height VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 10173, 834, 14819, 7, 41, 2138, 9, 2152, 834, 295, 651, 834, 4350, 584, 4280, 28027, 6, 3902, 584, 4280, 28027, 61, 11860, 10, 363, 19, 8, 556, 28, 8, 2030, 3902, 58, 6434, 140, 8, 10173...
[ 3, 23143, 14196, 10173, 834, 295, 651, 834, 4350, 21680, 10173, 834, 14819, 7, 4674, 11300, 272, 476, 3902, 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, ...
SELECT (SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'valvular stenosis - aortic' AND DATETIME(diagnosis.diagnosistime) <= DATETIME(CURRENT_TIME(), '-1 ye...
count the number of patients who were diagnosed with valvular stenosis - aortic but did not come back to hospital within 2 months until 1 year ago.
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid num...
[ 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, 1868, 41, 775, 12417, ...
[ 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 COUNT(district) FROM table_1341930_24 WHERE incumbent = "W. Arthur Winstead"
How many districts have W. Arthur Winstead as elected official?
CREATE TABLE table_1341930_24 (district VARCHAR, incumbent VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2294, 1458, 834, 2266, 41, 26, 23, 20066, 584, 4280, 28027, 6, 28406, 584, 4280, 28027, 61, 11860, 10, 571, 186, 14126, 43, 549, 5, 13962, 4871, 11931, 38, 8160, 2314, 58, ...
[ 3, 23143, 14196, 2847, 17161, 599, 26, 23, 20066, 61, 21680, 953, 834, 23747, 2294, 1458, 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, 0, ...
SELECT catalog_entry_name FROM catalog_contents ORDER BY capacity LIMIT 1
Find the name of the product that has the smallest capacity.
CREATE TABLE catalog_contents (catalog_entry_name VARCHAR, capacity VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 10173, 834, 14819, 7, 41, 2138, 9, 2152, 834, 295, 651, 834, 4350, 584, 4280, 28027, 6, 2614, 584, 4280, 28027, 61, 11860, 10, 2588, 8, 564, 13, 8, 556, 24, 65, 8, 3, 17924, 2614, 5, 1...
[ 3, 23143, 14196, 10173, 834, 295, 651, 834, 4350, 21680, 10173, 834, 14819, 7, 4674, 11300, 272, 476, 2614, 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, 0, 0, 0...
SELECT "Founded" FROM table_17914 WHERE "Captain" = 'Matt Smith'
When was the team, whose captain is Matt Smith, founded?
CREATE TABLE table_17914 ( "Team" text, "Location" text, "Stadium" text, "Founded" real, "Joined" real, "Head Coach" text, "Captain" text )
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 26593, 2534, 41, 96, 18699, 121, 1499, 6, 96, 434, 32, 75, 257, 121, 1499, 6, 96, 134, 17, 9, 12925, 121, 1499, 6, 96, 20100, 121, 490, 6, 96, 683, 32, 630, 26, 121, 490, 6...
[ 3, 23143, 14196, 96, 20100, 121, 21680, 953, 834, 26593, 2534, 549, 17444, 427, 96, 19566, 17, 9, 77, 121, 3274, 3, 31, 329, 144, 17, 3931, 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 district FROM table_1341930_11 WHERE incumbent = "Carl Vinson"
What is the district for carl vinson?
CREATE TABLE table_1341930_11 (district VARCHAR, incumbent VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2294, 1458, 834, 2596, 41, 26, 23, 20066, 584, 4280, 28027, 6, 28406, 584, 4280, 28027, 61, 11860, 10, 363, 19, 8, 3939, 21, 443, 40, 4671, 739, 58, 11801, 10, 1, 0, 0, ...
[ 3, 23143, 14196, 3939, 21680, 953, 834, 23747, 2294, 1458, 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 catalog_entry_name FROM catalog_contents WHERE product_stock_number LIKE "2%"
Find the names of all the products whose stock number starts with "2".
CREATE TABLE catalog_contents (catalog_entry_name VARCHAR, product_stock_number VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 10173, 834, 14819, 7, 41, 2138, 9, 2152, 834, 295, 651, 834, 4350, 584, 4280, 28027, 6, 556, 834, 7149, 834, 5525, 1152, 584, 4280, 28027, 61, 11860, 10, 2588, 8, 3056, 13, 66, 8, 494, 3...
[ 3, 23143, 14196, 10173, 834, 295, 651, 834, 4350, 21680, 10173, 834, 14819, 7, 549, 17444, 427, 556, 834, 7149, 834, 5525, 1152, 8729, 9914, 96, 5406, 121, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
SELECT Physician, Department FROM Affiliated_With WHERE PrimaryAffiliation = 1
List the physicians' employee ids together with their primary affiliation departments' ids. Plot them as scatter chart.
CREATE TABLE Room ( RoomNumber INTEGER, RoomType VARCHAR(30), BlockFloor INTEGER, BlockCode INTEGER, Unavailable BOOLEAN ) CREATE TABLE Affiliated_With ( Physician INTEGER, Department INTEGER, PrimaryAffiliation BOOLEAN ) CREATE TABLE Appointment ( AppointmentID INTEGER, Patien...
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 4181, 41, 4181, 567, 5937, 49, 3, 21342, 17966, 6, 4181, 25160, 584, 4280, 28027, 599, 1458, 201, 9387, 11251, 127, 3, 21342, 17966, 6, 9387, 22737, 3, 21342, 17966, 6, 597, 28843, 10842, 51...
[ 3, 23143, 14196, 23869, 6, 1775, 21680, 24003, 26, 834, 15013, 549, 17444, 427, 14542, 188, 89, 8027, 23, 257, 3274, 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, 0, 0, 0, ...
SELECT MAX(first_elected) FROM table_1341930_11 WHERE incumbent = "James C. Davis"
What is the most first elected for james c. davis?
CREATE TABLE table_1341930_11 (first_elected INTEGER, incumbent VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2294, 1458, 834, 2596, 41, 14672, 834, 19971, 3, 21342, 17966, 6, 28406, 584, 4280, 28027, 61, 11860, 10, 363, 19, 8, 167, 166, 8160, 21, 7620, 15, 7, 3, 75, 5, 836, 346...
[ 3, 23143, 14196, 4800, 4, 599, 14672, 834, 19971, 61, 21680, 953, 834, 23747, 2294, 1458, 834, 2596, 549, 17444, 427, 28406, 3274, 96, 683, 9, 2687, 205, 5, 8688, 121, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.catalog_level_number = "8"
Find the names of catalog entries with level number 8.
CREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id VARCHAR, catalog_level_number VARCHAR); CREATE TABLE Catalog_Contents (catalog_entry_name VARCHAR, catalog_entry_id VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 22424, 834, 4302, 4669, 7, 834, 20773, 4749, 138, 834, 188, 17, 5135, 1422, 41, 2138, 9, 2152, 834, 295, 651, 834, 23, 26, 584, 4280, 28027, 6, 10173, 834, 4563, 834, 5525, 1152, 584, 4280...
[ 3, 23143, 14196, 3, 17, 5411, 2138, 9, 2152, 834, 295, 651, 834, 4350, 21680, 22424, 834, 4302, 4669, 7, 6157, 3, 17, 536, 3, 15355, 3162, 22424, 834, 4302, 4669, 7, 834, 20773, 4749, 138, 834, 188, 17, 5135, 1422, 6157, 3, 17, ...
SELECT MIN(three_pointers) FROM table_22824324_2 WHERE rebounds = 178
What is the lowest number of three pointers in games where the number of rebounds was 178?
CREATE TABLE table_22824324_2 ( three_pointers INTEGER, rebounds VARCHAR )
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 357, 2577, 27730, 2266, 834, 357, 41, 386, 834, 2700, 277, 3, 21342, 17966, 6, 3, 23768, 584, 4280, 28027, 3, 61, 11860, 10, 363, 19, 8, 7402, 381, 13, 386, 500, 277, 16, 1031,...
[ 3, 23143, 14196, 3, 17684, 599, 21182, 834, 2700, 277, 61, 21680, 953, 834, 357, 2577, 27730, 2266, 834, 357, 549, 17444, 427, 3, 23768, 3274, 3, 27640, 1, 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_1341930_11 WHERE district = "Georgia 4"
What is the first elected for georgia 4?
CREATE TABLE table_1341930_11 (first_elected VARCHAR, district VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2294, 1458, 834, 2596, 41, 14672, 834, 19971, 584, 4280, 28027, 6, 3939, 584, 4280, 28027, 61, 11860, 10, 363, 19, 8, 166, 8160, 21, 873, 1677, 23, 9, 314, 58, 11801, 10, ...
[ 3, 23143, 14196, 166, 834, 19971, 21680, 953, 834, 23747, 2294, 1458, 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...
SELECT catalog_entry_name FROM catalog_contents WHERE LENGTH < 3 OR width > 5
Find the names of the products with length smaller than 3 or height greater than 5.
CREATE TABLE catalog_contents (catalog_entry_name VARCHAR, LENGTH VARCHAR, width VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 10173, 834, 14819, 7, 41, 2138, 9, 2152, 834, 295, 651, 834, 4350, 584, 4280, 28027, 6, 301, 23182, 4611, 584, 4280, 28027, 6, 9400, 584, 4280, 28027, 61, 11860, 10, 2588, 8, 3056, 13, 8, ...
[ 3, 23143, 14196, 10173, 834, 295, 651, 834, 4350, 21680, 10173, 834, 14819, 7, 549, 17444, 427, 301, 23182, 4611, 3, 2, 220, 4674, 9400, 2490, 305, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
SELECT "Grand Slam" FROM table_62130 WHERE "Year" = '1987' AND "Round" = 'first round' AND "Winner" = 'ivan lendl'
What is the grand slam in 1987, when round shows first round, and Ivan Lendl won?
CREATE TABLE table_62130 ( "Year" real, "Grand Slam" text, "Round" text, "Winner" text, "Loser" text )
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 4056, 21448, 41, 96, 476, 2741, 121, 490, 6, 96, 4744, 727, 29291, 121, 1499, 6, 96, 448, 32, 1106, 121, 1499, 6, 96, 18455, 687, 121, 1499, 6, 96, 434, 32, 7, 49, 121, 1499,...
[ 3, 23143, 14196, 96, 4744, 727, 29291, 121, 21680, 953, 834, 4056, 21448, 549, 17444, 427, 96, 476, 2741, 121, 3274, 3, 31, 2294, 4225, 31, 3430, 96, 448, 32, 1106, 121, 3274, 3, 31, 14672, 1751, 31, 3430, 96, 18455, 687, 121, 327...
SELECT party FROM table_1341930_18 WHERE incumbent = "Edwin E. Willis"
which affiliation does edwin e. willis affiliate with
CREATE TABLE table_1341930_18 (party VARCHAR, incumbent VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2294, 1458, 834, 2606, 41, 8071, 584, 4280, 28027, 6, 28406, 584, 4280, 28027, 61, 11860, 10, 84, 24405, 405, 3, 15, 26, 3757, 3, 15, 5, 56, 159, 8484, 28, 11801, 10, 1,...
[ 3, 23143, 14196, 1088, 21680, 953, 834, 23747, 2294, 1458, 834, 2606, 549, 17444, 427, 28406, 3274, 96, 427, 26, 3757, 262, 5, 2003, 159, 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 t1.attribute_name, t1.attribute_id FROM Attribute_Definitions AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.attribute_id = t2.attribute_id WHERE t2.attribute_value = 0
Find the name and attribute ID of the attribute definitions with attribute value 0.
CREATE TABLE Catalog_Contents_Additional_Attributes (attribute_id VARCHAR, attribute_value VARCHAR); CREATE TABLE Attribute_Definitions (attribute_name VARCHAR, attribute_id VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 22424, 834, 4302, 4669, 7, 834, 20773, 4749, 138, 834, 188, 17, 5135, 1422, 41, 144, 5135, 17, 15, 834, 23, 26, 584, 4280, 28027, 6, 15816, 834, 12097, 584, 4280, 28027, 3670, 205, 4386, 6...
[ 3, 23143, 14196, 3, 17, 5411, 144, 5135, 17, 15, 834, 4350, 6, 3, 17, 5411, 144, 5135, 17, 15, 834, 23, 26, 21680, 486, 5135, 17, 15, 834, 2962, 5582, 10872, 6157, 3, 17, 536, 3, 15355, 3162, 22424, 834, 4302, 4669, 7, 834, 20...
SELECT SUM(faculty) FROM faculty WHERE YEAR = 2002
How many faculty is there in total in the year of 2002?
CREATE TABLE faculty ( faculty INTEGER, YEAR VARCHAR )
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 6040, 41, 6040, 3, 21342, 17966, 6, 30431, 584, 4280, 28027, 3, 61, 11860, 10, 571, 186, 6040, 19, 132, 16, 792, 16, 8, 215, 13, 4407, 58, 11801, 10, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 3, 23143, 14196, 180, 6122, 599, 89, 12457, 17, 63, 61, 21680, 6040, 549, 17444, 427, 30431, 3274, 4407, 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 party FROM table_1341930_18 WHERE incumbent = "James H. Morrison"
which affiliation is james h. morrison part of
CREATE TABLE table_1341930_18 (party VARCHAR, incumbent VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2294, 1458, 834, 2606, 41, 8071, 584, 4280, 28027, 6, 28406, 584, 4280, 28027, 61, 11860, 10, 84, 24405, 19, 7620, 15, 7, 3, 107, 5, 8030, 23790, 294, 13, 11801, 10, 1, ...
[ 3, 23143, 14196, 1088, 21680, 953, 834, 23747, 2294, 1458, 834, 2606, 549, 17444, 427, 28406, 3274, 96, 683, 9, 2687, 454, 5, 12193, 106, 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 catalog_entry_name, capacity FROM Catalog_Contents WHERE price_in_dollars > 700
Find the name and capacity of products with price greater than 700 (in USD).
CREATE TABLE Catalog_Contents (catalog_entry_name VARCHAR, capacity VARCHAR, price_in_dollars INTEGER)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 22424, 834, 4302, 4669, 7, 41, 2138, 9, 2152, 834, 295, 651, 834, 4350, 584, 4280, 28027, 6, 2614, 584, 4280, 28027, 6, 594, 834, 77, 834, 26748, 7, 3, 21342, 17966, 61, 11860, 10, 2588, ...
[ 3, 23143, 14196, 10173, 834, 295, 651, 834, 4350, 6, 2614, 21680, 22424, 834, 4302, 4669, 7, 549, 17444, 427, 594, 834, 77, 834, 26748, 7, 2490, 12283, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
SELECT "Traffic direction" FROM table_56945 WHERE "Street" = '70th street'
What is the traffic direction of 70th street?
CREATE TABLE table_56945 ( "Street" text, "West" text, "East" text, "# of lanes" text, "Traffic direction" text )
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 755, 3951, 2128, 41, 96, 11500, 15, 15, 17, 121, 1499, 6, 96, 19069, 121, 1499, 6, 96, 25235, 121, 1499, 6, 96, 4663, 13, 50, 1496, 121, 1499, 6, 96, 9402, 89, 4638, 2212, 12...
[ 3, 23143, 14196, 96, 9402, 89, 4638, 2212, 121, 21680, 953, 834, 755, 3951, 2128, 549, 17444, 427, 96, 11500, 15, 15, 17, 121, 3274, 3, 31, 2518, 189, 2815, 31, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
SELECT candidates FROM table_1341973_11 WHERE first_elected = 1914
Who is the candidate that was first elected in 1914?
CREATE TABLE table_1341973_11 (candidates VARCHAR, first_elected VARCHAR)
[ 4398, 7, 10, 205, 4386, 6048, 332, 17098, 953, 834, 23747, 2294, 4552, 834, 2596, 41, 1608, 12416, 6203, 584, 4280, 28027, 6, 166, 834, 19971, 584, 4280, 28027, 61, 11860, 10, 2645, 19, 8, 4775, 24, 47, 166, 8160, 16, 24725, 58, 1...
[ 3, 23143, 14196, 4341, 21680, 953, 834, 23747, 2294, 4552, 834, 2596, 549, 17444, 427, 166, 834, 19971, 3274, 24725, 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, ...