answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
489
SELECT 1 AS st_party FROM table_name_10 WHERE election = "1893 by-election"
Which 1st Party has an Election of 1893 by-election?
CREATE TABLE table_name_10 (election VARCHAR)
SELECT date FROM table_name_73 WHERE attendance = "9,535"
Which Date has an Attendance of 9,535?
CREATE TABLE table_name_73 (date VARCHAR, attendance VARCHAR)
SELECT SUM(silver) FROM table_name_43 WHERE total = 4 AND rank = "3"
What is the sum of silver medals for the entry with rank 3 and a total of 4 medals?
CREATE TABLE table_name_43 (silver INTEGER, total VARCHAR, rank VARCHAR)
SELECT directed_by FROM table_23399481_2 WHERE us_viewers__in_millions_ = "2.22"
What is the director name is the U.S. viewers is 2.22 million?
CREATE TABLE table_23399481_2 (directed_by VARCHAR, us_viewers__in_millions_ VARCHAR)
SELECT director_s_ FROM table_name_92 WHERE film_title_used_in_nomination = "cannibal vegetarian"
Who is the director of Cannibal vegetarian, which is the film title used in nomination?
CREATE TABLE table_name_92 (director_s_ VARCHAR, film_title_used_in_nomination VARCHAR)
SELECT other FROM table_name_54 WHERE year = "2012"
What is the other for 2012?
CREATE TABLE table_name_54 (other VARCHAR, year VARCHAR)
SELECT us_viewers__million_ FROM table_29747178_2 WHERE directed_by = "Andy Wolk"
How many millions of U.S viewers are there when the director is andy wolk?
CREATE TABLE table_29747178_2 (us_viewers__million_ VARCHAR, directed_by VARCHAR)
SELECT venue FROM table_name_45 WHERE result = "1st"
Which venue has 1st as the result?
CREATE TABLE table_name_45 (venue VARCHAR, result VARCHAR)
SELECT MIN(rank) FROM table_150340_3 WHERE country = "Puerto Rico"
What is the lowest rank for puerto rico?
CREATE TABLE table_150340_3 (rank INTEGER, country VARCHAR)
SELECT AVG(prominence__m_) FROM table_name_9 WHERE col__m_ < 0
Count the Prominence (m) of Col (m) smaller than 0?
CREATE TABLE table_name_9 (prominence__m_ INTEGER, col__m_ INTEGER)
SELECT opponents_in_the_final FROM table_name_18 WHERE score = "4–6, 6–4, 2–6, 4–6"
Which Opponents in the final have a Score of 4–6, 6–4, 2–6, 4–6?
CREATE TABLE table_name_18 (opponents_in_the_final VARCHAR, score VARCHAR)
SELECT first_air_date FROM table_28980706_4 WHERE episode = 4
When 4 is the episode what is the air date?
CREATE TABLE table_28980706_4 (first_air_date VARCHAR, episode VARCHAR)
SELECT author FROM table_1620397_2 WHERE series_sorted = "6Y/AE"
Name the author for 6y/ae
CREATE TABLE table_1620397_2 (author VARCHAR, series_sorted VARCHAR)
SELECT time FROM table_name_30 WHERE away_team = "happy valley team b"
What time did the match with an away team of Happy Valley Team B start?
CREATE TABLE table_name_30 (time VARCHAR, away_team VARCHAR)
SELECT winning_driver FROM table_name_21 WHERE fastest_lap = "lorenzo bandini" AND pole_position = "lorenzo bandini"
Who is the Winnning driver in which lorenzo bandini has the fastest lap as well as the Pole position?
CREATE TABLE table_name_21 (winning_driver VARCHAR, fastest_lap VARCHAR, pole_position VARCHAR)
SELECT position FROM table_name_59 WHERE throws = "r" AND dob = "12 february 1983"
Which Position has Throws of r, and a DOB of 12 february 1983?
CREATE TABLE table_name_59 (position VARCHAR, throws VARCHAR, dob VARCHAR)
SELECT date FROM table_name_87 WHERE label = "hollywood records" AND format = "digital download"
When did Hollywood Records release a digital download?
CREATE TABLE table_name_87 (date VARCHAR, label VARCHAR, format VARCHAR)
SELECT COUNT(attendance) FROM table_name_77 WHERE date = "august 23"
What was the attendance on August 23?
CREATE TABLE table_name_77 (attendance VARCHAR, date VARCHAR)
SELECT score FROM table_10812293_3 WHERE date = "November 12"
What was the score of the game on November 12?
CREATE TABLE table_10812293_3 (score VARCHAR, date VARCHAR)
SELECT MAX(series__number) FROM table_19517621_4
What is the largest series number?
CREATE TABLE table_19517621_4 (series__number INTEGER)
SELECT tournament FROM table_name_22 WHERE runner_s__up = "chi-chi rodriguez"
What races were Chi-Chi Rodriguez the runner-up in?
CREATE TABLE table_name_22 (tournament VARCHAR, runner_s__up VARCHAR)
SELECT result FROM table_1341640_14 WHERE first_elected = 1960
What was the result of the election when someone was first elected in 1960?
CREATE TABLE table_1341640_14 (result VARCHAR, first_elected VARCHAR)
SELECT incumbent FROM table_1341707_15 WHERE first_elected = "1964"
Which incumbent was first elected in 1964?
CREATE TABLE table_1341707_15 (incumbent VARCHAR, first_elected VARCHAR)
SELECT AVG(lane) FROM table_name_79 WHERE name = "bronte barratt" AND rank > 4
What lane did Bronte Barratt, who had a rank larger than 4, swim in?
CREATE TABLE table_name_79 (lane INTEGER, name VARCHAR, rank VARCHAR)
SELECT venue FROM table_name_91 WHERE competition = "friendly"
What is the Venue with the Friendly Competition?
CREATE TABLE table_name_91 (venue VARCHAR, competition VARCHAR)
SELECT COUNT(to_par) FROM table_name_38 WHERE total = 295
What is the total number of To Par, when Total is "295"?
CREATE TABLE table_name_38 (to_par VARCHAR, total VARCHAR)
SELECT MAX(attendance) FROM table_name_67 WHERE result = "l 38-20" AND week < 9
What is the attendance for a week smaller than 9 with a result of L 38-20?
CREATE TABLE table_name_67 (attendance INTEGER, result VARCHAR, week VARCHAR)
SELECT MIN(goals_scored) FROM table_name_50 WHERE goals_conceded > 19 AND played < 18
What is the lowest amount of goals scored that has more than 19 goal conceded and played less than 18?
CREATE TABLE table_name_50 (goals_scored INTEGER, goals_conceded VARCHAR, played VARCHAR)
SELECT home_away FROM table_name_19 WHERE date = "february 29, 2008"
What home/away game is on February 29, 2008?
CREATE TABLE table_name_19 (home_away VARCHAR, date VARCHAR)
SELECT COUNT(reason_for_change) FROM table_1652224_5 WHERE district = "Michigan 3rd"
what is the total number for reason for change is district michigan 3rd?
CREATE TABLE table_1652224_5 (reason_for_change VARCHAR, district VARCHAR)
SELECT tournament FROM table_name_82 WHERE date = "6 october 2008"
What is Tournament, when Date is "6 October 2008"?
CREATE TABLE table_name_82 (tournament VARCHAR, date VARCHAR)
SELECT COUNT(field_goals) FROM table_name_6 WHERE extra_points > 0 AND touchdowns = 5
What is the total number of field goals a player had when there were more than 0 extra points and there were 5 touchdowns?
CREATE TABLE table_name_6 (field_goals VARCHAR, extra_points VARCHAR, touchdowns VARCHAR)
SELECT result FROM table_name_86 WHERE venue = "kinnarps arena" AND date = "thursday, february 19"
Which Result has a Venue of kinnarps arena, and a Date of thursday, february 19?
CREATE TABLE table_name_86 (result VARCHAR, venue VARCHAR, date VARCHAR)
SELECT to_par FROM table_name_64 WHERE player = "philip parkin"
What is the to par of Philip Parkin?
CREATE TABLE table_name_64 (to_par VARCHAR, player VARCHAR)
SELECT at_neutral_site FROM table_name_87 WHERE overall_record = "mu, 15-8"
With an overall record of MU, 15-8 what is the at neutral site?
CREATE TABLE table_name_87 (at_neutral_site VARCHAR, overall_record VARCHAR)
SELECT * FROM instructor ORDER BY salary
List the information of all instructors ordered by their salary in ascending order.
CREATE TABLE instructor (salary VARCHAR)
SELECT team FROM table_23285805_4 WHERE record = "5-8"
If the record is 5-8, what is the team name?
CREATE TABLE table_23285805_4 (team VARCHAR, record VARCHAR)
SELECT divisional_record FROM table_name_58 WHERE away_team = "dallas"
Can you tell me the Divisional Record that has the Away Team of dallas?
CREATE TABLE table_name_58 (divisional_record VARCHAR, away_team VARCHAR)
SELECT MAX(laps) FROM table_17693171_1 WHERE time_retired = "+1 lap"
If the time/retired is +1 lap, what is the amount of maximum laps?
CREATE TABLE table_17693171_1 (laps INTEGER, time_retired VARCHAR)
SELECT COUNT(original_title) FROM table_13719788_1 WHERE film_title_used_in_nomination = "Gie"
How many films titled Gie have been nominated?
CREATE TABLE table_13719788_1 (original_title VARCHAR, film_title_used_in_nomination VARCHAR)
SELECT AVG(week) FROM table_name_70 WHERE result = "l 34–24"
Tell me the average week for result of l 34–24
CREATE TABLE table_name_70 (week INTEGER, result VARCHAR)
SELECT MIN(founded) FROM table_261941_1
When was the earliest founded university?
CREATE TABLE table_261941_1 (founded INTEGER)
SELECT COUNT(DISTINCT Industry) FROM Companies
How many different industries are the companies in?
CREATE TABLE Companies (Industry VARCHAR)
SELECT name FROM Person WHERE age = (SELECT MAX(age) FROM person)
Who is the oldest person?
CREATE TABLE Person (name VARCHAR, age INTEGER); CREATE TABLE person (name VARCHAR, age INTEGER)
SELECT home FROM table_name_92 WHERE visitor = "chicago black hawks" AND date = "april 20"
What team did the Chicago Black Hawks visit on April 20?
CREATE TABLE table_name_92 (home VARCHAR, visitor VARCHAR, date VARCHAR)
SELECT place FROM table_name_33 WHERE score = 66
What is the Place for the 66 Score?
CREATE TABLE table_name_33 (place VARCHAR, score VARCHAR)
SELECT hanzi FROM table_name_69 WHERE launch = "1996" AND name = "phoenix television chinese"
What is the Hanzi of Phoenix Television Chinese that launched in 1996?
CREATE TABLE table_name_69 (hanzi VARCHAR, launch VARCHAR, name VARCHAR)
SELECT home FROM table_name_93 WHERE score = "21-17"
Name the home for 21-17
CREATE TABLE table_name_93 (home VARCHAR, score VARCHAR)
SELECT laps FROM table_2196127_1 WHERE year = "2002"
How many laps were there in 2002?
CREATE TABLE table_2196127_1 (laps VARCHAR, year VARCHAR)
SELECT opponent FROM table_name_8 WHERE date = "september 25, 1966"
Who did the Colts play against on September 25, 1966?
CREATE TABLE table_name_8 (opponent VARCHAR, date VARCHAR)
SELECT end_date__last_night_ FROM table_159359_2 WHERE season = "1918"
When are end dates (last night) for the season of 1918?
CREATE TABLE table_159359_2 (end_date__last_night_ VARCHAR, season VARCHAR)
SELECT location FROM table_name_77 WHERE fastest_lap = "ben spies" AND pole_position = "ben spies" AND winner = "ben spies" AND date = "tooele, utah"
What is Location, when Fastest Lap is Ben Spies, when Pole Position is Ben Spies, when Winner is Ben Spies, and when Date is Tooele, Utah?
CREATE TABLE table_name_77 (location VARCHAR, date VARCHAR, winner VARCHAR, fastest_lap VARCHAR, pole_position VARCHAR)
SELECT platelet_count FROM table_name_34 WHERE condition = "bernard-soulier syndrome"
Which Platelet count has a Condition of bernard-soulier syndrome?
CREATE TABLE table_name_34 (platelet_count VARCHAR, condition VARCHAR)
SELECT location FROM table_name_17 WHERE time = "5:00" AND record = "6-2-1"
What was the location of the bout that lasted 5:00 and led to a 6-2-1 record?
CREATE TABLE table_name_17 (location VARCHAR, time VARCHAR, record VARCHAR)
SELECT T1.Participant_ID, T1.Participant_Type_Code, COUNT(*) FROM Participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID GROUP BY T1.Participant_ID
How many events have each participants attended? List the participant id, type and the number.
CREATE TABLE Participants (Participant_ID VARCHAR, Participant_Type_Code VARCHAR); CREATE TABLE Participants_in_Events (Participant_ID VARCHAR)
SELECT warship FROM table_23614702_1 WHERE horse__power = 1500
What warship has horse-power of 1500?
CREATE TABLE table_23614702_1 (warship VARCHAR, horse__power VARCHAR)
SELECT MIN(date) FROM table_name_23 WHERE region = "korea" AND format = "cd"
WHAT IS THE LOWEST DATE FOR KOREA, IN CD FORMAT?
CREATE TABLE table_name_23 (date INTEGER, region VARCHAR, format VARCHAR)
SELECT republican_ticket FROM table_name_5 WHERE american_labor_ticket = "matthew j. merritt"
Which Republican ran against the American Labor candidate Matthew J. Merritt?
CREATE TABLE table_name_5 (republican_ticket VARCHAR, american_labor_ticket VARCHAR)
SELECT location_attendance FROM table_name_17 WHERE high_assists = "raymond felton (5)" AND record = "35–44"
Which Location Attendance has a High assists of raymond felton (5), and a Record of 35–44?
CREATE TABLE table_name_17 (location_attendance VARCHAR, high_assists VARCHAR, record VARCHAR)
SELECT finish FROM table_name_1 WHERE year_s__won = "1991"
Where did the player who won in 1991 finish?
CREATE TABLE table_name_1 (finish VARCHAR, year_s__won VARCHAR)
SELECT team FROM table_name_47 WHERE race_title = "mallala"
What was the team that held the race title of Mallala?
CREATE TABLE table_name_47 (team VARCHAR, race_title VARCHAR)
SELECT AVG(top_10) FROM table_name_56 WHERE cuts_made > 12 AND wins < 0
What is the average number of top-10s for events with more than 12 cuts made and 0 wins?
CREATE TABLE table_name_56 (top_10 INTEGER, cuts_made VARCHAR, wins VARCHAR)
SELECT constituency_number FROM table_name_99 WHERE name = "timarni"
Which constituency number has a name of Timarni?
CREATE TABLE table_name_99 (constituency_number VARCHAR, name VARCHAR)
SELECT game FROM table_21091157_1 WHERE record = "1-0"
Name the game for record 1-0
CREATE TABLE table_21091157_1 (game VARCHAR, record VARCHAR)
SELECT loss FROM table_name_4 WHERE opponent = "la new bears" AND save = "mac suzuki"
What was the loss of the game against with LA New Bears with a save of Mac Suzuki?
CREATE TABLE table_name_4 (loss VARCHAR, opponent VARCHAR, save VARCHAR)
SELECT venue FROM table_name_33 WHERE home_team = "geelong"
Which venue's home team is geelong?
CREATE TABLE table_name_33 (venue VARCHAR, home_team VARCHAR)
SELECT score FROM table_name_64 WHERE visitor = "colorado" AND date = "october 25"
On October 25, when the visitor was Colorado, what is the score?
CREATE TABLE table_name_64 (score VARCHAR, visitor VARCHAR, date VARCHAR)
SELECT coach FROM table_20319085_2 WHERE conference_record = "6-1"
Who coached the team in the season with a 6-1 conference record?
CREATE TABLE table_20319085_2 (coach VARCHAR, conference_record VARCHAR)
SELECT pi_code FROM table_name_54 WHERE area = "hindhead"
What is the PI code in the hindhead area?
CREATE TABLE table_name_54 (pi_code VARCHAR, area VARCHAR)
SELECT result FROM table_22825058_23 WHERE opponents = "Jiří Novák Radek Štěpánek"
Name the result for jiří novák radek štěpánek
CREATE TABLE table_22825058_23 (result VARCHAR, opponents VARCHAR)
SELECT nominated_work FROM table_name_96 WHERE year = 1997
Which Nominated work has a Year of 1997?
CREATE TABLE table_name_96 (nominated_work VARCHAR, year VARCHAR)
SELECT award_show FROM table_name_53 WHERE category = "best loved drama" AND year = 2002
In what award show was Bad Girls nominated for Best Loved Drama in 2002?
CREATE TABLE table_name_53 (award_show VARCHAR, category VARCHAR, year VARCHAR)
SELECT result FROM table_name_79 WHERE offer_team = "new york rangers" AND player = "adam graves"
What is the Result that has the New York Rangers as the Offer Team and Adam Graves as the Player?
CREATE TABLE table_name_79 (result VARCHAR, offer_team VARCHAR, player VARCHAR)
SELECT offer_team FROM table_name_59 WHERE player = "david backes"
What was David Backes' Offer Team?
CREATE TABLE table_name_59 (offer_team VARCHAR, player VARCHAR)
SELECT MIN(forfeited_in_seats) FROM table_22582663_1 WHERE seats_won = 19
Where 19 seats were won, what was the minimum number of forfeited seats?
CREATE TABLE table_22582663_1 (forfeited_in_seats INTEGER, seats_won VARCHAR)
SELECT record FROM table_name_89 WHERE game_site = "rich stadium" AND opponent = "new england patriots"
What is the record for the game against New England Patriots at the Rich Stadium?
CREATE TABLE table_name_89 (record VARCHAR, game_site VARCHAR, opponent VARCHAR)
SELECT player FROM table_24540893_6 WHERE cfl_team = "Calgary Stampeders"
Who was drafted by the calgary stampeders?
CREATE TABLE table_24540893_6 (player VARCHAR, cfl_team VARCHAR)
SELECT state FROM table_name_5 WHERE venue = "thomas assembly center"
In what state is the Thomas Assembly Center located?
CREATE TABLE table_name_5 (state VARCHAR, venue VARCHAR)
SELECT athlete FROM table_name_74 WHERE event = "35 km"
Which athlete has a 35 km event?
CREATE TABLE table_name_74 (athlete VARCHAR, event VARCHAR)
SELECT SUM(total) FROM table_name_22 WHERE bronze = 0 AND gold < 0
How many totals have a Bronze of 0, and a Gold smaller than 0?
CREATE TABLE table_name_22 (total INTEGER, bronze VARCHAR, gold VARCHAR)
SELECT play_by_play FROM table_name_53 WHERE network = "cbc" AND year < 1961
Who did the play-by-play on the CBC network before 1961?
CREATE TABLE table_name_53 (play_by_play VARCHAR, network VARCHAR, year VARCHAR)
SELECT season FROM table_2110959_1 WHERE pct__percentage = "0.552"
In what season was the pct % 0.552?
CREATE TABLE table_2110959_1 (season VARCHAR, pct__percentage VARCHAR)
SELECT MAX(crowd) FROM table_name_64 WHERE venue = "victoria park"
When the venue is victoria park, what's the largest Crowd that attended?
CREATE TABLE table_name_64 (crowd INTEGER, venue VARCHAR)
SELECT position FROM table_name_51 WHERE pick > 2 AND overall > 28 AND college = "nebraska"
what is the position when the pick is more than 2, the overall is more than 28 and the college is nebraska?
CREATE TABLE table_name_51 (position VARCHAR, college VARCHAR, pick VARCHAR, overall VARCHAR)
SELECT AVG(points) FROM table_name_61 WHERE pct__percentage > 0.685
When the percent is larger than 0.685, what is the average number of points scored?
CREATE TABLE table_name_61 (points INTEGER, pct__percentage INTEGER)
SELECT location FROM table_1987995_5 WHERE team = "Twins"
Where is the ballpark of the Twins?
CREATE TABLE table_1987995_5 (location VARCHAR, team VARCHAR)
SELECT final_score FROM table_name_21 WHERE stadium = "lambeau field"
What is the final score of the game at lambeau field?
CREATE TABLE table_name_21 (final_score VARCHAR, stadium VARCHAR)
SELECT opponent FROM table_name_23 WHERE date = "february 8, 1990"
who is the opponent on february 8, 1990?
CREATE TABLE table_name_23 (opponent VARCHAR, date VARCHAR)
SELECT player FROM table_name_1 WHERE score > 66 AND place = "t4"
What is the T4 Place Player with a Score of more than 66?
CREATE TABLE table_name_1 (player VARCHAR, score VARCHAR, place VARCHAR)
SELECT year FROM table_name_85 WHERE result = "did not qualify"
What year was the result did not qualify?
CREATE TABLE table_name_85 (year VARCHAR, result VARCHAR)
SELECT horse FROM table_name_15 WHERE faults = "0" AND total = 4.1
Tell me the horse with faults of 0 when the total is 4.1
CREATE TABLE table_name_15 (horse VARCHAR, faults VARCHAR, total VARCHAR)
SELECT place FROM table_name_30 WHERE score > 65 AND player = "rocco mediate"
WHAT IS THE PLACE THAT HAS SCORE OF 65 OR BETTER, FOR ROCCO MEDIATE?
CREATE TABLE table_name_30 (place VARCHAR, score VARCHAR, player VARCHAR)
SELECT component FROM table_11944282_1 WHERE allied_related = "Shared"
What is the name of the integrated where allied-related is shared?
CREATE TABLE table_11944282_1 (component VARCHAR, allied_related VARCHAR)
SELECT COUNT(age) FROM table_19061741_3 WHERE edition = "Clash 2010" AND home_or_representative_town_or_province = "Davao City"
When davao city is the home or representative town or province and clash 2010 is the edition how many ages are there?
CREATE TABLE table_19061741_3 (age VARCHAR, edition VARCHAR, home_or_representative_town_or_province VARCHAR)
SELECT higher_harmonics FROM table_name_19 WHERE noaa = "8"
What higher harmonics have an NOAA of 8?
CREATE TABLE table_name_19 (higher_harmonics VARCHAR, noaa VARCHAR)
SELECT away_team AS score FROM table_name_32 WHERE home_team = "collingwood"
What was Collingwood's away team score?
CREATE TABLE table_name_32 (away_team VARCHAR, home_team VARCHAR)
SELECT gdp__billion_us$_ FROM table_name_76 WHERE area__km²_ = "316"
What is the GDP (billion US$) of the country that has an Area (km²) of 316?
CREATE TABLE table_name_76 (gdp__billion_us$_ VARCHAR, area__km²_ VARCHAR)
SELECT city FROM table_name_39 WHERE region = "mideast" AND host = "temple university"
Which city in the mideast region is the hot of Temple University?
CREATE TABLE table_name_39 (city VARCHAR, region VARCHAR, host VARCHAR)
SELECT SUM(total) FROM table_name_33 WHERE year_s__won = "1994, 1997"
Total for 1994, 1997 years won?
CREATE TABLE table_name_33 (total INTEGER, year_s__won VARCHAR)
SELECT week_12 FROM table_name_38 WHERE week_2 = "magda tomek"
Who is the week 12 for the week 2 with Magda Tomek?
CREATE TABLE table_name_38 (week_12 VARCHAR, week_2 VARCHAR)