answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
484
SELECT COUNT(against) FROM table_name_72 WHERE losses < 13 AND byes < 2
What is the number listed under against when there were less than 13 losses and less than 2 byes?
CREATE TABLE table_name_72 (against VARCHAR, losses VARCHAR, byes VARCHAR)
SELECT MAX(season) FROM table_name_3 WHERE wins = 1 AND position = "8th"
What is the highest season wth a Win of 1 and a Position that is 8th?
CREATE TABLE table_name_3 (season INTEGER, wins VARCHAR, position VARCHAR)
SELECT democratic_seat_plurality FROM table_name_94 WHERE percentage_democrats = "29%"
What is the democratic seat plurality with 29% democrat?
CREATE TABLE table_name_94 (democratic_seat_plurality VARCHAR, percentage_democrats VARCHAR)
SELECT points_classification FROM table_name_85 WHERE trofeo_fast_team = "metauro mobili-pinarello" AND stage = "6"
Which Points classification has a Trofeo Fast Team of metauro mobili-pinarello, and a Stage of 6?
CREATE TABLE table_name_85 (points_classification VARCHAR, trofeo_fast_team VARCHAR, stage VARCHAR)
SELECT directed_by FROM table_23399481_2 WHERE us_viewers__in_millions_ = "2.22"
What is the director name is the U.S. viewers is 2.22 million?
CREATE TABLE table_23399481_2 (directed_by VARCHAR, us_viewers__in_millions_ VARCHAR)
SELECT winning_team FROM table_name_74 WHERE year = 2013
What was the winning team in 2013?
CREATE TABLE table_name_74 (winning_team VARCHAR, year VARCHAR)
SELECT venue FROM table_name_74 WHERE goals < 72 AND assists > 40
Where were less than 72 goals made and more than 40 assists made?
CREATE TABLE table_name_74 (venue VARCHAR, goals VARCHAR, assists VARCHAR)
SELECT winner FROM table_name_37 WHERE country = "scotland"
What is Scotland's winner?
CREATE TABLE table_name_37 (winner VARCHAR, country VARCHAR)
SELECT MAX(a_score) FROM table_name_38 WHERE total < 15.95 AND position < 7 AND b_score > 8.225
What is the A score for the person with a total less than 15.95, position less than 7, and B score more than 8.225?
CREATE TABLE table_name_38 (a_score INTEGER, b_score VARCHAR, total VARCHAR, position VARCHAR)
SELECT MAX(region) FROM table_name_9 WHERE name = "saint-simon-les-mines" AND population < 458
Which region in Saint-Simon-Les-Mines has a population smaller than 458?
CREATE TABLE table_name_9 (region INTEGER, name VARCHAR, population VARCHAR)
SELECT surface FROM table_name_38 WHERE opponent = "yevgeny kafelnikov"
What suface during the game that had Yevgeny Kafelnikov as an opponent?
CREATE TABLE table_name_38 (surface VARCHAR, opponent VARCHAR)
SELECT directed_by FROM table_24910733_1 WHERE us_viewers__millions_ = "8.44"
Who is the director when there is 8.44 million viewers?
CREATE TABLE table_24910733_1 (directed_by VARCHAR, us_viewers__millions_ VARCHAR)
SELECT MAX(rank) FROM table_name_68 WHERE total < 1
what is the highest rank with a total less than 1?
CREATE TABLE table_name_68 (rank INTEGER, total INTEGER)
SELECT AVG(apps) FROM table_name_64 WHERE player = "gilberto" AND goals > 1
How many Apps did Player Gilberto with more than 1 Goals have?
CREATE TABLE table_name_64 (apps INTEGER, player VARCHAR, goals VARCHAR)
SELECT result FROM table_name_52 WHERE date = "20 july 2008"
What is the result on 20 July 2008?
CREATE TABLE table_name_52 (result VARCHAR, date VARCHAR)
SELECT method FROM table_name_34 WHERE opponent = "andre roberts"
What is the method when the opponent is Andre Roberts?
CREATE TABLE table_name_34 (method VARCHAR, opponent VARCHAR)
SELECT headquarters FROM table_1682026_3 WHERE sales__billion_$_ = "69.2"
Where are the headquarters of the company whose sales were 69.2 billion?
CREATE TABLE table_1682026_3 (headquarters VARCHAR, sales__billion_$_ VARCHAR)
SELECT opponent FROM table_name_7 WHERE attendance = "20,456"
What opponent has an attendance of 20,456?
CREATE TABLE table_name_7 (opponent VARCHAR, attendance VARCHAR)
SELECT pada_4 FROM table_name_90 WHERE pada_1 = "खी ju/khi"
What kind of Pada 4 has a Pada 1 of खी ju/khi?
CREATE TABLE table_name_90 (pada_4 VARCHAR, pada_1 VARCHAR)
SELECT margin_of_victory FROM table_name_59 WHERE winning_score = 68 - 65 - 65 - 68 = 266
When the Winning score is 68-65-65-68=266, what is the Margin of victory?
CREATE TABLE table_name_59 (margin_of_victory VARCHAR, winning_score VARCHAR)
SELECT COUNT(new_adherents_per_year) FROM table_28137918_5 WHERE religion = "Confucianism"
Name the number of new adherents per year for confucianism
CREATE TABLE table_28137918_5 (new_adherents_per_year VARCHAR, religion VARCHAR)
SELECT score FROM table_name_20 WHERE home_team = "aston villa"
Which Score has a Home team of aston villa?
CREATE TABLE table_name_20 (score VARCHAR, home_team VARCHAR)
SELECT release_date FROM table_name_96 WHERE cat__number = "par116"
What is the release date with par116 as the cat. #?
CREATE TABLE table_name_96 (release_date VARCHAR, cat__number VARCHAR)
SELECT date FROM table_name_23 WHERE venue = "western oval"
When was the game played at the Western Oval venue?
CREATE TABLE table_name_23 (date VARCHAR, venue VARCHAR)
SELECT lost FROM table_name_90 WHERE club = "abercarn rfc"
How many losses does Abercarn RFC have?
CREATE TABLE table_name_90 (lost VARCHAR, club VARCHAR)
SELECT date FROM table_name_21 WHERE format = "lp"
What date was the release when the format was lp?
CREATE TABLE table_name_21 (date VARCHAR, format VARCHAR)
SELECT home FROM table_name_20 WHERE attendance = 1920
What is the Home team when the Attendance was 1920?
CREATE TABLE table_name_20 (home VARCHAR, attendance VARCHAR)
SELECT agg FROM table_name_2 WHERE team_2 = "dynamo moscow"
What is the agg of team 2 Dynamo Moscow?
CREATE TABLE table_name_2 (agg VARCHAR, team_2 VARCHAR)
SELECT home_captain FROM table_name_65 WHERE venue = "sabina park"
Who was the Home Captain at Sabina Park?
CREATE TABLE table_name_65 (home_captain VARCHAR, venue VARCHAR)
SELECT score_in_final FROM table_name_54 WHERE champion = "boris becker"
What score in final has boris becker as the champion?
CREATE TABLE table_name_54 (score_in_final VARCHAR, champion VARCHAR)
SELECT district FROM table_1341672_14 WHERE incumbent = "Tim Lee Hall"
Name the district for tim lee hall
CREATE TABLE table_1341672_14 (district VARCHAR, incumbent VARCHAR)
SELECT runner_up FROM table_name_31 WHERE location = "bells beach"
Who was the Runner-up when the game was played at Bells Beach?
CREATE TABLE table_name_31 (runner_up VARCHAR, location VARCHAR)
SELECT champion FROM table_name_96 WHERE purse = "¥200,000,000"
Who is the champion with a ¥200,000,000 purse?
CREATE TABLE table_name_96 (champion VARCHAR, purse VARCHAR)
SELECT score FROM table_name_52 WHERE game < 56 AND february > 18 AND opponent = "chicago black hawks"
What is the score of the game before 56 held after February 18 against the Chicago Black Hawks.
CREATE TABLE table_name_52 (score VARCHAR, opponent VARCHAR, game VARCHAR, february VARCHAR)
SELECT mix_pack FROM table_23649244_2 WHERE artist_2 = "Eminem"
What is the mix pack when the artist 2 is Eminem?
CREATE TABLE table_23649244_2 (mix_pack VARCHAR, artist_2 VARCHAR)
SELECT result FROM table_name_23 WHERE location = "arrowhead stadium" AND loser = "kansas city chiefs"
What is result of the game at Arrowhead Stadium where the loser was the Kansas City Chiefs?
CREATE TABLE table_name_23 (result VARCHAR, location VARCHAR, loser VARCHAR)
SELECT former_local_authority FROM table_name_96 WHERE name = "ecclesfield"
What is the Former local authority for Ecclesfield?
CREATE TABLE table_name_96 (former_local_authority VARCHAR, name VARCHAR)
SELECT MAX(round) FROM table_name_32 WHERE overall < 17
what is the highest round when the overall is less than 17?
CREATE TABLE table_name_32 (round INTEGER, overall INTEGER)
SELECT points_for FROM table_name_52 WHERE tries_for = "52" AND try_bonus = "7"
How many points did the Club score that has a try bonus of 7 and 52 tries for ?
CREATE TABLE table_name_52 (points_for VARCHAR, tries_for VARCHAR, try_bonus VARCHAR)
SELECT try_bonus FROM table_name_83 WHERE drawn = "0" AND points_for = "427"
What try bonus drew 0 and scored 427 points for?
CREATE TABLE table_name_83 (try_bonus VARCHAR, drawn VARCHAR, points_for VARCHAR)
SELECT gdp_adjusted__$_billions_ FROM table_1610496_3 WHERE population__millions_ = "5.141"
What is the adjusted GDP when the population is 5.141 million?
CREATE TABLE table_1610496_3 (gdp_adjusted__$_billions_ VARCHAR, population__millions_ VARCHAR)
SELECT MIN(year) FROM table_14903999_1 WHERE mixed_doubles = "Þorvaldur Ásgeirsson Lovísa Sigurðardóttir"
What was the earliest year Þorvaldur Ásgeirsson Lovísa Sigurðardóttir won mixed doubles
CREATE TABLE table_14903999_1 (year INTEGER, mixed_doubles VARCHAR)
SELECT notes FROM table_name_88 WHERE year = 2004
What are 2004's notes?
CREATE TABLE table_name_88 (notes VARCHAR, year VARCHAR)
SELECT time FROM table_name_68 WHERE set_3 = "24–26" AND score = "0–3"
Which Time has a Set 3 of 24–26, and a Score of 0–3?
CREATE TABLE table_name_68 (time VARCHAR, set_3 VARCHAR, score VARCHAR)
SELECT name, date FROM races ORDER BY date DESC LIMIT 1
What is the name and date of the most recent race?
CREATE TABLE races (name VARCHAR, date VARCHAR)
SELECT attendance FROM table_name_13 WHERE result = "l12–21"
What Attendance has a Result of l12–21?
CREATE TABLE table_name_13 (attendance VARCHAR, result VARCHAR)
SELECT COUNT(*), time_of_day FROM broadcast GROUP BY time_of_day
how many programs are broadcast in each time section of the day?
CREATE TABLE broadcast (time_of_day VARCHAR)
SELECT year FROM table_name_67 WHERE waterford_score = "6-08 (24)"
What yeae has 6-08 (24) as a waterford score?
CREATE TABLE table_name_67 (year VARCHAR, waterford_score VARCHAR)
SELECT 2011 FROM table_name_82 WHERE tournament = "french open"
What shows for 2011 at the French open?
CREATE TABLE table_name_82 (tournament VARCHAR)
SELECT MIN(super_bowl_championships) FROM table_1952057_5 WHERE team = "New England Patriots"
If the team in the New England Patriots, what is the super bowl championship minimum number?
CREATE TABLE table_1952057_5 (super_bowl_championships INTEGER, team VARCHAR)
SELECT withdrawal_rate__2010_11_ FROM table_21514460_1 WHERE graduation_rate__2011_12_ = "89.3%"
What is the withdrawal rate for the school district with a graduation rate of 89.3%?
CREATE TABLE table_21514460_1 (withdrawal_rate__2010_11_ VARCHAR, graduation_rate__2011_12_ VARCHAR)
SELECT date FROM table_name_3 WHERE visitor = "rockets"
What is the date of the game with the Rockets as the visitor team?
CREATE TABLE table_name_3 (date VARCHAR, visitor VARCHAR)
SELECT opponent FROM table_name_89 WHERE week = 6
Who was the opponent in week 6?
CREATE TABLE table_name_89 (opponent VARCHAR, week VARCHAR)
SELECT daily_hire_cost FROM Products_for_hire WHERE product_name LIKE '%Book%'
What are the daily hire costs for the products with substring 'Book' in its name?
CREATE TABLE Products_for_hire (daily_hire_cost VARCHAR, product_name VARCHAR)
SELECT area FROM table_name_85 WHERE name = "mount albert school"
What is the area of Mount Albert School?
CREATE TABLE table_name_85 (area VARCHAR, name VARCHAR)
SELECT score FROM table_27756014_1 WHERE date = "October 16"
What is the score of the game played on october 16?
CREATE TABLE table_27756014_1 (score VARCHAR, date VARCHAR)
SELECT MAX(laps) FROM table_27940569_1
What was the greatest number of laps run?
CREATE TABLE table_27940569_1 (laps INTEGER)
SELECT opponent FROM table_name_23 WHERE surface = "clay" AND tournament = "nice"
Who was the opponent in the math that was played in Nice on a clay court?
CREATE TABLE table_name_23 (opponent VARCHAR, surface VARCHAR, tournament VARCHAR)
SELECT MIN(first_elected) FROM table_1341663_19
What year was the earliest first elected?
CREATE TABLE table_1341663_19 (first_elected INTEGER)
SELECT nationality FROM table_name_86 WHERE player = "larry wright"
Which Nationality has a Player of larry wright?
CREATE TABLE table_name_86 (nationality VARCHAR, player VARCHAR)
SELECT AVG(year_joined) FROM table_name_88 WHERE size > 93 AND previous_conference = "none (new school)" AND mascot = "rebels"
Which Year Joined has a Size larger than 93, and a Previous Conference of none (new school), and a Mascot of rebels?
CREATE TABLE table_name_88 (year_joined INTEGER, mascot VARCHAR, size VARCHAR, previous_conference VARCHAR)
SELECT class FROM table_19897896_7 WHERE position = "Forward"
in which class is the position forward
CREATE TABLE table_19897896_7 (class VARCHAR, position VARCHAR)
SELECT total FROM table_24291077_8 WHERE week = 3
What was the total rating on week 3?
CREATE TABLE table_24291077_8 (total VARCHAR, week VARCHAR)
SELECT COUNT(points_difference) FROM table_15467476_3 WHERE tries_against = "62"
How many teams have 62 tries against?
CREATE TABLE table_15467476_3 (points_difference VARCHAR, tries_against VARCHAR)
SELECT object_type FROM table_name_37 WHERE ngc_number = 2171
Which Object type has an NGC number of 2171?
CREATE TABLE table_name_37 (object_type VARCHAR, ngc_number VARCHAR)
SELECT Previous AS rank FROM table_name_92 WHERE nationality = "italy" AND points > 100
Tell me the previous rank for italy with points more than 100
CREATE TABLE table_name_92 (Previous VARCHAR, nationality VARCHAR, points VARCHAR)
SELECT 2005 FROM table_name_88 WHERE 2007 = "5.545"
What is the 2005 Lukoil oil prodroduction when in 2007 oil production 5.545 million tonnes?
CREATE TABLE table_name_88 (Id VARCHAR)
SELECT COUNT(shot_pct) FROM table_1505809_2 WHERE blank_ends = 8
What is the total of all Shot PCT occurrences when the value of Blank Ends is 8?
CREATE TABLE table_1505809_2 (shot_pct VARCHAR, blank_ends VARCHAR)
SELECT Name FROM WINE WHERE Price > (SELECT MAX(Price) FROM WINE WHERE YEAR = 2006)
What are the names of wines that are more expensive then all wines made in the year 2006?
CREATE TABLE WINE (Name VARCHAR, Price INTEGER, YEAR VARCHAR)
SELECT handicap FROM table_25429986_1 WHERE distance = "9 lengths"
what is the handicap where the distance is 9 lengths?
CREATE TABLE table_25429986_1 (handicap VARCHAR, distance VARCHAR)
SELECT ship FROM table_name_18 WHERE nationality = "norway"
What ship has a norway nationality?
CREATE TABLE table_name_18 (ship VARCHAR, nationality VARCHAR)
SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name ORDER BY SUM(T2.amount) DESC LIMIT 1
Find the name of customer who has the highest amount of loans.
CREATE TABLE loan (cust_id VARCHAR, amount INTEGER); CREATE TABLE customer (cust_name VARCHAR, cust_id VARCHAR)
SELECT date FROM table_name_33 WHERE set_4 = "25-19"
What date has a set 4 of 25-19?
CREATE TABLE table_name_33 (date VARCHAR, set_4 VARCHAR)
SELECT title_subject FROM table_20903658_1 WHERE date_painted_created = "1982"
Who was the subject of the sculpture created in 1982?
CREATE TABLE table_20903658_1 (title_subject VARCHAR, date_painted_created VARCHAR)
SELECT AVG(year_named) FROM table_name_70 WHERE latitude = "37.9n" AND diameter__km_ > 76
What is the average Year Named, when Latitude is 37.9N, and when Diameter (km) is greater than 76?
CREATE TABLE table_name_70 (year_named INTEGER, latitude VARCHAR, diameter__km_ VARCHAR)
SELECT track FROM table_28715942_5 WHERE vocal_percussionist = "unknown"
What is the track whent the vocal percussionist is unknown?
CREATE TABLE table_28715942_5 (track VARCHAR, vocal_percussionist VARCHAR)
SELECT MAX(first_elected) FROM table_1342149_42 WHERE district = "Tennessee 7"
In the District Tennessee 7 what is the number of first elected?
CREATE TABLE table_1342149_42 (first_elected INTEGER, district VARCHAR)
SELECT function__percentage FROM table_name_30 WHERE estimated_function__percentage = 20
What is the function percentage when the estimated function percentage is 20?
CREATE TABLE table_name_30 (function__percentage VARCHAR, estimated_function__percentage VARCHAR)
SELECT location FROM table_name_84 WHERE fatalities = "50/50"
What was the location of the accident that led to 50/50 fatalities?
CREATE TABLE table_name_84 (location VARCHAR, fatalities VARCHAR)
SELECT DISTINCT TYPE FROM institution
Show all the distinct institution types.
CREATE TABLE institution (TYPE VARCHAR)
SELECT score FROM table_23285805_6 WHERE record = "15-25"
What was the score with the team record was 15-25?
CREATE TABLE table_23285805_6 (score VARCHAR, record VARCHAR)
SELECT AVG(rank) FROM table_name_38 WHERE name = "thomas morgenstern" AND points > 368.9
Which Rank has a Name of thomas morgenstern, and Points larger than 368.9?
CREATE TABLE table_name_38 (rank INTEGER, name VARCHAR, points VARCHAR)
SELECT constituency_number FROM table_name_8 WHERE name = "meerut"
What is the Constituency number for Meerut?
CREATE TABLE table_name_8 (constituency_number VARCHAR, name VARCHAR)
SELECT name FROM table_name_98 WHERE overall < 268 AND round = 1
What name has an overall less than 268, and 1 as the round?
CREATE TABLE table_name_98 (name VARCHAR, overall VARCHAR, round VARCHAR)
SELECT COUNT(DISTINCT LANGUAGE) FROM countrylanguage
How many unique languages are spoken in the world?
CREATE TABLE countrylanguage (LANGUAGE VARCHAR)
SELECT T2.Author, COUNT(DISTINCT T1.workshop_id) FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author
Show each author and the number of workshops they submitted to.
CREATE TABLE submission (Author VARCHAR, Submission_ID VARCHAR); CREATE TABLE acceptance (workshop_id VARCHAR, Submission_ID VARCHAR)
SELECT surface FROM table_name_77 WHERE date = "october 5, 1987"
What is the Surface of the match played on October 5, 1987?
CREATE TABLE table_name_77 (surface VARCHAR, date VARCHAR)
SELECT country_territory FROM table_1889619_5 WHERE story_no = "032" AND missing_episodes_with_recovered_footage = "Episode 4"
When episode 4 is the missing episode with recovered footage and the 032 is the story number what is the country/territory?
CREATE TABLE table_1889619_5 (country_territory VARCHAR, story_no VARCHAR, missing_episodes_with_recovered_footage VARCHAR)
SELECT day, _date FROM table_name_20 WHERE game = "2"
What is the day and date of game 2?
CREATE TABLE table_name_20 (day VARCHAR, _date VARCHAR, game VARCHAR)
SELECT T1.organisation_id, COUNT(*) FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.organisation_id ORDER BY COUNT(*) DESC LIMIT 1
List the organisation id with the maximum outcome count, and the count.
CREATE TABLE Project_outcomes (project_id VARCHAR); CREATE TABLE Projects (organisation_id VARCHAR, project_id VARCHAR)
SELECT streak FROM table_name_88 WHERE team_points > 113 AND game < 12 AND date = "november 16"
Which streak before game 12 had a team points larger than 113 on November 16?
CREATE TABLE table_name_88 (streak VARCHAR, date VARCHAR, team_points VARCHAR, game VARCHAR)
SELECT literacy___percentage_ FROM table_10710364_2 WHERE growth__1991_2001_ = "103.1%"
What is the literacy rate for groups that grew 103.1% between 1991 and 2001?
CREATE TABLE table_10710364_2 (literacy___percentage_ VARCHAR, growth__1991_2001_ VARCHAR)
SELECT date_of_birth__age_ FROM table_name_49 WHERE player = "henry qiodravu"
What is the date of birth of Henry Qiodravu?
CREATE TABLE table_name_49 (date_of_birth__age_ VARCHAR, player VARCHAR)
SELECT finsbury_division FROM table_16677738_1 WHERE inns_of_court_and_chancery = 1546
When 1546 is inns of court and chancery what is the finsbury division?
CREATE TABLE table_16677738_1 (finsbury_division VARCHAR, inns_of_court_and_chancery VARCHAR)
SELECT team FROM table_name_66 WHERE points < 203
What team has fewer than 203 points?
CREATE TABLE table_name_66 (team VARCHAR, points INTEGER)
SELECT MIN(season) FROM table_name_80 WHERE position > 12
What is the earliest season that has a position over 12?
CREATE TABLE table_name_80 (season INTEGER, position INTEGER)
SELECT record FROM table_21839208_4 WHERE week = 11
What was their record in week 11?
CREATE TABLE table_21839208_4 (record VARCHAR, week VARCHAR)
SELECT year_completed FROM table_name_20 WHERE line = "gardermobanen"
What year was the Line of Gardermobanen completed?
CREATE TABLE table_name_20 (year_completed VARCHAR, line VARCHAR)
SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id INTERSECT SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.liked_id = T2.id
Show name of all students who have some friends and also are liked by someone else.
CREATE TABLE Highschooler (name VARCHAR, id VARCHAR); CREATE TABLE Likes (student_id VARCHAR, liked_id VARCHAR); CREATE TABLE Friend (student_id VARCHAR, liked_id VARCHAR)
SELECT SUM(round) FROM table_name_43 WHERE position = "right wing" AND player = "jessie rezansoff"
What is the round number of Jessie Rezansoff, who plays right wing?
CREATE TABLE table_name_43 (round INTEGER, position VARCHAR, player VARCHAR)