answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
489
SELECT country FROM table_name_17 WHERE player = "mario lemieux" AND year = 1994
What country did mario lemieux play for in 1994?
CREATE TABLE table_name_17 (country VARCHAR, player VARCHAR, year VARCHAR)
SELECT pal_m FROM table_name_55 WHERE pal_i = "50hz"
Which PAL M has a PAL I of 50HZ?
CREATE TABLE table_name_55 (pal_m VARCHAR, pal_i VARCHAR)
SELECT Restaurant.ResName, SUM(Visits_Restaurant.Spent) FROM Visits_Restaurant JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID GROUP BY Restaurant.ResID ORDER BY SUM(Visits_Restaurant.Spent) LIMIT 1
At which restaurant did the students spend the least amount of time? List restaurant and the time students spent on in total.
CREATE TABLE Visits_Restaurant (Id VARCHAR); CREATE TABLE Restaurant (Id VARCHAR)
SELECT lead FROM table_name_62 WHERE third = "hans frauenlob"
Which Lead has Hans Frauenlob as a Third?
CREATE TABLE table_name_62 (lead VARCHAR, third VARCHAR)
SELECT venue FROM table_name_11 WHERE date = "7 october 2011"
what was the venue on 7 october 2011?
CREATE TABLE table_name_11 (venue VARCHAR, date VARCHAR)
SELECT 1989 FROM table_name_95 WHERE 1990 = "f"
What is the 1989 value with F in 1990?
CREATE TABLE table_name_95 (Id VARCHAR)
SELECT away_team FROM table_name_87 WHERE home_team = "fitzroy"
What was the away team that played against Fitzroy?
CREATE TABLE table_name_87 (away_team VARCHAR, home_team VARCHAR)
SELECT date FROM table_name_82 WHERE label = "sony bmg, epic" AND catalog = "5187482"
What is the date of the item with a label of Sony BMG, Epic and a Catalog number 5187482?
CREATE TABLE table_name_82 (date VARCHAR, label VARCHAR, catalog VARCHAR)
SELECT MIN(game) FROM table_name_98 WHERE location_attendance = "alexander memorial coliseum" AND date = "october 16"
What is the least game that was played in Alexander Memorial Coliseum on October 16?
CREATE TABLE table_name_98 (game INTEGER, location_attendance VARCHAR, date VARCHAR)
SELECT finalist FROM table_name_66 WHERE surface = "hard" AND tournament = "miami"
Who was the finalist of the hard surface tournament in Miami?
CREATE TABLE table_name_66 (finalist VARCHAR, surface VARCHAR, tournament VARCHAR)
SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city ORDER BY COUNT(*) DESC LIMIT 1
Find the city with the most number of stores.
CREATE TABLE district (headquartered_city VARCHAR, district_id VARCHAR); CREATE TABLE store_district (store_id VARCHAR, district_id VARCHAR); CREATE TABLE store (store_id VARCHAR)
SELECT replaced_by FROM table_22297198_3 WHERE date_of_vacancy = "12 Dec 2009"
Who was the replacement manager for the vacancy of 12 Dec 2009?
CREATE TABLE table_22297198_3 (replaced_by VARCHAR, date_of_vacancy VARCHAR)
SELECT MAX(capacity) FROM table_11208143_9 WHERE stadium = "Pittodrie"
What is Pittodrie Stadium's maximum capacity?
CREATE TABLE table_11208143_9 (capacity INTEGER, stadium VARCHAR)
SELECT attendance FROM table_name_58 WHERE result = "won 5-2"
What was the Attendance in the game with a Result of won 5-2?
CREATE TABLE table_name_58 (attendance VARCHAR, result VARCHAR)
SELECT AVG(react) FROM table_name_11 WHERE time < 22.29 AND rank > 1
What is the average react of the athlete with a time less than 22.29 and a rank greater than 1?
CREATE TABLE table_name_11 (react INTEGER, time VARCHAR, rank VARCHAR)
SELECT voting_turnout FROM table_name_91 WHERE general_elections = 1985
Tell me the voting turnout for 1985 general elections
CREATE TABLE table_name_91 (voting_turnout VARCHAR, general_elections VARCHAR)
SELECT COUNT(_number) FROM table_28196105_1 WHERE production_code = "7ABB21"
What was the number of episodes whose production code is 7ABB21?
CREATE TABLE table_28196105_1 (_number VARCHAR, production_code VARCHAR)
SELECT week FROM table_name_88 WHERE surface = "hard" AND tournament = "indian wells"
what was the week for the match on a hard surface at Indian Wells tournament?
CREATE TABLE table_name_88 (week VARCHAR, surface VARCHAR, tournament VARCHAR)
SELECT report FROM table_name_54 WHERE pole_position = "mario andretti" AND fastest_lap = "jean-pierre jarier"
What was the report when Mario Andretti held pole position and Jean-Pierre Jarier had the fastest lap?
CREATE TABLE table_name_54 (report VARCHAR, pole_position VARCHAR, fastest_lap VARCHAR)
SELECT SUM(long) FROM table_name_24 WHERE avg < 6 AND rec < 2
Name the sum of long for avg less than 6 and rec less than 2
CREATE TABLE table_name_24 (long INTEGER, avg VARCHAR, rec VARCHAR)
SELECT player FROM table_name_31 WHERE place = "t2"
Which Player has a Place of t2?
CREATE TABLE table_name_31 (player VARCHAR, place VARCHAR)
SELECT phoneme FROM table_name_43 WHERE nuskhuri = "ⴥ"
What is the Phoneme symbol for ⴥ in Nuskhuri?
CREATE TABLE table_name_43 (phoneme VARCHAR, nuskhuri VARCHAR)
SELECT AVG(attendance) FROM table_name_68 WHERE week = 14
How many people on average attended the game in week 14?
CREATE TABLE table_name_68 (attendance INTEGER, week VARCHAR)
SELECT away_team FROM table_name_26 WHERE venue = "princes park"
Who was the away team at Princes Park?
CREATE TABLE table_name_26 (away_team VARCHAR, venue VARCHAR)
SELECT attendance FROM table_name_53 WHERE home_team = "king's lynn"
What was the attendance for the game that had the king's lynn as the home team?
CREATE TABLE table_name_53 (attendance VARCHAR, home_team VARCHAR)
SELECT date FROM table_16119656_1 WHERE attendance < 6427.0
When was the game played if the attendance is less than 6427.0?
CREATE TABLE table_16119656_1 (date VARCHAR, attendance INTEGER)
SELECT COUNT(final_score) FROM table_24786958_2 WHERE game_site = "Amsterdam ArenA"
How many final scores were there on the game at Amsterdam arena?
CREATE TABLE table_24786958_2 (final_score VARCHAR, game_site VARCHAR)
SELECT AVG(total) FROM table_name_37 WHERE gymnast = "danny pinheiro rodrigues ( fra )" AND position < 7
What is the total for Danny Pinheiro Rodrigues ( fra ), in a Position smaller than 7?
CREATE TABLE table_name_37 (total INTEGER, gymnast VARCHAR, position VARCHAR)
SELECT result FROM table_name_30 WHERE goal = 3
What is the Result for Goal 3?
CREATE TABLE table_name_30 (result VARCHAR, goal VARCHAR)
SELECT DISTINCT product_name FROM product ORDER BY product_id
List all the distinct product names ordered by product id?
CREATE TABLE product (product_name VARCHAR, product_id VARCHAR)
SELECT candidate FROM table_26263322_1 WHERE age = 27
What is the candidate whose age is 27?
CREATE TABLE table_26263322_1 (candidate VARCHAR, age VARCHAR)
SELECT gold_medals FROM table_1305623_18 WHERE silver_medals < 1.0
what are all the gold medals when the silver medals is smaller than 1.0?
CREATE TABLE table_1305623_18 (gold_medals VARCHAR, silver_medals INTEGER)
SELECT event__number FROM table_22050544_1 WHERE winner = "what is 7x6"
What is the event # when the winner is what is 7x6?
CREATE TABLE table_22050544_1 (event__number VARCHAR, winner VARCHAR)
SELECT loses FROM table_name_84 WHERE points_for < 1175 AND wins > 2 AND points_against > 894 AND points = 24
What losses have points for less than 1175, wins greater than 2, points against greater than 894, and 24 as the points?
CREATE TABLE table_name_84 (loses VARCHAR, points VARCHAR, points_against VARCHAR, points_for VARCHAR, wins VARCHAR)
SELECT COUNT(attendance) FROM table_name_59 WHERE game_site = "veterans stadium" AND week < 1
How many attendance numbers are associated with the site of Veterans Stadium before week 1?
CREATE TABLE table_name_59 (attendance VARCHAR, game_site VARCHAR, week VARCHAR)
SELECT AVG(lib_dem) FROM table_name_87 WHERE conservative < 0
Name the the average Lib Dem with Conservative smaller than 0?
CREATE TABLE table_name_87 (lib_dem INTEGER, conservative INTEGER)
SELECT MAX(date) FROM table_name_90 WHERE type = "0-4-4 forney locomotive" AND number > 20 AND works_number > 23754
What date have highest 0-4-4 forney locomotive with number larger than 20 and works number larger than 23754?
CREATE TABLE table_name_90 (date INTEGER, works_number VARCHAR, type VARCHAR, number VARCHAR)
SELECT yacht FROM table_25594271_2 WHERE loa__metres_ = "13.34"
What yacht had LOA Metres of 13.34?
CREATE TABLE table_25594271_2 (yacht VARCHAR, loa__metres_ VARCHAR)
SELECT award FROM table_name_40 WHERE category = "music video acting award"
Which Award has a Category of music video acting award?
CREATE TABLE table_name_40 (award VARCHAR, category VARCHAR)
SELECT population__percentage FROM table_10710364_2 WHERE sex_ratio__rural_ = 953
What is the population percentage of the group where the rural sex ratio is 953?
CREATE TABLE table_10710364_2 (population__percentage VARCHAR, sex_ratio__rural_ VARCHAR)
SELECT MIN(overall) FROM table_10361230_1 WHERE player_name = "Bruce Cerone"
What is Bruce Cerone overall?
CREATE TABLE table_10361230_1 (overall INTEGER, player_name VARCHAR)
SELECT AVG(T1.Price), T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name
Select the average price of each manufacturer's products, showing the manufacturer's name.
CREATE TABLE Manufacturers (name VARCHAR, code VARCHAR); CREATE TABLE products (Price INTEGER, manufacturer VARCHAR)
SELECT venue FROM table_name_64 WHERE away_team = "geelong"
What venue features geelong as the away side?
CREATE TABLE table_name_64 (venue VARCHAR, away_team VARCHAR)
SELECT COUNT(signal_power___kw__) FROM table_1820752_1 WHERE arrival_date = "January 2059"
If the arrival date is January 2059, what is the total amount of signal power?
CREATE TABLE table_1820752_1 (signal_power___kw__ VARCHAR, arrival_date VARCHAR)
SELECT high_assists FROM table_27723228_7 WHERE score = "W 107–99 (OT)"
Name the high assists for w 107–99 (ot)
CREATE TABLE table_27723228_7 (high_assists VARCHAR, score VARCHAR)
SELECT code_name FROM table_name_26 WHERE southbridge = "amd-766, via-vt82c686b"
What is the code name when the Southbridge shows as amd-766, via-vt82c686b?
CREATE TABLE table_name_26 (code_name VARCHAR, southbridge VARCHAR)
SELECT points FROM table_name_34 WHERE races = "7"
What was the points with 7 races?
CREATE TABLE table_name_34 (points VARCHAR, races VARCHAR)
SELECT date_joined_staff FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn"
When did the staff member with first name as Janessa and last name as Sawayn join the company?
CREATE TABLE Staff (date_joined_staff VARCHAR, first_name VARCHAR, last_name VARCHAR)
SELECT MAX(attendance) FROM table_name_64 WHERE opponent = "chicago bears"
I want the greatest attendance when the opponent is the chicago bears
CREATE TABLE table_name_64 (attendance INTEGER, opponent VARCHAR)
SELECT away_team AS score FROM table_name_52 WHERE away_team = "melbourne"
In the match where Melbourne was the away team, how much did they score?
CREATE TABLE table_name_52 (away_team VARCHAR)
SELECT score FROM table_name_49 WHERE date = "december 20"
What was the score for the game on December 20?
CREATE TABLE table_name_49 (score VARCHAR, date VARCHAR)
SELECT to_par FROM table_name_86 WHERE place = "t9" AND score = 72 - 67 = 139
What is the to par of the player with a t9 place and a score of 72-67=139?
CREATE TABLE table_name_86 (to_par VARCHAR, place VARCHAR, score VARCHAR)
SELECT written_by FROM table_15284274_1 WHERE directed_by = "Peter Woeste"
Who wrote the episode directed by Peter Woeste?
CREATE TABLE table_15284274_1 (written_by VARCHAR, directed_by VARCHAR)
SELECT AVG(product_price) FROM products WHERE product_type_code = 'Clothes'
Find the average price of all product clothes.
CREATE TABLE products (product_price INTEGER, product_type_code VARCHAR)
SELECT AVG(points) FROM table_name_75 WHERE game > 25 AND opponent = "dallas stars"
Which Points have a Game larger than 25, and an Opponent of dallas stars?
CREATE TABLE table_name_75 (points INTEGER, game VARCHAR, opponent VARCHAR)
SELECT COUNT(avg_g) FROM table_name_40 WHERE name = "mccrary, greg"
What is the total avg/g of McCrary, Greg?
CREATE TABLE table_name_40 (avg_g VARCHAR, name VARCHAR)
SELECT T1.treatment_type_description FROM Treatment_types AS T1 JOIN Treatments AS T2 ON T1.treatment_type_code = T2.treatment_type_code GROUP BY T1.treatment_type_code ORDER BY SUM(cost_of_treatment) LIMIT 1
What is the description of the treatment type that costs the least money in total?
CREATE TABLE Treatments (treatment_type_code VARCHAR); CREATE TABLE Treatment_types (treatment_type_description VARCHAR, treatment_type_code VARCHAR)
SELECT AVG(independent) FROM table_name_35 WHERE green > 7 AND conservative < 0
Name the average Independent with a Green larger than 7, and a Conservative smaller than 0?
CREATE TABLE table_name_35 (independent INTEGER, green VARCHAR, conservative VARCHAR)
SELECT result FROM table_name_76 WHERE attendance = "72,703"
What was the result of the game that was attended by 72,703 people?
CREATE TABLE table_name_76 (result VARCHAR, attendance VARCHAR)
SELECT SUM(march) FROM table_name_56 WHERE score = "2 - 2" AND game > 67
What is the sum of March, when Score is "2 - 2", and when Game is greater than 67?
CREATE TABLE table_name_56 (march INTEGER, score VARCHAR, game VARCHAR)
SELECT graphics FROM table_name_43 WHERE vram = "512mb"
Which graphics spec has a VRAM spec of 512MB?
CREATE TABLE table_name_43 (graphics VARCHAR, vram VARCHAR)
SELECT region FROM table_22901612_2 WHERE chief_judge = "Jeffrey L. Viken"
If the chief judge is Jeffrey L. Viken, what is the region?
CREATE TABLE table_22901612_2 (region VARCHAR, chief_judge VARCHAR)
SELECT position FROM table_name_87 WHERE player = "ed stokes"
What position does Ed Stokes hold?
CREATE TABLE table_name_87 (position VARCHAR, player VARCHAR)
SELECT T2.zip_postcode FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = "Carole" AND T1.last_name = "Bernhard"
What is zip code of customer with first name as Carole and last name as Bernhard?
CREATE TABLE Addresses (zip_postcode VARCHAR, address_id VARCHAR); CREATE TABLE Customers (customer_address_id VARCHAR, first_name VARCHAR, last_name VARCHAR)
SELECT position FROM table_name_76 WHERE round = 2
What is the position played for the player drafted in round 2?
CREATE TABLE table_name_76 (position VARCHAR, round VARCHAR)
SELECT capacity__thousands_of_metric_tons_ FROM table_name_83 WHERE operator = "cyprus amax minerals"
What is the capacity of the mine that is operated by Cyprus Amax minerals?
CREATE TABLE table_name_83 (capacity__thousands_of_metric_tons_ VARCHAR, operator VARCHAR)
SELECT losing_bonus FROM table_name_65 WHERE points_for = "571"
What is the Losing bonus of 571 Points ?
CREATE TABLE table_name_65 (losing_bonus VARCHAR, points_for VARCHAR)
SELECT AVG(pos) FROM table_name_79 WHERE league = "tb2l" AND postseason = "promoted champion"
What is the average position for tb2l teams promoted champion?
CREATE TABLE table_name_79 (pos INTEGER, league VARCHAR, postseason VARCHAR)
SELECT episodes FROM table_name_37 WHERE actor = "david faustino"
How many episodes did the actor David Faustino appear in?
CREATE TABLE table_name_37 (episodes VARCHAR, actor VARCHAR)
SELECT location FROM table_name_31 WHERE round < 2 AND opponent = "mostapha al-turk"
At what Location was the match against Opponent of Mostapha Al-Turk lasting less than 2 Rounds?
CREATE TABLE table_name_31 (location VARCHAR, round VARCHAR, opponent VARCHAR)
SELECT COUNT(friday) FROM table_18173916_6 WHERE wednesday = "190 Boardwalk Empire"
How many episodes were shown on Friday if 190 Boardwalk Empire was shown on Wednesday?
CREATE TABLE table_18173916_6 (friday VARCHAR, wednesday VARCHAR)
SELECT 2007 FROM table_name_83 WHERE 2003 = "a"
What's the 2007 result when 2003 is a?
CREATE TABLE table_name_83 (Id VARCHAR)
SELECT MAX(rank) FROM table_name_38 WHERE notes = "qs" AND country = "china"
What is the rank for the man from China with notes of QS?
CREATE TABLE table_name_38 (rank INTEGER, notes VARCHAR, country VARCHAR)
SELECT score FROM table_name_96 WHERE venue = "kathmandu"
What was the score in Kathmandu?
CREATE TABLE table_name_96 (score VARCHAR, venue VARCHAR)
SELECT date FROM table_name_48 WHERE home_team = "fitzroy"
If fitzroy was the home team what date did they play?
CREATE TABLE table_name_48 (date VARCHAR, home_team VARCHAR)
SELECT hometown FROM table_22824312_1 WHERE player = "Jim Dutcher"
What is jim dutcher's hometown?
CREATE TABLE table_22824312_1 (hometown VARCHAR, player VARCHAR)
SELECT MAX(played) FROM table_name_69 WHERE lost > 2 AND team = "palmeiras" AND drawn < 1
What is the highest number played with more than 2 lost for Palmeiras and less than 1 draw?
CREATE TABLE table_name_69 (played INTEGER, drawn VARCHAR, lost VARCHAR, team VARCHAR)
SELECT position FROM table_name_86 WHERE home_town = "temple hills, md"
What is the Position of the Player from Temple Hills, MD?
CREATE TABLE table_name_86 (position VARCHAR, home_town VARCHAR)
SELECT COUNT(founded) FROM table_2076557_2 WHERE location_s_ = "Yankton"
Name the total number of founded for yankton
CREATE TABLE table_2076557_2 (founded VARCHAR, location_s_ VARCHAR)
SELECT researched_at FROM table_30057479_1 WHERE geometry = "D: ~100nm, L: 1 μm"
Where was d: ~100nm, l: 1 μm geometry researched?
CREATE TABLE table_30057479_1 (researched_at VARCHAR, geometry VARCHAR)
SELECT traditional FROM table_2135222_2 WHERE density = 820
What is the traditional with density of 820?
CREATE TABLE table_2135222_2 (traditional VARCHAR, density VARCHAR)
SELECT MIN(december) FROM table_name_96 WHERE points = 52
Which December is the lowest one that has Points of 52?
CREATE TABLE table_name_96 (december INTEGER, points VARCHAR)
SELECT round FROM table_name_8 WHERE kick_off = "1993-02-17 20:30"
Which round has a Kick Off of 1993-02-17 20:30?
CREATE TABLE table_name_8 (round VARCHAR, kick_off VARCHAR)
SELECT channel_tv___dt__ FROM table_1353096_2 WHERE city_of_license_market = "Boston"
What TV channel had a license from Boston?
CREATE TABLE table_1353096_2 (channel_tv___dt__ VARCHAR, city_of_license_market VARCHAR)
SELECT sport FROM table_name_22 WHERE event = "94kg men's weightlifting"
Which sport has 94kg men's weightlifting as one of its events?
CREATE TABLE table_name_22 (sport VARCHAR, event VARCHAR)
SELECT MIN(pick) FROM table_name_13 WHERE college = "king's (ny)"
What is the lowest pick number for players from king's (ny)?
CREATE TABLE table_name_13 (pick INTEGER, college VARCHAR)
SELECT home_team FROM table_name_75 WHERE away_team = "richmond"
What home team played the away team of Richmond?
CREATE TABLE table_name_75 (home_team VARCHAR, away_team VARCHAR)
SELECT format FROM table_name_16 WHERE region = "greece"
What is the Format of the release in Greece?
CREATE TABLE table_name_16 (format VARCHAR, region VARCHAR)
SELECT result FROM table_1341598_10 WHERE district = "Florida 18"
What was the result of the election in the Florida 18 district?
CREATE TABLE table_1341598_10 (result VARCHAR, district VARCHAR)
SELECT COUNT(laps) FROM table_name_85 WHERE driver = "mike spence" AND grid > 12
How many laps did mike spence complete grids above 12?
CREATE TABLE table_name_85 (laps VARCHAR, driver VARCHAR, grid VARCHAR)
SELECT country FROM table_24486462_1 WHERE compulsory_deduction = "29.3%"
What country has a compulsory deduction of 29.3%?
CREATE TABLE table_24486462_1 (country VARCHAR, compulsory_deduction VARCHAR)
SELECT MIN(year) FROM table_name_66 WHERE composition = "99.99% silver" AND issue_price = "$94.95"
What is the earliest year when the composition is 99.99% silver and the issue price is $94.95?
CREATE TABLE table_name_66 (year INTEGER, composition VARCHAR, issue_price VARCHAR)
SELECT COUNT(crowd) FROM table_name_98 WHERE home_team = "geelong"
What was the crowd size when geelong played home?
CREATE TABLE table_name_98 (crowd VARCHAR, home_team VARCHAR)
SELECT position FROM table_name_7 WHERE school_country = "temple"
What is the position of the player from Temple?
CREATE TABLE table_name_7 (position VARCHAR, school_country VARCHAR)
SELECT attendance FROM table_name_10 WHERE tie_no = "3"
What is the Attendance of Tie no 3?
CREATE TABLE table_name_10 (attendance VARCHAR, tie_no VARCHAR)
SELECT date FROM table_name_7 WHERE opponent = "varvara lepchenko"
When was varvara lepchenko the opponent?
CREATE TABLE table_name_7 (date VARCHAR, opponent VARCHAR)
SELECT COUNT(attendance) FROM table_name_2 WHERE opponent = "middlesbrough" AND result = "3-1"
What is the number of attendance values for ties having an opponent of Middlesbrough and result of 3-1?
CREATE TABLE table_name_2 (attendance VARCHAR, opponent VARCHAR, result VARCHAR)
SELECT MAX(gold) FROM table_name_90 WHERE total > 16
What is the largest gold with a Total larger than 16?
CREATE TABLE table_name_90 (gold INTEGER, total INTEGER)
SELECT MAX(grid) FROM table_name_70 WHERE time = "+15.532" AND laps > 23
Can you tell me the highest Grid that has the Time of +15.532, and the Laps larger than 23?
CREATE TABLE table_name_70 (grid INTEGER, time VARCHAR, laps VARCHAR)
SELECT front_side_bus FROM table_name_54 WHERE model_number = "c3 850"
What is the Front Side Bus for Model Number c3 850?
CREATE TABLE table_name_54 (front_side_bus VARCHAR, model_number VARCHAR)