answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
489
SELECT ahli FROM table_26173058_2 WHERE ramtha = "1-0"
what is the location where the record is 1-0
CREATE TABLE table_26173058_2 (ahli VARCHAR, ramtha VARCHAR)
SELECT first_elected FROM table_2668401_17 WHERE district = "Virginia 10"
When was the incumbent from the Virginia 10 district first elected?
CREATE TABLE table_2668401_17 (first_elected VARCHAR, district VARCHAR)
SELECT college FROM table_12165999_1 WHERE afl_team = "Cincinnati Bengals"
What college did the Cincinnati Bengals' player come from?
CREATE TABLE table_12165999_1 (college VARCHAR, afl_team VARCHAR)
SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T1.rank = "Professor"
Show the ids of students whose advisors are professors.
CREATE TABLE Student (StuID VARCHAR, advisor VARCHAR); CREATE TABLE Faculty (FacID VARCHAR, rank VARCHAR)
SELECT hanja___kanji FROM table_name_5 WHERE korean_name = "chungcheong-bukdo"
What is the Hanja/Kanji of the Province with a Korean name of Chungcheong-Bukdo?
CREATE TABLE table_name_5 (hanja___kanji VARCHAR, korean_name VARCHAR)
SELECT home FROM table_name_92 WHERE series = "series tied 3–3"
Which Home has a Series of series tied 3–3?
CREATE TABLE table_name_92 (home VARCHAR, series VARCHAR)
SELECT MIN(shots) FROM table_name_38 WHERE points > 32
What is the lowest Shots with a Point that is larger than 32?
CREATE TABLE table_name_38 (shots INTEGER, points INTEGER)
SELECT host_team FROM table_name_70 WHERE stadium = "lincoln financial field"
What is the host team with the stadium Lincoln Financial Field?
CREATE TABLE table_name_70 (host_team VARCHAR, stadium VARCHAR)
SELECT YEAR FROM festival_detail GROUP BY YEAR HAVING COUNT(*) > 1
List the year in which there are more than one festivals.
CREATE TABLE festival_detail (YEAR VARCHAR)
SELECT Product_Name, AVG(Product_Price) FROM PRODUCTS GROUP BY Product_Name
What are the different product names? What is the average product price for each of them?
CREATE TABLE PRODUCTS (Product_Name VARCHAR, Product_Price INTEGER)
SELECT method FROM table_name_19 WHERE opponent = "thiago alves"
What is Method, when Opponent is "Thiago Alves"?
CREATE TABLE table_name_19 (method VARCHAR, opponent VARCHAR)
SELECT SUM(drawn) FROM table_name_76 WHERE position < 12 AND team = "clitheroe" AND lost > 4
How many draws did clitheroe have when their position was less than 12 and they lost less than 4 times?
CREATE TABLE table_name_76 (drawn INTEGER, lost VARCHAR, position VARCHAR, team VARCHAR)
SELECT athlete FROM table_name_6 WHERE notes = "fb" AND rank < 5
Who has less than 5 rank and notes of fb?
CREATE TABLE table_name_6 (athlete VARCHAR, notes VARCHAR, rank VARCHAR)
SELECT DISTINCT T1.Grape FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "White" AND T2.score > 90
Find the the grape whose white color grapes are used to produce wines with scores higher than 90.
CREATE TABLE GRAPES (Grape VARCHAR, Color VARCHAR); CREATE TABLE WINE (Grape VARCHAR, score VARCHAR)
SELECT MAX(league_goals) FROM table_29701419_2 WHERE total_goals = 179
What is the league goals when the total goals is 179?
CREATE TABLE table_29701419_2 (league_goals INTEGER, total_goals VARCHAR)
SELECT T2.Delegate FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District WHERE T1.Population < 100000
Which delegates are from counties with population smaller than 100000?
CREATE TABLE election (Delegate VARCHAR, District VARCHAR); CREATE TABLE county (County_id VARCHAR, Population INTEGER)
SELECT status FROM table_name_18 WHERE floors < 18 AND year > 2013
What is the status of the building with less than 18 floors and later than 2013?
CREATE TABLE table_name_18 (status VARCHAR, floors VARCHAR, year VARCHAR)
SELECT to_par FROM table_name_45 WHERE player = "ben hogan"
What was Ben Hogan's par?
CREATE TABLE table_name_45 (to_par VARCHAR, player VARCHAR)
SELECT name FROM table_name_80 WHERE transfer_fee = "loan"
What is the Name, when the Transfer fee is "loan"?
CREATE TABLE table_name_80 (name VARCHAR, transfer_fee VARCHAR)
SELECT player FROM table_11545282_4 WHERE years_for_jazz = "1979-86"
Who are the players that played for the jazz from 1979-86
CREATE TABLE table_11545282_4 (player VARCHAR, years_for_jazz VARCHAR)
SELECT date FROM table_name_8 WHERE opponent_in_the_final = "johanna konta"
Tell me the date for johanna konta
CREATE TABLE table_name_8 (date VARCHAR, opponent_in_the_final VARCHAR)
SELECT finish FROM table_name_79 WHERE win__percentage = ".585"
What was the final rank of the Brewers when they achieved a win percentage of .585?
CREATE TABLE table_name_79 (finish VARCHAR, win__percentage VARCHAR)
SELECT name, CLASS, rank FROM captain
Find the name, class and rank of all captains.
CREATE TABLE captain (name VARCHAR, CLASS VARCHAR, rank VARCHAR)
SELECT visitor FROM table_name_52 WHERE date = "october 19"
Name the visitor for october 19
CREATE TABLE table_name_52 (visitor VARCHAR, date VARCHAR)
SELECT track FROM table_name_96 WHERE translation = "flemish women"
Which track translates to Flemish Women?
CREATE TABLE table_name_96 (track VARCHAR, translation VARCHAR)
SELECT MIN(_number) FROM table_24781886_2 WHERE viewers = "7.55"
When 7.55 is the amount of viewers what is the lowest number?
CREATE TABLE table_24781886_2 (_number INTEGER, viewers VARCHAR)
SELECT COUNT(party) FROM table_1341663_11 WHERE incumbent = "Dawson Mathis"
How many parties are there in races involving Dawson Mathis?
CREATE TABLE table_1341663_11 (party VARCHAR, incumbent VARCHAR)
SELECT population_density___km²_2011_ FROM table_24027047_1 WHERE area__km²__2011 * * = "684.37"
What was the population density in km2 for 2011 in the division where area in km2 was 684.37 in 2011?
CREATE TABLE table_24027047_1 (population_density___km²_2011_ VARCHAR, area__km²__2011 VARCHAR)
SELECT T1.Date_of_ceremony FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T2.Weeks_on_Top > 2
Please show the date of ceremony of the volumes that last more than 2 weeks on top.
CREATE TABLE music_festival (Date_of_ceremony VARCHAR, Volume VARCHAR); CREATE TABLE volume (Volume_ID VARCHAR, Weeks_on_Top INTEGER)
SELECT COUNT(pct) FROM table_name_5 WHERE years > 100 AND team = "akron"
What is Akron's highest Pct in 100 years?
CREATE TABLE table_name_5 (pct VARCHAR, years VARCHAR, team VARCHAR)
SELECT MAX(total) FROM table_name_57 WHERE rank < 4 AND nation = "tunisia (tun)" AND gold < 2
What is the highest Total with a Rank that is smaller than 4 and a Nation of tunisia (tun) with a Gold that is smaller than 2?
CREATE TABLE table_name_57 (total INTEGER, gold VARCHAR, rank VARCHAR, nation VARCHAR)
SELECT T2.Name FROM phone_market AS T1 JOIN phone AS T2 ON T1.Phone_ID = T2.Phone_ID GROUP BY T2.Name HAVING SUM(T1.Num_of_stock) >= 2000 ORDER BY SUM(T1.Num_of_stock) DESC
Show the names of phones that have total number of stocks bigger than 2000, in descending order of the total number of stocks.
CREATE TABLE phone_market (Phone_ID VARCHAR, Num_of_stock INTEGER); CREATE TABLE phone (Name VARCHAR, Phone_ID VARCHAR)
SELECT draw FROM table_name_85 WHERE span = "1987-1999"
What draw has a Span of 1987-1999?
CREATE TABLE table_name_85 (draw VARCHAR, span VARCHAR)
SELECT SUM(bronze) FROM table_name_89 WHERE silver > 2 AND rank > 6
What is the sum of the bronze medals when there were more than 2 silver medals and a rank larger than 6?
CREATE TABLE table_name_89 (bronze INTEGER, silver VARCHAR, rank VARCHAR)
SELECT bronze FROM table_name_4 WHERE total < 3 AND silver > 0
How many bronze medals did the team have with 0 total silver and less than 3 total medals?
CREATE TABLE table_name_4 (bronze VARCHAR, total VARCHAR, silver VARCHAR)
SELECT SUM(distance) FROM table_name_73 WHERE county = "faulkner" AND total < 1.5
How much Distance has a County of faulkner, and a Total smaller than 1.5?
CREATE TABLE table_name_73 (distance INTEGER, county VARCHAR, total VARCHAR)
SELECT nationality FROM table_name_57 WHERE ranking = 4
What is the Nationality that shows 4 as the ranking?
CREATE TABLE table_name_57 (nationality VARCHAR, ranking VARCHAR)
SELECT final_score FROM table_name_33 WHERE date = "november 17"
What was the final score of the game on November 17?
CREATE TABLE table_name_33 (final_score VARCHAR, date VARCHAR)
SELECT result FROM table_name_46 WHERE goal = 3
Tell me the result for 3 goals
CREATE TABLE table_name_46 (result VARCHAR, goal VARCHAR)
SELECT vfl_games FROM table_16527640_3 WHERE location = "off Goodenough Island Milne Bay"
How many VFL games were located off Goodenough Island Milne Bay?
CREATE TABLE table_16527640_3 (vfl_games VARCHAR, location VARCHAR)
SELECT MIN(founded) FROM table_name_42 WHERE club = "bizerte athletic f.c."
What is the lowest founded that has bizerte athletic f.c. as the club?
CREATE TABLE table_name_42 (founded INTEGER, club VARCHAR)
SELECT T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY T2.Host_city_ID HAVING COUNT(*) > 1
Show the official names of the cities that have hosted more than one competition.
CREATE TABLE farm_competition (Host_city_ID VARCHAR); CREATE TABLE city (Official_Name VARCHAR, City_ID VARCHAR)
SELECT main_contestant FROM table_name_11 WHERE status = "eliminated" AND scores_by_each_individual_judge = 1 + 7 + 5 = 13
Who is the main contestant eliminated with a score of 1 + 7 + 5 = 13?
CREATE TABLE table_name_11 (main_contestant VARCHAR, status VARCHAR, scores_by_each_individual_judge VARCHAR)
SELECT MIN(city_area_km_2__) FROM table_18425346_2
What is the smallest city area?
CREATE TABLE table_18425346_2 (city_area_km_2__ INTEGER)
SELECT year FROM table_name_59 WHERE borough = "harrogate" AND rank < 6 AND definition = "civil parish"
Which Year has a Borough of harrogate, and a Rank smaller than 6, and a Definition of civil parish?
CREATE TABLE table_name_59 (year VARCHAR, definition VARCHAR, borough VARCHAR, rank VARCHAR)
SELECT MAX(tournament) FROM table_name_90 WHERE total = 3 AND team = "iowa state"
How many tournament titles for iowa state with 3 total titles?
CREATE TABLE table_name_90 (tournament INTEGER, total VARCHAR, team VARCHAR)
SELECT street_address FROM table_name_94 WHERE name = "life & casualty tower"
What is the address of the Life & Casualty Tower?
CREATE TABLE table_name_94 (street_address VARCHAR, name VARCHAR)
SELECT position FROM table_16494599_4 WHERE school_club_team = "Seton Hall"
What position(s) does the player from seton hall play?
CREATE TABLE table_16494599_4 (position VARCHAR, school_club_team VARCHAR)
SELECT 2012 FROM table_name_6 WHERE 2011 = "1r" AND tournament = "australian open"
What is the 2012 value with a 1r in 2011 in the Australian Open?
CREATE TABLE table_name_6 (tournament VARCHAR)
SELECT score_in_the_final FROM table_2201724_1 WHERE opponent_in_the_final = "Tony Roche"
What are the scores in matches against Tony Roche?
CREATE TABLE table_2201724_1 (score_in_the_final VARCHAR, opponent_in_the_final VARCHAR)
SELECT MAX(year) FROM table_name_89 WHERE rank = "2"
which year holds rank 2?
CREATE TABLE table_name_89 (year INTEGER, rank VARCHAR)
SELECT COUNT(DISTINCT customer_id) FROM Accounts
How many customers have an account?
CREATE TABLE Accounts (customer_id VARCHAR)
SELECT attendance FROM table_name_64 WHERE home_team = "carlisle united"
What is the attendance of the match with Carlisle united as the home team?
CREATE TABLE table_name_64 (attendance VARCHAR, home_team VARCHAR)
SELECT visiting_team FROM table_name_36 WHERE date = "october 18"
What visiting team played on October 18?
CREATE TABLE table_name_36 (visiting_team VARCHAR, date VARCHAR)
SELECT AVG(silver) FROM table_name_87 WHERE bronze < 15 AND nation = "montenegro" AND total > 11
What is the average amount of silver medals Montenegro, who has less than 15 bronze and more than 11 total medals, has?
CREATE TABLE table_name_87 (silver INTEGER, total VARCHAR, bronze VARCHAR, nation VARCHAR)
SELECT edition FROM table_27877656_8 WHERE opponent_team = "Zimbabwe"
In what edition was the opponent team Zimbabwe?
CREATE TABLE table_27877656_8 (edition VARCHAR, opponent_team VARCHAR)
SELECT preliminary_average FROM table_16268026_3 WHERE semifinal_average = "8.834 (3)"
What is the preliminary average when the semifinal average is 8.834 (3) ?
CREATE TABLE table_16268026_3 (preliminary_average VARCHAR, semifinal_average VARCHAR)
SELECT leading_scorer FROM table_name_27 WHERE home = "kings"
Who is the leading scorer of the game where the Kings is the home team?
CREATE TABLE table_name_27 (leading_scorer VARCHAR, home VARCHAR)
SELECT away_team FROM table_name_54 WHERE match_score = "norths 19 manly 4"
What is the Away team when the match score was norths 19 manly 4?
CREATE TABLE table_name_54 (away_team VARCHAR, match_score VARCHAR)
SELECT COUNT(year) FROM table_name_63 WHERE film_name = "rang barse"
Which year was the film Rang Barse introduced?
CREATE TABLE table_name_63 (year VARCHAR, film_name VARCHAR)
SELECT county FROM table_name_51 WHERE precincts = "90/90"
Which County has Precincts of 90/90?
CREATE TABLE table_name_51 (county VARCHAR, precincts VARCHAR)
SELECT partner FROM table_28948937_3 WHERE outcome = "Winner" AND surface = "Hard"
What is the name of the partner that has a winner outcome and a hard surface?
CREATE TABLE table_28948937_3 (partner VARCHAR, outcome VARCHAR, surface VARCHAR)
SELECT date_made FROM table_name_26 WHERE type = "railmotor"
When was the railmotor made?
CREATE TABLE table_name_26 (date_made VARCHAR, type VARCHAR)
SELECT time_retired FROM table_name_47 WHERE laps > 52 AND grid > 21
What is the Time/Retired for laps higher than 52 on a grid larger than 21?
CREATE TABLE table_name_47 (time_retired VARCHAR, laps VARCHAR, grid VARCHAR)
SELECT super_g FROM table_name_31 WHERE victories = 26 AND country = "austria"
What Super G has Victories of 26, and a Country of austria?
CREATE TABLE table_name_31 (super_g VARCHAR, victories VARCHAR, country VARCHAR)
SELECT runner_up FROM table_name_35 WHERE winner = "janice yan (閻奕格)"
Name the runner-up for janice yan (閻奕格)
CREATE TABLE table_name_35 (runner_up VARCHAR, winner VARCHAR)
SELECT total FROM table_26980923_2 WHERE stadium = "Rugby Park"
What was the total attendance at rugby park?
CREATE TABLE table_26980923_2 (total VARCHAR, stadium VARCHAR)
SELECT MIN AS $25___1_4_oz FROM table_name_57 WHERE $10___1_10_oz = "70,250"
WHAT IS THE LOWEST $25-1/4 OZ COIN WITH A $10-1/10 OZ OF $70,250?
CREATE TABLE table_name_57 (MIN VARCHAR, $10___1_10_oz VARCHAR)
SELECT Carrier FROM device WHERE Software_Platform <> 'Android'
What are the carriers of devices whose software platforms are not "Android"?
CREATE TABLE device (Carrier VARCHAR, Software_Platform VARCHAR)
SELECT COUNT(losses) FROM table_name_37 WHERE wins = 12 AND goal_difference < -14
What is the total number of losses for entries that have 12 wins and a goal difference smaller than -14?
CREATE TABLE table_name_37 (losses VARCHAR, wins VARCHAR, goal_difference VARCHAR)
SELECT MIN(floors) FROM table_name_41 WHERE street_address = "921 sw sixth avenue"
What's the least amount of floors at 921 sw sixth avenue?
CREATE TABLE table_name_41 (floors INTEGER, street_address VARCHAR)
SELECT MAX(bronze) FROM table_name_63 WHERE nation = "czech republic" AND total < 4
Which the highest Bronze of czech republic with a Total smaller than 4?
CREATE TABLE table_name_63 (bronze INTEGER, nation VARCHAR, total VARCHAR)
SELECT MIN(year) FROM table_11570261_1 WHERE winning_score = −8(71 - 63 - 69 - 69 = 272)
what is the minimum year where winning score is −8 (71-63-69-69=272)
CREATE TABLE table_11570261_1 (year INTEGER, winning_score VARCHAR)
SELECT circuit FROM table_25459168_2 WHERE date = "August 21"
What circuit was used on August 21?
CREATE TABLE table_25459168_2 (circuit VARCHAR, date VARCHAR)
SELECT COUNT(andrew_and_georgies_guest_lee_mack_replaced_andrew_flintoff_as_team_captain_for_one_week_in_series_4), _episode_2 FROM table_29141354_4 WHERE episode = "04x04"
How many items are listed under 'andrew and georgies guest lee mack replaced andrew flint as team captain for one week' for episode 04x04?
CREATE TABLE table_29141354_4 (_episode_2 VARCHAR, andrew_and_georgies_guest_lee_mack_replaced_andrew_flintoff_as_team_captain_for_one_week_in_series_4 VARCHAR, episode VARCHAR)
SELECT country FROM table_name_55 WHERE player = "steve jones"
What country is Steve Jones from?
CREATE TABLE table_name_55 (country VARCHAR, player VARCHAR)
SELECT COUNT(week) FROM table_name_12 WHERE result = "bye"
What is the number of weeks where the result was listed at bye?
CREATE TABLE table_name_12 (week VARCHAR, result VARCHAR)
SELECT away_team FROM table_name_67 WHERE tie_no = "40"
What team was the away team when the tie no is 40?
CREATE TABLE table_name_67 (away_team VARCHAR, tie_no VARCHAR)
SELECT MAX(total) FROM table_name_64 WHERE rank = "8"
What is the maximum total medals when the rank is 8?
CREATE TABLE table_name_64 (total INTEGER, rank VARCHAR)
SELECT year FROM table_name_2 WHERE title = "the love eterne"
When was The Love Eterne released?
CREATE TABLE table_name_2 (year VARCHAR, title VARCHAR)
SELECT college FROM table_name_32 WHERE school = "wichita heights high school"
What college is getting a player that attends Wichita Heights High School?
CREATE TABLE table_name_32 (college VARCHAR, school VARCHAR)
SELECT player FROM table_name_50 WHERE eliminated = "episode 5"
Who's the player eliminated on episode 5?
CREATE TABLE table_name_50 (player VARCHAR, eliminated VARCHAR)
SELECT AVG(cuts_made) FROM table_name_93 WHERE top_10 = 11 AND wins < 1
What is the average number of cuts made in events with fewer than 1 win and exactly 11 top-10s?
CREATE TABLE table_name_93 (cuts_made INTEGER, top_10 VARCHAR, wins VARCHAR)
SELECT SUM(year) FROM table_name_55 WHERE pts = "54 (73)"
What year has 54 (73) points?
CREATE TABLE table_name_55 (year INTEGER, pts VARCHAR)
SELECT T1.name, T2.name FROM Country AS T1 JOIN League AS T2 ON T1.id = T2.country_id
List all country and league names.
CREATE TABLE League (name VARCHAR, country_id VARCHAR); CREATE TABLE Country (name VARCHAR, id VARCHAR)
SELECT MIN(first_elected) FROM table_1341718_14 WHERE party = "Republican" AND candidates = "Robert H. Michel (R) 66.1% Rosa Lee Fox (D) 33.9%"
When was the first elected when the party was republican and the candidate were robert h. michel (r) 66.1% rosa lee fox (d) 33.9%?
CREATE TABLE table_1341718_14 (first_elected INTEGER, party VARCHAR, candidates VARCHAR)
SELECT player FROM table_name_5 WHERE college = "memphis"
What Player is from the College of memphis?
CREATE TABLE table_name_5 (player VARCHAR, college VARCHAR)
SELECT score FROM table_name_17 WHERE attendance = 2441
What was the score when 2441 people were in attendance?
CREATE TABLE table_name_17 (score VARCHAR, attendance VARCHAR)
SELECT win_loss FROM table_25820786_2 WHERE nationality = "Switzerland"
What was the win-loss record for the player from Switzerland?
CREATE TABLE table_25820786_2 (win_loss VARCHAR, nationality VARCHAR)
SELECT away_team FROM table_name_2 WHERE venue = "kardinia park"
What is the name of the away team that played at Kardinia Park?
CREATE TABLE table_name_2 (away_team VARCHAR, venue VARCHAR)
SELECT city FROM table_name_74 WHERE team = "pegah"
where is the pegah team located?
CREATE TABLE table_name_74 (city VARCHAR, team VARCHAR)
SELECT MIN(fin_pos) FROM table_17244483_1 WHERE driver = "Darren Manning"
Darren Manning finished in what position?
CREATE TABLE table_17244483_1 (fin_pos INTEGER, driver VARCHAR)
SELECT original_us_air_date FROM table_27622417_1 WHERE prod_code = "415"
when was the premiere of the episode whose production code is 415?
CREATE TABLE table_27622417_1 (original_us_air_date VARCHAR, prod_code VARCHAR)
SELECT customer_id FROM Customers EXCEPT SELECT customer_id FROM Accounts
Show customer ids who don't have an account.
CREATE TABLE Customers (customer_id VARCHAR); CREATE TABLE Accounts (customer_id VARCHAR)
SELECT name_of_the_song FROM table_name_75 WHERE kind_of_the_song = "ending theme" AND singer = "miriam yeung"
Which song has a ending theme, and is sung by miriam yeung?
CREATE TABLE table_name_75 (name_of_the_song VARCHAR, kind_of_the_song VARCHAR, singer VARCHAR)
SELECT city FROM table_28005160_2 WHERE country = "Sweden"
What cities are in sweden on this list?
CREATE TABLE table_28005160_2 (city VARCHAR, country VARCHAR)
SELECT method FROM table_name_11 WHERE event = "ufc fight night 10"
What was the method for the UFC Fight Night 10 event?
CREATE TABLE table_name_11 (method VARCHAR, event VARCHAR)
SELECT republican FROM table_name_26 WHERE district = 10
Which Republican has a District of 10?
CREATE TABLE table_name_26 (republican VARCHAR, district VARCHAR)
SELECT COUNT(station) FROM table_1353096_1 WHERE primary_affiliation = "Fox" AND owned_since = "1986"
How many stations have fox as the primary affiliation and have been owned since 1986?
CREATE TABLE table_1353096_1 (station VARCHAR, primary_affiliation VARCHAR, owned_since VARCHAR)
SELECT COUNT(record) FROM table_25461946_5 WHERE date = "November 27"
How many games were played on november 27?
CREATE TABLE table_25461946_5 (record VARCHAR, date VARCHAR)