answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
489
SELECT AVG(roll) FROM table_name_18 WHERE name = "fairfield school"
What is the average roll for Fairfield school?
CREATE TABLE table_name_18 (roll INTEGER, name VARCHAR)
SELECT model FROM table_name_85 WHERE seats = 29 AND built = "1941–1942"
What is the Model of the Engine with 29 Seats Built in 1941–1942?
CREATE TABLE table_name_85 (model VARCHAR, seats VARCHAR, built VARCHAR)
SELECT COUNT(caps) FROM table_name_40 WHERE position = "flanker" AND player = "aca ratuva"
What is the total number of Caps Aca Ratuva, a flanker, has?
CREATE TABLE table_name_40 (caps VARCHAR, position VARCHAR, player VARCHAR)
SELECT SUM(decile) FROM table_name_99 WHERE authority = "state" AND roll = 120
What is the Decile with a State Authority and a roll of 120?
CREATE TABLE table_name_99 (decile INTEGER, authority VARCHAR, roll VARCHAR)
SELECT 1984 FROM table_name_87 WHERE 1978 = "46–15"
What 1984 has a 1978 of 46–15?
CREATE TABLE table_name_87 (Id VARCHAR)
SELECT constructor FROM table_name_88 WHERE time_retired = "1:34:12.912"
Who built the car that has a Time/Retired of 1:34:12.912?
CREATE TABLE table_name_88 (constructor VARCHAR, time_retired VARCHAR)
SELECT COUNT(engine_capacity) FROM table_name_50 WHERE transmission = "a4" AND mpg_us_urban > 19 AND mpg_us_extra_urban > 38.6 AND model = "aveo"
What is the total engine capacity of the a4 transmission, which has an urban mpg-US greater than 19, an mpg-us extra-urban greater than 38.6, and an aveo model?
CREATE TABLE table_name_50 (engine_capacity VARCHAR, model VARCHAR, mpg_us_extra_urban VARCHAR, transmission VARCHAR, mpg_us_urban VARCHAR)
SELECT sound FROM table_name_77 WHERE language = "cantonese" AND classifaction = "n/a" AND publisher = "spectrum dvd"
What sound has cantonese as the language, N/A as the classification, and spectrum dvd as the publisher?
CREATE TABLE table_name_77 (sound VARCHAR, publisher VARCHAR, language VARCHAR, classifaction VARCHAR)
SELECT year FROM table_2597876_2 WHERE avg_start = "27.2"
What is every year with average start of 27.2?
CREATE TABLE table_2597876_2 (year VARCHAR, avg_start VARCHAR)
SELECT location FROM table_28523_2 WHERE school = "Cunningham Hill Infant school"
Where is the cunningham hill infant school located?
CREATE TABLE table_28523_2 (location VARCHAR, school VARCHAR)
SELECT SUM(overall) FROM table_name_59 WHERE college = "louisiana tech" AND pick__number > 10
What is the overall number for Louisiana Tech college, and a pick more than 10?
CREATE TABLE table_name_59 (overall INTEGER, college VARCHAR, pick__number VARCHAR)
SELECT T1.area_code FROM area_code_state AS T1 JOIN votes AS T2 ON T1.state = T2.state GROUP BY T1.area_code ORDER BY COUNT(*) DESC LIMIT 1
What is the area code in which the most voters voted?
CREATE TABLE area_code_state (area_code VARCHAR, state VARCHAR); CREATE TABLE votes (state VARCHAR)
SELECT original_air_date FROM table_name_64 WHERE production_code = "ad1c13"
What is the air date for the episode with production code ad1c13?
CREATE TABLE table_name_64 (original_air_date VARCHAR, production_code VARCHAR)
SELECT years_in_orlando FROM table_name_53 WHERE school_club_team = "clemson"
What year did Orlando have a School/Club team in Clemson?
CREATE TABLE table_name_53 (years_in_orlando VARCHAR, school_club_team VARCHAR)
SELECT margin_of_victory FROM table_name_84 WHERE tournament = "southwest golf classic"
What was the Margin of victory in the southwest golf classic Tournament?
CREATE TABLE table_name_84 (margin_of_victory VARCHAR, tournament VARCHAR)
SELECT cfl_team FROM table_25017530_5 WHERE player = "Steven Turner"
Name the cfl team for steven turner
CREATE TABLE table_25017530_5 (cfl_team VARCHAR, player VARCHAR)
SELECT enrollment FROM table_262476_1 WHERE nickname = "Tomcats"
Name the enrollment for tomcats
CREATE TABLE table_262476_1 (enrollment VARCHAR, nickname VARCHAR)
SELECT MAX(year) FROM table_name_82 WHERE time = "1:36.69"
What is the most recent year that had a time of 1:36.69?
CREATE TABLE table_name_82 (year INTEGER, time VARCHAR)
SELECT MIN(roll) FROM table_name_40 WHERE decile > 6 AND name = "broomfield school"
What is the smallest roll with a Decile larger than 6, and a Name of broomfield school?
CREATE TABLE table_name_40 (roll INTEGER, decile VARCHAR, name VARCHAR)
SELECT cup_apps__sub_ FROM table_name_59 WHERE cup_goals = "2"
Which Cup Apps (sub) had 2 goals?
CREATE TABLE table_name_59 (cup_apps__sub_ VARCHAR, cup_goals VARCHAR)
SELECT award FROM table_name_14 WHERE recipient = "charlie productions ltd"
What award did Charlie Productions Ltd receive?
CREATE TABLE table_name_14 (award VARCHAR, recipient VARCHAR)
SELECT teams FROM table_name_75 WHERE home = "2-3"
What team has a home of 2-3?
CREATE TABLE table_name_75 (teams VARCHAR, home VARCHAR)
SELECT MIN(crowd) FROM table_name_61 WHERE away_team = "footscray"
What is the lowest attendance when footscray is the away team?
CREATE TABLE table_name_61 (crowd INTEGER, away_team VARCHAR)
SELECT team FROM table_name_47 WHERE tournament > 1 AND regular_season = "0" AND total = 2
What team has over 1 tournament title, 0 in the regular season, and 2 total?
CREATE TABLE table_name_47 (team VARCHAR, total VARCHAR, tournament VARCHAR, regular_season VARCHAR)
SELECT elevation FROM table_name_24 WHERE route > 24 AND highway = "trail ridge road"
Route larger than 24, and a Highway of trail ridge road had what elevation?
CREATE TABLE table_name_24 (elevation VARCHAR, route VARCHAR, highway VARCHAR)
SELECT paraguay_scorers FROM table_name_1 WHERE date = "june 15, 2008"
Who were the Paraguay scorers on June 15, 2008?
CREATE TABLE table_name_1 (paraguay_scorers VARCHAR, date VARCHAR)
SELECT branding FROM table_19874169_3 WHERE callsign = "DXYR"
If the call sign is DXYR, what is the branding?
CREATE TABLE table_19874169_3 (branding VARCHAR, callsign VARCHAR)
SELECT date FROM table_name_67 WHERE away_team = "bury"
What date was Bury the home team?
CREATE TABLE table_name_67 (date VARCHAR, away_team VARCHAR)
SELECT AVG(played) FROM table_name_63 WHERE lost = 3 AND against = 23
Which Played has a Lost of 3, and an Against of 23?
CREATE TABLE table_name_63 (played INTEGER, lost VARCHAR, against VARCHAR)
SELECT AVG(against) FROM table_name_78 WHERE team = "estudantes paulista" AND position < 4
Team Estudantes Paulista with a position less than 4 has what average against?
CREATE TABLE table_name_78 (against INTEGER, team VARCHAR, position VARCHAR)
SELECT right_ascension___j2000__ FROM table_name_14 WHERE ngc_number < 6995 AND object_type = "diffuse nebula" AND declination___j2000__ = "°42′30″"
What is the Right Ascension with a Diffuse Nebula Object Type has a °42′30″ Declination and a NGC less than 6995?
CREATE TABLE table_name_14 (right_ascension___j2000__ VARCHAR, declination___j2000__ VARCHAR, ngc_number VARCHAR, object_type VARCHAR)
SELECT country FROM table_name_19 WHERE score = 73 - 70 - 71 - 71 = 285
What is the Country of the Player with a Score of 73-70-71-71=285?
CREATE TABLE table_name_19 (country VARCHAR, score VARCHAR)
SELECT COUNT(silver) FROM table_name_10 WHERE bronze < 0
What is the number of silver when bronze is less than 0?
CREATE TABLE table_name_10 (silver VARCHAR, bronze INTEGER)
SELECT account_id, COUNT(*) FROM Financial_transactions GROUP BY account_id
Show the account id and the number of transactions for each account
CREATE TABLE Financial_transactions (account_id VARCHAR)
SELECT away_team AS score FROM table_name_84 WHERE home_team = "melbourne"
What was the away score when the home team was Melbourne?
CREATE TABLE table_name_84 (away_team VARCHAR, home_team VARCHAR)
SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff
Which last names are both used by customers and by staff?
CREATE TABLE Customers (last_name VARCHAR); CREATE TABLE Staff (last_name VARCHAR)
SELECT second FROM table_name_91 WHERE third = "don walchuk"
What is the Second when the third is don walchuk?
CREATE TABLE table_name_91 (second VARCHAR, third VARCHAR)
SELECT away_team FROM table_name_63 WHERE venue = "glenferrie oval"
Which away team plays at the venue glenferrie oval?
CREATE TABLE table_name_63 (away_team VARCHAR, venue VARCHAR)
SELECT SUM(week) FROM table_name_50 WHERE opponent = "san diego chargers"
What was the score of the game against the San Diego Chargers?
CREATE TABLE table_name_50 (week INTEGER, opponent VARCHAR)
SELECT result FROM table_name_15 WHERE extra = "4 x 100 m relay" AND year > 1971
what is the result when extra is 4 x 100 m relay and the year is later than 1971?
CREATE TABLE table_name_15 (result VARCHAR, extra VARCHAR, year VARCHAR)
SELECT 2004 FROM table_name_46 WHERE 2011 = "grand slam tournaments"
What is the 2004 value in the 2011 Grand Slam Tournaments?
CREATE TABLE table_name_46 (Id VARCHAR)
SELECT 2010 FROM table_name_97 WHERE 2007 = "a" AND 2004 = "2r"
What shows for 2010 when 2007 is a and 2004 is 2r?
CREATE TABLE table_name_97 (Id VARCHAR)
SELECT AVG(draft) FROM table_name_45 WHERE pick > 42 AND player = "grant eakin" AND round > 8
What is the average draft with a pick larger than 42, and player Grant Eakin after round 8?
CREATE TABLE table_name_45 (draft INTEGER, round VARCHAR, pick VARCHAR, player VARCHAR)
SELECT MIN(average_parish_size) FROM table_name_25 WHERE _percentage_of_adherents = "47.2%" AND regular_attendees > 4 OFFSET 936
What is the lowest average parish size with 47.2% of adherents and 4,936 regular attendees?
CREATE TABLE table_name_25 (average_parish_size INTEGER, _percentage_of_adherents VARCHAR, regular_attendees VARCHAR)
SELECT Country, COUNT(*) FROM perpetrator GROUP BY Country HAVING COUNT(*) >= 2
What are the countries that have at least two perpetrators?
CREATE TABLE perpetrator (Country VARCHAR)
SELECT margin_of_victory FROM table_1590652_4 WHERE date = "10 Jul 2011"
Name th margin of victory when date is 10 jul 2011
CREATE TABLE table_1590652_4 (margin_of_victory VARCHAR, date VARCHAR)
SELECT original_artist FROM table_name_15 WHERE week__number = "top 16 (8 men)"
What is the name of the Original artist when the week # is top 16 (8 men)?
CREATE TABLE table_name_15 (original_artist VARCHAR, week__number VARCHAR)
SELECT city___municipality FROM table_2562572_5 WHERE urban_settlement = "Kanjiža"
Name the city for kanjiža
CREATE TABLE table_2562572_5 (city___municipality VARCHAR, urban_settlement VARCHAR)
SELECT director FROM table_22265716_1 WHERE film_title_used_in_nomination = "Three Summer Days"
Who directed the film with the title three summer days?
CREATE TABLE table_22265716_1 (director VARCHAR, film_title_used_in_nomination VARCHAR)
SELECT COUNT(track) FROM table_name_21 WHERE translation = "the fallen angel"
Name the total number of tracks for of the fallen angel
CREATE TABLE table_name_21 (track VARCHAR, translation VARCHAR)
SELECT result FROM table_name_26 WHERE home_team = "portland" AND date = "june 12"
What was the result for Portland at home on June 12?
CREATE TABLE table_name_26 (result VARCHAR, home_team VARCHAR, date VARCHAR)
SELECT authority FROM table_name_58 WHERE gender = "coed" AND area = "pinehaven"
What authority is the coed school in pinehaven?
CREATE TABLE table_name_58 (authority VARCHAR, gender VARCHAR, area VARCHAR)
SELECT score FROM table_name_21 WHERE visitor = "grizzlies" AND date = "30 december 2007"
What is the score of the game with Grizzlies as the visitor team on 30 December 2007?
CREATE TABLE table_name_21 (score VARCHAR, visitor VARCHAR, date VARCHAR)
SELECT player FROM table_25085059_1 WHERE pick__number = 1
What player was the number 1 draft pick?
CREATE TABLE table_25085059_1 (player VARCHAR, pick__number VARCHAR)
SELECT location FROM table_name_25 WHERE goal = "2"
Which location has a Goal of 2?
CREATE TABLE table_name_25 (location VARCHAR, goal VARCHAR)
SELECT nationality FROM table_name_4 WHERE school_club_team = "ucla"
What is the nationality of the player from UCLA?
CREATE TABLE table_name_4 (nationality VARCHAR, school_club_team VARCHAR)
SELECT player FROM table_name_1 WHERE place = "2"
What is the Place 2 Player?
CREATE TABLE table_name_1 (player VARCHAR, place VARCHAR)
SELECT candidates FROM table_1346137_4 WHERE first_elected = "1910"
Who were the candidates when the winner was first elected in 1910?
CREATE TABLE table_1346137_4 (candidates VARCHAR, first_elected VARCHAR)
SELECT game_site FROM table_17782308_1 WHERE date = "October 16, 1966"
On October 16, 1966, what was the game site?
CREATE TABLE table_17782308_1 (game_site VARCHAR, date VARCHAR)
SELECT qual FROM table_name_3 WHERE laps < 68
What is the Qual with less than 68 laps?
CREATE TABLE table_name_3 (qual VARCHAR, laps INTEGER)
SELECT co_drivers FROM table_name_41 WHERE pos = "dnf" AND class = "gt1"
Who was the co-driver in the DNF position in the GT1 class?
CREATE TABLE table_name_41 (co_drivers VARCHAR, pos VARCHAR, class VARCHAR)
SELECT name FROM table_14966667_19 WHERE number = "98"
who is number 98?
CREATE TABLE table_14966667_19 (name VARCHAR, number VARCHAR)
SELECT winner FROM table_name_35 WHERE date = "3 june"
Who won on 3 june?
CREATE TABLE table_name_35 (winner VARCHAR, date VARCHAR)
SELECT opponent_number FROM table_name_19 WHERE attendance = "42,000"
Who was the opponent in the game that was attended by 42,000 people?
CREATE TABLE table_name_19 (opponent_number VARCHAR, attendance VARCHAR)
SELECT score FROM table_name_58 WHERE result = "win" AND competition = "1998 fifa world cup qualification" AND date = "october 30, 1996"
What's the score at the October 30, 1996 1998 fifa world cup qualification with a result of win?
CREATE TABLE table_name_58 (score VARCHAR, date VARCHAR, result VARCHAR, competition VARCHAR)
SELECT award FROM table_name_90 WHERE year > 1947 AND category = "best actor in a leading role"
Who was awarded after 1947 in the category of, the best actor in a leading role?
CREATE TABLE table_name_90 (award VARCHAR, year VARCHAR, category VARCHAR)
SELECT MAX(year) FROM table_name_36 WHERE venue = "gothenburg, sweden"
When is the latest year the venue is in gothenburg, sweden?
CREATE TABLE table_name_36 (year INTEGER, venue VARCHAR)
SELECT lead FROM table_name_87 WHERE season = "1999–00"
What is the Lead for the 1999–00 season?
CREATE TABLE table_name_87 (lead VARCHAR, season VARCHAR)
SELECT safari FROM table_name_57 WHERE chrome = "2.05%"
What percentage of browsers were using Safari during the period in which 2.05% were using Chrome?
CREATE TABLE table_name_57 (safari VARCHAR, chrome VARCHAR)
SELECT season FROM table_name_68 WHERE regionalliga_süd = "stuttgarter kickers"
Which season had a Regionalliga Sud of Stuttgarter Kickers?
CREATE TABLE table_name_68 (season VARCHAR, regionalliga_süd VARCHAR)
SELECT MAX(tie_no) FROM table_24887326_6 WHERE attendance = 19129
What is the highest tie that had 19129 attendance?
CREATE TABLE table_24887326_6 (tie_no INTEGER, attendance VARCHAR)
SELECT MIN(grid) FROM table_name_53 WHERE car_no = 98
What is Car number 98's lowest grid?
CREATE TABLE table_name_53 (grid INTEGER, car_no VARCHAR)
SELECT height_from_sea_level_in_meters FROM table_1430913_1 WHERE trekking_route = "22km"
if 22km is the trekking route what is height from sea level in meters?
CREATE TABLE table_1430913_1 (height_from_sea_level_in_meters VARCHAR, trekking_route VARCHAR)
SELECT name FROM table_name_36 WHERE direction = "toyohashi east" AND length__km_ = 24.7
What line is 24.7 km and head towards Toyohashi East?
CREATE TABLE table_name_36 (name VARCHAR, direction VARCHAR, length__km_ VARCHAR)
SELECT film FROM table_name_7 WHERE nominating_festival = "prix uip vilo do conde"
The Prix UIP Vilo Do Conde festival nominated which film?
CREATE TABLE table_name_7 (film VARCHAR, nominating_festival VARCHAR)
SELECT place FROM table_name_43 WHERE score < 74 AND to_par = "e"
What place had a score smaller than 74 and a par of e?
CREATE TABLE table_name_43 (place VARCHAR, score VARCHAR, to_par VARCHAR)
SELECT COUNT(storage_medium) FROM table_27615520_1 WHERE product_name = "RamSan-720"
List the number of ramsan-720 hard drives?
CREATE TABLE table_27615520_1 (storage_medium VARCHAR, product_name VARCHAR)
SELECT week_6 FROM table_name_80 WHERE week_2 = "see notes 2 , 3 , 4"
What kind of Week 6 has a Week 2 of see notes 2 , 3 , 4?
CREATE TABLE table_name_80 (week_6 VARCHAR, week_2 VARCHAR)
SELECT COUNT(*) FROM customers WHERE state = "CA"
How many customers in state of CA?
CREATE TABLE customers (state VARCHAR)
SELECT type FROM table_name_26 WHERE quantity = 5
What type has 5 as the quantity?
CREATE TABLE table_name_26 (type VARCHAR, quantity VARCHAR)
SELECT SUM(area_km_2) FROM table_name_10 WHERE status = "village" AND census_ranking = "2,471 of 5,008" AND population < 748
What is the area (in km2) for the community that has a status of village, a census ranking of 2,471 of 5,008, and a population of less than 748?
CREATE TABLE table_name_10 (area_km_2 INTEGER, population VARCHAR, status VARCHAR, census_ranking VARCHAR)
SELECT pop__1996_ FROM table_2134521_1 WHERE area__km²_ = "9909.31"
How many people lived in the census division spread out on 9909.31 km2 in 1996?
CREATE TABLE table_2134521_1 (pop__1996_ VARCHAR, area__km²_ 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 MIN(pick__number) FROM table_name_98 WHERE college = "jackson state"
What is the lowest Pick #, when College is "Jackson State"?
CREATE TABLE table_name_98 (pick__number INTEGER, college VARCHAR)
SELECT name FROM table_name_53 WHERE overs < 2047.3 AND wickets > 200 AND average > 29.02
Who has fewer than 2047.3 overs, more than 200 wickets and an average of 29.02?
CREATE TABLE table_name_53 (name VARCHAR, average VARCHAR, overs VARCHAR, wickets VARCHAR)
SELECT tyres FROM table_name_37 WHERE year > 1974 AND points = "5"
What tyres are associated with a year after 1974 and 5 points?
CREATE TABLE table_name_37 (tyres VARCHAR, year VARCHAR, points VARCHAR)
SELECT highway_commissioners FROM table_name_37 WHERE "treasurer" = "treasurer"
When Treasurer was treasurer, who was the highway commissioner?
CREATE TABLE table_name_37 (highway_commissioners VARCHAR)
SELECT COUNT(bronze) FROM table_name_45 WHERE nation = "u.s. virgin islands" AND gold < 0
What is the total number of bronze medals the U.S. Virgin Islands, which has less than 0 golds, has?
CREATE TABLE table_name_45 (bronze VARCHAR, nation VARCHAR, gold VARCHAR)
SELECT score FROM table_name_35 WHERE away_team = "chelsea"
What is the score for the away team Chelsea?
CREATE TABLE table_name_35 (score VARCHAR, away_team VARCHAR)
SELECT Name FROM editor ORDER BY Age
List the names of editors in ascending order of age.
CREATE TABLE editor (Name VARCHAR, Age VARCHAR)
SELECT sportsperson FROM table_name_36 WHERE sport = "athletics"
Who playes the sport of athletics?
CREATE TABLE table_name_36 (sportsperson VARCHAR, sport VARCHAR)
SELECT MAX(joined) FROM table_1969577_1 WHERE institution = "Molloy College"
Name the most joined for molloy college
CREATE TABLE table_1969577_1 (joined INTEGER, institution VARCHAR)
SELECT entrant FROM table_name_80 WHERE engine = "talbot l6" AND driver = "eugène chaboud"
What is the Entrant with a Engine of talbot l6, and Eugène Chaboud was the driver?
CREATE TABLE table_name_80 (entrant VARCHAR, engine VARCHAR, driver VARCHAR)
SELECT territory FROM table_name_91 WHERE screens = 17
What is the territory with 17 screens?
CREATE TABLE table_name_91 (territory VARCHAR, screens VARCHAR)
SELECT name FROM enzyme WHERE name LIKE "%ALA%"
Which enzyme names have the substring "ALA"?
CREATE TABLE enzyme (name VARCHAR)
SELECT COUNT(number_of_cantons__gavars_) FROM table_23887174_1 WHERE armenian_name = "Վասպուրական"
How many different numbers of cantons does the province with the Armenian name վասպուրական have?
CREATE TABLE table_23887174_1 (number_of_cantons__gavars_ VARCHAR, armenian_name VARCHAR)
SELECT venue FROM table_name_19 WHERE date = "20 may"
Where was the game played on 20 may?
CREATE TABLE table_name_19 (venue VARCHAR, date VARCHAR)
SELECT DISTINCT T1.name, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Dan' OR T2.friend = 'Alice'
Find the name and age of the person who is a friend of Dan or Alice.
CREATE TABLE Person (name VARCHAR, age VARCHAR); CREATE TABLE PersonFriend (name VARCHAR, friend VARCHAR)
SELECT chord FROM table_name_23 WHERE minor_seventh = "f"
What is the listed chord for a Minor seventh of F?
CREATE TABLE table_name_23 (chord VARCHAR, minor_seventh VARCHAR)
SELECT COUNT(nationality) FROM table_2840500_8 WHERE player = "Ryan Mckie"
Name the number of nationalities for ryan mckie
CREATE TABLE table_2840500_8 (nationality VARCHAR, player VARCHAR)