answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT COUNT(winnings) FROM table_2597876_2 WHERE avg_start = "19.0" | How many values for winnings correspond to average start of 19.0? | CREATE TABLE table_2597876_2 (
winnings VARCHAR,
avg_start VARCHAR
) |
SELECT loss FROM table_name_91 WHERE attendance = "9,065" | What was the loss of the Mariners game that had an attendance of 9,065? | CREATE TABLE table_name_91 (loss VARCHAR, attendance VARCHAR) |
SELECT COUNT(title) FROM table_2156758_4 WHERE written_by = "Don Shank and Genndy Tartakovsky" | How many titles were written by Don Shank and Genndy Tartakovsky? | CREATE TABLE table_2156758_4 (title VARCHAR, written_by VARCHAR) |
SELECT "Opponents" FROM table_61221 WHERE "Date" = 'may 3, 1982' | Who is the Opponents on May 3, 1982? | CREATE TABLE table_61221 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents" text,
"Score" text
) |
SELECT opponent FROM table_name_49 WHERE attendance = "7,893" | Who was the Mariners opponent at the game attended by 7,893? | CREATE TABLE table_name_49 (opponent VARCHAR, attendance VARCHAR) |
SELECT mens_3rd_xi FROM table_21576644_2 WHERE ladies_1st_xi = "3rd, Sedgemoor Division 1" | When 3rd, sedgemoor division 1 is the ladies 1st xi what is the mens 3rd xi? | CREATE TABLE table_21576644_2 (mens_3rd_xi VARCHAR, ladies_1st_xi VARCHAR) |
SELECT MAX("Founded") FROM table_17220 WHERE "Enrollment" = '3584' | If the enrollment is 3584, what's the largest founded? | CREATE TABLE table_17220 (
"Institution" text,
"Location" text,
"Founded" real,
"Type" text,
"Enrollment" real,
"Nickname" text,
"Joined" real
) |
SELECT surface FROM table_name_88 WHERE tournament = "aptos" | What is the tournament surface at Aptos? | CREATE TABLE table_name_88 (surface VARCHAR, tournament VARCHAR) |
SELECT ladies_1st_xi FROM table_21576644_2 WHERE mens_2nd_xi = "10th, South West District 1" | When 10th, south west district 1 is the mens 2nd xi what is the ladies 1st xi? | CREATE TABLE table_21576644_2 (ladies_1st_xi VARCHAR, mens_2nd_xi VARCHAR) |
SELECT "Player" FROM table_52098 WHERE "Hometown" = 'queens, ny' | Which player is from Queens, NY? | CREATE TABLE table_52098 (
"Year" text,
"Player" text,
"School" text,
"Hometown" text,
"College" text
) |
SELECT score FROM table_name_96 WHERE opponent_in_the_final = "paul goldstein" | What was the final score of the Paul Goldstein match? | CREATE TABLE table_name_96 (score VARCHAR, opponent_in_the_final VARCHAR) |
SELECT season FROM table_21576644_2 WHERE mens_2nd_xi = "5th, South Western District 2" | When 5th, south western district 2 is the mens 2nd xi what is the season? | CREATE TABLE table_21576644_2 (season VARCHAR, mens_2nd_xi VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Norml pressure hydroceph" AND lab.fluid = "Urine" | how many patients have been diagnosed with short title norml pressure hydroceph anfd have had a urine lab test? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) |
SELECT opponent_in_the_final FROM table_name_69 WHERE date = "november 23, 1998" | Who played the final match on November 23, 1998? | CREATE TABLE table_name_69 (opponent_in_the_final VARCHAR, date VARCHAR) |
SELECT mens_2nd_xi FROM table_21576644_2 WHERE mens_1st_xi = "6th, South Division 2" | When 6th, south division 2 is the mens 1st xi what is the mens 2nd xi? | CREATE TABLE table_21576644_2 (mens_2nd_xi VARCHAR, mens_1st_xi VARCHAR) |
SELECT SUM("2nd leg" + "2nd leg") FROM table_204_405 | what is the total points scored in the second round by all teams ? | CREATE TABLE table_204_405 (
id number,
"team 1" text,
"agg." text,
"team 2" text,
"1st leg" text,
"2nd leg" text
) |
SELECT date FROM table_name_69 WHERE opponent_in_the_final = "paul goldstein" | What date did Paul Goldstein play the final? | CREATE TABLE table_name_69 (date VARCHAR, opponent_in_the_final VARCHAR) |
SELECT stage FROM table_21578303_2 WHERE name = "Kourdali" | Which stage has kourdali as the name? | CREATE TABLE table_21578303_2 (stage VARCHAR, name VARCHAR) |
SELECT * FROM Posts WHERE Posts.ViewCount > 24231 AND Posts.ViewCount < 30580 | Assignment 1 - Step 8: Data File 5. | CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress 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 FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskStates (
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 Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
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 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 ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId 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 PostTags (
PostId number,
TagId number
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange 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 PostTypes (
Id number,
Name text
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description 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
) |
SELECT surface FROM table_name_83 WHERE opponent_in_the_final = "takao suzuki" | What was the surface type at Takao Suzuki? | CREATE TABLE table_name_83 (surface VARCHAR, opponent_in_the_final VARCHAR) |
SELECT stage FROM table_21578303_2 WHERE time__eet_ = "15:17" | Which stage has 15:17 as time? | CREATE TABLE table_21578303_2 (stage VARCHAR, time__eet_ VARCHAR) |
SELECT player_id FROM salary WHERE year = "2015" ORDER BY salary DESC LIMIT 1 | Who is the player had the highest salary in 2015? | CREATE TABLE hall_of_fame (
player_id text,
yearid number,
votedby text,
ballots text,
needed text,
votes text,
inducted text,
category text,
needed_note text
)
CREATE TABLE salary (
year number,
team_id text,
league_id text,
player_id text,
salary number
)
CREATE TABLE player (
player_id text,
birth_year text,
birth_month text,
birth_day text,
birth_country text,
birth_state text,
birth_city text,
death_year text,
death_month text,
death_day text,
death_country text,
death_state text,
death_city text,
name_first text,
name_last text,
name_given text,
weight text
)
CREATE TABLE player_award (
player_id text,
award_id text,
year number,
league_id text,
tie text,
notes text
)
CREATE TABLE player_award_vote (
award_id text,
year number,
league_id text,
player_id text,
points_won number,
points_max number,
votes_first text
) |
SELECT score FROM table_name_95 WHERE date = "september 11, 2006" | What were the scores on September 11, 2006? | CREATE TABLE table_name_95 (score VARCHAR, date VARCHAR) |
SELECT time FROM table_21578303_2 WHERE time__eet_ = "10:46" | What is the time when time is 10:46? | CREATE TABLE table_21578303_2 (time VARCHAR, time__eet_ VARCHAR) |
SELECT final_place FROM table_23819979_3 WHERE last_match = "July 25, 2009" | Name the final place for july 25, 2009 | CREATE TABLE table_23819979_3 (
final_place VARCHAR,
last_match VARCHAR
) |
SELECT loss FROM table_name_83 WHERE date = "may 9" | Who did they lose to on may 9? | CREATE TABLE table_name_83 (loss VARCHAR, date VARCHAR) |
SELECT time FROM table_21578303_2 WHERE stage = "SS12" | What is the time when ss12 is stage? | CREATE TABLE table_21578303_2 (time VARCHAR, stage VARCHAR) |
SELECT "Result" FROM table_12001 WHERE "Opponent" = 'everton' | What is the result against everton? | CREATE TABLE table_12001 (
"Round" text,
"Date" text,
"Opponent" text,
"Venue" text,
"Result" text,
"Attendance" real
) |
SELECT COUNT(grid) FROM table_name_27 WHERE driver = "pedro de la rosa" | What is Pedro De La Rosa's total number of Grid? | CREATE TABLE table_name_27 (grid VARCHAR, driver VARCHAR) |
SELECT state__class_ FROM table_2159506_3 WHERE reason_for_change = "Resigned November 3, 1964" | Name the state class for resigned november 3, 1964 | CREATE TABLE table_2159506_3 (state__class_ VARCHAR, reason_for_change VARCHAR) |
SELECT COUNT(year) FROM table_name_35 WHERE team = "aston martin racing" AND pos = "6th" | In what year did the team of aston martin racing have a position of 6th? | CREATE TABLE table_name_35 (
year VARCHAR,
team VARCHAR,
pos VARCHAR
) |
SELECT constructor FROM table_name_91 WHERE time_retired = "+37.311" | Which constructor has a Time/Retired of +37.311? | CREATE TABLE table_name_91 (constructor VARCHAR, time_retired VARCHAR) |
SELECT COUNT(champion) FROM table_21584646_10 WHERE runner_up = "Stefan Edberg" | How many champions are shown for the runner-up of stefan edberg? | CREATE TABLE table_21584646_10 (champion VARCHAR, runner_up VARCHAR) |
SELECT MIN("CDR*") FROM table_59306 WHERE "Difference" = '112' | What is the lowest CDR that has 112 as the difference? | CREATE TABLE table_59306 (
"Periodo" text,
"Births" real,
"Deaths" real,
"Difference" real,
"CBR*" real,
"CDR*" real,
"IMR*" real,
"TFR*" real
) |
SELECT time_retired FROM table_name_38 WHERE driver = "mika häkkinen" | What is the time/retired for mika häkkinen | CREATE TABLE table_name_38 (time_retired VARCHAR, driver VARCHAR) |
SELECT week_of FROM table_21584646_10 WHERE semifinalists = "Stefan Edberg Anders Järryd" AND champion = "John McEnroe 7–6, 6–3" | What week was stefan edberg anders järryd was semifinalist and champion is john mcenroe 7–6, 6–3? | CREATE TABLE table_21584646_10 (week_of VARCHAR, semifinalists VARCHAR, champion VARCHAR) |
SELECT COUNT(nationality) FROM table_16494599_10 WHERE player = "Casey Jacobsen" | How many nationalities does athlete Casey Jacobsen have? | CREATE TABLE table_16494599_10 (
nationality VARCHAR,
player VARCHAR
) |
SELECT title FROM table_name_68 WHERE audience = "4.629.000" | Which title had an audience of 4.629.000? | CREATE TABLE table_name_68 (title VARCHAR, audience VARCHAR) |
SELECT runner_up FROM table_21584646_10 WHERE champion = "John McEnroe 6–2, 6–3" | Who is the runner up for the champion of john mcenroe 6–2, 6–3? | CREATE TABLE table_21584646_10 (runner_up VARCHAR, champion VARCHAR) |
SELECT SUM("Viewers (millions)") FROM table_54635 WHERE "Episode" = 'the summer house' | How many total viewers for 'the summer house'? | CREATE TABLE table_54635 (
"Episode" text,
"Air Date" text,
"Timeslot (EST)" text,
"Rating" real,
"Share" text,
"18\u201349 Rating" text,
"Viewers (millions)" real,
"Rank" text
) |
SELECT audience FROM table_name_36 WHERE episode = "21" | What was the audience for Episode 21? | CREATE TABLE table_name_36 (audience VARCHAR, episode VARCHAR) |
SELECT quarterfinalists FROM table_21584646_10 WHERE runner_up = "Mike De Palmer Gary Donnelly" | Who were the quarterfinalists for the runner-ups of mike de palmer gary donnelly? | CREATE TABLE table_21584646_10 (quarterfinalists VARCHAR, runner_up VARCHAR) |
SELECT COUNT(grid) FROM table_name_60 WHERE laps = 52 | Tell me the total number of grid for laps of 52 | CREATE TABLE table_name_60 (
grid VARCHAR,
laps VARCHAR
) |
SELECT share FROM table_name_82 WHERE audience = "3.944.000" | What was the share when the audience was 3.944.000? | CREATE TABLE table_name_82 (share VARCHAR, audience VARCHAR) |
SELECT quarterfinalists FROM table_21584646_10 WHERE runner_up = "Jimmy Connors" | Who are the quarterfinalists for runner-up jimmy connors? | CREATE TABLE table_21584646_10 (quarterfinalists VARCHAR, runner_up VARCHAR) |
SELECT "election" FROM table_204_690 ORDER BY "total votes" DESC LIMIT 1 | what election had the most total votes ? | CREATE TABLE table_204_690 (
id number,
"election" number,
"party name" text,
"total votes" number,
"share of votes" text,
"seats" number,
"share of seats" text,
"party leader(s)" text,
"notes" text
) |
SELECT audience FROM table_name_74 WHERE title = "mi amigo el monstruo" | What was the audience for Mi Amigo el Monstruo? | CREATE TABLE table_name_74 (audience VARCHAR, title VARCHAR) |
SELECT COUNT(week_of) FROM table_21584646_10 WHERE champion = "John McEnroe 6–2, 6–3" | How many weeks are shown for the champion of john mcenroe 6–2, 6–3? | CREATE TABLE table_21584646_10 (week_of VARCHAR, champion VARCHAR) |
SELECT "Manufacturer" FROM table_45610 WHERE "Rider" = 'makoto tamada' | Who manufactures Makoto Tamada's vehicle? | CREATE TABLE table_45610 (
"Rider" text,
"Manufacturer" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) |
SELECT title FROM table_name_67 WHERE share = "19,9%" | Which title has a share of 19,9% | CREATE TABLE table_name_67 (title VARCHAR, share VARCHAR) |
SELECT reason_for_change FROM table_2159571_1 WHERE date_of_successors_formal_installation = "March 16, 1960" | What is every reason for change for the date of successors installation is March 16, 1960? | CREATE TABLE table_2159571_1 (reason_for_change VARCHAR, date_of_successors_formal_installation VARCHAR) |
SELECT "Position" FROM table_68847 WHERE "Name" = 'robert johnson' | what is the position for robert johnson? | CREATE TABLE table_68847 (
"Round" real,
"Name" text,
"Position" text,
"School" text,
"Signed" text
) |
SELECT share FROM table_name_12 WHERE audience = "4.693.000" | Which share had an audience of 4.693.000? | CREATE TABLE table_name_12 (share VARCHAR, audience VARCHAR) |
SELECT vacator FROM table_2159571_1 WHERE date_of_successors_formal_installation = "August 8, 1960" | Who is every vacator if date of successors formal installation is August 8, 1960? | CREATE TABLE table_2159571_1 (vacator VARCHAR, date_of_successors_formal_installation VARCHAR) |
SELECT COUNT("Rank") FROM table_29183 WHERE "Tues 24 Aug" = '19'' 19.83 117.110mph' | How many times was tues 24 aug 19' 19.83 117.110mph? | CREATE TABLE table_29183 (
"Rank" real,
"Rider" text,
"Sat 21 Aug" text,
"Mon 23 Aug" text,
"Tues 24 Aug" text,
"Wed 25 Aug" text,
"Thurs 26 Aug" text,
"Fri 27 Aug" text,
"Sat 29 Aug" text
) |
SELECT venue FROM table_name_24 WHERE away_team = "carlton" | what was the venue that hosted Carlton as the away team? | CREATE TABLE table_name_24 (venue VARCHAR, away_team VARCHAR) |
SELECT successor FROM table_2159571_2 WHERE district = "Washington 3rd" | Who is every successor for the Washington 3rd District? | CREATE TABLE table_2159571_2 (successor VARCHAR, district VARCHAR) |
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight WHERE ((flight.to_airport = AIRPORT_SERVICE_1.airport_code AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE') OR (flight.to_airport = AIRPORT_SERVICE_2.airport_code AND CITY_2.city_code = AIRPORT_SERVICE_2.city_code AND CITY_2.city_name = 'WASHINGTON')) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code | which flights are between BOSTON and BALTIMORE WASHINGTON | CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
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 compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
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 date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
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 code_description (
code varchar,
description text
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant 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 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 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 equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code 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 class_of_service (
booking_class varchar,
rank int,
class_description text
) |
SELECT date FROM table_name_38 WHERE away_team = "collingwood" | What was the date of the Collingwood away game? | CREATE TABLE table_name_38 (date VARCHAR, away_team VARCHAR) |
SELECT reason_for_change FROM table_2159571_2 WHERE district = "Washington 3rd" | What is every reason for change for the Washington 3rd District? | CREATE TABLE table_2159571_2 (reason_for_change VARCHAR, district VARCHAR) |
SELECT headquarters FROM table_2168295_1 WHERE population__2011_ = 3685681 | If the 2011 population is 3685681, what is the name of the headquarters? | CREATE TABLE table_2168295_1 (
headquarters VARCHAR,
population__2011_ VARCHAR
) |
SELECT player FROM table_name_54 WHERE team = "new york knicks" AND position = "c" | Who is the player that plays position c on the New York Knicks? | CREATE TABLE table_name_54 (player VARCHAR, team VARCHAR, position VARCHAR) |
SELECT vacator FROM table_2159571_2 WHERE reason_for_change = "Resigned December 31, 1959" | Who is every vacator with reason for change as resigned December 31, 1959? | CREATE TABLE table_2159571_2 (vacator VARCHAR, reason_for_change VARCHAR) |
SELECT "Disposition of Ship" FROM table_78964 WHERE "Ship Type" = 'brig' AND "Location" = 'english channel' | For the ship that was a brig and located in the English Channel, what was the disposition of ship? | CREATE TABLE table_78964 (
"Date" text,
"Ship Name" text,
"Tonnage" text,
"Ship Type" text,
"Location" text,
"Disposition of Ship" text
) |
SELECT position FROM table_name_42 WHERE pick = "1" | What is the position of the pick 1 player? | CREATE TABLE table_name_42 (position VARCHAR, pick VARCHAR) |
SELECT district FROM table_2159537_3 WHERE date_successor_seated = "August 31, 1943" | In what district was the successor seated August 31, 1943? | CREATE TABLE table_2159537_3 (district VARCHAR, date_successor_seated VARCHAR) |
SELECT COUNT("Draws") FROM table_22447 WHERE "Scored" = '25' | How many draws occurred when 25 points were scored? | CREATE TABLE table_22447 (
"Position" real,
"Team" text,
"Played" real,
"Wins" real,
"Draws" real,
"Losses" real,
"Scored" real,
"Conceded" real,
"Points" real
) |
SELECT player FROM table_name_89 WHERE team = "fort wayne pistons" AND position = "f" | Who is the player that plays position f from Fort Wayne Pistons? | CREATE TABLE table_name_89 (player VARCHAR, team VARCHAR, position VARCHAR) |
SELECT successor FROM table_2159537_3 WHERE reason_for_change = "Died January 16, 1944" | Who was the successor for the reason for change being "died January 16, 1944? | CREATE TABLE table_2159537_3 (successor VARCHAR, reason_for_change VARCHAR) |
SELECT guest_3 FROM table_20466963_9 WHERE guest_1 = "Jim White" | On episodes where guest 1 is Jim White, who was guest 3? | CREATE TABLE table_20466963_9 (
guest_3 VARCHAR,
guest_1 VARCHAR
) |
SELECT round FROM table_name_32 WHERE college = "oregon" | Which round is the player from Oregon from? | CREATE TABLE table_name_32 (round VARCHAR, college VARCHAR) |
SELECT successor FROM table_2159537_3 WHERE district = "New York 11th" | Who was the successor in New York 11th district? | CREATE TABLE table_2159537_3 (successor VARCHAR, district VARCHAR) |
SELECT "1970 census" FROM table_204_257 WHERE "ethnicity" = 'russians' | how many russians lived in south ossetia in 1970 ? | CREATE TABLE table_204_257 (
id number,
"ethnicity" text,
"1926 census" text,
"1939 census" text,
"1959 census" text,
"1970 census" text,
"1979 census" text,
"1989 census" text,
"2007 estimate" text
) |
SELECT COUNT(goals_for) FROM table_name_37 WHERE goals_against < 56 AND games_played > 7 AND wins < 6 | How many goals for occurred when the goals against was less than 56 and games played was larger than 7 with less than 6 wins? | CREATE TABLE table_name_37 (goals_for VARCHAR, wins VARCHAR, goals_against VARCHAR, games_played VARCHAR) |
SELECT date_successor_seated FROM table_2159547_3 WHERE vacator = "James P. Buchanan (D)" | On what date was James P. Buchanan (d)'s successor seated? | CREATE TABLE table_2159547_3 (date_successor_seated VARCHAR, vacator VARCHAR) |
SELECT release_date FROM table_name_62 WHERE model_number = "c7 1.8" | What is the Release Date for Model Number c7 1.8? | CREATE TABLE table_name_62 (
release_date VARCHAR,
model_number VARCHAR
) |
SELECT MIN(wins) FROM table_name_93 WHERE games_played = 7 AND goals_against < 46 AND goals_for > 34 | What is the smallest number of wins with 7 games played and goals against less than 46 when goals for is more than 34? | CREATE TABLE table_name_93 (wins INTEGER, goals_for VARCHAR, games_played VARCHAR, goals_against VARCHAR) |
SELECT COUNT(vacator) FROM table_2159547_3 WHERE successor = "Dave E. Satterfield, Jr. (D)" | How many people vacated to successor Dave E. Satterfield, Jr. (d)? | CREATE TABLE table_2159547_3 (vacator VARCHAR, successor VARCHAR) |
SELECT "Report" FROM table_47218 WHERE "Home team" = 'townsville crocodiles' | What is the report corresponding to the game that had the Townsville Crocodiles as home team? | CREATE TABLE table_47218 (
"Date" text,
"Home team" text,
"Score" text,
"Away team" text,
"Venue" text,
"Box Score" text,
"Report" text
) |
SELECT AVG(ties) FROM table_name_41 WHERE goals_against < 56 AND team = "ottawa hockey club" AND goals_for > 47 | What is the average number of ties when goals against is less than 56 for Ottawa Hockey Club and the goals for is more than 47? | CREATE TABLE table_name_41 (ties INTEGER, goals_for VARCHAR, goals_against VARCHAR, team VARCHAR) |
SELECT reason_for_change FROM table_2159547_3 WHERE vacator = "Robert L. Bacon (R)" | Why did Robert L. Bacon (r) vacate? | CREATE TABLE table_2159547_3 (reason_for_change VARCHAR, vacator VARCHAR) |
SELECT COUNT("stage") FROM table_204_312 WHERE "terrain" = 'stage with mountain(s)' | how many number of stages in the tour de france contain stages with mountains ? | CREATE TABLE table_204_312 (
id number,
"stage" text,
"date" text,
"route" text,
"terrain" text,
"length" text,
"winner" text
) |
SELECT COUNT(losses) FROM table_name_75 WHERE games_played < 8 AND wins < 3 | How many losses occurred with less than 8 games played and less than 3 wins? | CREATE TABLE table_name_75 (losses VARCHAR, games_played VARCHAR, wins VARCHAR) |
SELECT character FROM table_2160215_1 WHERE original_japanese = "Makio Inoue" | Makio Inoue dubbed on which character? | CREATE TABLE table_2160215_1 (character VARCHAR, original_japanese VARCHAR) |
SELECT first_name FROM customer WHERE NOT customer_id IN (SELECT customer_id FROM rental WHERE rental_date > '2005-08-23 02:06:01') | What are the first names of customers who have not rented any films after '2005-08-23 02:06:01'? | CREATE TABLE store (
store_id number,
manager_staff_id number,
address_id number,
last_update time
)
CREATE TABLE film_text (
film_id number,
title text,
description text
)
CREATE TABLE film_category (
film_id number,
category_id number,
last_update time
)
CREATE TABLE film_actor (
actor_id number,
film_id number,
last_update time
)
CREATE TABLE city (
city_id number,
city text,
country_id number,
last_update time
)
CREATE TABLE rental (
rental_id number,
rental_date time,
inventory_id number,
customer_id number,
return_date time,
staff_id number,
last_update time
)
CREATE TABLE film (
film_id number,
title text,
description text,
release_year time,
language_id number,
original_language_id number,
rental_duration number,
rental_rate number,
length number,
replacement_cost number,
rating text,
special_features text,
last_update time
)
CREATE TABLE address (
address_id number,
address text,
address2 text,
district text,
city_id number,
postal_code text,
phone text,
last_update time
)
CREATE TABLE language (
language_id number,
name text,
last_update time
)
CREATE TABLE customer (
customer_id number,
store_id number,
first_name text,
last_name text,
email text,
address_id number,
active boolean,
create_date time,
last_update time
)
CREATE TABLE payment (
payment_id number,
customer_id number,
staff_id number,
rental_id number,
amount number,
payment_date time,
last_update time
)
CREATE TABLE actor (
actor_id number,
first_name text,
last_name text,
last_update time
)
CREATE TABLE staff (
staff_id number,
first_name text,
last_name text,
address_id number,
picture others,
email text,
store_id number,
active boolean,
username text,
password text,
last_update time
)
CREATE TABLE inventory (
inventory_id number,
film_id number,
store_id number,
last_update time
)
CREATE TABLE country (
country_id number,
country text,
last_update time
)
CREATE TABLE category (
category_id number,
name text,
last_update time
) |
SELECT COUNT(goals_against) FROM table_name_65 WHERE goals_for < 48 AND ties < 0 | How many goals against were scored when the goals for is less than 48 with 0 ties? | CREATE TABLE table_name_65 (goals_against VARCHAR, goals_for VARCHAR, ties VARCHAR) |
SELECT english___manga_uk__ FROM table_2160215_1 WHERE original_japanese = "Kō Nishimura" | Who was the cast on the English (Manga UK) version if Kō Nishimura acted on the original Japanese? | CREATE TABLE table_2160215_1 (english___manga_uk__ VARCHAR, original_japanese VARCHAR) |
SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 74624) AND STRFTIME('%y', procedures_icd.charttime) = '2105' ORDER BY procedures_icd.charttime LIMIT 1 | when is the first procedure time of patient 74624 in 2105? | CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime 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 d_labitems (
row_id number,
itemid number,
label 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 outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
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_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
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 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 inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
) |
SELECT position FROM table_name_26 WHERE school_club_team_country = "valparaiso" | Name the position for the player that is from valparaiso | CREATE TABLE table_name_26 (position VARCHAR, school_club_team_country VARCHAR) |
SELECT original_japanese FROM table_2160215_1 WHERE english___manga_uk__ = "Sean Barrett" | Who was the original Japanese cast if Sean Barrett acted on the English (Manga UK) version? | CREATE TABLE table_2160215_1 (original_japanese VARCHAR, english___manga_uk__ VARCHAR) |
SELECT booking_start_date, COUNT(booking_start_date) FROM Apartment_Bookings ORDER BY COUNT(booking_start_date) | Show the number of apartment bookings in each weekday and bin booking start date by weekday with a bar chart, show how many booking start date in ascending order. | CREATE TABLE Apartment_Facilities (
apt_id INTEGER,
facility_code CHAR(15)
)
CREATE TABLE Apartment_Buildings (
building_id INTEGER,
building_short_name CHAR(15),
building_full_name VARCHAR(80),
building_description VARCHAR(255),
building_address VARCHAR(255),
building_manager VARCHAR(50),
building_phone VARCHAR(80)
)
CREATE TABLE View_Unit_Status (
apt_id INTEGER,
apt_booking_id INTEGER,
status_date DATETIME,
available_yn BIT
)
CREATE TABLE Guests (
guest_id INTEGER,
gender_code CHAR(1),
guest_first_name VARCHAR(80),
guest_last_name VARCHAR(80),
date_of_birth DATETIME
)
CREATE TABLE Apartments (
apt_id INTEGER,
building_id INTEGER,
apt_type_code CHAR(15),
apt_number CHAR(10),
bathroom_count INTEGER,
bedroom_count INTEGER,
room_count CHAR(5)
)
CREATE TABLE Apartment_Bookings (
apt_booking_id INTEGER,
apt_id INTEGER,
guest_id INTEGER,
booking_status_code CHAR(15),
booking_start_date DATETIME,
booking_end_date DATETIME
) |
SELECT height_in_ft FROM table_name_35 WHERE position = "guard" AND school_club_team_country = "north carolina-charlotte" | Name the height in feet for the guard from north carolina-charlotte | CREATE TABLE table_name_35 (height_in_ft VARCHAR, position VARCHAR, school_club_team_country VARCHAR) |
SELECT district FROM table_2160008_4 WHERE reason_for_change = "Died July 4, 1939" | Name the district for reason for change being died july 4, 1939 | CREATE TABLE table_2160008_4 (district VARCHAR, reason_for_change VARCHAR) |
SELECT "result" FROM table_204_157 WHERE "date" = '09/28/1946' | what is the combined result on 9/28 ? | CREATE TABLE table_204_157 (
id number,
"date" text,
"opponent#" text,
"rank#" text,
"site" text,
"result" text
) |
SELECT height_in_ft FROM table_name_80 WHERE school_club_team_country = "valparaiso" | Name the height in feet for the player from valparaiso | CREATE TABLE table_name_80 (height_in_ft VARCHAR, school_club_team_country VARCHAR) |
SELECT COUNT(reason_for_change) FROM table_2160008_4 WHERE date_successor_seated = "May 11, 1939" | Name the number of reason for change on may 11, 1939 | CREATE TABLE table_2160008_4 (reason_for_change VARCHAR, date_successor_seated VARCHAR) |
SELECT "Independent Regional Force" FROM table_28764 WHERE "Democratic Coalition" = '(R) Jorge Tarud ( PPD )' | Who is the independent regional force when democratic coalition is (r) jorge tarud ( ppd )? | CREATE TABLE table_28764 (
"Dist." real,
"Democratic Coalition" text,
"Alliance" text,
"Together We Can Do More" text,
"Independent Regional Force" text,
"Independents" text
) |
SELECT school_club_team_country FROM table_name_11 WHERE height_in_ft = "6-5" | Name the school/club team/country for the player that is 6-5 ft | CREATE TABLE table_name_11 (school_club_team_country VARCHAR, height_in_ft VARCHAR) |
SELECT wed_3_june FROM table_21607058_1 WHERE rank = 12 | What were the time and speed for the rider ranked in 12 on Wed, June 3? | CREATE TABLE table_21607058_1 (wed_3_june VARCHAR, rank VARCHAR) |
SELECT record FROM table_name_48 WHERE attendance = "10,389" | What was the record at the game attended by 10,389? | CREATE TABLE table_name_48 (
record VARCHAR,
attendance VARCHAR
) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.