answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
484
SELECT MAX(laps) FROM table_name_27 WHERE manufacturer = "honda" AND grid = 12
What is the highest number of laps when honda is the manufacturer and the grid number is 12?
CREATE TABLE table_name_27 (laps INTEGER, manufacturer VARCHAR, grid VARCHAR)
SELECT away FROM table_name_57 WHERE time = "15:00"
Who was the away team of the game at the time 15:00?
CREATE TABLE table_name_57 (away VARCHAR, time VARCHAR)
SELECT score FROM table_229059_2 WHERE year = 1978
What was the score in 1978?
CREATE TABLE table_229059_2 (score VARCHAR, year VARCHAR)
SELECT home FROM table_name_76 WHERE visitor = "chicago"
Name the home with chicago visiting
CREATE TABLE table_name_76 (home VARCHAR, visitor VARCHAR)
SELECT COUNT(population__2010_) FROM table_216776_2 WHERE municipality = "Cavinti"
How many different counts of the population in Cavinti in 2010 are there?
CREATE TABLE table_216776_2 (population__2010_ VARCHAR, municipality VARCHAR)
SELECT COUNT(losses) FROM table_name_45 WHERE name = "blair kiel"
How many Losses have a Name of blair kiel?
CREATE TABLE table_name_45 (losses VARCHAR, name VARCHAR)
SELECT years FROM table_name_31 WHERE name = "asashio"
What are asashio's years?
CREATE TABLE table_name_31 (years VARCHAR, name VARCHAR)
SELECT enrollment, primary_conference FROM university ORDER BY founded LIMIT 1
Show the enrollment and primary_conference of the oldest college.
CREATE TABLE university (enrollment VARCHAR, primary_conference VARCHAR, founded VARCHAR)
SELECT lner_class FROM table_name_37 WHERE passed_to_lner > 3 AND date_introduced = "1895–98"
Which LNER class has been Passed to LNER larger than 3 and a introduced in 1895–98?
CREATE TABLE table_name_37 (lner_class VARCHAR, passed_to_lner VARCHAR, date_introduced VARCHAR)
SELECT country FROM table_name_11 WHERE city = "istanbul"
What country is Istanbul in?
CREATE TABLE table_name_11 (country VARCHAR, city VARCHAR)
SELECT college_junior_club_team FROM table_name_12 WHERE nhl_team = "toronto maple leafs" AND nationality = "united states"
What College/junior/club had a player of United States nationality drafted by the Toronto Maple Leafs?
CREATE TABLE table_name_12 (college_junior_club_team VARCHAR, nhl_team VARCHAR, nationality VARCHAR)
SELECT main_cast_seasons FROM table_12441518_1 WHERE character = "Nick Lucas"
What seasons does Nick lucas appear?
CREATE TABLE table_12441518_1 (main_cast_seasons VARCHAR, character VARCHAR)
SELECT season_7 FROM table_name_98 WHERE season_6 = "jim treliving"
Which Season 7 has a Season 6 of jim treliving?
CREATE TABLE table_name_98 (season_7 VARCHAR, season_6 VARCHAR)
SELECT COUNT(founded) FROM table_255205_1 WHERE nickname = "Beavers"
How many times this institution was founded that was nicknamed Beavers?
CREATE TABLE table_255205_1 (founded VARCHAR, nickname VARCHAR)
SELECT title FROM table_name_28 WHERE leading_lady = "muriel evans"
Which title had Muriel Evans as leading lady?
CREATE TABLE table_name_28 (title VARCHAR, leading_lady VARCHAR)
SELECT junior_high_school__12_15_yrs_ FROM table_name_15 WHERE university_students_and_adults__18yrs + _ = "26mm"
Which junior high school has university students and adults of 26mm?
CREATE TABLE table_name_15 (junior_high_school__12_15_yrs_ VARCHAR, university_students_and_adults__18yrs VARCHAR, _ VARCHAR)
SELECT MIN(production_code) FROM table_2409041_5 WHERE no_in_series = 86
What is the production code for episode number 86 in the series?
CREATE TABLE table_2409041_5 (production_code INTEGER, no_in_series VARCHAR)
SELECT project_id FROM Documents GROUP BY project_id HAVING COUNT(*) >= 2
Show the ids for projects with at least 2 documents.
CREATE TABLE Documents (project_id VARCHAR)
SELECT school FROM table_name_4 WHERE team = "new york mets"
What school did the player drafted for the New York Mets attend?
CREATE TABLE table_name_4 (school VARCHAR, team VARCHAR)
SELECT SUM(pop_density_people_km_2) FROM table_name_47 WHERE population__percentage_of_eu = "0.1%" AND area__percentage_of_eu = "0.1%" AND population_in_millions > 0.5
What is the sum of the pop density people/km2 with a population % of EU of 0.1%, an area % of EU of 0.1%, and has more than 0.5 population in millions?
CREATE TABLE table_name_47 (pop_density_people_km_2 INTEGER, population_in_millions VARCHAR, population__percentage_of_eu VARCHAR, area__percentage_of_eu VARCHAR)
SELECT COUNT(pick) FROM table_name_69 WHERE position = "tackle" AND player = "woody adams" AND round > 22
What's the sum of the Pick that has the Position of Tackle, the Player Woody Adams, and a Round that's larger than 22?
CREATE TABLE table_name_69 (pick VARCHAR, round VARCHAR, position VARCHAR, player VARCHAR)
SELECT to_par FROM table_name_9 WHERE place = "4"
What is the To par of the 4 Place Player?
CREATE TABLE table_name_9 (to_par VARCHAR, place VARCHAR)
SELECT home_team FROM table_name_3 WHERE venue = "windy hill"
Who played the home team at Windy Hill?
CREATE TABLE table_name_3 (home_team VARCHAR, venue VARCHAR)
SELECT MIN(games) FROM table_20107762_1 WHERE mins = "385:33"
What is the game number with 385:33 mins?
CREATE TABLE table_20107762_1 (games INTEGER, mins VARCHAR)
SELECT AVG(attendance) FROM table_name_78 WHERE date = "september 17, 1981"
What is the average Attendance, when the Date is September 17, 1981?
CREATE TABLE table_name_78 (attendance INTEGER, date VARCHAR)
SELECT time FROM table_name_87 WHERE date = "april 5"
What was the time of the game on April 5?
CREATE TABLE table_name_87 (time VARCHAR, date VARCHAR)
SELECT ceased_operation FROM table_name_5 WHERE launched = "june 29, 1961"
What was the ceased operation that launched June 29, 1961?
CREATE TABLE table_name_5 (ceased_operation VARCHAR, launched VARCHAR)
SELECT T2.dept_name, AVG(T1.stu_gpa) FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY AVG(T1.stu_gpa) DESC LIMIT 1
What is the name and the average gpa of department whose students have the highest average gpa?
CREATE TABLE department (dept_name VARCHAR, dept_code VARCHAR); CREATE TABLE student (stu_gpa INTEGER, dept_code VARCHAR)
SELECT film_or_television_series_or_miniseries FROM table_name_16 WHERE year = 2001
What is the film, television series, or miniseries with a nomination in 2001?
CREATE TABLE table_name_16 (film_or_television_series_or_miniseries VARCHAR, year VARCHAR)
SELECT MIN(pick) FROM table_name_8 WHERE player = "ian hazlett"
Which pick was used on Ian Hazlett?
CREATE TABLE table_name_8 (pick INTEGER, player VARCHAR)
SELECT chng FROM table_name_55 WHERE rank > 6 AND prev = 12
What chng has a rank greater than 6, with 12 as a prev?
CREATE TABLE table_name_55 (chng VARCHAR, rank VARCHAR, prev VARCHAR)
SELECT segment_a FROM table_name_94 WHERE netflix = "s08e04"
What is the segment for Netflix episode S08E04?
CREATE TABLE table_name_94 (segment_a VARCHAR, netflix VARCHAR)
SELECT role_description FROM ROLES WHERE role_name = "Proof Reader"
Show the description for role name "Proof Reader".
CREATE TABLE ROLES (role_description VARCHAR, role_name VARCHAR)
SELECT MIN(lecturers) FROM table_name_86 WHERE department = "accounting" AND full_professors < 5
What is the least amount of lecturers in the accounting department with less than 5 full professors?
CREATE TABLE table_name_86 (lecturers INTEGER, department VARCHAR, full_professors VARCHAR)
SELECT score FROM table_name_62 WHERE visitor = "new jersey" AND home = "toronto"
What was the score when the home team, Toronto, played against New Jersey?
CREATE TABLE table_name_62 (score VARCHAR, visitor VARCHAR, home VARCHAR)
SELECT train_number, TIME FROM train WHERE origin = 'Chennai' AND destination = 'Guruvayur'
Find the number and time of the train that goes from Chennai to Guruvayur.
CREATE TABLE train (train_number VARCHAR, TIME VARCHAR, origin VARCHAR, destination VARCHAR)
SELECT date FROM table_name_29 WHERE region = "united kingdom" AND format = "stereo lp"
When did the United Kingdom format a stereo LP?
CREATE TABLE table_name_29 (date VARCHAR, region VARCHAR, format VARCHAR)
SELECT date FROM table_name_81 WHERE home_team = "geelong"
What day was geelong the home team?
CREATE TABLE table_name_81 (date VARCHAR, home_team VARCHAR)
SELECT joined FROM table_262514_1 WHERE nickname = "Ravens"
What is every year for joined with the Ravens nickname?
CREATE TABLE table_262514_1 (joined VARCHAR, nickname VARCHAR)
SELECT AVG(top_25) FROM table_name_33 WHERE events = 5 AND cuts_made < 3
Tell me the average top 25 with events of 5 and cuts madde less than 3
CREATE TABLE table_name_33 (top_25 INTEGER, events VARCHAR, cuts_made VARCHAR)
SELECT AVG(total) FROM table_name_61 WHERE fa_cup = 1 AND fa_trophy > 0
What is the average total with 1 FA cup and more than 0 FA trophies?
CREATE TABLE table_name_61 (total INTEGER, fa_cup VARCHAR, fa_trophy VARCHAR)
SELECT notes FROM table_name_31 WHERE title = "creature comforts"
What notes did the creature comforts film have?
CREATE TABLE table_name_31 (notes VARCHAR, title VARCHAR)
SELECT COUNT(*) FROM Accounts
How many accounts do we have?
CREATE TABLE Accounts (Id VARCHAR)
SELECT nhl_team FROM table_1473672_2 WHERE player = "Dwight Bialowas"
What nhl team does dwight bialowas play for?
CREATE TABLE table_1473672_2 (nhl_team VARCHAR, player VARCHAR)
SELECT title FROM table_13301516_1 WHERE us_viewers__millions_ = "11.75"
Which episode was watched by 11.75 million U.S. viewers?
CREATE TABLE table_13301516_1 (title VARCHAR, us_viewers__millions_ VARCHAR)
SELECT MAX(villages) FROM table_name_92 WHERE hanzi = "南流乡" AND population > 24 OFFSET 802
Which town has the most villages with the hanzi 南流乡 and a population larger than 24,802?
CREATE TABLE table_name_92 (villages INTEGER, hanzi VARCHAR, population VARCHAR)
SELECT date FROM table_11960610_7 WHERE team = "LA Lakers"
What date did the Bulls play the LA Lakers?
CREATE TABLE table_11960610_7 (date VARCHAR, team VARCHAR)
SELECT player FROM table_name_97 WHERE pba_team = "alaska milkmen" AND college = "up-diliman"
Which player went to college at Up-Diliman and plays on PBA team of the Alaska Milkmen?
CREATE TABLE table_name_97 (player VARCHAR, pba_team VARCHAR, college VARCHAR)
SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member AS T3 ON T1.member_id = T3.member_id WHERE T3.Hometown = 'Louisville , Kentucky' INTERSECT SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id = T2.branch_id JOIN member ...
Find the name of branches where have some members whose hometown is in Louisville, Kentucky and some in Hiram, Georgia.
CREATE TABLE member (member_id VARCHAR, Hometown VARCHAR); CREATE TABLE branch (name VARCHAR, branch_id VARCHAR); CREATE TABLE membership_register_branch (branch_id VARCHAR, member_id VARCHAR)
SELECT home FROM table_name_99 WHERE record = "33-30-8"
Who had a 33-30-8 record at home?
CREATE TABLE table_name_99 (home VARCHAR, record VARCHAR)
SELECT score FROM table_name_55 WHERE to_par = "+1" AND country = "england" AND player = "howard clark"
What is the score of Howard Clark from England with a To Par of +1?
CREATE TABLE table_name_55 (score VARCHAR, player VARCHAR, to_par VARCHAR, country VARCHAR)
SELECT loss FROM table_name_90 WHERE opponent = "california angels" AND attendance = "10,886"
Who took the loss against the California Angels when the attendance was 10,886?
CREATE TABLE table_name_90 (loss VARCHAR, opponent VARCHAR, attendance VARCHAR)
SELECT office FROM table_20246201_9 WHERE states___third_place = "1 New Hampshire"
Which office has 1 New Hampshire as a third place state?
CREATE TABLE table_20246201_9 (office VARCHAR, states___third_place VARCHAR)
SELECT COUNT(tries_for) FROM table_name_81 WHERE points_for < 137 AND tries_against > 12
How many Tries has Points for smaller than 137, and Tries against larger than 12?
CREATE TABLE table_name_81 (tries_for VARCHAR, points_for VARCHAR, tries_against VARCHAR)
SELECT T1.emp_lname, T1.emp_hiredate FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num WHERE T2.prof_office = 'DRE 102'
Find the last name and hire date of the professor who is in office DRE 102.
CREATE TABLE professor (emp_num VARCHAR, prof_office VARCHAR); CREATE TABLE employee (emp_lname VARCHAR, emp_hiredate VARCHAR, emp_num VARCHAR)
SELECT location_attendance FROM table_name_78 WHERE team = "@ milwaukee"
When the team is @ Milwaukee, what is the name of the location where the game is played?
CREATE TABLE table_name_78 (location_attendance VARCHAR, team VARCHAR)
SELECT date FROM table_name_70 WHERE home_team = "west ham united"
What is the Date for the Home team West Ham United
CREATE TABLE table_name_70 (date VARCHAR, home_team VARCHAR)
SELECT _number_of_seats_to_be_won FROM table_19283982_4 WHERE _percentage_of_popular_vote = "6.88%"
Name the number of seats to be won being % of popular vote at 6.88%
CREATE TABLE table_19283982_4 (_number_of_seats_to_be_won VARCHAR, _percentage_of_popular_vote VARCHAR)
SELECT MIN(teams) FROM table_25735_1 WHERE winner = "Wynnum Manly Seagulls"
What was the number of teams in the competition that wynnum manly seagulls won?
CREATE TABLE table_25735_1 (teams INTEGER, winner VARCHAR)
SELECT player FROM table_name_50 WHERE score = 68 - 66 = 134
What player scored 68-66=134?
CREATE TABLE table_name_50 (player VARCHAR, score VARCHAR)
SELECT historical_references FROM table_name_7 WHERE run_time = "6:07"
What is the topic of the episode that runs 6:07?
CREATE TABLE table_name_7 (historical_references VARCHAR, run_time VARCHAR)
SELECT 3 AS rd_party FROM table_name_35 WHERE election = "1922"
What was the 3rd Party in the Election of 1922?
CREATE TABLE table_name_35 (election VARCHAR)
SELECT frequency FROM table_name_33 WHERE origin = "bus station" AND number = 3
What is the frequency of number 3 with a bus station origin?
CREATE TABLE table_name_33 (frequency VARCHAR, origin VARCHAR, number VARCHAR)
SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning'
Find the names of the channels that are broadcast in the morning.
CREATE TABLE channel (name VARCHAR, channel_id VARCHAR); CREATE TABLE broadcast (channel_id VARCHAR, time_of_day VARCHAR)
SELECT college_junior_club_team__league_ FROM table_name_44 WHERE nationality = "united states" AND round < 12
What league is from the United States and a round smaller than 12.
CREATE TABLE table_name_44 (college_junior_club_team__league_ VARCHAR, nationality VARCHAR, round VARCHAR)
SELECT year FROM table_name_23 WHERE pick = "15"
What year was the player pick number 15 picked?
CREATE TABLE table_name_23 (year VARCHAR, pick VARCHAR)
SELECT AVG(assists) FROM table_name_64 WHERE games > 19 AND name = "pablo prigioni"
What is the average Assists, when Games is greater than 19, and when Name is "Pablo Prigioni"?
CREATE TABLE table_name_64 (assists INTEGER, games VARCHAR, name VARCHAR)
SELECT date_of_appointment FROM table_name_94 WHERE replaced_by = "markus babbel"
What is the date of appointment of the manager who was replaced by markus babbel?
CREATE TABLE table_name_94 (date_of_appointment VARCHAR, replaced_by VARCHAR)
SELECT COUNT(filipino) FROM table_10118412_6 WHERE indian = 30947
How many States have an Indian population of 30947?
CREATE TABLE table_10118412_6 (filipino VARCHAR, indian VARCHAR)
SELECT listed FROM table_name_29 WHERE location = "mcclain"
On what date was the bridge located in McClain listed?
CREATE TABLE table_name_29 (listed VARCHAR, location VARCHAR)
SELECT MAX(_number) FROM table_19908313_2 WHERE crew_chief = "Billy Wilburn"
What is the number of the truck that has the crew chief Billy Wilburn?
CREATE TABLE table_19908313_2 (_number INTEGER, crew_chief VARCHAR)
SELECT title FROM table_name_81 WHERE director = "stephen fossatti"
On what title was Stephen Fossatti the director of?
CREATE TABLE table_name_81 (title VARCHAR, director VARCHAR)
SELECT MIN(group_stage) FROM table_1059743_2 WHERE points = "886.6"
What is the lowest group to earn 886.6 points?
CREATE TABLE table_1059743_2 (group_stage INTEGER, points VARCHAR)
SELECT 1 AS st_leg FROM table_name_61 WHERE team_2 = "wagad mogadishu"
What is the first leg score when team 2 is Wagad Mogadishu?
CREATE TABLE table_name_61 (team_2 VARCHAR)
SELECT SUM(number_of_households) FROM table_name_43 WHERE median_household_income = "$44,718"
What is the sum of households that makes a median household income of $44,718?
CREATE TABLE table_name_43 (number_of_households INTEGER, median_household_income VARCHAR)
SELECT year FROM table_name_55 WHERE percentage = "9.66%"
Name the year with percentage of 9.66%
CREATE TABLE table_name_55 (year VARCHAR, percentage VARCHAR)
SELECT vacator FROM table_1651764_3 WHERE district = "New Jersey 2nd"
who is the vacator whre the district is new jersey 2nd?
CREATE TABLE table_1651764_3 (vacator VARCHAR, district VARCHAR)
SELECT COUNT(fa_trophy) FROM table_name_17 WHERE fa_cup > 2 AND player = "neil grayson" AND league > 17
What is the total number of FA trophies of player Neil Grayson, who has more than 2 FA cups and a league greater than 17?
CREATE TABLE table_name_17 (fa_trophy VARCHAR, league VARCHAR, fa_cup VARCHAR, player VARCHAR)
SELECT SUM(wins) FROM table_name_47 WHERE year > 1999
What is the sum of wins after 1999?
CREATE TABLE table_name_47 (wins INTEGER, year INTEGER)
SELECT 2007 AS _2008 FROM table_22591910_4 WHERE position = 3
who was position 3 in 2007-2008?
CREATE TABLE table_22591910_4 (position VARCHAR)
SELECT drawn FROM table_13741576_4 WHERE club = "Llandaff RFC"
Name the drawn for llandaff rfc
CREATE TABLE table_13741576_4 (drawn VARCHAR, club VARCHAR)
SELECT home_team FROM table_name_64 WHERE tie_no = "27"
What home team has 27 as the tie no.?
CREATE TABLE table_name_64 (home_team VARCHAR, tie_no VARCHAR)
SELECT economy FROM table_28846752_13 WHERE bbi = "3/33"
What is the economy of the player with BBI of 3/33?
CREATE TABLE table_28846752_13 (economy VARCHAR, bbi VARCHAR)
SELECT born_died FROM table_name_74 WHERE left_office = "1021" AND throne_name = "315"
What is teh born-died dates of the king with a throne name 315 and left office in 1021?
CREATE TABLE table_name_74 (born_died VARCHAR, left_office VARCHAR, throne_name VARCHAR)
SELECT SUM(matches) FROM table_name_58 WHERE goalkeeper = "carlos kameni" AND average > 1.27
How many matches did Carlos Kameni play in, who had an average larger than 1.27?
CREATE TABLE table_name_58 (matches INTEGER, goalkeeper VARCHAR, average VARCHAR)
SELECT COUNT(crowd) FROM table_name_96 WHERE home_team = "geelong"
How big was the crowd when Geelong was the home team?
CREATE TABLE table_name_96 (crowd VARCHAR, home_team VARCHAR)
SELECT college FROM table_name_68 WHERE player = "dorian finney-smith"
What College did Player Dorian Finney-Smith play for?
CREATE TABLE table_name_68 (college VARCHAR, player VARCHAR)
SELECT COUNT(area__km²_) FROM table_28367242_1 WHERE name = "Armstrong"
How many Area's are there for Armstrong?
CREATE TABLE table_28367242_1 (area__km²_ VARCHAR, name VARCHAR)
SELECT SUM(sign) FROM table_name_98 WHERE bits_precision > 53 AND type = "double extended (80-bit)" AND total_bits > 80
What's the sum of sign with more than 53 bits precision, double extended (80-bit) type, and more than 80 total bits?
CREATE TABLE table_name_98 (sign INTEGER, total_bits VARCHAR, bits_precision VARCHAR, type VARCHAR)
SELECT country FROM table_name_85 WHERE airport = "brisbane airport"
The Brisbane airport is located in which country?
CREATE TABLE table_name_85 (country VARCHAR, airport VARCHAR)
SELECT loan_club FROM table_12608427_8 WHERE name = "Westlake"
Who was the loan club for the Westlake game?
CREATE TABLE table_12608427_8 (loan_club VARCHAR, name VARCHAR)
SELECT developer_s_ FROM table_name_98 WHERE game = "xcom: enemy unknown"
Who was the developer of XCom: Enemy Unknown?
CREATE TABLE table_name_98 (developer_s_ VARCHAR, game VARCHAR)
SELECT COUNT(_percentage_20_39_years) FROM table_29615165_5 WHERE quartier = "Pont-de-Vivaux"
how many 20-39% are in pont-de-vivaux?
CREATE TABLE table_29615165_5 (_percentage_20_39_years VARCHAR, quartier VARCHAR)
SELECT COUNT(nett_gross) FROM table_name_90 WHERE year = 1957
What is the total count of net gross in 1957?
CREATE TABLE table_name_90 (nett_gross VARCHAR, year VARCHAR)
SELECT permanence_of_the_body FROM table_11609814_1 WHERE constancy = "interestedness"
what's the permanence of the body where constancy is interestedness
CREATE TABLE table_11609814_1 (permanence_of_the_body VARCHAR, constancy VARCHAR)
SELECT COUNT(population__glengallan_) FROM table_12584173_1 WHERE population__region_total_ = 30554
How many population figures are given for Glengallen for the year when the region's total is 30554?
CREATE TABLE table_12584173_1 (population__glengallan_ VARCHAR, population__region_total_ VARCHAR)
SELECT coach FROM table_20319085_2 WHERE conference_record = "6-1"
Who coached the team in the season with a 6-1 conference record?
CREATE TABLE table_20319085_2 (coach VARCHAR, conference_record VARCHAR)
SELECT record FROM table_name_44 WHERE date = "september 30"
What was the home team's record on September 30?
CREATE TABLE table_name_44 (record VARCHAR, date VARCHAR)
SELECT leader FROM table_name_35 WHERE number_of_seats > 8 AND party = "democratic unionist party"
Which leader of the Democratic Unionist party has more than 8 seats?
CREATE TABLE table_name_35 (leader VARCHAR, number_of_seats VARCHAR, party VARCHAR)
SELECT height_ft___m FROM table_name_80 WHERE floors = 9
Name the height with 9 floors
CREATE TABLE table_name_80 (height_ft___m VARCHAR, floors VARCHAR)