answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
484
SELECT AVG(rank) FROM table_name_31 WHERE headquarters = "usa" AND market_value__billion_$_ > 407.2
What is the average rank for USA when the market value is 407.2 billion?
CREATE TABLE table_name_31 (rank INTEGER, headquarters VARCHAR, market_value__billion_$_ VARCHAR)
SELECT country FROM table_name_33 WHERE col__m_ = 1374
Which country has a Col (m) of 1374?
CREATE TABLE table_name_33 (country VARCHAR, col__m_ VARCHAR)
SELECT position FROM table_11677691_10 WHERE school = "Butler High school"
What was the position of the player from Butler High School?
CREATE TABLE table_11677691_10 (position VARCHAR, school VARCHAR)
SELECT SUM(year) FROM table_name_17 WHERE film = "the adventures of tintin"
Which year did The Adventures of Tintin come out?
CREATE TABLE table_name_17 (year INTEGER, film VARCHAR)
SELECT COUNT(loss) FROM table_name_81 WHERE name = "jake sharp" AND long < 30
How many losses have jake sharp as the name, with a long less than 30?
CREATE TABLE table_name_81 (loss VARCHAR, name VARCHAR, long VARCHAR)
SELECT district_name FROM table_22665117_1 WHERE dist_id = 74907
If the district ID is 74907, what is the name of the district?
CREATE TABLE table_22665117_1 (district_name VARCHAR, dist_id VARCHAR)
SELECT SUM(grid) FROM table_name_98 WHERE driver = "cristiano da matta" AND points < 33
Which Grid has a Driver of cristiano da matta, and Points smaller than 33?
CREATE TABLE table_name_98 (grid INTEGER, driver VARCHAR, points VARCHAR)
SELECT MIN(cultural_and_educational_panel) FROM table_name_74 WHERE nominated_by_the_taoiseach < 5 AND total > 19
What is the smallest cultural and educational panel with a nominated by the Taoiseach less than 5 and the total greater than 19?
CREATE TABLE table_name_74 (cultural_and_educational_panel INTEGER, nominated_by_the_taoiseach VARCHAR, total VARCHAR)
SELECT res FROM table_name_73 WHERE record = "19-9"
What was the result of the fight when Tetsuji Kato's record was 19-9?
CREATE TABLE table_name_73 (res VARCHAR, record VARCHAR)
SELECT attendance FROM table_name_86 WHERE date = "december 6"
What was the Bill's attendance on December 6?
CREATE TABLE table_name_86 (attendance VARCHAR, date VARCHAR)
SELECT COUNT(*) FROM services
How many services are there?
CREATE TABLE services (Id VARCHAR)
SELECT record FROM table_name_11 WHERE home = "mavericks"
What was the record in the competition in which the home team was the Mavericks?
CREATE TABLE table_name_11 (record VARCHAR, home VARCHAR)
SELECT vacator FROM table_2417345_3 WHERE date_of_successors_formal_installation = "February 1, 1871"
Who was the vacator when the successor was formally installed on February 1, 1871?
CREATE TABLE table_2417345_3 (vacator VARCHAR, date_of_successors_formal_installation VARCHAR)
SELECT result FROM table_name_86 WHERE competition = "friendly match"
What was the result for a friendly match?
CREATE TABLE table_name_86 (result VARCHAR, competition VARCHAR)
SELECT cyrillic_name_other_names FROM table_2562572_9 WHERE settlement = "Budisava"
What is the cyrillic name for Budisava?
CREATE TABLE table_2562572_9 (cyrillic_name_other_names VARCHAR, settlement 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 location FROM table_27409644_1 WHERE manager = "Richard Barnwell"
Where is the team that is managed by richard barnwell from?
CREATE TABLE table_27409644_1 (location VARCHAR, manager VARCHAR)
SELECT episode FROM table_name_83 WHERE viii_season = "5 082 535 (19 october 2008)"
What is Episode, when VIII Season is 5 082 535 (19 October 2008)?
CREATE TABLE table_name_83 (episode VARCHAR, viii_season VARCHAR)
SELECT COUNT(grid) FROM table_name_79 WHERE driver = "bruce mclaren"
What's the total grid of Bruce Mclaren?
CREATE TABLE table_name_79 (grid VARCHAR, driver VARCHAR)
SELECT COUNT(points) FROM table_name_34 WHERE chassis = "porsche 718" AND year < 1964
how many points are there for a Chassis of porsche 718, and a Year smaller than 1964?
CREATE TABLE table_name_34 (points VARCHAR, chassis VARCHAR, year VARCHAR)
SELECT AVG(goals_for) FROM table_name_49 WHERE position < 12 AND draw > 1 AND goals_against < 28
What is the average goals for with a position under 12, draws over 1, and goals against under 28?
CREATE TABLE table_name_49 (goals_for INTEGER, goals_against VARCHAR, position VARCHAR, draw VARCHAR)
SELECT COUNT(score) FROM table_name_30 WHERE place = "t1" AND player = "scott simpson"
Which Score has a Place of t1, and a Player of scott simpson?
CREATE TABLE table_name_30 (score VARCHAR, place VARCHAR, player VARCHAR)
SELECT MIN(2012) FROM table_name_8 WHERE 2004 > 0 AND 2008 > 1 AND 1994 = 8 AND 2005 < 11
what is the listing for 2012 when 2004 is more than 0, 2008 is more than 1 1994 is 8 and 2005 is less than 11?
CREATE TABLE table_name_8 (Id VARCHAR)
SELECT away_team FROM table_name_6 WHERE attendance = "81"
Who was the away team at the game attended by 81?
CREATE TABLE table_name_6 (away_team VARCHAR, attendance VARCHAR)
SELECT mixed_doubles FROM table_20361783_1 WHERE womens_singles = "Wang Yihan"
who won mixed doubles when wang yihan won womens singles
CREATE TABLE table_20361783_1 (mixed_doubles VARCHAR, womens_singles VARCHAR)
SELECT atomic_property FROM table_name_57 WHERE helium = "4.16"
Which Atomic property has Helium of 4.16?
CREATE TABLE table_name_57 (atomic_property VARCHAR, helium VARCHAR)
SELECT COUNT(air_date) FROM table_17257687_1 WHERE event_1 = "Suspension Bridge"
On how many different dates was event 1 Suspension Bridge?
CREATE TABLE table_17257687_1 (air_date VARCHAR, event_1 VARCHAR)
SELECT SUM(points) FROM table_name_66 WHERE against < 24 AND played < 20
What is the sum of Points when the against is less than 24 and played is less than 20?
CREATE TABLE table_name_66 (points INTEGER, against VARCHAR, played VARCHAR)
SELECT rating FROM table_11274401_3 WHERE air_date = "May 5, 2009"
What's the rating of the episode originally aired on May 5, 2009?
CREATE TABLE table_11274401_3 (rating VARCHAR, air_date VARCHAR)
SELECT paper_type FROM table_name_51 WHERE illustration = "martin dee, ubc public affairs"
What is the Paper Type with an Illustration with martin dee, ubc public affairs?
CREATE TABLE table_name_51 (paper_type VARCHAR, illustration VARCHAR)
SELECT title FROM table_name_84 WHERE role = "molly o'day"
What is the title of the work where the role was Molly O'Day?
CREATE TABLE table_name_84 (title VARCHAR, role VARCHAR)
SELECT lead FROM table_name_86 WHERE alternate = "christina haller"
Who is the lead for the team with Christina Haller as alternate?
CREATE TABLE table_name_86 (lead VARCHAR, alternate VARCHAR)
SELECT position FROM table_10812403_4 WHERE player = "Calvin McCarty"
What position did Calvin Mccarty play?
CREATE TABLE table_10812403_4 (position VARCHAR, player VARCHAR)
SELECT who_two FROM table_1015914_24 WHERE you_two = "ngipelngu"
What is who-two when you two is ngipelngu?
CREATE TABLE table_1015914_24 (who_two VARCHAR, you_two VARCHAR)
SELECT other FROM table_name_80 WHERE atheism = "1.86%"
What is the value of other religions associated with atheism at 1.86%?
CREATE TABLE table_name_80 (other VARCHAR, atheism VARCHAR)
SELECT 1994 FROM table_name_45 WHERE tournament = "sr"
What result in 1994 has a SR as the tournament?
CREATE TABLE table_name_45 (tournament VARCHAR)
SELECT event FROM table_name_98 WHERE year = 1971 AND result = "6th"
In which event did he place 6th in 1971?
CREATE TABLE table_name_98 (event VARCHAR, year VARCHAR, result VARCHAR)
SELECT constituency_number FROM table_name_73 WHERE name = "total:"
What is the Constituency Number of Total:?
CREATE TABLE table_name_73 (constituency_number VARCHAR, name VARCHAR)
SELECT us_ac FROM table_name_16 WHERE year = 1985 AND us_hot_100 = "57"
What is th US A.C. in 1985 with a US hot 100 of 57?
CREATE TABLE table_name_16 (us_ac VARCHAR, year VARCHAR, us_hot_100 VARCHAR)
SELECT MAX(week) FROM table_name_60 WHERE record = "1-2" AND attendance > 61 OFFSET 602
Name the most week for record of 1-2 and attendance more than 61,602
CREATE TABLE table_name_60 (week INTEGER, record VARCHAR, attendance VARCHAR)
SELECT MAX(year) FROM table_name_10 WHERE issue_price = "$2,995.95" AND theme = "grizzly bear"
What year had an issue price of $2,995.95, and a theme of grizzly bear?
CREATE TABLE table_name_10 (year INTEGER, issue_price VARCHAR, theme VARCHAR)
SELECT SUM(to_par) FROM table_name_65 WHERE player = "bob rosburg"
What is the total of all to par with player Bob Rosburg?
CREATE TABLE table_name_65 (to_par INTEGER, player VARCHAR)
SELECT loss_gain FROM table_25818630_2 WHERE votes__cast = 166
What was the loss/gain when the votes -cast was 166?
CREATE TABLE table_25818630_2 (loss_gain VARCHAR, votes__cast VARCHAR)
SELECT mascot FROM table_name_8 WHERE school = "south bend clay"
What is the mascot for South Bend Clay?
CREATE TABLE table_name_8 (mascot VARCHAR, school VARCHAR)
SELECT winner FROM table_name_83 WHERE stages = "17" AND year = "1987"
Who won the 17 staged event in 1987?
CREATE TABLE table_name_83 (winner VARCHAR, stages VARCHAR, year VARCHAR)
SELECT MIN(match) FROM table_name_99 WHERE lost > 3 AND team = "kolejarz rawicz"
What is the lowest match that has a lost greater than 3, and kolejarz rawicz as the team?
CREATE TABLE table_name_99 (match INTEGER, lost VARCHAR, team VARCHAR)
SELECT SUM(goals_for) FROM table_name_81 WHERE goals_against < 9 AND goal_differential = "0" AND draws < 2 AND wins = 1
for a Goals Against smaller than 9, and a Goal Differential of 0, and a Draws smaller than 2, and a Wins of 1, what's the goal total?
CREATE TABLE table_name_81 (goals_for INTEGER, wins VARCHAR, draws VARCHAR, goals_against VARCHAR, goal_differential VARCHAR)
SELECT score FROM table_name_59 WHERE opponent = "scoville jenkins"
what was the score when scoville jenkins was the opponent?
CREATE TABLE table_name_59 (score VARCHAR, opponent VARCHAR)
SELECT location FROM table_name_67 WHERE league_division = "second division" AND position_in_2012_13 = "4th, third division (promoted)"
What Location is in the second division and has 4th, third division (promoted) as its Position in 2012-13?
CREATE TABLE table_name_67 (location VARCHAR, league_division VARCHAR, position_in_2012_13 VARCHAR)
SELECT score FROM table_name_91 WHERE loss = "cerutti (0-1)"
What was the score of the game that had a loss of Cerutti (0-1)?
CREATE TABLE table_name_91 (score VARCHAR, loss VARCHAR)
SELECT 1993 FROM table_name_68 WHERE tournament = "french open"
What is the 1993 value of the French open?
CREATE TABLE table_name_68 (tournament VARCHAR)
SELECT COUNT(wins) FROM table_10420426_1 WHERE series = "GP2 series" AND team = "Racing Engineering"
What is the number of wins for gp2 series for racing engineering?
CREATE TABLE table_10420426_1 (wins VARCHAR, series VARCHAR, team VARCHAR)
SELECT to_par FROM table_1121352_2 WHERE date = "May 4, 2003"
What is the to par dated may 4, 2003?
CREATE TABLE table_1121352_2 (to_par VARCHAR, date VARCHAR)
SELECT no_in_series FROM table_2226817_2 WHERE production_code = "1.11"
How many number of series have a production code of 1.11?
CREATE TABLE table_2226817_2 (no_in_series VARCHAR, production_code VARCHAR)
SELECT driver FROM table_name_10 WHERE grid = 24
Which driver's grid was 24?
CREATE TABLE table_name_10 (driver VARCHAR, grid VARCHAR)
SELECT conference FROM table_name_69 WHERE division = "south" AND home_stadium = "georgia dome"
What is the name of the Conference which Division is south, and the Home Stadium is georgia dome?
CREATE TABLE table_name_69 (conference VARCHAR, division VARCHAR, home_stadium VARCHAR)
SELECT COUNT(call_sign) FROM table_18536769_1 WHERE owner = "Vista Radio"
When vista radio is the owner how many call signs are there?
CREATE TABLE table_18536769_1 (call_sign VARCHAR, owner VARCHAR)
SELECT COUNT(first_elected) FROM table_1342233_32 WHERE incumbent = "Sol Bloom"
Name the total number of first elected for sol bloom
CREATE TABLE table_1342233_32 (first_elected VARCHAR, incumbent VARCHAR)
SELECT MAX(overall) FROM table_name_3 WHERE pick__number < 9 AND name = "mike pearson"
Which Overall is the highest one that has a Pick # smaller than 9, and a Name of mike pearson?
CREATE TABLE table_name_3 (overall INTEGER, pick__number VARCHAR, name VARCHAR)
SELECT team FROM table_name_87 WHERE rank > 8 AND rider = "chris barrett"
Rank larger than 8, and a Rider of chris barrett is what team?
CREATE TABLE table_name_87 (team VARCHAR, rank VARCHAR, rider VARCHAR)
SELECT crowd FROM table_name_58 WHERE home_team = "sydney spirit"
How many people attended the game when sydney spirit was at home?
CREATE TABLE table_name_58 (crowd VARCHAR, home_team VARCHAR)
SELECT status FROM table_name_34 WHERE name = "the cub/john"
What is the status of the Cub/John locomotive?
CREATE TABLE table_name_34 (status VARCHAR, name VARCHAR)
SELECT points FROM table_name_17 WHERE draws < 7 AND wins < 16 AND goals_for = 35
What is Points, when Draws is less than 7, when Wins is less than 16, and when Goals For is "35"?
CREATE TABLE table_name_17 (points VARCHAR, goals_for VARCHAR, draws VARCHAR, wins VARCHAR)
SELECT SUM(total) FROM table_name_68 WHERE club = "darlington" AND league_goals = "13" AND league_cup_goals = "1"
Which Total has a Club of darlington, and a League goals of 13, and a League Cup goals of 1?
CREATE TABLE table_name_68 (total INTEGER, league_cup_goals VARCHAR, club VARCHAR, league_goals VARCHAR)
SELECT notes FROM table_name_98 WHERE built = "1917"
What is the notes for the vehicle built in 1917?
CREATE TABLE table_name_98 (notes VARCHAR, built VARCHAR)
SELECT opponent FROM table_17386066_2 WHERE stadium = "Shea stadium"
Who is the opposing team when the game was played on the Shea Stadium?
CREATE TABLE table_17386066_2 (opponent VARCHAR, stadium VARCHAR)
SELECT composer_s_ FROM table_name_33 WHERE time = "2:50"
Which composer has a track length of 2:50?
CREATE TABLE table_name_33 (composer_s_ VARCHAR, time VARCHAR)
SELECT AVG(round) FROM table_name_28 WHERE overall < 187 AND player = "dave stachelski"
Name the average round where Dave Stachelski was picked smaller than 187.
CREATE TABLE table_name_28 (round INTEGER, overall VARCHAR, player VARCHAR)
SELECT MAX(2011) FROM table_name_38 WHERE airport = "bole international airport"
Which 2011 has an Airport of bole international airport?
CREATE TABLE table_name_38 (airport VARCHAR)
SELECT champion FROM table_29295463_9 WHERE runner_up = "Scott Davis Chris Dunk"
Who was the champion in the tournament where Scott Davis Chris Dunk was the runner up?
CREATE TABLE table_29295463_9 (champion VARCHAR, runner_up VARCHAR)
SELECT label FROM table_name_40 WHERE region = "japan"
What is Label, when Region is Japan?
CREATE TABLE table_name_40 (label VARCHAR, region VARCHAR)
SELECT score FROM table_name_78 WHERE home = "detroit" AND date = "december 9"
What score has detroit as the home, and December 9 as the date?
CREATE TABLE table_name_78 (score VARCHAR, home VARCHAR, date VARCHAR)
SELECT MAX(grid) FROM table_name_95 WHERE constructor = "toyota" AND driver = "jarno trulli"
I want the highest Grid for Toyota and jarno trulli
CREATE TABLE table_name_95 (grid INTEGER, constructor VARCHAR, driver VARCHAR)
SELECT directed_by FROM table_20704243_6 WHERE original_air_date = "July15,2012"
Who directed the episode that aired on july15,2012?
CREATE TABLE table_20704243_6 (directed_by VARCHAR, original_air_date VARCHAR)
SELECT result FROM table_name_80 WHERE event = "syracuse grand prix"
What was the result of the syracuse grand prix?
CREATE TABLE table_name_80 (result VARCHAR, event VARCHAR)
SELECT score FROM table_name_55 WHERE date = "october 24, 2005"
What was the score on October 24, 2005?
CREATE TABLE table_name_55 (score VARCHAR, date VARCHAR)
SELECT segment_c FROM table_name_63 WHERE episode < 179 AND segment_b = "s sticker"
Name the segment c with episode less than 179 and segment b of s sticker
CREATE TABLE table_name_63 (segment_c VARCHAR, episode VARCHAR, segment_b VARCHAR)
SELECT SUM(total) FROM table_name_90 WHERE gold > 1 AND nation = "russia" AND bronze < 10
What's the sum of the totals for Russia with more than 1 gold and less than 10 bronze?
CREATE TABLE table_name_90 (total INTEGER, bronze VARCHAR, gold VARCHAR, nation VARCHAR)
SELECT event FROM table_name_9 WHERE round = 1 AND location = "new town, north dakota , united states" AND time = "4:12"
What is Event, when Round is "1", when Location is "New Town, North Dakota , United States" and when Time is "4:12"?
CREATE TABLE table_name_9 (event VARCHAR, time VARCHAR, round VARCHAR, location VARCHAR)
SELECT MAX(rank) FROM table_name_51 WHERE goals > 220 AND years = "1965–1978-78"
What is the highest Rank for more than 220 goals in 1965–1978-78?
CREATE TABLE table_name_51 (rank INTEGER, goals VARCHAR, years VARCHAR)
SELECT opponent FROM table_name_47 WHERE res = "win" AND time = "1:21"
Who was the opponent in the bout that led to a win in a time of 1:21?
CREATE TABLE table_name_47 (opponent VARCHAR, res VARCHAR, time VARCHAR)
SELECT finish FROM table_name_61 WHERE date = "june 1, 2008"
What is the Finish on June 1, 2008?
CREATE TABLE table_name_61 (finish VARCHAR, date VARCHAR)
SELECT MAX(number) FROM table_14624447_33 WHERE name = "Trevard Lindley"
What was Trevard Lindley's number?
CREATE TABLE table_14624447_33 (number INTEGER, name VARCHAR)
SELECT city FROM table_name_25 WHERE winner = "ruben visser"
What is the City, when the Winner is Ruben Visser?
CREATE TABLE table_name_25 (city VARCHAR, winner VARCHAR)
SELECT place_of_birth FROM table_name_7 WHERE elevator = "nicholas iv" AND elector = "napoleone orsini frangipani"
What is the place of birth when the elevator is Nicholas IV, and elector is Napoleone Orsini Frangipani?
CREATE TABLE table_name_7 (place_of_birth VARCHAR, elevator VARCHAR, elector VARCHAR)
SELECT brand_name FROM table_24099628_1 WHERE model__list_ = "E4xxx"
What is the brand name associated with a model name e4xxx?
CREATE TABLE table_24099628_1 (brand_name VARCHAR, model__list_ VARCHAR)
SELECT rank FROM table_name_56 WHERE bronze = 0 AND total < 3 AND nation = "north korea"
What rank has 0 as the bronze, and a total less than 3, with north korea as the nation?
CREATE TABLE table_name_56 (rank VARCHAR, nation VARCHAR, bronze VARCHAR, total VARCHAR)
SELECT sport FROM table_name_56 WHERE games = "1960 rome" AND event = "men's freestyle welterweight"
What sport in the 1960 Rome Games did Pakistan play in the Men's Freestyle Welterweight?
CREATE TABLE table_name_56 (sport VARCHAR, games VARCHAR, event VARCHAR)
SELECT place FROM table_name_25 WHERE score = 67 - 68 - 78 - 77 = 290
What place has a 67-68-78-77=290 score?
CREATE TABLE table_name_25 (place VARCHAR, score VARCHAR)
SELECT COUNT(episode_titles) FROM table_11220799_2 WHERE first_air_date = "March 6, 2008"
How many episodes had their first air date on March 6, 2008?
CREATE TABLE table_11220799_2 (episode_titles VARCHAR, first_air_date VARCHAR)
SELECT MIN(year) FROM table_name_56 WHERE start = "saint-gaudens" AND stage < 15
What was the earliest year that had a start of Saint-Gaudens and a stage smaller than 15?
CREATE TABLE table_name_56 (year INTEGER, start VARCHAR, stage VARCHAR)
SELECT score FROM table_name_46 WHERE date = "august 21, 2007"
Name the score on august 21, 2007
CREATE TABLE table_name_46 (score VARCHAR, date VARCHAR)
SELECT country FROM table_160510_5 WHERE area = "11,891"
Name the country for 11,891 area
CREATE TABLE table_160510_5 (country VARCHAR, area VARCHAR)
SELECT opponent FROM table_name_19 WHERE march = 31
Which opponent's march was 31?
CREATE TABLE table_name_19 (opponent VARCHAR, march VARCHAR)
SELECT COUNT(background) FROM table_1289860_2 WHERE hometown = "Memphis, Tennessee"
How many backgrounds are there represented from Memphis, Tennessee?
CREATE TABLE table_1289860_2 (background VARCHAR, hometown VARCHAR)
SELECT player FROM table_name_58 WHERE pick < 161 AND college = "auburn university"
What is Player, when Pick is less than 161, and when College is "Auburn University"?
CREATE TABLE table_name_58 (player VARCHAR, pick VARCHAR, college VARCHAR)
SELECT mascot FROM table_name_33 WHERE school = "shelbyville"
Name the mascot for shelbyville
CREATE TABLE table_name_33 (mascot VARCHAR, school VARCHAR)
SELECT circuit FROM table_name_27 WHERE race = "adac großer preis der tourenwagen"
What is the circuit for the ADAC großer preis der tourenwagen race?
CREATE TABLE table_name_27 (circuit VARCHAR, race VARCHAR)
SELECT COUNT(area__acres__) FROM table_30120566_1 WHERE townland = "Rathcoola East"
How many different sizes (in acres) are noted for Rathcoola East?
CREATE TABLE table_30120566_1 (area__acres__ VARCHAR, townland VARCHAR)
SELECT AVG(round) FROM table_name_59 WHERE player = "pete laframboise"
What's the average Round of Pete Laframboise?
CREATE TABLE table_name_59 (round INTEGER, player VARCHAR)