answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
489
SELECT tournament FROM table_name_26 WHERE 2009 = "atp masters series"
Tell me the tournament of 2009 of atp masters series
CREATE TABLE table_name_26 (tournament VARCHAR)
SELECT MAX(year) FROM table_name_71 WHERE score = "4–1"
Name the highest Year with a Score of 4–1?
CREATE TABLE table_name_71 (year INTEGER, score VARCHAR)
SELECT MAX(points) FROM table_27539272_4 WHERE record = "1-3-1"
Name the most points for 1-3-1 record
CREATE TABLE table_27539272_4 (points INTEGER, record VARCHAR)
SELECT 1 AS st_leg FROM table_17968229_1 WHERE home__2nd_leg_ = "Newell's Old Boys"
If second leg is Newell's Old Boys, what name is first leg?
CREATE TABLE table_17968229_1 (home__2nd_leg_ VARCHAR)
SELECT AVG(level) FROM table_name_45 WHERE leaguecontested = "northern premier league premier division" AND season = "2011–12"
Which Level has a League Contested of northern premier league premier division, and a Season of 2011–12?
CREATE TABLE table_name_45 (level INTEGER, leaguecontested VARCHAR, season VARCHAR)
SELECT engine FROM table_name_22 WHERE driver = "michele alboreto"
What was the Michele Alboreto's engine?
CREATE TABLE table_name_22 (engine VARCHAR, driver VARCHAR)
SELECT crowd FROM table_name_66 WHERE home_team = "essendon"
How big of a crowd does the home team of essendon have?
CREATE TABLE table_name_66 (crowd VARCHAR, home_team VARCHAR)
SELECT record FROM table_name_55 WHERE date = "december 4"
What is the record on December 4?
CREATE TABLE table_name_55 (record VARCHAR, date VARCHAR)
SELECT DISTINCT T1.Age FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = T2.Secretary_Vote WHERE T2.Election_Cycle = "Fall"
Find the distinct ages of students who have secretary votes in the fall election cycle.
CREATE TABLE VOTING_RECORD (Secretary_Vote VARCHAR, Election_Cycle VARCHAR); CREATE TABLE STUDENT (Age VARCHAR, StuID VARCHAR)
SELECT Industry FROM Companies WHERE Headquarters = "USA" INTERSECT SELECT Industry FROM Companies WHERE Headquarters = "China"
Show the industries shared by companies whose headquarters are "USA" and companies whose headquarters are "China".
CREATE TABLE Companies (Industry VARCHAR, Headquarters VARCHAR)
SELECT DISTINCT T3.name, T2.title, T1.stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T2.director = T3.name
For any rating where the name of reviewer is the same as the director of the movie, return the reviewer name, movie title, and number of stars.
CREATE TABLE Rating (stars VARCHAR, mID VARCHAR, rID VARCHAR); CREATE TABLE Reviewer (name VARCHAR, rID VARCHAR); CREATE TABLE Movie (title VARCHAR, mID VARCHAR, director VARCHAR)
SELECT game FROM table_name_27 WHERE road_team = "utah jazz" AND result = "81-83 (3-2)"
Road Team of utah jazz, and a Result of 81-83 (3-2) involved what game?
CREATE TABLE table_name_27 (game VARCHAR, road_team VARCHAR, result VARCHAR)
SELECT high_rebounds FROM table_name_71 WHERE game = 62
What is the High rebounds with a Game that is 62?
CREATE TABLE table_name_71 (high_rebounds VARCHAR, game VARCHAR)
SELECT MIN(attendance) FROM table_name_3 WHERE date = "may 2"
How many people were in attendance on may 2?
CREATE TABLE table_name_3 (attendance INTEGER, date VARCHAR)
SELECT mobile FROM table_name_31 WHERE opera = "2.62%"
What percentage of users were using mobile browsers during the period in which 2.62% were using Opera?
CREATE TABLE table_name_31 (mobile VARCHAR, opera VARCHAR)
SELECT dutch FROM table_name_3 WHERE latin = "navigo"
What is the Dutch translation of the Latin word navigo?
CREATE TABLE table_name_3 (dutch VARCHAR, latin VARCHAR)
SELECT champion FROM table_name_87 WHERE runner_up = "dick chapman" AND venue = "st. andrews links"
Who was the champion in the game played at the St. Andrews Links with Dick Chapman as the runner-up?
CREATE TABLE table_name_87 (champion VARCHAR, runner_up VARCHAR, venue VARCHAR)
SELECT player FROM table_name_23 WHERE date = "19-02-2003"
Who had a date of 19-02-2003?
CREATE TABLE table_name_23 (player VARCHAR, date VARCHAR)
SELECT period FROM table_name_49 WHERE player = "ben eager"
What is the period for Ben Eager?
CREATE TABLE table_name_49 (period VARCHAR, player VARCHAR)
SELECT iata_code FROM table_18047346_4 WHERE passengers = "15,505,566"
If the passengers are 15,505,566, what is the iata code?
CREATE TABLE table_18047346_4 (iata_code VARCHAR, passengers VARCHAR)
SELECT points FROM table_name_59 WHERE lost = "13" AND points_against = "461"
How many points did the club with 13 losses and 461 points against have?
CREATE TABLE table_name_59 (points VARCHAR, lost VARCHAR, points_against 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 females FROM table_name_21 WHERE males = "1 234"
What females have males of 1 234?
CREATE TABLE table_name_21 (females VARCHAR, males VARCHAR)
SELECT player FROM table_name_60 WHERE score = 68 - 71 - 70 = 208
Who has a Score of 68-71-70=208?
CREATE TABLE table_name_60 (player VARCHAR, score VARCHAR)
SELECT COUNT(played) FROM table_name_5 WHERE drawn > 0 AND lost > 0
how many times is there more than 0 draws and more than 0 losses?
CREATE TABLE table_name_5 (played VARCHAR, drawn VARCHAR, lost VARCHAR)
SELECT AVG(number_of_households) FROM table_name_98 WHERE county = "cook" AND population < 5 OFFSET 176
Which Number of households has a County of cook, and Population smaller than 5,176?
CREATE TABLE table_name_98 (number_of_households INTEGER, county VARCHAR, population VARCHAR)
SELECT record FROM table_name_68 WHERE game = 43
What was the record of Game 43?
CREATE TABLE table_name_68 (record VARCHAR, game VARCHAR)
SELECT opponent FROM table_name_27 WHERE loss = "harden (9-6)"
Who was the opponent at the game that had a loss of Harden (9-6)?
CREATE TABLE table_name_27 (opponent VARCHAR, loss VARCHAR)
SELECT SUM(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE "%London%"
What are the total number of Domestic Passengers of airports that contain the word "London".
CREATE TABLE airport (Domestic_Passengers INTEGER, Airport_Name VARCHAR)
SELECT shot_pct FROM table_name_67 WHERE stolen_ends = 2
What is Shot Pct., when Stolen Ends is 2?
CREATE TABLE table_name_67 (shot_pct VARCHAR, stolen_ends VARCHAR)
SELECT incumbent FROM table_1341690_43 WHERE district = "Texas 12"
Name the incumbent for district texas 12
CREATE TABLE table_1341690_43 (incumbent VARCHAR, district VARCHAR)
SELECT home_team FROM table_14312471_3 WHERE ground = "Manuka Oval"
Name the home team for manuka oval
CREATE TABLE table_14312471_3 (home_team VARCHAR, ground VARCHAR)
SELECT monarch FROM table_name_67 WHERE heir = "robert curthose" AND reason = "father became king"
Who is the Monarch whose Heir is Robert Curthose when the Reason is that the father became king?
CREATE TABLE table_name_67 (monarch VARCHAR, heir VARCHAR, reason VARCHAR)
SELECT manufacturer FROM table_name_14 WHERE year > 1969 AND finish = 34
Which manufacturer was used after 1969 with a finish position of 34?
CREATE TABLE table_name_14 (manufacturer VARCHAR, year VARCHAR, finish VARCHAR)
SELECT COUNT(record) FROM table_11964154_7 WHERE score = "L 96–123 (OT)"
How many times was the final score l 96–123 (ot)?
CREATE TABLE table_11964154_7 (record VARCHAR, score VARCHAR)
SELECT MAX(laps) FROM table_name_3 WHERE driver = "joe nemechek"
What is the highest number of laps completed by driver Joe Nemechek?
CREATE TABLE table_name_3 (laps INTEGER, driver VARCHAR)
SELECT song_title FROM table_name_78 WHERE chart_peak = "#1" AND track = 20
What was the title of the song that peaked the charts at #1 with track 20?
CREATE TABLE table_name_78 (song_title VARCHAR, chart_peak VARCHAR, track VARCHAR)
SELECT COUNT(round) FROM table_name_62 WHERE player = "duncan mccoll" AND pick < 97
What is the total number of rounds that had draft pick 97, duncan mccoll?
CREATE TABLE table_name_62 (round VARCHAR, player VARCHAR, pick VARCHAR)
SELECT df FROM table_23835213_2 WHERE adam_hinshelwood = "Junior Mendes"
What is the df when Adam Hinshelwood is Junior Mendes?
CREATE TABLE table_23835213_2 (df VARCHAR, adam_hinshelwood VARCHAR)
SELECT SUM(time) FROM table_name_50 WHERE lane < 4 AND name = "britta steffen"
What's the time of Britta Steffen in a lane less than 4?
CREATE TABLE table_name_50 (time INTEGER, lane VARCHAR, name VARCHAR)
SELECT season FROM table_name_24 WHERE round = "2r" AND home_result = "0-0"
Round of 2r, and a Home result of 0-0 has what season?
CREATE TABLE table_name_24 (season VARCHAR, round VARCHAR, home_result VARCHAR)
SELECT COUNT(date) FROM table_24547593_1 WHERE circuit = "Knockhill"
How many dates was knockhill?
CREATE TABLE table_24547593_1 (date VARCHAR, circuit VARCHAR)
SELECT finish FROM table_name_17 WHERE laps > 200
Name the finish with Laps more than 200
CREATE TABLE table_name_17 (finish VARCHAR, laps INTEGER)
SELECT venue FROM table_name_62 WHERE away_team = "richmond"
At what venue was richmond the away team?
CREATE TABLE table_name_62 (venue VARCHAR, away_team VARCHAR)
SELECT high_points FROM table_27312918_5 WHERE game = 5
Who got the most points in game number 5?
CREATE TABLE table_27312918_5 (high_points VARCHAR, game VARCHAR)
SELECT COUNT(pick__number) FROM table_name_5 WHERE affiliation = "university of portland"
Tell me the total number of pick for university of portland
CREATE TABLE table_name_5 (pick__number VARCHAR, affiliation VARCHAR)
SELECT COUNT(participating_parties) FROM table_2676980_4 WHERE registered_voters = 643629
What is the number of participating parties when registered voters totaled 643629?
CREATE TABLE table_2676980_4 (participating_parties VARCHAR, registered_voters VARCHAR)
SELECT nhl_team FROM table_name_81 WHERE position = "left wing" AND college_junior_club_team = "toronto marlboros (omjhl)"
What NHL team has a player in the position of Left Wing that came from the Toronto Marlboros (omjhl)?
CREATE TABLE table_name_81 (nhl_team VARCHAR, position VARCHAR, college_junior_club_team VARCHAR)
SELECT MAX(aircraft_movements) FROM table_13836704_9 WHERE international_passengers = 21002260
what is the maximum aircraft movements with international passengers being 21002260
CREATE TABLE table_13836704_9 (aircraft_movements INTEGER, international_passengers VARCHAR)
SELECT COUNT(points) FROM table_16864968_8 WHERE game = 70
How many points were made in game 70?
CREATE TABLE table_16864968_8 (points VARCHAR, game VARCHAR)
SELECT winner FROM table_name_60 WHERE race_name = "tre valli varesine"
Who was the winner of the tre valli varesine race?
CREATE TABLE table_name_60 (winner VARCHAR, race_name VARCHAR)
SELECT winner FROM table_name_66 WHERE loser = "russia-2"
Who was the winner with the loser being russia-2?
CREATE TABLE table_name_66 (winner VARCHAR, loser VARCHAR)
SELECT attendance FROM table_name_24 WHERE away_team = "reading"
WHAT IS THE ATTENDANCE WITH A READING AWAY TEAM?
CREATE TABLE table_name_24 (attendance VARCHAR, away_team VARCHAR)
SELECT city FROM table_name_20 WHERE region = "east" AND state = "north carolina" AND host = "university of richmond"
What city in the east region in North Carolina was the round where the University of Richmond was the host?
CREATE TABLE table_name_20 (city VARCHAR, host VARCHAR, region VARCHAR, state VARCHAR)
SELECT MIN(rank) FROM table_name_71 WHERE silver > 5 AND total = 29 AND bronze < 16
What is the lowest rank for a nation with 29 total medals, over 5 silvers, and under 16 bronze?
CREATE TABLE table_name_71 (rank INTEGER, bronze VARCHAR, silver VARCHAR, total VARCHAR)
SELECT result FROM table_name_77 WHERE category = "directorial debut of the year"
What is the result of the directorial debut of the year award?
CREATE TABLE table_name_77 (result VARCHAR, category VARCHAR)
SELECT outcome FROM table_name_61 WHERE partner = "marcella mesker" AND score = "6–4, 4–6, 4–6"
What is the Outcome of the match with Partner Marcella Mesker and a Score of 6–4, 4–6, 4–6?
CREATE TABLE table_name_61 (outcome VARCHAR, partner VARCHAR, score VARCHAR)
SELECT winner FROM table_name_31 WHERE semi_finalists = "anke huber chanda rubin"
What is the Winner when anke huber chanda rubin was semi finalist?
CREATE TABLE table_name_31 (winner VARCHAR, semi_finalists VARCHAR)
SELECT MIN(first_elected) FROM table_1805191_39 WHERE incumbent = "Tim Holden"
What year was Tim Holden first elected?
CREATE TABLE table_1805191_39 (first_elected INTEGER, incumbent VARCHAR)
SELECT nhl_team FROM table_2840500_2 WHERE player = "Travis Brigley"
Which team drafted Travis Brigley?
CREATE TABLE table_2840500_2 (nhl_team VARCHAR, player VARCHAR)
SELECT part_2 FROM table_1745843_2 WHERE part_4 = "*ridanaz"
What word is listed under part 2 for part 4 *ridanaz?
CREATE TABLE table_1745843_2 (part_2 VARCHAR, part_4 VARCHAR)
SELECT SUM(rank) FROM table_name_94 WHERE time = "1:12.40.28"
What is the rank for the team with a Time of 1:12.40.28?
CREATE TABLE table_name_94 (rank INTEGER, time VARCHAR)
SELECT home_team FROM table_name_38 WHERE crowd > 22 OFFSET 449
Which home team has a crowd that is bigger than 22,449?
CREATE TABLE table_name_38 (home_team VARCHAR, crowd INTEGER)
SELECT duration FROM table_19061741_3 WHERE name = "Joaqui Mendoza"
WHen joaqui mendoza is the name how long is the duration?
CREATE TABLE table_19061741_3 (duration VARCHAR, name VARCHAR)
SELECT tournament FROM table_name_69 WHERE 1972 = "a" AND 1975 = "2r"
What tournament is listed as A in 1972 and 2R in 1975?
CREATE TABLE table_name_69 (tournament VARCHAR)
SELECT MAX(gold) FROM table_name_8 WHERE nation = "total" AND "total" < 24
what is the highest gold when the nation is total and the total is less than 24?
CREATE TABLE table_name_8 (gold INTEGER, nation VARCHAR)
SELECT MIN(rank) FROM table_19764939_1 WHERE total = 2
Name the least rank for 2
CREATE TABLE table_19764939_1 (rank INTEGER, total VARCHAR)
SELECT surface FROM table_name_68 WHERE route < 7
What is the Surface of the Route less than 7?
CREATE TABLE table_name_68 (surface VARCHAR, route INTEGER)
SELECT frequency_mhz FROM table_13998897_1 WHERE city_of_license = "Chattanooga, Tennessee"
what's the frequency mhz with city of license being chattanooga, tennessee
CREATE TABLE table_13998897_1 (frequency_mhz VARCHAR, city_of_license VARCHAR)
SELECT opponent FROM table_13258806_2 WHERE record = "2-2"
Who did they play against in the game that ended in 2-2?
CREATE TABLE table_13258806_2 (opponent VARCHAR, record VARCHAR)
SELECT winning_score FROM table_name_57 WHERE tournament = "buy.com siouxland open"
What was the winning score of the Buy.com Siouxland Open?
CREATE TABLE table_name_57 (winning_score VARCHAR, tournament VARCHAR)
SELECT MAX(years_participated) FROM table_1571238_2 WHERE team = "Notre Dame"
How many years did notre dame participate?
CREATE TABLE table_1571238_2 (years_participated INTEGER, team VARCHAR)
SELECT AVG(wins) FROM table_name_72 WHERE draws < 0
what is the average wins when draws is less than 0?
CREATE TABLE table_name_72 (wins INTEGER, draws INTEGER)
SELECT AVG(season) FROM table_name_14 WHERE first_broadcast = "january 23, 1981"
What is the average Season, when First Broadcast is January 23, 1981?
CREATE TABLE table_name_14 (season INTEGER, first_broadcast VARCHAR)
SELECT 2012 FROM table_name_11 WHERE 2007 = "a" AND 2011 = "qf"
What is the 2012 value with A in 2007 and qf in 2011?
CREATE TABLE table_name_11 (Id VARCHAR)
SELECT COUNT(first_pref_votes) FROM table_name_45 WHERE seats = "1"
How many First Pref votes have Seats of 1?
CREATE TABLE table_name_45 (first_pref_votes VARCHAR, seats VARCHAR)
SELECT AVG(heat) FROM table_name_97 WHERE rank = 34 AND time < 49.49
What is the Heat of the 34 Rank swimmer with a Time of 49.49 or less?
CREATE TABLE table_name_97 (heat INTEGER, rank VARCHAR, time VARCHAR)
SELECT kind_of_the_song FROM table_name_50 WHERE number > 8 AND name_of_the_song = "實情"
What type of song is larger than 8 and named 實情?
CREATE TABLE table_name_50 (kind_of_the_song VARCHAR, number VARCHAR, name_of_the_song VARCHAR)
SELECT winning_driver FROM table_name_53 WHERE winning_constructor = "alfa romeo" AND name = "roussillon grand prix"
Which winning driver of the Roussillon Grand Prix had an Alfa Romeo?
CREATE TABLE table_name_53 (winning_driver VARCHAR, winning_constructor VARCHAR, name VARCHAR)
SELECT seats FROM table_name_71 WHERE _percentage_of_votes = "8.1"
Regarding the seats that casted 8.1% of the vote how many seats were held?
CREATE TABLE table_name_71 (seats VARCHAR, _percentage_of_votes VARCHAR)
SELECT T1.City FROM AIRPORTS AS T1 JOIN FLIGHTS AS T2 ON T1.AirportCode = T2.SourceAirport GROUP BY T1.City ORDER BY COUNT(*) DESC LIMIT 1
Which city has most number of departing flights?
CREATE TABLE AIRPORTS (City VARCHAR, AirportCode VARCHAR); CREATE TABLE FLIGHTS (SourceAirport VARCHAR)
SELECT region FROM table_name_58 WHERE format = "cd" AND catalog = "32xa-119"
What is the region of the release of a CD with catalog 32xa-119?
CREATE TABLE table_name_58 (region VARCHAR, format VARCHAR, catalog VARCHAR)
SELECT revenues FROM table_name_43 WHERE tenure = "1854-1855"
What is the Revenues during Tenure 1854-1855?
CREATE TABLE table_name_43 (revenues VARCHAR, tenure VARCHAR)
SELECT main_presenter FROM table_24224647_2 WHERE year_premiered = 2011
Who is every main presenter for the year 2011?
CREATE TABLE table_24224647_2 (main_presenter VARCHAR, year_premiered VARCHAR)
SELECT ss_winning_car FROM table_27965906_2 WHERE circuit = "Road Atlanta" AND b_winning_car = "#35 Quantum Engineering #35 Honda CRX-Si"
Name the ss winning car for road atlanta and #35 quantum engineering #35 honda crx-si
CREATE TABLE table_27965906_2 (ss_winning_car VARCHAR, circuit VARCHAR, b_winning_car VARCHAR)
SELECT home_team AS score FROM table_name_33 WHERE venue = "windy hill"
At the match in windy hill, how much did the home team score?
CREATE TABLE table_name_33 (home_team VARCHAR, venue VARCHAR)
SELECT SUM(pick) FROM table_name_72 WHERE school = "mckinney high school"
What's the total number of picks for mckinney high school?
CREATE TABLE table_name_72 (pick INTEGER, school VARCHAR)
SELECT constructor FROM table_name_50 WHERE chassis = "196"
Who is the constructor of the 196 chassis?
CREATE TABLE table_name_50 (constructor VARCHAR, chassis VARCHAR)
SELECT MIN(current) FROM table_19312274_2
what is the least current
CREATE TABLE table_19312274_2 (current INTEGER)
SELECT COUNT(number) FROM table_name_57 WHERE position = "f" AND hometown = "dallas, texas"
What is the number with the f position in Dallas, Texas?
CREATE TABLE table_name_57 (number VARCHAR, position VARCHAR, hometown VARCHAR)
SELECT location FROM table_name_18 WHERE floors = "03.0 n/a"
Which Location has a Floors of 03.0 n/a?
CREATE TABLE table_name_18 (location VARCHAR, floors VARCHAR)
SELECT power FROM table_name_71 WHERE city_of_license = "belleville"
what is the power when the city of license is belleville?
CREATE TABLE table_name_71 (power VARCHAR, city_of_license VARCHAR)
SELECT pole_position FROM table_name_30 WHERE fastest_lap = "rubens barrichello" AND round > 11
What pole position was Rubens Barrichello when he had the fastest lap and a round larger than 11?
CREATE TABLE table_name_30 (pole_position VARCHAR, fastest_lap VARCHAR, round VARCHAR)
SELECT rider FROM table_name_52 WHERE time = "1:27.37.22"
Who is the rider who had the time of 1:27.37.22?
CREATE TABLE table_name_52 (rider VARCHAR, time VARCHAR)
SELECT COUNT(prod_code) FROM table_2623498_5 WHERE episode__number = "73"
What is the number of production codes for episode #73?
CREATE TABLE table_2623498_5 (prod_code VARCHAR, episode__number VARCHAR)
SELECT leading_scorer FROM table_11964047_9 WHERE home = "Sacramento Kings"
what's the leading scorer where home is sacramento kings
CREATE TABLE table_11964047_9 (leading_scorer VARCHAR, home VARCHAR)
SELECT AVG(ast_avg) FROM table_name_74 WHERE games > 101 AND rank = 5 AND total_assists < 331
WHAT IS THE AVG AST FOR GAMES LARGER THAN 101, RANK 5, TOTAL ASSISTS SMALLER THAN 331?
CREATE TABLE table_name_74 (ast_avg INTEGER, total_assists VARCHAR, games VARCHAR, rank VARCHAR)
SELECT largest_ethnic_group__2002_ FROM table_2562572_30 WHERE cyrillic_name_other_names = "Банатско Аранђелово"
What is the largest ethnic group of the settlement with the cyrillic name of банатско аранђелово?
CREATE TABLE table_2562572_30 (largest_ethnic_group__2002_ VARCHAR, cyrillic_name_other_names VARCHAR)
SELECT 2 AS nd_leg FROM table_name_19 WHERE home__2nd_leg_ = "newell's old boys"
What was the score of the 2nd leg when Newell's Old Boys played at home?
CREATE TABLE table_name_19 (home__2nd_leg_ VARCHAR)
SELECT location FROM table_name_62 WHERE enrollment > 543
Which Location has an Enrollment larger than 543?
CREATE TABLE table_name_62 (location VARCHAR, enrollment INTEGER)