answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT written_by FROM table_23916272_6 WHERE original_air_date = "March 1, 2004"
Who was the writer for the episode originally airing on March 1, 2004?
CREATE TABLE table_23916272_6 (written_by VARCHAR, original_air_date VARCHAR)
SELECT trainer FROM table_24915874_1 WHERE jockey = "Luke Nolen"
Who was the trainer when the jockey was Luke Nolen?
CREATE TABLE table_24915874_1 (trainer VARCHAR, jockey VARCHAR)
SELECT COUNT("Score") FROM table_77402 WHERE "Country" = 'united states' AND "Player" = 'lee trevino'
What is the total number of Score, when Country is 'United States', and when Player is 'Lee Trevino'?
CREATE TABLE table_77402 ( "Place" text, "Player" text, "Country" text, "Score" real, "To par" text )
SELECT title FROM table_23916272_6 WHERE season__number = 8
List the title for the season episode number of 8.
CREATE TABLE table_23916272_6 (title VARCHAR, season__number VARCHAR)
SELECT placing FROM table_24915874_1 WHERE jockey = "Damien Oliver"
What was the placing when the jockey was Damien Oliver?
CREATE TABLE table_24915874_1 (placing VARCHAR, jockey VARCHAR)
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BALTIMORE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADELPHIA' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code
i would like to see the flights from BALTIMORE to PHILADELPHIA please
CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, restriction_code text, one_direction_cost int, round_trip_cost int, round_trip_required varchar ) 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 airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE compartment_class ( compartment varchar, class_type varchar ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE flight ( aircraft_code_sequence text, airline_code varchar, airline_flight text, arrival_time int, connections int, departure_time int, dual_carrier text, flight_days text, flight_id int, flight_number int, from_airport varchar, meal_code text, stops int, time_elapsed int, to_airport varchar ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE airport ( airport_code varchar, airport_name text, airport_location text, state_code varchar, country_name varchar, time_zone_code varchar, minimum_connect_time int ) CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE fare_basis ( fare_basis_code text, booking_class text, class_type text, premium text, economy text, discounted text, night text, season text, basis_days text ) CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, maximum_stay int, application text, no_discounts text ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE aircraft ( aircraft_code varchar, aircraft_description varchar, manufacturer varchar, basic_type varchar, engines int, propulsion varchar, wide_body varchar, wing_span int, length int, weight int, capacity int, pay_load int, cruising_speed int, range_miles int, pressurized varchar ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar )
SELECT directed_by FROM table_23916272_6 WHERE original_air_date = "September 29, 2003"
Who was the director for the episode originally airing September 29, 2003?
CREATE TABLE table_23916272_6 (directed_by VARCHAR, original_air_date VARCHAR)
SELECT placing FROM table_24915874_1 WHERE weight__kg_ = "58.0"
What was the placing when the weight in kg was 58.0?
CREATE TABLE table_24915874_1 (placing VARCHAR, weight__kg_ VARCHAR)
SELECT Id, Score FROM Posts WHERE Score >= 10 AND (Title LIKE '%date%' OR Title LIKE '%Date%' OR Title LIKE '%time%' OR Title LIKE '%Time%') AND Tags LIKE '%python%' ORDER BY CreationDate DESC LIMIT 100
mine old date and time.
CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDate time, ApprovalModeratorId number, DeactivationDate time, DeactivationModeratorId number ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE ReviewTaskStates ( 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 number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE PostTypes ( Id number, Name text )
SELECT original_air_date FROM table_23937219_2 WHERE written_by = "Harry Hannigan" AND directed_by = "Adam Weissman"
Name the original air date for harry hannigan directed by adam weissman
CREATE TABLE table_23937219_2 (original_air_date VARCHAR, written_by VARCHAR, directed_by VARCHAR)
SELECT horse FROM table_24915874_1 WHERE jockey = "Peter Wells"
Who was the horse when the jockey was Peter Wells?
CREATE TABLE table_24915874_1 (horse VARCHAR, jockey VARCHAR)
SELECT "Score" FROM table_21198 WHERE "Game" = '15'
What was the final score in game 15?
CREATE TABLE table_21198 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
SELECT COUNT(directed_by) FROM table_23937219_3 WHERE season__number = 7
How many people directed episode 7 In the season?
CREATE TABLE table_23937219_3 (directed_by VARCHAR, season__number VARCHAR)
SELECT weight__kg_ FROM table_24915874_1 WHERE horse = "Alcopop"
What was the weight in kg when the horse was Alcopop?
CREATE TABLE table_24915874_1 (weight__kg_ VARCHAR, horse VARCHAR)
SELECT Name, COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_id = T2.technician_id GROUP BY T2.Name
What are the names of the technicians and how many machines are they assigned to repair.
CREATE TABLE repair ( repair_ID int, name text, Launch_Date text, Notes text ) CREATE TABLE repair_assignment ( technician_id int, repair_ID int, Machine_ID int ) CREATE TABLE machine ( Machine_ID int, Making_Year int, Class text, Team text, Machine_series text, value_points real, quality_rank int ) CREATE TABLE technician ( technician_id real, Name text, Team text, Starting_Year real, Age int )
SELECT COUNT(original_air_date) FROM table_23937219_3 WHERE prod_code = 212
How many original air dates were there for the episode with production code 212?
CREATE TABLE table_23937219_3 (original_air_date VARCHAR, prod_code VARCHAR)
SELECT COUNT(week) FROM table_24918268_2 WHERE opponent = "Barcelona Dragons"
How many weeks are teams playing agains the Barcelona dragons?
CREATE TABLE table_24918268_2 (week VARCHAR, opponent VARCHAR)
SELECT MIN("Grid") FROM table_8761 WHERE "Laps" < '22' AND "Bike" = 'honda cbr1000rr' AND "Rider" = 'luca morelli'
Which Grid has Laps smaller than 22, and a Bike of honda cbr1000rr, and a Rider of luca morelli?
CREATE TABLE table_8761 ( "Rider" text, "Bike" text, "Laps" real, "Time" text, "Grid" real )
SELECT MIN(prod_code) FROM table_23937219_3 WHERE series__number = 31
What is the production code for episode 31 in the series?
CREATE TABLE table_23937219_3 (prod_code INTEGER, series__number VARCHAR)
SELECT final_score FROM table_24918268_2 WHERE kickoff = "6:00 p.m."
What was the score for the game that kicked off at 6:00 p.m.?
CREATE TABLE table_24918268_2 (final_score VARCHAR, kickoff VARCHAR)
SELECT number FROM table_name_54 WHERE acquisition_via = "rookie draft" AND school_club_team = "cal state fullerton"
What number has an acquisition via the Rookie Draft, and is part of a School/club team at Cal State Fullerton?
CREATE TABLE table_name_54 ( number VARCHAR, acquisition_via VARCHAR, school_club_team VARCHAR )
SELECT COUNT(season) FROM table_23927423_4 WHERE relegated_from_league = "Barking Birmingham & Solihull Stourbridge"
How many seasons did Barking Birmingham & Solihull Stourbridge were relegated from league?
CREATE TABLE table_23927423_4 (season VARCHAR, relegated_from_league VARCHAR)
SELECT opponent FROM table_24918268_2 WHERE date = "Sunday, June 9"
Who are the opponents for games on Sunday, June 9?
CREATE TABLE table_24918268_2 (opponent VARCHAR, date VARCHAR)
SELECT HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%'
For all employees who have the letters D or S in their first name, a bar chart shows the distribution of hire_date and the average of manager_id bin hire_date by time.
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE 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 jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), SALARY decimal(8,2), COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) )
SELECT relegated_to_league FROM table_23927423_4 WHERE relegated_from_league = "Barking Birmingham & Solihull Stourbridge"
Who was relegated to league if Barking Birmingham & Solihull Stourbridge were relegated from league?
CREATE TABLE table_23927423_4 (relegated_to_league VARCHAR, relegated_from_league VARCHAR)
SELECT fat__g_ FROM table_2493389_1 WHERE protein__g_ = "4" AND calories__1_tbsp__ = 80
Name the fat for protein being 4 and calories 80
CREATE TABLE table_2493389_1 (fat__g_ VARCHAR, protein__g_ VARCHAR, calories__1_tbsp__ VARCHAR)
SELECT "Club" FROM table_60066 WHERE "Head Coach" = 'manuel fernandes'
What club does Manuel Fernandes coach?
CREATE TABLE table_60066 ( "Club" text, "Head Coach" text, "City" text, "Stadium" text, "2003\u20132004 season" text )
SELECT MIN(teams) FROM table_23927423_4
How many were the minimum team that participated in the league?
CREATE TABLE table_23927423_4 (teams INTEGER)
SELECT COUNT(butter) FROM table_2493389_1 WHERE protein__g_ = "3"
Name the number of butters for 3 protein
CREATE TABLE table_2493389_1 (butter VARCHAR, protein__g_ VARCHAR)
SELECT t1.drug FROM (SELECT prescriptions.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age BETWEEN 30 AND 39) GROUP BY prescriptions.drug) AS t1 WHERE t1.c1 <= 5
among the patients with age 30s , what was the top five prescribed drugs?
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime time ) 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 d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text )
SELECT MAX(teams) FROM table_23927423_4 WHERE relegated_to_league = "Cornish All Blacks Pertemps Bees"
How many teams participated (maximum) when Cornish All Blacks Pertemps Bees were relegated to the league?
CREATE TABLE table_23927423_4 (teams INTEGER, relegated_to_league VARCHAR)
SELECT calcium__mg_ FROM table_2493389_1 WHERE fat__g_ = "6.5"
Name the calcium for fat being 6.5
CREATE TABLE table_2493389_1 (calcium__mg_ VARCHAR, fat__g_ VARCHAR)
SELECT Id, DisplayName, EmailHash FROM Users WHERE EmailHash = '5e7308ff7122df9ebbee7b52956a2ea3' LIMIT 50
Get email MD5 hashes for StackExchange users.
CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDate time, ApprovalModeratorId number, DeactivationDate time, DeactivationModeratorId number ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number )
SELECT promoted_to_league FROM table_23927423_4 WHERE relegated_to_league = "Coventry"
Who was promoted to the league when Coventry was relegated to the league?
CREATE TABLE table_23927423_4 (promoted_to_league VARCHAR, relegated_to_league VARCHAR)
SELECT COUNT(county_ies__)[a_] FROM table_249512_2 WHERE place_name = "Macedonia"
How many counties have a place name of Macedonia?
CREATE TABLE table_249512_2 (a_ VARCHAR, county_ies__ VARCHAR, place_name VARCHAR)
SELECT COUNT(*) > 0 FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'venous cath nec') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 16088) AND DATETIME(procedures_icd.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year')
this year patient 16088 had undergone any venous cath nec procedure?
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) 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 d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime time ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text )
SELECT COUNT(promoted_from_league) FROM table_23927423_4 WHERE relegated_to_league = "Esher"
How many were promoted from the league when Esher was relegated to the league?
CREATE TABLE table_23927423_4 (promoted_from_league VARCHAR, relegated_to_league VARCHAR)
SELECT COUNT(land_area__2010_) FROM table_249512_2 WHERE place_name = "Ballplay"
What is the number of land areas that have a place name of Ballplay?
CREATE TABLE table_249512_2 (land_area__2010_ VARCHAR, place_name VARCHAR)
SELECT MAX("Blank Ends") FROM table_73254 WHERE "Locale" = 'Prince Edward Island'
What is the total of blank ends at Prince Edward Island?
CREATE TABLE table_73254 ( "Locale" text, "Skip" text, "W" real, "L" real, "PF" real, "PA" real, "Ends Won" real, "Ends Lost" real, "Blank Ends" real, "Stolen Ends" real, "Shot Pct." real )
SELECT MIN(08 AS _09_gp_jgp_2nd) FROM table_23938357_7 WHERE ws_points = 3197
What is the smallest 08-09 GP/JGP 2nd value when WS points equals 3197?
CREATE TABLE table_23938357_7 (ws_points VARCHAR)
SELECT MIN(population__2010_) FROM table_249512_2 WHERE place_name = "Edgewater"
What is the minimum 2010 population of Edgewater?
CREATE TABLE table_249512_2 (population__2010_ INTEGER, place_name VARCHAR)
SELECT "Result" FROM table_7829 WHERE "Date" = 'november 29, 1959'
What was the game result on November 29, 1959?
CREATE TABLE table_7829 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
SELECT MIN(07 AS _08_oi_best) FROM table_23938357_7
What is the smallest 07-08 oi best value?
CREATE TABLE table_23938357_7 (Id VARCHAR)
SELECT MIN(09 AS _10_i_o_best) FROM table_24990183_5
What is the lowest 09-10 i/o best?
CREATE TABLE table_24990183_5 (Id VARCHAR)
SELECT CITY, COUNT(CITY) FROM locations GROUP BY CITY ORDER BY CITY
Give me a bar chart to compare the number of departments located in different cities, and rank in ascending by the x-axis.
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), COUNTRY_ID varchar(2) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), SALARY decimal(8,2), COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) )
SELECT COUNT(partner) FROM table_23944006_4 WHERE score = "5-7, 6-7 (5-7)"
Name the number of partners for 5-7, 6-7 (5-7)
CREATE TABLE table_23944006_4 (partner VARCHAR, score VARCHAR)
SELECT country FROM table_24990183_5 WHERE name = "Akiko Suzuki"
Which country is akiko suzuki from?
CREATE TABLE table_24990183_5 (country VARCHAR, name VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN" AND demographic.days_stay > "7"
provide the number of patients whose ethnicity is black/cape verdean and days of hospital stay is greater than 7?
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location text, discharge_location text, diagnosis text, dod text, dob_year text, dod_year text, admittime text, dischtime text, admityear text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text )
SELECT surface FROM table_23944006_4 WHERE opponents = "Cara Black Rennae Stubbs"
Name the surface for cara black rennae stubbs
CREATE TABLE table_23944006_4 (surface VARCHAR, opponents VARCHAR)
SELECT 08 AS _09_i_o_best FROM table_24990183_5 WHERE ws_points = 1386
What was the 08-09 i/o best of the player with 1386 points?
CREATE TABLE table_24990183_5 (ws_points VARCHAR)
SELECT COUNT("Date") FROM table_50731 WHERE "Boiler type" = 'forward topfeed' AND "Built at" = 'crewe' AND "Lot No." < '187'
What year is the date when the boiler type is forward topfeed, the built at is Crewe, and lot number is less than 187?
CREATE TABLE table_50731 ( "BR No." text, "Lot No." real, "Date" real, "Built at" text, "Boiler type" text )
SELECT score FROM table_23944006_4 WHERE championship = "San Diego"
Name the score for san diego
CREATE TABLE table_23944006_4 (score VARCHAR, championship VARCHAR)
SELECT COUNT(09 AS _10_oi_best) FROM table_24990183_5 WHERE ws_points = 949
What was the 09-10 oi best of the player with 949 points?
CREATE TABLE table_24990183_5 (ws_points VARCHAR)
SELECT COUNT("Height") FROM table_25063 WHERE "High School" = 'Bayside'
How many height entries are there for players from bayside high school?
CREATE TABLE table_25063 ( "Name" text, "#" real, "Position" text, "Height" text, "Weight" real, "Year" text, "Home Town" text, "High School" text )
SELECT outcome FROM table_23944006_4 WHERE championship = "Zurich"
Name the outcome for zurich
CREATE TABLE table_23944006_4 (outcome VARCHAR, championship VARCHAR)
SELECT name FROM table_24990183_5 WHERE country = "Georgia"
Who was the player from georgia?
CREATE TABLE table_24990183_5 (name VARCHAR, country VARCHAR)
SELECT "network name" FROM table_204_796 ORDER BY "affiliates" DESC LIMIT 1
who has the most number of affiliates ?
CREATE TABLE table_204_796 ( id number, "network name" text, "flagship" text, "programming type" text, "owner" text, "affiliates" number )
SELECT COUNT(surface) FROM table_23944006_4 WHERE score = "4-6, 2-6"
Name the number of surfaces for 4-6, 2-6
CREATE TABLE table_23944006_4 (surface VARCHAR, score VARCHAR)
SELECT MAX(minutes) FROM table_25016555_5 WHERE player = "Tracy Reid"
When tracy reid is the player what is the highest amount of minutes?
CREATE TABLE table_25016555_5 (minutes INTEGER, player VARCHAR)
SELECT Category, COUNT(*) FROM music_festival GROUP BY Category ORDER BY Category DESC
Return the number of music festivals of each category in a bar chart, and could you order x axis in descending order?
CREATE TABLE artist ( Artist_ID int, Artist text, Age int, Famous_Title text, Famous_Release_date text ) CREATE TABLE volume ( Volume_ID int, Volume_Issue text, Issue_Date text, Weeks_on_Top real, Song text, Artist_ID int ) CREATE TABLE music_festival ( ID int, Music_Festival text, Date_of_ceremony text, Category text, Volume int, Result text )
SELECT MIN(08 AS _09_i_o_best) FROM table_23938357_6
What is the least 08-09 i/o best?
CREATE TABLE table_23938357_6 (Id VARCHAR)
SELECT MIN(assists) FROM table_25016555_5
What is the lowest overall amount of assists?
CREATE TABLE table_25016555_5 (assists INTEGER)
SELECT player FROM table_name_63 WHERE to_par = 12 AND country = "united states"
Which united states player had a To par of 12?
CREATE TABLE table_name_63 ( player VARCHAR, to_par VARCHAR, country VARCHAR )
SELECT COUNT(rank) FROM table_23938357_6 WHERE name = "Keauna McLaughlin / Rockne Brubaker"
How many times is keauna mclaughlin / rockne brubaker ranked?
CREATE TABLE table_23938357_6 (rank VARCHAR, name VARCHAR)
SELECT MIN(minutes) FROM table_25016555_5 WHERE player = "Sandy Brondello"
When sandy brondello is the player what is the lowest amount of minutes?
CREATE TABLE table_25016555_5 (minutes INTEGER, player VARCHAR)
SELECT COUNT(*) FROM table_203_651 WHERE "position" = 2 AND "competition" = 'european championships'
what are the number of times she came in 2nd position for the european championships ?
CREATE TABLE table_203_651 ( id number, "year" number, "competition" text, "venue" text, "position" text, "notes" text )
SELECT sprint_classification FROM table_23944514_15 WHERE aggressive_rider = "Michael Barry"
Name the sprint classification for michael barry
CREATE TABLE table_23944514_15 (sprint_classification VARCHAR, aggressive_rider VARCHAR)
SELECT COUNT(blocks) FROM table_25016555_5 WHERE assists = 21
When 21 is the number of assists how many sets of blocks are there?
CREATE TABLE table_25016555_5 (blocks VARCHAR, assists VARCHAR)
SELECT MIN("Round") FROM table_33995 WHERE "Pick #" = '12' AND "Position" = 'linebacker'
Which is the lowest round to have a pick of 12 and position of linebacker?
CREATE TABLE table_33995 ( "Round" real, "Pick #" real, "Overall" real, "Name" text, "Position" text, "College" text )
SELECT youth_classification FROM table_23944514_15 WHERE aggressive_rider = "Michael Barry"
Name the youth classification for michael barry
CREATE TABLE table_23944514_15 (youth_classification VARCHAR, aggressive_rider VARCHAR)
SELECT candidates FROM table_25030512_12 WHERE district = "Florida 7" AND first_elected = "2010"
When 2010 is the first elected and Florida 7 is the district who are the candidates?
CREATE TABLE table_25030512_12 (candidates VARCHAR, district VARCHAR, first_elected VARCHAR)
SELECT Calendar_Date, COUNT(Calendar_Date) FROM Ref_Calendar
Show all calendar dates and bin by year in a line chart.
CREATE TABLE Documents_to_be_Destroyed ( Document_ID INTEGER, Destruction_Authorised_by_Employee_ID INTEGER, Destroyed_by_Employee_ID INTEGER, Planned_Destruction_Date DATETIME, Actual_Destruction_Date DATETIME, Other_Details VARCHAR(255) ) CREATE TABLE Employees ( Employee_ID INTEGER, Role_Code CHAR(15), Employee_Name VARCHAR(255), Gender_MFU CHAR(1), Date_of_Birth DATETIME, Other_Details VARCHAR(255) ) CREATE TABLE Ref_Document_Types ( Document_Type_Code CHAR(15), Document_Type_Name VARCHAR(255), Document_Type_Description VARCHAR(255) ) CREATE TABLE Ref_Locations ( Location_Code CHAR(15), Location_Name VARCHAR(255), Location_Description VARCHAR(255) ) CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME, Day_Number INTEGER ) CREATE TABLE Roles ( Role_Code CHAR(15), Role_Name VARCHAR(255), Role_Description VARCHAR(255) ) CREATE TABLE All_Documents ( Document_ID INTEGER, Date_Stored DATETIME, Document_Type_Code CHAR(15), Document_Name CHAR(255), Document_Description CHAR(255), Other_Details VARCHAR(255) ) CREATE TABLE Document_Locations ( Document_ID INTEGER, Location_Code CHAR(15), Date_in_Location_From DATETIME, Date_in_Locaton_To DATETIME )
SELECT mountains_classification FROM table_23944514_15 WHERE aggressive_rider = "Bradley White"
Name the mountains classification for bradley white
CREATE TABLE table_23944514_15 (mountains_classification VARCHAR, aggressive_rider VARCHAR)
SELECT party FROM table_25030512_12 WHERE incumbent = "Bill Young Redistricted from the 10th district"
When bill young redistricted from the 10th district is the incumbent what is the party?
CREATE TABLE table_25030512_12 (party VARCHAR, incumbent VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "M" AND diagnoses.short_title = "Ath ext ntv art gngrene"
count the number of patients whose gender is m and diagnoses short title is ath ext ntv art gngrene?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location text, discharge_location text, diagnosis text, dod text, dob_year text, dod_year text, admittime text, dischtime text, admityear text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text )
SELECT max_downstream_throughput___mbit_s__ FROM table_2394927_1 WHERE profile = "8b"
List all mbit/s with profiles of 8b.
CREATE TABLE table_2394927_1 (max_downstream_throughput___mbit_s__ VARCHAR, profile VARCHAR)
SELECT party FROM table_25030512_12 WHERE candidates = "Dennis Ross (R) unopposed"
When dennis ross (r) unopposed is the candidate what is the party?
CREATE TABLE table_25030512_12 (party VARCHAR, candidates VARCHAR)
SELECT "Streak" FROM table_12513 WHERE "Game" > '8' AND "Date" = 'nov 22'
What was the streak for the game after 8 on Nov 22?
CREATE TABLE table_12513 ( "Game" real, "Date" text, "Opponent" text, "Result" text, "Raiders points" real, "Opponents" real, "First Downs" real, "Record" text, "Streak" text, "Attendance" real )
SELECT bandwidth___mhz__ FROM table_2394927_1 WHERE profile = "8b"
What are the mhz when the profile is 8b?
CREATE TABLE table_2394927_1 (bandwidth___mhz__ VARCHAR, profile VARCHAR)
SELECT candidates FROM table_25030512_12 WHERE first_elected = "None (New seat)"
When none (new seat) is the first elected who are the candidates?
CREATE TABLE table_25030512_12 (candidates VARCHAR, first_elected VARCHAR)
SELECT COUNT(*) FROM table_203_102 WHERE "place" = 'beijing'
how many records were set in beijing ?
CREATE TABLE table_203_102 ( id number, "event" text, "performance" text, "athlete" text, "nation" text, "place" text, "date" text )
SELECT max_downstream_throughput___mbit_s__ FROM table_2394927_1 WHERE power___dbm__ = "+17.5"
What are the highest mbit/s when the dbm is +17.5?
CREATE TABLE table_2394927_1 (max_downstream_throughput___mbit_s__ VARCHAR, power___dbm__ VARCHAR)
SELECT viewing_figures_millions FROM table_2501754_4 WHERE prod_code = "ICEC483X"
How many millions of people watched the episode with a production code of icec483x?
CREATE TABLE table_2501754_4 (viewing_figures_millions VARCHAR, prod_code VARCHAR)
SELECT patients.gender FROM patients WHERE patients.subject_id = 55027
tell me the sex of patient 55027.
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime time ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) 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 diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time )
SELECT power___dbm__ FROM table_2394927_1 WHERE profile = "8a"
List all dbm's when profiles are 8a.
CREATE TABLE table_2394927_1 (power___dbm__ VARCHAR, profile VARCHAR)
SELECT MIN(episode__number) FROM table_2501754_4
What is the lowest episode number?
CREATE TABLE table_2501754_4 (episode__number INTEGER)
SELECT MIN(gold) FROM table_name_4 WHERE total = 37 AND rank = "1" AND bronze > 7
What nation won the fewest gold medals while being in Rank 1, with a total of 37 medals and more than 7 bronze medals?
CREATE TABLE table_name_4 ( gold INTEGER, bronze VARCHAR, total VARCHAR, rank VARCHAR )
SELECT MIN(number_of_carriers) FROM table_2394927_1
What is the lowest number of carriers?
CREATE TABLE table_2394927_1 (number_of_carriers INTEGER)
SELECT MIN(episode__number) FROM table_2501754_4 WHERE viewing_figures_millions = "6.19" AND prod_code = "ICEC487Y"
What is the lowest episode number with 6.19 million viewers and a production code of icec487y?
CREATE TABLE table_2501754_4 (episode__number INTEGER, viewing_figures_millions VARCHAR, prod_code VARCHAR)
SELECT "opponent" FROM table_203_691 WHERE "week" = 4 + 1
who would the next opponent be after week 4 ?
CREATE TABLE table_203_691 ( id number, "week" number, "date" text, "opponent" text, "result" text, "attendance" number )
SELECT directed_by FROM table_23958944_5 WHERE no_by_season = 21
Who directed episode 21?
CREATE TABLE table_23958944_5 (directed_by VARCHAR, no_by_season VARCHAR)
SELECT prod_code FROM table_2501754_3 WHERE viewing_figures_millions = "5.55"
List the production code for the episode had 5.55 million viewers?
CREATE TABLE table_2501754_3 (prod_code VARCHAR, viewing_figures_millions VARCHAR)
SELECT Category, COUNT(*) FROM book_club GROUP BY Category
Return a pie on how many books fall into each category?
CREATE TABLE book_club ( book_club_id int, Year int, Author_or_Editor text, Book_Title text, Publisher text, Category text, Result text ) CREATE TABLE culture_company ( Company_name text, Type text, Incorporated_in text, Group_Equity_Shareholding real, book_club_id text, movie_id text ) CREATE TABLE movie ( movie_id int, Title text, Year int, Director text, Budget_million real, Gross_worldwide int )
SELECT MIN(no_by_season) FROM table_23958944_5 WHERE us_viewers__in_millions_ = "10.81"
What episode was watched by 10.81 million US viewers?
CREATE TABLE table_23958944_5 (no_by_season INTEGER, us_viewers__in_millions_ VARCHAR)
SELECT original_airdate FROM table_2501754_3 WHERE prod_code = "ICEB786E"
List the 1st air date for the episode with a iceb786e production code.
CREATE TABLE table_2501754_3 (original_airdate VARCHAR, prod_code VARCHAR)
SELECT "Lead" FROM table_5596 WHERE "Left Bloc" = '8.4%'
Name the lead with left bloc of 8.4%
CREATE TABLE table_5596 ( "Date Released" text, "Institute" text, "Socialist" text, "Social Democratic" text, "Green-Communist" text, "Left Bloc" text, "People's Party" text, "Lead" text )
SELECT title FROM table_23958944_5 WHERE directed_by = "Bryan Spicer" AND written_by = "Terence Paul Winter"
What episode is directed by Bryan Spicer and written by Terence Paul Winter?
CREATE TABLE table_23958944_5 (title VARCHAR, directed_by VARCHAR, written_by VARCHAR)
SELECT party FROM table_25030512_24 WHERE first_elected = "1998"
Name the party for 1998 first elected
CREATE TABLE table_25030512_24 (party VARCHAR, first_elected VARCHAR)
SELECT "Visitor" FROM table_9840 WHERE "Date" = 'april 2'
Who was the visitor on April 2?
CREATE TABLE table_9840 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Decision" text, "Attendance" real, "Record" text )
SELECT no_by_series FROM table_23958944_6 WHERE no_by_season = 19
Name the number of series for 19
CREATE TABLE table_23958944_6 (no_by_series VARCHAR, no_by_season VARCHAR)