answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
484
SELECT gameid, SUM(hours_played) FROM Plays_games GROUP BY gameid
Show all game ids and the number of hours played.
CREATE TABLE Plays_games (gameid VARCHAR, hours_played INTEGER)
SELECT position FROM table_21321804_5 WHERE player = "Marc Parenteau"
What is Marc Parenteau's position?
CREATE TABLE table_21321804_5 (position VARCHAR, player VARCHAR)
SELECT MIN(capacity) FROM table_11208143_9 WHERE team = "Dundee United"
What is the minimum capacity of Dundee United's stadium?
CREATE TABLE table_11208143_9 (capacity INTEGER, team VARCHAR)
SELECT p FROM table_12608427_8 WHERE name = "Clapham"
What was the position (P) for Clapham?
CREATE TABLE table_12608427_8 (p VARCHAR, name VARCHAR)
SELECT definition FROM table_name_63 WHERE rank < 12 AND town = "tadcaster"
Which Definition has a Rank smaller than 12, and a Town of tadcaster?
CREATE TABLE table_name_63 (definition VARCHAR, rank VARCHAR, town VARCHAR)
SELECT MIN(vinto_municipality) FROM table_2509113_2 WHERE quillacollo_municipality = 93131
If the Quillacollo Municipality is 93131, what is the Vinto Municipality minimum?
CREATE TABLE table_2509113_2 (vinto_municipality INTEGER, quillacollo_municipality VARCHAR)
SELECT attendance FROM table_name_82 WHERE score = "0:1"
How many were in attendance with a score of 0:1?
CREATE TABLE table_name_82 (attendance VARCHAR, score VARCHAR)
SELECT author___editor___source FROM table_19948664_2 WHERE ranking_la__2_ = "1st"
What was the author/editor/source when the l.a. ranking was 1st?
CREATE TABLE table_19948664_2 (author___editor___source VARCHAR, ranking_la__2_ VARCHAR)
SELECT engine FROM table_name_72 WHERE chassis = "march 85c"
What Engine had a chassis of March 85c?
CREATE TABLE table_name_72 (engine VARCHAR, chassis VARCHAR)
SELECT location_attendance FROM table_name_47 WHERE opponent = "at chicago bulls"
When they played at Chicago Bulls, what was the Location/Attendance?
CREATE TABLE table_name_47 (location_attendance VARCHAR, opponent VARCHAR)
SELECT COUNT(rank) FROM table_name_87 WHERE year < 2002 AND ascent_time = "43:24"
What was the rank of the rider whose ascent time was 43:24 before the year 2002?
CREATE TABLE table_name_87 (rank VARCHAR, year VARCHAR, ascent_time VARCHAR)
SELECT MAX(total) FROM table_name_34 WHERE country = "spain"
What's spain's highest total?
CREATE TABLE table_name_34 (total INTEGER, country VARCHAR)
SELECT package_option FROM table_name_56 WHERE content = "documentaries" AND hdtv = "yes" AND television_service = "history hd"
What package/option has documentaries as the content, yes as the HDTV, and a television service of history hd?
CREATE TABLE table_name_56 (package_option VARCHAR, television_service VARCHAR, content VARCHAR, hdtv VARCHAR)
SELECT team FROM table_27713030_3 WHERE game = 6
Who was the opposing team in game 6?
CREATE TABLE table_27713030_3 (team VARCHAR, game VARCHAR)
SELECT MIN(Highest) AS position FROM table_name_22 WHERE album_title = "10 years of hits" AND sales > 870 OFFSET 000
What is the lowest high position for 10 years of hits, and over 870,000 sales?
CREATE TABLE table_name_22 (Highest INTEGER, album_title VARCHAR, sales VARCHAR)
SELECT * FROM Albums WHERE YEAR = 2012
Find all the albums in 2012.
CREATE TABLE Albums (YEAR VARCHAR)
SELECT division FROM table_name_26 WHERE position = "6th"
Which Division has a Position of 6th?
CREATE TABLE table_name_26 (division VARCHAR, position VARCHAR)
SELECT artist FROM table_name_48 WHERE date = "june 1979"
What is the Artist with a Date that is june 1979?
CREATE TABLE table_name_48 (artist VARCHAR, date VARCHAR)
SELECT years FROM table_name_97 WHERE jersey_number_s_ = "21" AND position = "sg"
What is Years, when Jersey Number(s) is 21, and when Position is SG?
CREATE TABLE table_name_97 (years VARCHAR, jersey_number_s_ VARCHAR, position VARCHAR)
SELECT dominant_religion__2002_ FROM table_2562572_9 WHERE cyrillic_name_other_names = "Степановићево"
What is the dominant religion in степановићево during 2002?
CREATE TABLE table_2562572_9 (dominant_religion__2002_ VARCHAR, cyrillic_name_other_names VARCHAR)
SELECT start FROM table_name_13 WHERE laps = 199 AND qual = "224.838"
Name the start with Laps of 199 with qual of 224.838
CREATE TABLE table_name_13 (start VARCHAR, laps VARCHAR, qual VARCHAR)
SELECT length FROM table_1245148_1 WHERE track_name = "Michigan International Speedway"
What is the length of the track named michigan international speedway?
CREATE TABLE table_1245148_1 (length VARCHAR, track_name VARCHAR)
SELECT SUM(laps) FROM table_name_29 WHERE grid < 20 AND driver = "johnny herbert"
what is the sum of laps when grid is less than 20 and johnny herbert is driving?
CREATE TABLE table_name_29 (laps INTEGER, grid VARCHAR, driver VARCHAR)
SELECT state FROM table_name_67 WHERE net_contribution_per_capita = "$-171"
What state has a Net contribution per capita of $-171?
CREATE TABLE table_name_67 (state VARCHAR, net_contribution_per_capita VARCHAR)
SELECT MIN(round) FROM table_name_4 WHERE method = "decision"
What round was the fight won or loss by a decision?
CREATE TABLE table_name_4 (round INTEGER, method VARCHAR)
SELECT MIN(round) FROM table_name_97 WHERE pick__number > 10 AND position = "tight end" AND overall < 132
Which Round is the lowest one that has a Pick # larger than 10, and a Position of tight end, and an Overall smaller than 132?
CREATE TABLE table_name_97 (round INTEGER, overall VARCHAR, pick__number VARCHAR, position VARCHAR)
SELECT MAX(election_year) FROM table_23512864_4 WHERE speaker = "R. Muthiah"
If the speaker is R. Muthiah, what is the election year maximum?
CREATE TABLE table_23512864_4 (election_year INTEGER, speaker VARCHAR)
SELECT AVG(points) FROM table_name_13 WHERE tied > 8 AND games < 82 AND coach = "bryan mclay † morris lallo ‡ gerry moore ‡" AND goals_against > 322
What is the points average when the tied is greater than 8, less than 82 games and the coach of Bryan Mclay † Morris Lallo ‡ Gerry Moore ‡, and greater than 322 goals?
CREATE TABLE table_name_13 (points INTEGER, goals_against VARCHAR, coach VARCHAR, tied VARCHAR, games VARCHAR)
SELECT AVG(to_par) FROM table_name_52 WHERE score = 78 - 74 - 71 - 75 = 298
Which To par has a Score of 78-74-71-75=298?
CREATE TABLE table_name_52 (to_par INTEGER, score VARCHAR)
SELECT COUNT(successor) FROM table_224839_3 WHERE vacator = "William North ( F )"
What is the total number of successors when the vacator was William North ( F )
CREATE TABLE table_224839_3 (successor VARCHAR, vacator VARCHAR)
SELECT score FROM table_name_24 WHERE date = "22 september 1972"
What is the score on 22 September 1972?
CREATE TABLE table_name_24 (score VARCHAR, date VARCHAR)
SELECT result FROM table_1342359_15 WHERE district = "Kansas 1"
what's the result with district being kansas 1
CREATE TABLE table_1342359_15 (result VARCHAR, district VARCHAR)
SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings DESC
What are the names of poker players in descending order of earnings?
CREATE TABLE poker_player (People_ID VARCHAR, Earnings VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR)
SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city GROUP BY T2.host_city ORDER BY COUNT(*) DESC LIMIT 1
Which city has hosted the most events?
CREATE TABLE city (city VARCHAR, city_id VARCHAR); CREATE TABLE hosting_city (host_city VARCHAR)
SELECT goberman FROM table_name_63 WHERE date = "april 28–april 30, 2008"
Which Goberman has a Date of april 28–april 30, 2008?
CREATE TABLE table_name_63 (goberman VARCHAR, date VARCHAR)
SELECT miles__km_ FROM table_17802778_1 WHERE race_time = "1:05:33"
How many total miles recorded for the racer who finished in 1:05:33?
CREATE TABLE table_17802778_1 (miles__km_ VARCHAR, race_time VARCHAR)
SELECT directed_by FROM table_16617011_1 WHERE us_viewers__millions_ = "15.15"
Name the directed by for 15.15 viewers
CREATE TABLE table_16617011_1 (directed_by VARCHAR, us_viewers__millions_ VARCHAR)
SELECT opponent FROM table_name_37 WHERE game < 43 AND record = "23-14-3"
Who has a Game smaller than 43, and a Record of 23-14-3?
CREATE TABLE table_name_37 (opponent VARCHAR, game VARCHAR, record VARCHAR)
SELECT SUM(laps) FROM table_name_94 WHERE rider = "alex baldolini"
How many laps did the rider Alex Baldolini take?
CREATE TABLE table_name_94 (laps INTEGER, rider VARCHAR)
SELECT Festival_Name FROM festival_detail ORDER BY YEAR DESC LIMIT 3
Show the names of the three most recent festivals.
CREATE TABLE festival_detail (Festival_Name VARCHAR, YEAR VARCHAR)
SELECT media_type FROM table_23829490_1 WHERE genre = "Psychedelic Trance"
What is every media type for the Psychedelic Trance genre?
CREATE TABLE table_23829490_1 (media_type VARCHAR, genre VARCHAR)
SELECT SUM(crowd) FROM table_name_56 WHERE venue = "princes park"
How large was the crowd when they played at princes park?
CREATE TABLE table_name_56 (crowd INTEGER, venue VARCHAR)
SELECT MAX(total) FROM table_name_87 WHERE last = "september 1970"
What is the greatest total when the last was September 1970?
CREATE TABLE table_name_87 (total INTEGER, last VARCHAR)
SELECT name FROM table_name_10 WHERE rank = 4
Can you tell me the Name that has the Rank of 4?
CREATE TABLE table_name_10 (name VARCHAR, rank VARCHAR)
SELECT COUNT(*) FROM actor
How many actors are there?
CREATE TABLE actor (Id VARCHAR)
SELECT date FROM table_24853015_1 WHERE class_b_winner = "Alan Hutcheson" AND round = 1
When did Alan Hutcheson won Class B on round 1?
CREATE TABLE table_24853015_1 (date VARCHAR, class_b_winner VARCHAR, round VARCHAR)
SELECT AVG(goal) FROM table_name_81 WHERE venue = "stade roi baudouin, brussels"
What was the Goal in Stade Roi Baudouin, Brussels?
CREATE TABLE table_name_81 (goal INTEGER, venue VARCHAR)
SELECT launched FROM table_12592074_1 WHERE ship = "Tecumseh"
When was the ship tecumseh launched?
CREATE TABLE table_12592074_1 (launched VARCHAR, ship VARCHAR)
SELECT MIN(year) FROM table_name_21 WHERE country = "canada" AND position = "center" AND player = "mario lemieux"
What is the first year that Mario Lemieux from Canada won playing center?
CREATE TABLE table_name_21 (year INTEGER, player VARCHAR, country VARCHAR, position VARCHAR)
SELECT player FROM table_name_12 WHERE position = "guard-forward" AND school_club_team = "pepperdine"
Which Player plays Guard-Forward Position for School/Club Team Pepperdine?
CREATE TABLE table_name_12 (player VARCHAR, position VARCHAR, school_club_team VARCHAR)
SELECT result FROM table_name_45 WHERE date = "november 25, 2001"
What is the result for November 25, 2001?
CREATE TABLE table_name_45 (result VARCHAR, date VARCHAR)
SELECT T2.Year, T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID
Show the years and the official names of the host cities of competitions.
CREATE TABLE city (Official_Name VARCHAR, City_ID VARCHAR); CREATE TABLE farm_competition (Year VARCHAR, Host_city_ID VARCHAR)
SELECT state FROM table_name_43 WHERE name = "li" AND title = "marquis"
In which state did Marquis Li rule?
CREATE TABLE table_name_43 (state VARCHAR, name VARCHAR, title VARCHAR)
SELECT years FROM table_name_71 WHERE rank > 2 AND wins = 2 AND country = "france"
Which Years have a Rank larger than 2, and Wins of 2, and a Country of france?
CREATE TABLE table_name_71 (years VARCHAR, country VARCHAR, rank VARCHAR, wins VARCHAR)
SELECT competition FROM table_name_88 WHERE venue = "away" AND opponent = "bracknell bees"
When the venue is away and the opponents are the bracknell bees, what is the competition?
CREATE TABLE table_name_88 (competition VARCHAR, venue VARCHAR, opponent VARCHAR)
SELECT tv_time FROM table_name_66 WHERE road_team = "phoenix" AND date = "june 18"
What was the TV time for Chicago's road game against Phoenix on June 18?
CREATE TABLE table_name_66 (tv_time VARCHAR, road_team VARCHAR, date VARCHAR)
SELECT MIN(position) FROM table_name_70 WHERE goals_against = 53 AND points = 26 AND goal_difference > -11
What is the lowest position of the club with 53 goals against, 26 points, and a -11 goal difference?
CREATE TABLE table_name_70 (position INTEGER, goal_difference VARCHAR, goals_against VARCHAR, points VARCHAR)
SELECT civil_parish FROM table_30120605_1 WHERE townland = "Ballymacandrick"
In which civil parish is ballymacandrick?
CREATE TABLE table_30120605_1 (civil_parish VARCHAR, townland VARCHAR)
SELECT candidates FROM table_1805191_36 WHERE incumbent = "Dennis Kucinich"
Who are all of the candidates in elections where Dennis Kucinich was a candidate?
CREATE TABLE table_1805191_36 (candidates VARCHAR, incumbent VARCHAR)
SELECT opponent FROM table_name_7 WHERE score = "6–4, 3–6, 6–3"
Which opponent has a Score of 6–4, 3–6, 6–3?
CREATE TABLE table_name_7 (opponent VARCHAR, score VARCHAR)
SELECT result FROM table_name_33 WHERE week < 13 AND opponent = "oakland raiders"
What was the result before week 13 when they played the Oakland Raiders?
CREATE TABLE table_name_33 (result VARCHAR, week VARCHAR, opponent VARCHAR)
SELECT AVG(pick__number) FROM table_name_67 WHERE round > 5 AND position = "wide receiver" AND name = "gregory spann" AND overall > 228
Which Pick # has a Round larger than 5, and a Position of wide receiver, and a Name of gregory spann, and an Overall larger than 228?
CREATE TABLE table_name_67 (pick__number INTEGER, overall VARCHAR, name VARCHAR, round VARCHAR, position VARCHAR)
SELECT SUM(rank) FROM table_name_6 WHERE silver < 0
what is the rank when silver is less than 0?
CREATE TABLE table_name_6 (rank INTEGER, silver INTEGER)
SELECT district FROM table_name_73 WHERE population < 75 AND name = "st martin's without"
What district is St Martin's Without parish in with a population less than 75?
CREATE TABLE table_name_73 (district VARCHAR, population VARCHAR, name VARCHAR)
SELECT set_3 FROM table_name_26 WHERE total = "53–75"
What is the Set 3 when the total was 53–75?
CREATE TABLE table_name_26 (set_3 VARCHAR, total VARCHAR)
SELECT type FROM table_name_63 WHERE regulatory_citation = "40 cfr 50.9(a)"
what is the type when the regulatory citation is 40 cfr 50.9(a)?
CREATE TABLE table_name_63 (type VARCHAR, regulatory_citation VARCHAR)
SELECT leading_scorer FROM table_name_59 WHERE score = "89–102"
What is the name of the Leading scorer when the Score was 89–102?
CREATE TABLE table_name_59 (leading_scorer VARCHAR, score VARCHAR)
SELECT affiliation FROM table_name_33 WHERE pick__number < 59 AND position = "gk"
Tell me the affiliation for pick number less than 59 and position of gk
CREATE TABLE table_name_33 (affiliation VARCHAR, pick__number VARCHAR, position VARCHAR)
SELECT ground FROM table_name_22 WHERE score = "62-69"
Where was the game played the ended with a score of 62-69?
CREATE TABLE table_name_22 (ground VARCHAR, score VARCHAR)
SELECT combined FROM table_name_60 WHERE super_g = 14
What is the combined of the 14 Super G?
CREATE TABLE table_name_60 (combined VARCHAR, super_g VARCHAR)
SELECT competition FROM table_name_6 WHERE date = "13 december 2012"
Name the competition for 13 december 2012
CREATE TABLE table_name_6 (competition VARCHAR, date VARCHAR)
SELECT competition FROM table_name_85 WHERE result = "2-0" AND location = "ferreiras" AND assist_pass = "casey nogueira"
Which competition has a result of 2-0 in Ferreiras with an assist/pass by Casey Nogueira?
CREATE TABLE table_name_85 (competition VARCHAR, assist_pass VARCHAR, result VARCHAR, location VARCHAR)
SELECT per_capita_income FROM table_1840495_2 WHERE place = "Pigeon Creek"
For Pigeon Creek what is the per capita income?
CREATE TABLE table_1840495_2 (per_capita_income VARCHAR, place VARCHAR)
SELECT part_1 FROM table_1745843_2 WHERE class = "3b"
What is listed under part 1 for class 3b?
CREATE TABLE table_1745843_2 (part_1 VARCHAR, class VARCHAR)
SELECT license FROM table_15038373_1 WHERE software = "BeeOne SMOD/HMS"
What is hte license for beeone smod/hms software?
CREATE TABLE table_15038373_1 (license VARCHAR, software VARCHAR)
SELECT COUNT(game) FROM table_name_36 WHERE score = "85-92"
How many games have a score of 85-92?
CREATE TABLE table_name_36 (game VARCHAR, score VARCHAR)
SELECT MIN(avg_g) FROM table_name_52 WHERE long > 8 AND loss < 34 AND gain > 16 AND name = "bullock, chris"
Which Avg/G is the lowest one that has a Long larger than 8, and a Loss smaller than 34, and a Gain larger than 16, and a Name of bullock, chris?
CREATE TABLE table_name_52 (avg_g INTEGER, name VARCHAR, gain VARCHAR, long VARCHAR, loss VARCHAR)
SELECT party FROM table_1341423_36 WHERE candidates = "Ernest Istook (R) 69% Garland McWatters (D) 28%"
What is the party when the candidates were ernest istook (r) 69% garland mcwatters (d) 28%?
CREATE TABLE table_1341423_36 (party VARCHAR, candidates VARCHAR)
SELECT candidates FROM table_1341884_20 WHERE first_elected = 1961
Who were all the candidates when the first elected year was 1961?
CREATE TABLE table_1341884_20 (candidates VARCHAR, first_elected VARCHAR)
SELECT average FROM table_11884814_3 WHERE swimsuit = "9.57"
What was the average for the country with the swimsuit score of 9.57?
CREATE TABLE table_11884814_3 (average VARCHAR, swimsuit VARCHAR)
SELECT SUM(car) FROM table_name_83 WHERE player = "jeremiah pope"
What are the carries of the player Jeremiah Pope?
CREATE TABLE table_name_83 (car INTEGER, player VARCHAR)
SELECT frequency FROM table_name_81 WHERE power = "900w"
What is the frequency with 900w power?
CREATE TABLE table_name_81 (frequency VARCHAR, power VARCHAR)
SELECT round FROM table_name_52 WHERE against = 1 AND date = "29 january 1949"
What was the round for 29 January 1949, when the against was 1?
CREATE TABLE table_name_52 (round VARCHAR, against VARCHAR, date VARCHAR)
SELECT date FROM table_name_85 WHERE partnering = "laura golarsa"
What was the date of the game that was played against Laura Golarsa?
CREATE TABLE table_name_85 (date VARCHAR, partnering VARCHAR)
SELECT date FROM table_name_17 WHERE record = "46-22"
What is the Date of the Game with a Record of 46-22?
CREATE TABLE table_name_17 (date VARCHAR, record VARCHAR)
SELECT outcome FROM table_name_73 WHERE tournament = "rome 2, italy"
What was the outcome for the Rome 2, Italy tournament?
CREATE TABLE table_name_73 (outcome VARCHAR, tournament VARCHAR)
SELECT COUNT(gold) FROM table_name_70 WHERE bronze > 1 AND total > 4
What is the total number of Gold medals for the Nation with more than 1 Bronze and more the 4 Total medals?
CREATE TABLE table_name_70 (gold VARCHAR, bronze VARCHAR, total VARCHAR)
SELECT mixed_doubles FROM table_14496232_2 WHERE tour = "Hong Kong Super Series"
Name the mixed doubles when tour is hong kong super series
CREATE TABLE table_14496232_2 (mixed_doubles VARCHAR, tour VARCHAR)
SELECT country FROM table_name_92 WHERE score = 69 AND player = "mick soli"
Which Country has a Score of 69, and a Player of mick soli?
CREATE TABLE table_name_92 (country VARCHAR, score VARCHAR, player VARCHAR)
SELECT wednesday FROM table_name_23 WHERE saturday = "གཟའ་སྤེན་པ།"
Which Wednesday has a Saturday of གཟའ་སྤེན་པ།?
CREATE TABLE table_name_23 (wednesday VARCHAR, saturday VARCHAR)
SELECT MAX(pick__number) FROM table_21321804_1 WHERE player = "Wes Lysack"
What is the pick # for player wes lysack?
CREATE TABLE table_21321804_1 (pick__number INTEGER, player VARCHAR)
SELECT date_performed FROM table_18278508_2 WHERE main_contestant = "Jatin Shah" AND co_contestant__yaar_vs_pyaar_ = "Shalini Chandran"
What date did Jatin Shah and Shalini Chandran perform?
CREATE TABLE table_18278508_2 (date_performed VARCHAR, main_contestant VARCHAR, co_contestant__yaar_vs_pyaar_ VARCHAR)
SELECT year FROM table_name_72 WHERE points > 0
In which year were the points more than 0?
CREATE TABLE table_name_72 (year VARCHAR, points INTEGER)
SELECT loss FROM table_name_91 WHERE date = "august 19"
What was the loss for August 19?
CREATE TABLE table_name_91 (loss VARCHAR, date VARCHAR)
SELECT tries_for FROM table_name_16 WHERE try_bonus = "0"
What is the number of tries for when the try bonus is 0?
CREATE TABLE table_name_16 (tries_for VARCHAR, try_bonus VARCHAR)
SELECT COUNT(no_in_series) FROM table_26259391_1 WHERE us_viewers__million_ = "6.55" AND directed_by = "Pete Michels"
how many series had 6.55 u.s. viewers (million) and were directed by pete michels
CREATE TABLE table_26259391_1 (no_in_series VARCHAR, us_viewers__million_ VARCHAR, directed_by VARCHAR)
SELECT COUNT(pf) FROM table_25176088_2 WHERE stolen_ends = 3
What are the number of points for associated with exactly 3 stolen ends?
CREATE TABLE table_25176088_2 (pf VARCHAR, stolen_ends VARCHAR)
SELECT ordained_priest FROM table_1656555_1 WHERE vacated_throne = "August 18, 1885"
When was the archbishop who vacated the throne on August 18, 1885 ordained as a priest?
CREATE TABLE table_1656555_1 (ordained_priest VARCHAR, vacated_throne VARCHAR)
SELECT average FROM table_12094300_1 WHERE swimsuit = "8.503"
What is the average score when the swimsuit score is 8.503?
CREATE TABLE table_12094300_1 (average VARCHAR, swimsuit VARCHAR)
SELECT venue FROM table_name_22 WHERE home_team = "fitzroy"
Where did Fitzroy play as the home team?
CREATE TABLE table_name_22 (venue VARCHAR, home_team VARCHAR)