answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
489
SELECT MIN(year) FROM table_name_65 WHERE rank = 20 AND floors < 60
What was the earliest year with rank 20 and less than 60 floors?
CREATE TABLE table_name_65 (year INTEGER, rank VARCHAR, floors VARCHAR)
SELECT AVG(wins) FROM table_name_79 WHERE draws < 3 AND points = 26
Which Wins has a Draws smaller than 3, and Points of 26?
CREATE TABLE table_name_79 (wins INTEGER, draws VARCHAR, points VARCHAR)
SELECT rank FROM table_26375386_22 WHERE couple = "Mikey and Melanie"
Name the rank for mikey and melanie
CREATE TABLE table_26375386_22 (rank VARCHAR, couple VARCHAR)
SELECT COUNT(since) FROM table_name_24 WHERE name = "belletti"
Name the total number of since for belletti
CREATE TABLE table_name_24 (since VARCHAR, name VARCHAR)
SELECT MIN(week) FROM table_name_35 WHERE attendance = "60,233"
What is the earliest week with a game attended by 60,233?
CREATE TABLE table_name_35 (week INTEGER, attendance VARCHAR)
SELECT 4 AS th_district FROM table_14123513_5 WHERE year = 1924
Who was in the 4th district in 1924?
CREATE TABLE table_14123513_5 (year VARCHAR)
SELECT record FROM table_name_54 WHERE game < 6 AND opponent = "chicago black hawks"
What was the record for the game before game 6 against the chicago black hawks?
CREATE TABLE table_name_54 (record VARCHAR, game VARCHAR, opponent VARCHAR)
SELECT round FROM table_name_24 WHERE position = "goaltender"
In what Round is the Position Goaltender?
CREATE TABLE table_name_24 (round VARCHAR, position VARCHAR)
SELECT report FROM table_name_32 WHERE circuit = "reims"
Which Report is on the Circuit of reims?
CREATE TABLE table_name_32 (report VARCHAR, circuit VARCHAR)
SELECT high_rebounds FROM table_name_46 WHERE game = 68
What is the high rebounds of game 68?
CREATE TABLE table_name_46 (high_rebounds VARCHAR, game VARCHAR)
SELECT nationality FROM table_name_59 WHERE player = "larry mcmorran"
What nationality is Larry McMorran?
CREATE TABLE table_name_59 (nationality VARCHAR, player VARCHAR)
SELECT score FROM table_11959669_6 WHERE high_points = "Pierce (30)"
What is the score when high points is from pierce (30)?
CREATE TABLE table_11959669_6 (score VARCHAR, high_points VARCHAR)
SELECT club FROM table_name_2 WHERE league_goals = "16" AND total = 20
Which club has 16 league goals for a total of 20?
CREATE TABLE table_name_2 (club VARCHAR, league_goals VARCHAR, total VARCHAR)
SELECT drawn FROM table_name_1 WHERE points_for = "447"
How many matches were drawn by a team with 447 points?
CREATE TABLE table_name_1 (drawn VARCHAR, points_for VARCHAR)
SELECT AVG(wins) FROM table_name_56 WHERE team = "winnipeg blue bombers" AND season > 1964
Which Wins have a Team of winnipeg blue bombers, and a Season larger than 1964?
CREATE TABLE table_name_56 (wins INTEGER, team VARCHAR, season VARCHAR)
SELECT billing_country, AVG(total) FROM invoices GROUP BY billing_country ORDER BY AVG(total) DESC LIMIT 10
A list of the top 10 countries by average invoice size. List country name and average invoice size.
CREATE TABLE invoices (billing_country VARCHAR, total INTEGER)
SELECT COUNT(original_air_date) FROM table_20046379_3 WHERE no_in_series = "35"
On how many different dates did the episode with series number 35 air for the first time?
CREATE TABLE table_20046379_3 (original_air_date VARCHAR, no_in_series VARCHAR)
SELECT transit_connections FROM table_22771048_3 WHERE station = "Capitol Hill U"
Name the transit connections for capitol hill u
CREATE TABLE table_22771048_3 (transit_connections VARCHAR, station VARCHAR)
SELECT competition FROM table_name_3 WHERE location = "tokyo" AND result = "loss"
What is the competition in tokyo with the result loss?
CREATE TABLE table_name_3 (competition VARCHAR, location VARCHAR, result VARCHAR)
SELECT athlete FROM table_name_51 WHERE time < 11.13 AND country = "belgium"
who is the athlete when the time is less than 11.13 and the country is belgium?
CREATE TABLE table_name_51 (athlete VARCHAR, time VARCHAR, country VARCHAR)
SELECT into_service FROM table_29002641_1 WHERE number = "DH1"
Name the into service for dh1
CREATE TABLE table_29002641_1 (into_service VARCHAR, number VARCHAR)
SELECT last_5 FROM table_name_31 WHERE rank = 7
Which Last 5 has a Rank of 7?
CREATE TABLE table_name_31 (last_5 VARCHAR, rank VARCHAR)
SELECT MIN(preliminary) FROM table_name_50 WHERE swimsuit < 8.822 AND interview > 8.744 AND evening_gown > 9.333
What is the smallest preliminary when swimsuit is less than 8.822, interview is more than 8.744 and gown is more than 9.333?
CREATE TABLE table_name_50 (preliminary INTEGER, evening_gown VARCHAR, swimsuit VARCHAR, interview VARCHAR)
SELECT document_name, document_id FROM Documents WHERE document_type_code = "BK"
Find names and ids of all documents with document type code BK.
CREATE TABLE Documents (document_name VARCHAR, document_id VARCHAR, document_type_code VARCHAR)
SELECT height_in_ft FROM table_11734041_17 WHERE years_for_rockets = "1969-70"
What is the hight of the player who's tenure lasted from 1969-70?
CREATE TABLE table_11734041_17 (height_in_ft VARCHAR, years_for_rockets VARCHAR)
SELECT score FROM table_name_81 WHERE attendance = "tbc" AND opponent = "sidley united"
What is the score when the attendance shows TBC, and Sidley United was the opponent?
CREATE TABLE table_name_81 (score VARCHAR, attendance VARCHAR, opponent VARCHAR)
SELECT player FROM table_name_10 WHERE country = "united states" AND place = "t2"
Who is the player from the United States and a place of t2?
CREATE TABLE table_name_10 (player VARCHAR, country VARCHAR, place VARCHAR)
SELECT party FROM table_name_4 WHERE incumbent = "charles van wyck"
What party is Charles Van Wyck part of?
CREATE TABLE table_name_4 (party VARCHAR, incumbent VARCHAR)
SELECT attendance FROM table_name_48 WHERE home_team = "walsall"
What was the attendance for the home team of Walsall?
CREATE TABLE table_name_48 (attendance VARCHAR, home_team VARCHAR)
SELECT language FROM table_1930857_1 WHERE year_founded = "1874"
What's the language of classes in the school founded in 1874?
CREATE TABLE table_1930857_1 (language VARCHAR, year_founded VARCHAR)
SELECT title FROM table_28140588_1 WHERE directed_by = "Maynard C. Virgil I"
What is the title when the director is Maynard C. Virgil i ?
CREATE TABLE table_28140588_1 (title VARCHAR, directed_by VARCHAR)
SELECT MAX(super_g) FROM table_name_43 WHERE slalom = "58" AND overall > 2
What was her highest Super G score with a Slalom score of 58 and an Overall larger than 2?
CREATE TABLE table_name_43 (super_g INTEGER, slalom VARCHAR, overall VARCHAR)
SELECT MAX(played) FROM table_name_25 WHERE season = "2003-04"
What is the highest amount of games played in the 2003-04 season?
CREATE TABLE table_name_25 (played INTEGER, season VARCHAR)
SELECT attendance FROM table_name_93 WHERE record = "25–17–5"
Which attendance has the 25–17–5 record?
CREATE TABLE table_name_93 (attendance VARCHAR, record VARCHAR)
SELECT MAX(last_title) FROM table_10682862_68
In what year was the last last title received, by any of the countries?
CREATE TABLE table_10682862_68 (last_title INTEGER)
SELECT result FROM table_name_70 WHERE week > 9 AND attendance = "69,714"
What was the Result of the game after Week 9 with an Attendance of 69,714?
CREATE TABLE table_name_70 (result VARCHAR, week VARCHAR, attendance VARCHAR)
SELECT opponent FROM table_name_98 WHERE attendance = "628"
Who was the opponent with an attendance of 628?
CREATE TABLE table_name_98 (opponent VARCHAR, attendance VARCHAR)
SELECT COUNT(year) FROM table_1529260_2 WHERE champion = "Jiyai Shin"
How many years was Jiyai Shin the champion?
CREATE TABLE table_1529260_2 (year VARCHAR, champion VARCHAR)
SELECT location FROM table_name_4 WHERE frequency = "102.5 fm"
Which Location has a Frequency of 102.5 fm?
CREATE TABLE table_name_4 (location VARCHAR, frequency VARCHAR)
SELECT district FROM table_1341973_11 WHERE incumbent = "Carl Vinson"
In which district is the incumbent Carl Vinson?
CREATE TABLE table_1341973_11 (district VARCHAR, incumbent VARCHAR)
SELECT codename FROM table_27329061_2 WHERE code_base = "Ubuntu 8.04" AND edition = "Fluxbox CE"
What is the the codename when the code base is ubuntu 8.04 and the edition is fluxbox ce?
CREATE TABLE table_27329061_2 (codename VARCHAR, code_base VARCHAR, edition VARCHAR)
SELECT AVG(bike_no) FROM table_name_34 WHERE driver___passenger = "joris hendrickx / kaspars liepins" AND position > 4
What is the average Bike No, when Driver / Passenger is Joris Hendrickx / Kaspars Liepins, and when Position is greater than 4?
CREATE TABLE table_name_34 (bike_no INTEGER, driver___passenger VARCHAR, position VARCHAR)
SELECT COUNT(goals) FROM table_name_74 WHERE points < 4
How many goals did the player with less than 4 points have?
CREATE TABLE table_name_74 (goals VARCHAR, points INTEGER)
SELECT COUNT(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.name = 'John F Kennedy International Airport'
Find the number of routes that have destination John F Kennedy International Airport.
CREATE TABLE airports (apid VARCHAR, name VARCHAR); CREATE TABLE routes (dst_apid VARCHAR)
SELECT competition FROM table_name_75 WHERE result = "3-0" AND venue = "suwon"
Which Competition had a Result of 3-0 and VEnue of Suwon?
CREATE TABLE table_name_75 (competition VARCHAR, result VARCHAR, venue VARCHAR)
SELECT geographical_regions FROM table_name_1 WHERE hometown = "imbert"
What is the geographical region for hometown Imbert?
CREATE TABLE table_name_1 (geographical_regions VARCHAR, hometown VARCHAR)
SELECT engine_s_ FROM table_name_71 WHERE chassis = "ensign n177" AND year < 1978
What is the engine(s) on the car before 1978 with ensign n177 chassis?
CREATE TABLE table_name_71 (engine_s_ VARCHAR, chassis VARCHAR, year VARCHAR)
SELECT fictional_narrator FROM table_name_63 WHERE published_as_serial = "february–july 1912, all-story"
Which Fictional narrator has a Published as serial of february–july 1912, all-story?
CREATE TABLE table_name_63 (fictional_narrator VARCHAR, published_as_serial VARCHAR)
SELECT prod_code FROM table_20967430_2 WHERE original_air_date = "November 08, 1985"
Name the production code for november 08, 1985
CREATE TABLE table_20967430_2 (prod_code VARCHAR, original_air_date VARCHAR)
SELECT College FROM match_season WHERE POSITION = "Midfielder" INTERSECT SELECT College FROM match_season WHERE POSITION = "Defender"
Which college have both players with position midfielder and players with position defender?
CREATE TABLE match_season (College VARCHAR, POSITION VARCHAR)
SELECT COUNT(week) FROM table_name_79 WHERE venue = "milwaukee county stadium" AND attendance = 47 OFFSET 897
What is the total number of weeks with a game at the Milwaukee County Stadium attended by 47,897?
CREATE TABLE table_name_79 (week VARCHAR, venue VARCHAR, attendance VARCHAR)
SELECT AVG(bronze) FROM table_name_85 WHERE nation = "total"
What is the average number of bronze medals for total of all nations?
CREATE TABLE table_name_85 (bronze INTEGER, nation VARCHAR)
SELECT chassis FROM table_name_3 WHERE year = 2012
What chassis has 2012 as the year?
CREATE TABLE table_name_3 (chassis VARCHAR, year VARCHAR)
SELECT MIN(number__map_) FROM table_name_71 WHERE area_in_km² = 9.7 AND population_canada_2011_census > 66 OFFSET 158
Which Number (map) is the lowest one that has a Area in km² of 9.7, and a Population Canada 2011 Census larger than 66,158?
CREATE TABLE table_name_71 (number__map_ INTEGER, area_in_km² VARCHAR, population_canada_2011_census VARCHAR)
SELECT lost FROM table_name_66 WHERE "played" = "played"
If the Played was played, what is the lost?
CREATE TABLE table_name_66 (lost VARCHAR)
SELECT record FROM table_name_65 WHERE attendance = "35,614"
What was the record for the game attended by 35,614 spectators?
CREATE TABLE table_name_65 (record VARCHAR, attendance VARCHAR)
SELECT years FROM table_name_71 WHERE position = "mf"
In what Years was the Player in MF Position?
CREATE TABLE table_name_71 (years VARCHAR, position VARCHAR)
SELECT MAX(no_in_season) FROM table_23117208_3 WHERE no_in_series = 20
which is the biggest number of episode in the season, where the number of the episode in series is 20?
CREATE TABLE table_23117208_3 (no_in_season INTEGER, no_in_series VARCHAR)
SELECT week FROM table_name_66 WHERE opponent = "detroit lions"
On what Week was the Detroit Lions the Opponent?
CREATE TABLE table_name_66 (week VARCHAR, opponent VARCHAR)
SELECT cfl_team FROM table_23619005_3 WHERE position = "SB"
What CFL team was the player playing on SB position drafted for?
CREATE TABLE table_23619005_3 (cfl_team VARCHAR, position VARCHAR)
SELECT bowling_style FROM table_name_10 WHERE date_of_birth = "16 march 1974"
Name the bowling style of the player born 16 march 1974
CREATE TABLE table_name_10 (bowling_style VARCHAR, date_of_birth VARCHAR)
SELECT analog_channel FROM table_name_31 WHERE digital_channel = "4.1"
Which analog channel has a digital channel of 4.1?
CREATE TABLE table_name_31 (analog_channel VARCHAR, digital_channel VARCHAR)
SELECT nickname FROM table_261941_1 WHERE institution = "Linfield College"
What is the nickname of Linfield College?
CREATE TABLE table_261941_1 (nickname VARCHAR, institution VARCHAR)
SELECT first_year FROM table_12148147_2 WHERE third_year = "Geometry"
What is the first year course in the program where geometry is taken in the third year?
CREATE TABLE table_12148147_2 (first_year VARCHAR, third_year VARCHAR)
SELECT races FROM table_name_43 WHERE position = "8th"
What is the race in the 8th position?
CREATE TABLE table_name_43 (races VARCHAR, position VARCHAR)
SELECT MAX(area__acres__) FROM table_30121046_1 WHERE townland = "Knockacullen"
What is the maximum area (in acres) of the Knockacullen townland?
CREATE TABLE table_30121046_1 (area__acres__ INTEGER, townland VARCHAR)
SELECT SUM(week) FROM table_name_49 WHERE opponent = "san diego chargers"
What is the total number of weeks that the buffalo bills played against the San Diego Chargers?
CREATE TABLE table_name_49 (week INTEGER, opponent VARCHAR)
SELECT MIN(number_in_fleet) FROM table_1425948_1 WHERE chassis_model = "Scania K360UA"
Chassis model Scania K360ua has what minimum number in fleet?
CREATE TABLE table_1425948_1 (number_in_fleet INTEGER, chassis_model VARCHAR)
SELECT T1.Fname, T1.Lname FROM FACULTY AS T1 JOIN MEMBER_OF AS T2 ON T1.FacID = T2.FacID WHERE T2.DNO = 520
Find the full names of faculties who are members of department with department number 520.
CREATE TABLE FACULTY (Fname VARCHAR, Lname VARCHAR, FacID VARCHAR); CREATE TABLE MEMBER_OF (FacID VARCHAR, DNO VARCHAR)
SELECT MIN(rank) FROM table_26375386_23 WHERE vote_percentage = "5.6%"
What was the maximum rank for the vote percentage of 5.6%
CREATE TABLE table_26375386_23 (rank INTEGER, vote_percentage VARCHAR)
SELECT COUNT(*) FROM club
How many clubs are there?
CREATE TABLE club (Id VARCHAR)
SELECT date FROM table_name_59 WHERE venue = "brunswick street oval"
Name the date for the venue of brunswick street oval
CREATE TABLE table_name_59 (date VARCHAR, venue VARCHAR)
SELECT COUNT(game) FROM table_name_55 WHERE team = "chicago"
How many Games has a Team of chicago?
CREATE TABLE table_name_55 (game VARCHAR, team VARCHAR)
SELECT other_details FROM Residents WHERE other_details LIKE '%Miss%'
What are the resident details containing the substring 'Miss'?
CREATE TABLE Residents (other_details VARCHAR)
SELECT netflow_version FROM table_1206114_2 WHERE vendor_and_type = "PC and Servers"
What is the netflow version when vendor and type is pc and servers?
CREATE TABLE table_1206114_2 (netflow_version VARCHAR, vendor_and_type VARCHAR)
SELECT city_of_license FROM table_name_20 WHERE call_sign = "kyli"
Which city of license has the Kyli call sign?
CREATE TABLE table_name_20 (city_of_license VARCHAR, call_sign VARCHAR)
SELECT MIN(bronze) FROM table_name_7 WHERE gold > 4
What is the smallest number of bronze medals with more than 4 gold medals?
CREATE TABLE table_name_7 (bronze INTEGER, gold INTEGER)
SELECT points FROM table_name_64 WHERE races = "11" AND season > 2008
If the Season is later than 2008 and Races is 11, what ate the Points?
CREATE TABLE table_name_64 (points VARCHAR, races VARCHAR, season VARCHAR)
SELECT singer_part_number FROM table_28652521_1 WHERE storage_case = "green plastic box"
What's the singer part number of the buttonholer whose storage case is a green plastic box?
CREATE TABLE table_28652521_1 (singer_part_number VARCHAR, storage_case VARCHAR)
SELECT live_births_per_year FROM table_18950570_2 WHERE life_expectancy_females = "73.3"
How many live births per year are there in the period where the life expectancy for females is 73.3?
CREATE TABLE table_18950570_2 (live_births_per_year VARCHAR, life_expectancy_females VARCHAR)
SELECT MAX(grand_total) FROM table_26214389_3 WHERE qatari_male = 1104
If the qatari male is 1104, what is the grand total?
CREATE TABLE table_26214389_3 (grand_total INTEGER, qatari_male VARCHAR)
SELECT raion__district__or_city FROM table_name_58 WHERE bessarabian_bulgarians = "8,600"
What city or Raion (district) has 8,600 Bessarabian Bulgarians?
CREATE TABLE table_name_58 (raion__district__or_city VARCHAR, bessarabian_bulgarians VARCHAR)
SELECT 2006 FROM table_name_68 WHERE 2009 = "a" AND 2011 = "a" AND 2007 = "a"
What is the 2006 value of the 2009 A value, 2011 A value, and A as the 2007 value?
CREATE TABLE table_name_68 (Id VARCHAR)
SELECT MAX(touchdowns) FROM table_20906175_3 WHERE qb_rating = "82.7"
How many touchdowns were scored when QB rating was 82.7?
CREATE TABLE table_20906175_3 (touchdowns INTEGER, qb_rating VARCHAR)
SELECT party FROM table_name_3 WHERE left_office = "26 november 2002"
What is the party of the minister who left office on 26 November 2002?
CREATE TABLE table_name_3 (party VARCHAR, left_office VARCHAR)
SELECT man_of_the_match FROM table_name_19 WHERE opponent = "milton keynes lightning" AND venue = "away"
Who was the Man of the Match when the opponent was Milton Keynes Lightning and the venue was Away?
CREATE TABLE table_name_19 (man_of_the_match VARCHAR, opponent VARCHAR, venue VARCHAR)
SELECT AVG(draws) FROM table_name_15 WHERE against = 989 AND wins < 12
What is th average dras when wins are less than 12 and the against is 989?
CREATE TABLE table_name_15 (draws INTEGER, against VARCHAR, wins VARCHAR)
SELECT COUNT(nhl_team) FROM table_1213511_2 WHERE player = "Terry French"
How many NHL teams does Terry French play for?
CREATE TABLE table_1213511_2 (nhl_team VARCHAR, player VARCHAR)
SELECT crowd FROM table_name_79 WHERE home_team = "st kilda"
How many people watched when st kilda played at home?
CREATE TABLE table_name_79 (crowd VARCHAR, home_team VARCHAR)
SELECT MIN(game) FROM table_27700375_6 WHERE location_attendance = "Prudential Center 15,086"
Which game number was located in Prudential Center 15,086?
CREATE TABLE table_27700375_6 (game INTEGER, location_attendance VARCHAR)
SELECT championship FROM table_name_77 WHERE year < 1952 AND race_title = "grand prix watkins glen" AND drivers = "miles collier"
Was the Grand Prix Watkins GLen that Miles Collier raced in before 1952 a championship?
CREATE TABLE table_name_77 (championship VARCHAR, drivers VARCHAR, year VARCHAR, race_title VARCHAR)
SELECT MAX(year) FROM table_name_25 WHERE earnings__$_ = "557,158"
What year has earnings of $557,158?
CREATE TABLE table_name_25 (year INTEGER, earnings__$_ VARCHAR)
SELECT date FROM table_name_33 WHERE opposition = "sydney fc" AND round = "round 19"
When was the opposition sydney fc on round 19?
CREATE TABLE table_name_33 (date VARCHAR, opposition VARCHAR, round VARCHAR)
SELECT SUM(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = "Lucas" AND T1.last_name = "Mancini"
What is the total amount of money spent by Lucas Mancini?
CREATE TABLE invoices (total INTEGER, customer_id VARCHAR); CREATE TABLE customers (id VARCHAR, first_name VARCHAR, last_name VARCHAR)
SELECT region FROM table_name_8 WHERE state = "georgia"
Tell me the region for georgia
CREATE TABLE table_name_8 (region VARCHAR, state VARCHAR)
SELECT location_attendance FROM table_17355628_10 WHERE high_assists = "Chucky Atkins , Russell Westbrook (4)"
Name the location attendance for chucky atkins , russell westbrook (4)
CREATE TABLE table_17355628_10 (location_attendance VARCHAR, high_assists VARCHAR)
SELECT MAX(races) FROM table_15852257_1
What is the highest value for race?
CREATE TABLE table_15852257_1 (races INTEGER)
SELECT dáil FROM table_name_55 WHERE seats = 61
What is the number of the dail with 61 seats?
CREATE TABLE table_name_55 (dáil VARCHAR, seats VARCHAR)
SELECT legs_won FROM table_20351295_2 WHERE high_checkout = 80
How many legs has the player with high checkout of 80 won?
CREATE TABLE table_20351295_2 (legs_won VARCHAR, high_checkout VARCHAR)
SELECT name FROM table_name_47 WHERE losses = "5" AND matches = "11"
Who has 5 losses and has played 11 matches?
CREATE TABLE table_name_47 (name VARCHAR, losses VARCHAR, matches VARCHAR)