answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
484
SELECT Festival_Name, LOCATION FROM festival_detail
What are the names and locations of festivals?
CREATE TABLE festival_detail (Festival_Name VARCHAR, LOCATION VARCHAR)
SELECT written_by FROM table_1876825_5 WHERE no_in_series = 74
Who wrote episode 74?
CREATE TABLE table_1876825_5 (written_by VARCHAR, no_in_series VARCHAR)
SELECT MIN(goals) FROM table_name_52 WHERE w_league = "8 (2)"
What is the lowest number of goals with 8 (2) w-leagues?
CREATE TABLE table_name_52 (goals INTEGER, w_league VARCHAR)
SELECT COUNT(episode__number) FROM table_17525955_2 WHERE us_air_date = "Saturday, July 11, 2009"
How many episodes aired Saturday, July 11, 2009
CREATE TABLE table_17525955_2 (episode__number VARCHAR, us_air_date VARCHAR)
SELECT division_record FROM table_name_79 WHERE school = "milford"
The Milford School has what Division Record?
CREATE TABLE table_name_79 (division_record VARCHAR, school VARCHAR)
SELECT MIN(draws) FROM table_name_98 WHERE ntfa_div_2 = "lilydale"
What is the lowest number of draws of the NTFA Div 2 Lilydale?
CREATE TABLE table_name_98 (draws INTEGER, ntfa_div_2 VARCHAR)
SELECT away_team AS score FROM table_name_9 WHERE home_team = "essendon"
What was home team Essendon's opponents score?
CREATE TABLE table_name_9 (away_team VARCHAR, home_team VARCHAR)
SELECT percentage___percentage_ FROM table_name_31 WHERE males = "1"
Which language do 1% of males speak?
CREATE TABLE table_name_31 (percentage___percentage_ VARCHAR, males VARCHAR)
SELECT height FROM table_name_48 WHERE club = "sainte-foy" AND name = "valérie dionne"
What is the height of valérie dionne at Club Sainte-Foy?
CREATE TABLE table_name_48 (height VARCHAR, club VARCHAR, name VARCHAR)
SELECT record FROM table_name_95 WHERE loss = "rosales (1-1)"
What was the record after the game in which Rosales (1-1) took the loss?
CREATE TABLE table_name_95 (record VARCHAR, loss VARCHAR)
SELECT report FROM table_name_61 WHERE winning_driver = "emerson fittipaldi"
Which Report has a Winning driver of emerson fittipaldi?
CREATE TABLE table_name_61 (report VARCHAR, winning_driver VARCHAR)
SELECT place FROM table_name_59 WHERE to_par = "e" AND score = 69 - 69 - 72 = 210
What is the place with a to par of E and a score of 69-69-72=210?
CREATE TABLE table_name_59 (place VARCHAR, to_par VARCHAR, score VARCHAR)
SELECT away_team FROM table_name_55 WHERE tie_no = "20"
Who were the away team in tie number 20?
CREATE TABLE table_name_55 (away_team VARCHAR, tie_no VARCHAR)
SELECT team FROM table_name_97 WHERE game = 41
What is the Team in Game 41?
CREATE TABLE table_name_97 (team VARCHAR, game VARCHAR)
SELECT iata FROM table_name_58 WHERE airport = "galeão airport"
What is the IATA of galeão airport?
CREATE TABLE table_name_58 (iata VARCHAR, airport VARCHAR)
SELECT T2.Party FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes LIMIT 1
What is the party of the representative that has the smallest number of votes.
CREATE TABLE representative (Party VARCHAR, Representative_ID VARCHAR); CREATE TABLE election (Representative_ID VARCHAR)
SELECT date FROM table_name_61 WHERE home_team = "sheffield wednesday"
On what Date is Sheffield Wednesday the Home team?
CREATE TABLE table_name_61 (date VARCHAR, home_team VARCHAR)
SELECT AVG(2008) FROM table_name_56 WHERE city = "durban"
Which 2008 has a City of durban?
CREATE TABLE table_name_56 (city VARCHAR)
SELECT date FROM table_name_46 WHERE tie_no = "9"
what is the date when the tie no is 9?
CREATE TABLE table_name_46 (date VARCHAR, tie_no VARCHAR)
SELECT score_points FROM table_name_12 WHERE event = "wc rio de janeiro" AND rank_points = "10"
What is Score Points, when Event is "WC Rio De Janeiro", and when Rank Points is "10"?
CREATE TABLE table_name_12 (score_points VARCHAR, event VARCHAR, rank_points VARCHAR)
SELECT SUM(rank) FROM table_name_41 WHERE director_s_ = "m. night shyamalan"
Sum of m. night shyamalan ranks?
CREATE TABLE table_name_41 (rank INTEGER, director_s_ VARCHAR)
SELECT qual FROM table_name_67 WHERE laps = 182
When completing 182 laps, what was the qual.?
CREATE TABLE table_name_67 (qual VARCHAR, laps VARCHAR)
SELECT copies_per_particle FROM table_name_88 WHERE location = "nonstructural" AND rna_segment__gene_ > 5 AND size___s_base_pair__ < 751
What is the number of copies per particle having a nonstructural location, an RNA segment over 5 and a base pair size under 751?
CREATE TABLE table_name_88 (copies_per_particle VARCHAR, size___s_base_pair__ VARCHAR, location VARCHAR, rna_segment__gene_ VARCHAR)
SELECT booking_status_code, COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code
Show the booking status code and the corresponding number of bookings.
CREATE TABLE Apartment_Bookings (booking_status_code VARCHAR)
SELECT categoría FROM table_27501971_2 WHERE country = "E.E.U.U"
What was the categoria when E.E.U.U was the country?
CREATE TABLE table_27501971_2 (categoría VARCHAR, country VARCHAR)
SELECT home_team FROM table_name_39 WHERE venue = "mcg"
Who was the home team at MCG?
CREATE TABLE table_name_39 (home_team VARCHAR, venue VARCHAR)
SELECT score FROM table_name_32 WHERE date = "june 15"
On the date of June 15 what was the score?
CREATE TABLE table_name_32 (score VARCHAR, date VARCHAR)
SELECT 2 AS nd_leg FROM table_name_23 WHERE team_1 = "rk gold club kozina"
What 2nd leg has rk gold club kozina as team 1?
CREATE TABLE table_name_23 (team_1 VARCHAR)
SELECT MAX(extra_points) FROM table_name_2 WHERE player = "herrnstein" AND points < 30
Which Extra points is the highest one that has a Player of herrnstein, and Points smaller than 30?
CREATE TABLE table_name_2 (extra_points INTEGER, player VARCHAR, points VARCHAR)
SELECT COUNT(driver) FROM table_23239946_3 WHERE points = 1942
How many drivers have 1942 points?
CREATE TABLE table_23239946_3 (driver VARCHAR, points VARCHAR)
SELECT report FROM table_1140117_5 WHERE circuit = "Silverstone"
What's the report for the Silverstone circuit?
CREATE TABLE table_1140117_5 (report VARCHAR, circuit VARCHAR)
SELECT MAX(average) FROM table_name_45 WHERE state = "texas" AND swimsuit > 8.839
What is the highest mean number for Texas when the swimsuit stat was more than 8.839?
CREATE TABLE table_name_45 (average INTEGER, state VARCHAR, swimsuit VARCHAR)
SELECT location FROM table_29535057_4 WHERE acc_team = "Wake Forest"
Where did the games that had Wake Forest as Acc Team take place?
CREATE TABLE table_29535057_4 (location VARCHAR, acc_team VARCHAR)
SELECT MIN(year) FROM table_name_47 WHERE wins < 0
Which Year is the lowest one that has Wins smaller than 0?
CREATE TABLE table_name_47 (year INTEGER, wins INTEGER)
SELECT result FROM table_1342233_43 WHERE candidates = "R. Ewing Thomason (D) Unopposed"
What was the result of the election featuring r. ewing thomason (d) unopposed?
CREATE TABLE table_1342233_43 (result VARCHAR, candidates VARCHAR)
SELECT team FROM table_name_37 WHERE qual_1 = "59.372"
What team has 59.372 for qual 1?
CREATE TABLE table_name_37 (team VARCHAR, qual_1 VARCHAR)
SELECT throws FROM table_name_1 WHERE position = "3b/rhp"
Which Throws have a Position of 3b/rhp?
CREATE TABLE table_name_1 (throws VARCHAR, position VARCHAR)
SELECT COUNT(player) FROM table_16570286_4 WHERE best_bowling = "4/125"
How many players Bowled 4/125?
CREATE TABLE table_16570286_4 (player VARCHAR, best_bowling VARCHAR)
SELECT MAX(area_km_2) FROM table_name_92 WHERE status = "village" AND census_ranking = "1,442 of 5,008" AND population < 1 OFFSET 778
What is the area of the village with a census ranking of 1,442 of 5,008 and a population less than 1,778?
CREATE TABLE table_name_92 (area_km_2 INTEGER, population VARCHAR, status VARCHAR, census_ranking VARCHAR)
SELECT MAX(first_elected) FROM table_1341453_37 WHERE incumbent = "Sherrod Brown"
When was the incumbent Sherrod Brown first elected?
CREATE TABLE table_1341453_37 (first_elected INTEGER, incumbent VARCHAR)
SELECT home_team FROM table_name_59 WHERE away_team = "north melbourne"
Who was the home team for the game where North Melbourne was the away team?
CREATE TABLE table_name_59 (home_team VARCHAR, away_team VARCHAR)
SELECT MAX(population_1991) FROM table_name_13 WHERE name = "baden bei wien" AND population_2007 > 25 OFFSET 284
What is the highest population in 1991 in Baden Bei Wien, and a 2007 population larger than 25,284?
CREATE TABLE table_name_13 (population_1991 INTEGER, name VARCHAR, population_2007 VARCHAR)
SELECT share_of_votes FROM table_name_67 WHERE dáil = "6th"
What is the 6th dail share of votes?
CREATE TABLE table_name_67 (share_of_votes VARCHAR, dáil VARCHAR)
SELECT last_64 FROM table_name_65 WHERE total = "£34,600"
Which Last 64 has a Total of £34,600?
CREATE TABLE table_name_65 (last_64 VARCHAR, total VARCHAR)
SELECT goals_scored FROM table_name_50 WHERE pos > 4 AND years_active = "2001-"
How many goals were scored with a pos larger than 4 and active in 2001-?
CREATE TABLE table_name_50 (goals_scored VARCHAR, pos VARCHAR, years_active VARCHAR)
SELECT area_km_2 FROM table_171361_2 WHERE official_name = "Balmoral"
Name the area km 2 for balmoral
CREATE TABLE table_171361_2 (area_km_2 VARCHAR, official_name VARCHAR)
SELECT ga FROM table_name_33 WHERE losses = "2" AND team = "scotland"
What's the G.A. when there were 2 losses and Scotland played?
CREATE TABLE table_name_33 (ga VARCHAR, losses VARCHAR, team VARCHAR)
SELECT MIN(catches) FROM table_27771406_1 WHERE player = "Clifford McWatt"
How many catches did Clifford McWatt have?
CREATE TABLE table_27771406_1 (catches INTEGER, player VARCHAR)
SELECT MIN(bronze) FROM table_name_7 WHERE rank = "3" AND silver < 2
Which Bronze is the lowest one that has a Rank of 3, and a Silver smaller than 2?
CREATE TABLE table_name_7 (bronze INTEGER, rank VARCHAR, silver VARCHAR)
SELECT date FROM table_name_38 WHERE episode = "one"
What date did episode one air on?
CREATE TABLE table_name_38 (date VARCHAR, episode VARCHAR)
SELECT COUNT(winning_driver) FROM table_15511178_3 WHERE rd = 8
how many winners were in round 8
CREATE TABLE table_15511178_3 (winning_driver VARCHAR, rd VARCHAR)
SELECT AVG(points) FROM table_name_80 WHERE difference = "3" AND played < 10
Which Points has a Difference of 3, and a Played smaller than 10?
CREATE TABLE table_name_80 (points INTEGER, difference VARCHAR, played VARCHAR)
SELECT song_title FROM table_name_7 WHERE length = "2:50"
What Song has a Length of 2:50?
CREATE TABLE table_name_7 (song_title VARCHAR, length VARCHAR)
SELECT competition FROM table_name_45 WHERE venue = "estadio alfonso lastras, san luis potosí, mexico" AND goal > 15
Which Competition has a Venue of estadio alfonso lastras, san luis potosí, mexico, and a Goal larger than 15?
CREATE TABLE table_name_45 (competition VARCHAR, venue VARCHAR, goal VARCHAR)
SELECT AVG(RAM_MiB) FROM chip_model WHERE NOT model_name IN (SELECT chip_model FROM phone)
Find the average ram mib size of the chip models that are never used by any phone.
CREATE TABLE chip_model (RAM_MiB INTEGER, model_name VARCHAR, chip_model VARCHAR); CREATE TABLE phone (RAM_MiB INTEGER, model_name VARCHAR, chip_model VARCHAR)
SELECT MIN(production_code) FROM table_14845640_1 WHERE us_viewers__millions_ = "16.04"
Namw the minimum production code for 16.04 million viewers
CREATE TABLE table_14845640_1 (production_code INTEGER, us_viewers__millions_ VARCHAR)
SELECT place FROM table_name_32 WHERE country = "italy"
What place was the player from Italy in ?
CREATE TABLE table_name_32 (place VARCHAR, country VARCHAR)
SELECT AVG(january) FROM table_name_2 WHERE game = 50
Which January has a Game of 50?
CREATE TABLE table_name_2 (january INTEGER, game VARCHAR)
SELECT team_usa FROM table_19072602_5 WHERE team_europe = "Paul Moor"
When paul moor is on the europe team who is on the usa team?
CREATE TABLE table_19072602_5 (team_usa VARCHAR, team_europe VARCHAR)
SELECT opponent FROM table_14263158_3 WHERE result = "0–3 0–8 0–1 0–2 0–3 1–4 0–9 0–5"
Who played in the series that resulted in matches with the following scores: 0–3 0–8 0–1 0–2 0–3 1–4 0–9 0–5?
CREATE TABLE table_14263158_3 (opponent VARCHAR, result VARCHAR)
SELECT opponent FROM table_name_25 WHERE attendance = "38,150"
Who was the Opponent when the Attendance was 38,150?
CREATE TABLE table_name_25 (opponent VARCHAR, attendance VARCHAR)
SELECT grand_finalist FROM table_1139835_3 WHERE scores = "8.9 (57) – 7.12 (54)"
who is the grand finalist where scores is 8.9 (57) – 7.12 (54)
CREATE TABLE table_1139835_3 (grand_finalist VARCHAR, scores VARCHAR)
SELECT title FROM table_2409041_9 WHERE written_by = "Gary M. Goodrich"
What was the name of the epiode written by Gary M. Goodrich?
CREATE TABLE table_2409041_9 (title VARCHAR, written_by VARCHAR)
SELECT vii_season FROM table_name_29 WHERE episode = "11"
What is VII Season, when Episode is 11?
CREATE TABLE table_name_29 (vii_season VARCHAR, episode VARCHAR)
SELECT listed FROM table_name_46 WHERE construction_completed = "08/10/2007"
What construction completed on 08/10/2007?
CREATE TABLE table_name_46 (listed VARCHAR, construction_completed VARCHAR)
SELECT AVG(total_apps) FROM table_name_41 WHERE total_goals = 0 AND fa_cup_goals > 0
It has fa cup goals larger than 0 and total goals of 0, what is the average total apps?
CREATE TABLE table_name_41 (total_apps INTEGER, total_goals VARCHAR, fa_cup_goals VARCHAR)
SELECT date FROM table_name_76 WHERE score = "6–1, 6–2"
Which Date has a Score of 6–1, 6–2?
CREATE TABLE table_name_76 (date VARCHAR, score VARCHAR)
SELECT MAX(total_goals) FROM table_name_98 WHERE fa_cup_goals = 0 AND league_apps = "41"
What is the most total goals for a player having 0 FA Cup goals and 41 League appearances?
CREATE TABLE table_name_98 (total_goals INTEGER, fa_cup_goals VARCHAR, league_apps VARCHAR)
SELECT attendance FROM table_name_32 WHERE result = "l 41-37"
What is the attendance number when the result is l 41-37?
CREATE TABLE table_name_32 (attendance VARCHAR, result VARCHAR)
SELECT engine FROM table_name_74 WHERE year > 1956
Which engine has a year larger than 1956?
CREATE TABLE table_name_74 (engine VARCHAR, year INTEGER)
SELECT story_title FROM table_18305523_2 WHERE artist_s = "Barry Kitson and Farmer"
What is the title of the issue where the art was done by Barry Kitson and Farmer?
CREATE TABLE table_18305523_2 (story_title VARCHAR, artist_s VARCHAR)
SELECT home_team FROM table_name_95 WHERE venue = "glenferrie oval"
Who is the home team who plays at Glenferrie Oval?
CREATE TABLE table_name_95 (home_team VARCHAR, venue VARCHAR)
SELECT MIN(rank) FROM table_name_2 WHERE country = "denmark" AND total < 1
What is the lowest Rank of Denmark County with a Total smaller than 1?
CREATE TABLE table_name_2 (rank INTEGER, country VARCHAR, total VARCHAR)
SELECT MIN(votes) FROM table_name_86 WHERE party = "labour"
What is the number of votes for the Party of Labour?
CREATE TABLE table_name_86 (votes INTEGER, party VARCHAR)
SELECT replaced_by FROM table_17115950_2 WHERE team = "CFR Cluj"
Who replaced the manager on Team Cfr Cluj?
CREATE TABLE table_17115950_2 (replaced_by VARCHAR, team VARCHAR)
SELECT location FROM table_26466528_1 WHERE colors = "Black, Orange"
Name the location for black, orange
CREATE TABLE table_26466528_1 (location VARCHAR, colors VARCHAR)
SELECT denomination FROM table_name_34 WHERE date_of_issue = "8 january 2009"
What is the denomination for the stamp issued 8 January 2009?
CREATE TABLE table_name_34 (denomination VARCHAR, date_of_issue VARCHAR)
SELECT COUNT(game) FROM table_23308178_8 WHERE record = "39-12-6"
How many games did they have a record of 39-12-6?
CREATE TABLE table_23308178_8 (game VARCHAR, record VARCHAR)
SELECT away_team FROM table_name_5 WHERE crowd > 19 OFFSET 498
When the crowd was greater than 19,498 who was the away team?
CREATE TABLE table_name_5 (away_team VARCHAR, crowd INTEGER)
SELECT T2.Name, COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name
Show names of teachers and the number of courses they teach.
CREATE TABLE teacher (Name VARCHAR, Teacher_ID VARCHAR); CREATE TABLE course_arrange (Teacher_ID VARCHAR)
SELECT date FROM table_23284271_8 WHERE record = "32-19"
When did the Mavericks have a record of 32-19?
CREATE TABLE table_23284271_8 (date VARCHAR, record VARCHAR)
SELECT class_to_1928 FROM table_name_21 WHERE year_s__of_manufacture = "1921/23" AND class_from_1928 = "bci-21"
Which class to 1928 value had years of manufacture of 1921/23 and class from 1928 of BCi-21?
CREATE TABLE table_name_21 (class_to_1928 VARCHAR, year_s__of_manufacture VARCHAR, class_from_1928 VARCHAR)
SELECT date FROM table_name_67 WHERE tie_no = "3"
What is the Date of Tie no 3?
CREATE TABLE table_name_67 (date VARCHAR, tie_no VARCHAR)
SELECT result FROM table_name_73 WHERE rank = 1
What was the result of rank 1?
CREATE TABLE table_name_73 (result VARCHAR, rank VARCHAR)
SELECT school FROM table_name_54 WHERE team_name = "trojans"
What school had a team name of the Trojans?
CREATE TABLE table_name_54 (school VARCHAR, team_name VARCHAR)
SELECT comp FROM table_name_84 WHERE date = "2004-10-17"
Which Comp is on 2004-10-17?
CREATE TABLE table_name_84 (comp VARCHAR, date VARCHAR)
SELECT MAX(league_cup_apps) FROM table_name_74 WHERE league_cup_goals = 0 AND name = "jimmy lawson"
What's the most league cup apps for Jimmy Lawson having 0 league cup goals?
CREATE TABLE table_name_74 (league_cup_apps INTEGER, league_cup_goals VARCHAR, name VARCHAR)
SELECT league_goals FROM table_name_61 WHERE club = "wolverhampton wanderers"
what was the total for the Wolverhampton Wanderers?
CREATE TABLE table_name_61 (league_goals VARCHAR, club VARCHAR)
SELECT cfl_team FROM table_10975034_5 WHERE player = "Ryan Folk"
What is the cfl team with ryan folk?
CREATE TABLE table_10975034_5 (cfl_team VARCHAR, player VARCHAR)
SELECT tournament FROM table_name_90 WHERE score = "6–3, 2–6, [10–8]"
What tournament had a Score of 6–3, 2–6, [10–8]?
CREATE TABLE table_name_90 (tournament VARCHAR, score VARCHAR)
SELECT COUNT(*) FROM products WHERE product_category_code = "Spices" AND typical_buying_price > 1000
Find the number of products with category "Spices" and typically sold above 1000.
CREATE TABLE products (product_category_code VARCHAR, typical_buying_price VARCHAR)
SELECT MIN(year_of_release) FROM table_name_93 WHERE label_s_ = "艺能动音"
What is the earliest year of release for the album labelled 艺能动音?
CREATE TABLE table_name_93 (year_of_release INTEGER, label_s_ VARCHAR)
SELECT blagojevich__d_ FROM table_name_5 WHERE source = "zogby/wsj" AND topinka__r_ = "33.2%"
Which Blagojevich (D) has a Source of zogby/wsj, and a Topinka (R) of 33.2%?
CREATE TABLE table_name_5 (blagojevich__d_ VARCHAR, source VARCHAR, topinka__r_ VARCHAR)
SELECT runner_s__up FROM table_name_62 WHERE tournament = "cameron park open"
Which Runner(s)-up has a Tournament of cameron park open?
CREATE TABLE table_name_62 (runner_s__up VARCHAR, tournament VARCHAR)
SELECT year FROM table_name_35 WHERE producer = "sam kazman"
What year was Sam Kazman a producer?
CREATE TABLE table_name_35 (year VARCHAR, producer VARCHAR)
SELECT country FROM table_name_56 WHERE player = "tom kite"
What country is Tom Kite from?
CREATE TABLE table_name_56 (country VARCHAR, player VARCHAR)
SELECT MIN(number) FROM table_22705586_1
Name the least number
CREATE TABLE table_22705586_1 (number INTEGER)
SELECT MAX(drawn) FROM table_name_27 WHERE points > 15 AND against = 19 AND lost < 3
What is the highest number of draws with more than 15 points, an against of 19, and less than 3 losses?
CREATE TABLE table_name_27 (drawn INTEGER, lost VARCHAR, points VARCHAR, against VARCHAR)
SELECT COUNT(district) FROM table_1342256_32 WHERE incumbent = "John Taber"
How many polling areas are there with John Taber as the sitting Representative?
CREATE TABLE table_1342256_32 (district VARCHAR, incumbent VARCHAR)
SELECT MAX(s_b_share) FROM table_206419_3 WHERE percent_of_votes = "2.55"
What is the s B share for the shareholder that has 2.55 percent of votes?
CREATE TABLE table_206419_3 (s_b_share INTEGER, percent_of_votes VARCHAR)