answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
484
SELECT MIN(lost) FROM table_name_47 WHERE win__percentage > 47.1 AND matches < 145
Win % larger than 47.1, and a Matches smaller than 145 had what lowest lost?
CREATE TABLE table_name_47 (lost INTEGER, win__percentage VARCHAR, matches VARCHAR)
SELECT Headquarters FROM company GROUP BY Headquarters ORDER BY COUNT(*) DESC LIMIT 1
Show the most common headquarter for companies.
CREATE TABLE company (Headquarters VARCHAR)
SELECT tournament FROM table_name_38 WHERE country = "united states"
what is the tournament when the country is united states?
CREATE TABLE table_name_38 (tournament VARCHAR, country VARCHAR)
SELECT road_team FROM table_name_17 WHERE home_team = "portland" AND date = "may 31"
Which Road team has a Home team of portland, and a Date of may 31?
CREATE TABLE table_name_17 (road_team VARCHAR, home_team VARCHAR, date VARCHAR)
SELECT AVG(pick) FROM table_name_81 WHERE round < 3 AND college = "northwestern state"
What was the average pick of northwestern state college under round 3?
CREATE TABLE table_name_81 (pick INTEGER, round VARCHAR, college VARCHAR)
SELECT crowd FROM table_name_71 WHERE home_team = "north melbourne"
What was the listed attendance when north melbourne was the home team?
CREATE TABLE table_name_71 (crowd VARCHAR, home_team VARCHAR)
SELECT _percentage_2006 FROM table_21132404_1 WHERE seats_2006 = 5
What was the % 2006 rating in 2006 where there were 5 seats?
CREATE TABLE table_21132404_1 (_percentage_2006 VARCHAR, seats_2006 VARCHAR)
SELECT COUNT(matches) FROM table_27268238_5 WHERE wickets = 16
How many matches were wickets 16?
CREATE TABLE table_27268238_5 (matches VARCHAR, wickets VARCHAR)
SELECT language FROM table_25926120_7 WHERE name_of_award = "Best Editing"
what is the language when the name of award is best editing?
CREATE TABLE table_25926120_7 (language VARCHAR, name_of_award VARCHAR)
SELECT opponent FROM table_name_30 WHERE week < 11 AND game_site = "sullivan stadium"
Who was the opponent at the game at Sullivan Stadium before week 11?
CREATE TABLE table_name_30 (opponent VARCHAR, week VARCHAR, game_site VARCHAR)
SELECT name AS origin FROM table_16799784_7 WHERE diameter__km_ = "2,155.0"
what's the name origin of feature of diameter (km) 2,155.0
CREATE TABLE table_16799784_7 (name VARCHAR, diameter__km_ VARCHAR)
SELECT ship FROM table_name_66 WHERE class___type = "cargo ship" AND location = "birkenhead"
What is the Cargo Ship located at Birkenhead?
CREATE TABLE table_name_66 (ship VARCHAR, class___type VARCHAR, location VARCHAR)
SELECT date FROM table_name_48 WHERE winning_driver = "rodger ward"
What date was Rodger Ward the winning driver?
CREATE TABLE table_name_48 (date VARCHAR, winning_driver VARCHAR)
SELECT location_attendance FROM table_13464416_8 WHERE record = "16-44"
What was the location and attendance when the team's record was 16-44?
CREATE TABLE table_13464416_8 (location_attendance VARCHAR, record VARCHAR)
SELECT tournament FROM table_name_61 WHERE year = 1971
What tournament is in 1971?
CREATE TABLE table_name_61 (tournament VARCHAR, year VARCHAR)
SELECT date FROM table_name_43 WHERE away = "high park demons"
What is Date, when Away is High Park Demons?
CREATE TABLE table_name_43 (date VARCHAR, away VARCHAR)
SELECT away_team FROM table_name_26 WHERE home_team = "fulham"
What is the Away Team when the Home Team is Fulham?
CREATE TABLE table_name_26 (away_team VARCHAR, home_team VARCHAR)
SELECT potential_prize_money FROM table_name_70 WHERE mole = "petrina edge"
When the Mole was Petrina Edge, what was the potential prize money?
CREATE TABLE table_name_70 (potential_prize_money VARCHAR, mole VARCHAR)
SELECT to_par FROM table_275162_1 WHERE player = "Zach Johnson"
What was zach johnson's score to par?
CREATE TABLE table_275162_1 (to_par VARCHAR, player VARCHAR)
SELECT h_a_n FROM table_name_50 WHERE date = "october 31"
What is H/A/N, when Date is October 31?
CREATE TABLE table_name_50 (h_a_n VARCHAR, date VARCHAR)
SELECT attendance FROM table_name_39 WHERE week < 16 AND date = "bye"
What is the Attendance for a Week earlier than 16, and a Date of bye?
CREATE TABLE table_name_39 (attendance VARCHAR, week VARCHAR, date VARCHAR)
SELECT design FROM table_11900773_5 WHERE theme = "Jasper National Park"
Who was responsible for the design of the Jasper National Park theme?
CREATE TABLE table_11900773_5 (design VARCHAR, theme VARCHAR)
SELECT COUNT(division) FROM table_name_83 WHERE apps > 5 AND country = "greece"
Name the total number of division for apps more than 5 for greece
CREATE TABLE table_name_83 (division VARCHAR, apps VARCHAR, country VARCHAR)
SELECT SUM(pages) FROM table_name_47 WHERE isbn = "1-40122-328-1"
How many pages does the ISBN 1-40122-328-1 have?
CREATE TABLE table_name_47 (pages INTEGER, isbn VARCHAR)
SELECT COUNT(laps) FROM table_name_88 WHERE grid = 14
What is the number of laps for Grid 14?
CREATE TABLE table_name_88 (laps VARCHAR, grid VARCHAR)
SELECT result FROM table_name_33 WHERE year > 2004
What were the results after 2004?
CREATE TABLE table_name_33 (result VARCHAR, year INTEGER)
SELECT kerry_number FROM table_1302886_1 WHERE bush_number = 3907
When bush# is 3907, what is Kerry#?
CREATE TABLE table_1302886_1 (kerry_number VARCHAR, bush_number VARCHAR)
SELECT opponent FROM table_name_33 WHERE week < 11 AND tv_time = "fox 10:00 am mt" AND result = "w 20-17"
Can you tell me the Opponent that has the Week smaller than 11, and the TV Time of fox 10:00 am mt, and the Result of w 20-17?
CREATE TABLE table_name_33 (opponent VARCHAR, result VARCHAR, week VARCHAR, tv_time VARCHAR)
SELECT COUNT(nationality) FROM table_2897457_7 WHERE player = "Alex Nikolic"
How many nationalities does Alex Nikolic come from?
CREATE TABLE table_2897457_7 (nationality VARCHAR, player VARCHAR)
SELECT opposing_pitcher FROM table_name_37 WHERE team = "phillies" AND location = "pittsburgh" AND inning = "8th"
Who is the Opposing Pitcher when Team is phillies, Location is pittsburgh, and Inning is 8th?
CREATE TABLE table_name_37 (opposing_pitcher VARCHAR, inning VARCHAR, team VARCHAR, location VARCHAR)
SELECT COUNT(weeks_on_peak) FROM table_1160304_2 WHERE chart = "Ireland Albums Top 75"
What was the total number of weeks on peak for the Ireland Albums Top 75 chart?
CREATE TABLE table_1160304_2 (weeks_on_peak VARCHAR, chart VARCHAR)
SELECT AVG(debut_year) FROM table_name_6 WHERE games < 54 AND years_at_club = "1989" AND goals < 8
What is the debut year for the player with fewer than 54 games, fewer than 8 goals and 1989 at club?
CREATE TABLE table_name_6 (debut_year INTEGER, goals VARCHAR, games VARCHAR, years_at_club VARCHAR)
SELECT current_broadway_cast FROM table_19529639_3 WHERE original_broadway_cast = "Constantine Maroulis"
What member of the current Broadway cast plays the character played by Constantine Maroulis from the original Broadway cast?
CREATE TABLE table_19529639_3 (current_broadway_cast VARCHAR, original_broadway_cast VARCHAR)
SELECT election FROM table_name_63 WHERE outcome_of_election = "ndc opposition" AND number_of_votes = "2,728,241"
What is the election with an outcome of ndc opposition and 2,728,241 votes?
CREATE TABLE table_name_63 (election VARCHAR, outcome_of_election VARCHAR, number_of_votes VARCHAR)
SELECT away_team AS score FROM table_name_85 WHERE venue = "kardinia park"
What did the away team score at Kardinia Park?
CREATE TABLE table_name_85 (away_team VARCHAR, venue VARCHAR)
SELECT country FROM table_name_25 WHERE player = "jack nicklaus"
WHAT COUNTRY HAS A PLAYER NAMED JACK NICKLAUS?
CREATE TABLE table_name_25 (country VARCHAR, player VARCHAR)
SELECT date FROM table_name_21 WHERE away_team = "gold coast blaze"
What was the date that featured a game against Gold Coast Blaze?
CREATE TABLE table_name_21 (date VARCHAR, away_team VARCHAR)
SELECT jockey FROM table_24915874_1 WHERE weight__kg_ = "53.5"
For which jockey was the weight in kg 53.5?
CREATE TABLE table_24915874_1 (jockey VARCHAR, weight__kg_ VARCHAR)
SELECT year_of_previous_participation FROM table_2518850_4 WHERE prefecture = "Kagoshima"
What was the year of previous participation for the school in the Kagoshima prefecture?
CREATE TABLE table_2518850_4 (year_of_previous_participation VARCHAR, prefecture VARCHAR)
SELECT partner FROM table_name_19 WHERE score_in_the_final = "6–4, 6–1"
what partner made the scores 6–4, 6–1?
CREATE TABLE table_name_19 (partner VARCHAR, score_in_the_final VARCHAR)
SELECT visitor FROM table_name_99 WHERE game__number > 62 AND date = "february 25"
Which Visitor has a Game # larger than 62, and a Date of february 25?
CREATE TABLE table_name_99 (visitor VARCHAR, game__number VARCHAR, date VARCHAR)
SELECT date FROM table_name_60 WHERE result = "w 31-28"
Name the date for w 31-28
CREATE TABLE table_name_60 (date VARCHAR, result VARCHAR)
SELECT MAX(fa_cup) FROM table_name_74 WHERE championship = 18 AND total = 19
Name the most FA cup for championship of 18 and total of 19
CREATE TABLE table_name_74 (fa_cup INTEGER, championship VARCHAR, total VARCHAR)
SELECT manufacturer FROM table_name_84 WHERE laps = 24 AND grid = 9
Who manufactured the motorcycle that did 24 laps and 9 grids?
CREATE TABLE table_name_84 (manufacturer VARCHAR, laps VARCHAR, grid VARCHAR)
SELECT score FROM table_name_21 WHERE place = "4"
What was the score for place 4?
CREATE TABLE table_name_21 (score VARCHAR, place VARCHAR)
SELECT player FROM table_name_23 WHERE cfl_team = "montreal alouettes (via hamilton via winnipeg)"
Which Player has a CFL Team of montreal alouettes (via hamilton via winnipeg)?
CREATE TABLE table_name_23 (player VARCHAR, cfl_team VARCHAR)
SELECT visitor FROM table_name_42 WHERE home = "kings"
Who was the visiting team that played against the Kings?
CREATE TABLE table_name_42 (visitor VARCHAR, home VARCHAR)
SELECT companion__in_order_from_star_ FROM table_name_58 WHERE semimajor_axis___au__ = "0.1886 +0.083 −0.0104"
What Companion (in order from star) has a Semimajor axis (AU) of 0.1886 +0.083 −0.0104?
CREATE TABLE table_name_58 (companion__in_order_from_star_ VARCHAR, semimajor_axis___au__ VARCHAR)
SELECT visitor FROM table_name_85 WHERE date = "october 20"
Who was the visitor on October 20?
CREATE TABLE table_name_85 (visitor VARCHAR, date VARCHAR)
SELECT COUNT(winning_driver) FROM table_10707176_2 WHERE rnd = "5"
How many winning drivers were the for the rnd equalling 5?
CREATE TABLE table_10707176_2 (winning_driver VARCHAR, rnd VARCHAR)
SELECT hk_viewers FROM table_10942714_1 WHERE premiere = 34
How many viewers were there for the premier with 34
CREATE TABLE table_10942714_1 (hk_viewers VARCHAR, premiere VARCHAR)
SELECT july__°c_ FROM table_21980_1 WHERE july__°f_ = "71/55"
What were the July (°C) temperatures when the July (°F) temperatures were 71/55?
CREATE TABLE table_21980_1 (july__°c_ VARCHAR, july__°f_ VARCHAR)
SELECT AVG(total) FROM table_name_89 WHERE position < 4 AND b_score > 9.125 AND a_score < 6.6
What total has a position smaller than 4, a B score higher than 9.125, and an A score less than 6.6?
CREATE TABLE table_name_89 (total INTEGER, a_score VARCHAR, position VARCHAR, b_score VARCHAR)
SELECT constructor FROM table_name_10 WHERE driver = "david coulthard"
Tell me the constructor for david coulthard
CREATE TABLE table_name_10 (constructor VARCHAR, driver VARCHAR)
SELECT COUNT(opponent) FROM table_29163303_4 WHERE score = "6–4, 3–6, [11–13]"
How many times has the score been 6–4, 3–6, [11–13]?
CREATE TABLE table_29163303_4 (opponent VARCHAR, score VARCHAR)
SELECT investment_earnings FROM table_name_3 WHERE year > 2001 AND other_local_sources = "$2,670,060"
What were the investment earnings in a year when other local sources were $2,670,060 after 2001?
CREATE TABLE table_name_3 (investment_earnings VARCHAR, year VARCHAR, other_local_sources VARCHAR)
SELECT home_team AS score FROM table_name_98 WHERE venue = "vfl park"
For Venue vfl park, what was the home team score?
CREATE TABLE table_name_98 (home_team VARCHAR, venue VARCHAR)
SELECT MIN(seating), MAX(seating), AVG(seating) FROM track
What is the minimum, maximum, and average seating for all tracks.
CREATE TABLE track (seating INTEGER)
SELECT semifinals FROM table_18602462_22 WHERE athlete = "Dorrie Timmermans-Van Hall"
What is the semifinal result for Dorrie Timmermans-Van Hall?
CREATE TABLE table_18602462_22 (semifinals VARCHAR, athlete VARCHAR)
SELECT term_limited FROM table_26131768_4 WHERE representative = "Dave Hall"
If the representative is Dave Hall, when was the term limited?
CREATE TABLE table_26131768_4 (term_limited VARCHAR, representative VARCHAR)
SELECT label FROM table_name_13 WHERE catalog = "486 136-2"
What Label has a Catalog of 486 136-2?
CREATE TABLE table_name_13 (label VARCHAR, catalog VARCHAR)
SELECT country FROM table_name_1 WHERE city = "gafsa"
what is the country when the city is gafsa?
CREATE TABLE table_name_1 (country VARCHAR, city VARCHAR)
SELECT location_attendance FROM table_27756314_7 WHERE game = 19
where was the location that had game 19?
CREATE TABLE table_27756314_7 (location_attendance VARCHAR, game VARCHAR)
SELECT website FROM table_name_82 WHERE founded < 1897 AND suburb_town = "adaminaby"
Which website was founded before 1897, and is located in Adaminaby?
CREATE TABLE table_name_82 (website VARCHAR, founded VARCHAR, suburb_town VARCHAR)
SELECT player FROM table_11545282_19 WHERE position = "Shooting guard"
Which player's position is the shooting guard?
CREATE TABLE table_11545282_19 (player VARCHAR, position VARCHAR)
SELECT member_countries FROM table_name_15 WHERE area__km²_ = "871,980"
Which country has an area of 871,980 square km?
CREATE TABLE table_name_15 (member_countries VARCHAR, area__km²_ VARCHAR)
SELECT position FROM table_name_52 WHERE province___club = "example" AND date_of_birth__age_ = "example" AND player = "michael elumeze"
What is Position, when Province / Club is Example, when Date of Birth (Age) is Example, and when Player is Michael Elumeze?
CREATE TABLE table_name_52 (position VARCHAR, player VARCHAR, province___club VARCHAR, date_of_birth__age_ VARCHAR)
SELECT country FROM table_name_34 WHERE engine_make_capacity = "čz 171cc"
In what country was the car with the čz 171cc engine?
CREATE TABLE table_name_34 (country VARCHAR, engine_make_capacity VARCHAR)
SELECT lead FROM table_name_1 WHERE nation = "croatia"
Where did Croatia lead?
CREATE TABLE table_name_1 (lead VARCHAR, nation VARCHAR)
SELECT COUNT(*) FROM (SELECT city FROM airports GROUP BY city HAVING COUNT(*) > 3)
How many cities are there that have more than 3 airports?
CREATE TABLE airports (city VARCHAR)
SELECT country FROM table_name_88 WHERE place = "t6" AND player = "sean o'hair"
What country has t6 as the place, with sean o'hair as the player?
CREATE TABLE table_name_88 (country VARCHAR, place VARCHAR, player VARCHAR)
SELECT date FROM table_29126507_1 WHERE home_team = "Fitzroy"
When did Fitzroy play as the home team?
CREATE TABLE table_29126507_1 (date VARCHAR, home_team VARCHAR)
SELECT MAX(time) FROM table_name_48 WHERE heat_rank = 8 AND lane > 2
Tell me the highest time for heat rank of 8 and lane more than 2
CREATE TABLE table_name_48 (time INTEGER, heat_rank VARCHAR, lane VARCHAR)
SELECT club FROM table_name_18 WHERE date_of_birth = "1979-01-29"
What is the Club of the Player with a Date of Birth of 1979-01-29?
CREATE TABLE table_name_18 (club VARCHAR, date_of_birth VARCHAR)
SELECT COUNT(record) FROM table_22815265_1 WHERE opponent = "Utah"
How many records show Utah as the opponent?
CREATE TABLE table_22815265_1 (record VARCHAR, opponent VARCHAR)
SELECT arabic_capital_name FROM table_15694696_1 WHERE english_capital_name = "Beirut"
what is the arabic capital name where the english capital name is beirut?
CREATE TABLE table_15694696_1 (arabic_capital_name VARCHAR, english_capital_name VARCHAR)
SELECT MIN(floors) FROM table_name_90 WHERE built > 1970 AND name = "nv building 3"
What is the lowest Floors, when Built is greater than 1970, and when Name is NV Building 3?
CREATE TABLE table_name_90 (floors INTEGER, built VARCHAR, name VARCHAR)
SELECT tournament FROM table_11622840_1 WHERE location = "Rhode Island"
Name all the tournaments that took place in Rhode Island.
CREATE TABLE table_11622840_1 (tournament VARCHAR, location VARCHAR)
SELECT engine FROM table_name_9 WHERE chassis = "theodore n183"
What engine was in the Theodore n183?
CREATE TABLE table_name_9 (engine VARCHAR, chassis VARCHAR)
SELECT category FROM table_name_8 WHERE established = 1990
Which is the category of the group was establishe in 1990?
CREATE TABLE table_name_8 (category VARCHAR, established VARCHAR)
SELECT director FROM table_name_14 WHERE year = 1935 AND role = "shelby barret wyatt"
What director directed the role of shelby barret wyatt in 1935?
CREATE TABLE table_name_14 (director VARCHAR, year VARCHAR, role VARCHAR)
SELECT MAX(episode) FROM table_15187735_4 WHERE segment_d = "Blown Glass"
What is the last episode which has segment d as blown glass?
CREATE TABLE table_15187735_4 (episode INTEGER, segment_d VARCHAR)
SELECT score FROM table_name_50 WHERE attendance = "43,746"
What was the score when 43,746 attended?
CREATE TABLE table_name_50 (score VARCHAR, attendance VARCHAR)
SELECT date FROM table_name_3 WHERE score = "3-6 4-6"
When was the score 3-6 4-6?
CREATE TABLE table_name_3 (date VARCHAR, score VARCHAR)
SELECT attendance FROM table_name_69 WHERE date = "november 1, 1993"
What Attendance has a Date that is november 1, 1993?
CREATE TABLE table_name_69 (attendance VARCHAR, date VARCHAR)
SELECT nickname_s_ FROM table_name_59 WHERE enrollment__2013_14_ = "160"
What is the nickname with an enrollment (2013/14) of 160?
CREATE TABLE table_name_59 (nickname_s_ VARCHAR, enrollment__2013_14_ VARCHAR)
SELECT MIN(year) FROM table_name_37 WHERE manager = "bobby dews" AND playoffs = "lost in 1st round"
Which Year has a Manager of bobby dews, and Playoffs of lost in 1st round?
CREATE TABLE table_name_37 (year INTEGER, manager VARCHAR, playoffs VARCHAR)
SELECT COUNT(affiliation) FROM table_16383772_1 WHERE enrollment = 14898
Name the total number of affiliation for enrollment being 14898
CREATE TABLE table_16383772_1 (affiliation VARCHAR, enrollment VARCHAR)
SELECT COUNT(week) FROM table_name_23 WHERE date = "bye"
How many weeks in total has bye as the date?
CREATE TABLE table_name_23 (week VARCHAR, date VARCHAR)
SELECT president FROM table_name_37 WHERE head_coach = "mark wakeling"
Who is the President of the team that has the Head Coach Mark Wakeling?
CREATE TABLE table_name_37 (president VARCHAR, head_coach VARCHAR)
SELECT 2011 FROM table_name_56 WHERE 2010 = "8–4"
What is the 2011 when the 2010 is 8–4?
CREATE TABLE table_name_56 (Id VARCHAR)
SELECT away_captain FROM table_name_21 WHERE venue = "melbourne cricket ground" AND home_captain = "joe darling"
Who was the Away Captain when the Home Captain was Joe Darling at Melbourne Cricket Ground?
CREATE TABLE table_name_21 (away_captain VARCHAR, venue VARCHAR, home_captain VARCHAR)
SELECT DISTINCT Police_force FROM county_public_safety WHERE LOCATION <> "East"
List the distinct police forces of counties whose location is not on east side.
CREATE TABLE county_public_safety (Police_force VARCHAR, LOCATION VARCHAR)
SELECT class_to_1928 FROM table_name_16 WHERE quantity < 440 AND seats = "29/29"
What Class to 1928 has the Quantity smaller than 440 and Seats of 29/29?
CREATE TABLE table_name_16 (class_to_1928 VARCHAR, quantity VARCHAR, seats VARCHAR)
SELECT date FROM table_name_25 WHERE away_team = "honduras"
What is the date that is Away team is Honduras?
CREATE TABLE table_name_25 (date VARCHAR, away_team VARCHAR)
SELECT rebuildjahr_e_ FROM table_name_17 WHERE class = "t2aa"
What was the Rebuildjahr(e) for the T2AA class?
CREATE TABLE table_name_17 (rebuildjahr_e_ VARCHAR, class VARCHAR)
SELECT opponents_in_the_final FROM table_name_62 WHERE surface = "carpet (i)"
Who were the Opponents in the final that played on a carpet (i) Surface?
CREATE TABLE table_name_62 (opponents_in_the_final VARCHAR, surface VARCHAR)
SELECT COUNT(contestant) FROM table_19810459_1 WHERE background = "Internet dreamer"
For how many contestants was the background internet dreamer?
CREATE TABLE table_19810459_1 (contestant VARCHAR, background VARCHAR)
SELECT casualties FROM table_name_43 WHERE nature_of_incident = "hostile" AND date = "2006-06-26"
Name the casualities for nation of incident of hostile on 2006-06-26
CREATE TABLE table_name_43 (casualties VARCHAR, nature_of_incident VARCHAR, date VARCHAR)
SELECT school FROM table_name_76 WHERE enrollment < 301
What School has an Enrollement smaller than 301?
CREATE TABLE table_name_76 (school VARCHAR, enrollment INTEGER)