answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
489
SELECT COUNT(writer) FROM table_2560677_1 WHERE episode__number = "06"
How many writers where there for episode # 06?
CREATE TABLE table_2560677_1 (writer VARCHAR, episode__number VARCHAR)
SELECT player FROM table_name_83 WHERE total = 10 AND opposition = "kilkenny"
What Player in Opposition of Kilkenny has a Total of 10?
CREATE TABLE table_name_83 (player VARCHAR, total VARCHAR, opposition VARCHAR)
SELECT district FROM table_1341930_21 WHERE party = "Republican"
What is the district that has a republican?
CREATE TABLE table_1341930_21 (district VARCHAR, party VARCHAR)
SELECT score FROM table_name_13 WHERE competition = "2014 fifa world cup qual."
What was the score for the 2014 FIFA World Cup Qual. competition?
CREATE TABLE table_name_13 (score VARCHAR, competition VARCHAR)
SELECT division_one FROM table_24575253_4 WHERE division_four = "Real Holmesdale Reserves"
When real holmesdale reserves is division four who is in division one?
CREATE TABLE table_24575253_4 (division_one VARCHAR, division_four VARCHAR)
SELECT result FROM table_name_99 WHERE year = "2008"
What was the result in 2008?
CREATE TABLE table_name_99 (result VARCHAR, year VARCHAR)
SELECT position FROM table_name_21 WHERE school_club_team = "kansas"
What position in the club team of Kansas?
CREATE TABLE table_name_21 (position VARCHAR, school_club_team VARCHAR)
SELECT start FROM table_25034983_2 WHERE nickname = "Voice of Muscatine"
In which year did the voice of muscatine show start?
CREATE TABLE table_25034983_2 (start VARCHAR, nickname VARCHAR)
SELECT sign_of_zodiac FROM table_name_58 WHERE in_malayalam = "മീനം"
WHAT IS THE SIGN OF ZODIAC OF മീനം?
CREATE TABLE table_name_58 (sign_of_zodiac VARCHAR, in_malayalam VARCHAR)
SELECT ba___running_bear FROM table_2603017_2 WHERE b___bishop = "RN - Running Stag"
what is ba - running bear where b - bishop is rn - running stag?
CREATE TABLE table_2603017_2 (ba___running_bear VARCHAR, b___bishop VARCHAR)
SELECT Name FROM journalist WHERE Nationality = "England" OR Nationality = "Wales"
Show the names of journalists from "England" or "Wales".
CREATE TABLE journalist (Name VARCHAR, Nationality VARCHAR)
SELECT MAX(fall_08) FROM table_name_28 WHERE fall_07 < 242
What is the largest value for Fall 08 when Fall 07 is less than 242?
CREATE TABLE table_name_28 (fall_08 INTEGER, fall_07 INTEGER)
SELECT driver FROM table_name_39 WHERE time_retired = "off course"
Which driver had a time off course?
CREATE TABLE table_name_39 (driver VARCHAR, time_retired VARCHAR)
SELECT commissioned FROM table_name_29 WHERE nvr_page = "mcm02"
What is the Commissioned date of the ship in NVR Page MCM02?
CREATE TABLE table_name_29 (commissioned VARCHAR, nvr_page VARCHAR)
SELECT date FROM table_name_76 WHERE rating = "1.5" AND event = "johnson vs. moraga"
What is Date, when Rating 1.5, and when Event is Johnson Vs. Moraga?
CREATE TABLE table_name_76 (date VARCHAR, rating VARCHAR, event VARCHAR)
SELECT gross_revenue__2011_ FROM table_name_78 WHERE gross_revenue__1982_ = "$156,315"
What was the 2011 gross revenue for the venue that had a gross revenue of $156,315 in 1982?
CREATE TABLE table_name_78 (gross_revenue__2011_ VARCHAR, gross_revenue__1982_ VARCHAR)
SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num GROUP BY T2.stu_num HAVING COUNT(*) = 1
Find the first names of students who took exactly one class.
CREATE TABLE enroll (stu_num VARCHAR); CREATE TABLE student (stu_fname VARCHAR, stu_num VARCHAR)
SELECT label FROM table_name_98 WHERE date = "1973" AND catalog = "l 35023"
What is the label from 1973 that has a catalog number of l 35023?
CREATE TABLE table_name_98 (label VARCHAR, date VARCHAR, catalog VARCHAR)
SELECT region_of_ussr FROM table_16048129_5 WHERE _percentage_of_total_deportees = "10.6"
What regions of the USSR have a percentage of deportees of 10.6?
CREATE TABLE table_16048129_5 (region_of_ussr VARCHAR, _percentage_of_total_deportees VARCHAR)
SELECT height__f_ FROM table_23670057_6 WHERE player = "Demond Greene"
Name the height of demond greene
CREATE TABLE table_23670057_6 (height__f_ VARCHAR, player VARCHAR)
SELECT famous_for FROM table_14345690_5 WHERE finished = "2nd"
Who is the famous for that finished 2nd?
CREATE TABLE table_14345690_5 (famous_for VARCHAR, finished VARCHAR)
SELECT dob FROM table_name_8 WHERE bats = "s" AND position = "inf"
Which DOB has Bats of s, and a Position of inf?
CREATE TABLE table_name_8 (dob VARCHAR, bats VARCHAR, position VARCHAR)
SELECT score_in_final FROM table_23197088_4 WHERE championship = "Rome"
what are all the score in conclusive where title is rome
CREATE TABLE table_23197088_4 (score_in_final VARCHAR, championship VARCHAR)
SELECT tournament FROM table_name_29 WHERE surface = "clay" AND partner = "henri leconte" AND date = 1983
Which tournament has a clay surface and partner henri leconte in 1983?
CREATE TABLE table_name_29 (tournament VARCHAR, date VARCHAR, surface VARCHAR, partner VARCHAR)
SELECT home_team AS score FROM table_name_54 WHERE home_team = "collingwood"
What was Collingwood's score as the home team?
CREATE TABLE table_name_54 (home_team VARCHAR)
SELECT athlete FROM table_name_45 WHERE wind = "1.8"
Who was the athlete with a wind of 1.8?
CREATE TABLE table_name_45 (athlete VARCHAR, wind VARCHAR)
SELECT COUNT(report) FROM table_1140078_2 WHERE race = "Italian Grand Prix"
What is the number of reports for the italian grand prix?
CREATE TABLE table_1140078_2 (report VARCHAR, race VARCHAR)
SELECT deputy_prime_minister FROM table_name_8 WHERE term = "7th legislature" AND left_office = "2004"
Which deputy prime minister left office in 2004 and was in the 7th legislature?
CREATE TABLE table_name_8 (deputy_prime_minister VARCHAR, term VARCHAR, left_office VARCHAR)
SELECT player FROM table_11545282_5 WHERE no = "53"
Which player is no. 53?
CREATE TABLE table_11545282_5 (player VARCHAR, no VARCHAR)
SELECT MIN(wins) FROM table_name_46 WHERE rank > 6 AND first_win = "1950 british grand prix"
What is the rank 6 lowest win who's first win was at the 1950 British Grand Prix?
CREATE TABLE table_name_46 (wins INTEGER, rank VARCHAR, first_win VARCHAR)
SELECT location_attendance FROM table_11963601_11 WHERE date = "May 15"
Where was the game on May 15 and how many were in attendance?
CREATE TABLE table_11963601_11 (location_attendance VARCHAR, date VARCHAR)
SELECT cause_of_destruction FROM table_19342760_1 WHERE name = "Mausoleum at Halicarnassus"
What caused the collapse of the Mausoleum at Halicarnassus?
CREATE TABLE table_19342760_1 (cause_of_destruction VARCHAR, name VARCHAR)
SELECT AVG(top_5) FROM table_name_72 WHERE tournament = "u.s. open" AND cuts_made > 10
What is the average Top-5, when Tournament is U.S. Open, and when Cuts Made is greater than 10?
CREATE TABLE table_name_72 (top_5 INTEGER, tournament VARCHAR, cuts_made VARCHAR)
SELECT COUNT(no_in_series) FROM table_27481781_2 WHERE viewers__millions_ = "18.73"
How many episodes have 18.73 million viewers?
CREATE TABLE table_27481781_2 (no_in_series VARCHAR, viewers__millions_ VARCHAR)
SELECT home FROM table_name_26 WHERE date = "november 8"
What's the stadium on November 8?
CREATE TABLE table_name_26 (home VARCHAR, date VARCHAR)
SELECT COUNT(T1.SSN) FROM patient AS T1 JOIN prescribes AS T2 ON T1.SSN = T2.patient JOIN physician AS T3 ON T2.physician = T3.employeeid WHERE T3.name = "John Dorian"
How many patients' prescriptions are made by physician John Dorian?
CREATE TABLE patient (SSN VARCHAR); CREATE TABLE prescribes (patient VARCHAR, physician VARCHAR); CREATE TABLE physician (employeeid VARCHAR, name VARCHAR)
SELECT MIN(average_attendance) FROM table_10815352_1 WHERE season = "2013"
What's the average attendance of the leagues in the season of 2013?
CREATE TABLE table_10815352_1 (average_attendance INTEGER, season VARCHAR)
SELECT date_of_vacancy FROM table_name_4 WHERE manner_of_departure = "contract terminated" AND position_in_table = "23rd" AND date_of_appointment = "31 december 2008"
what is the date of vacancy when the manner of departure is contract terminated, the position in table is 23rd and the date of appointment is 31 december 2008?
CREATE TABLE table_name_4 (date_of_vacancy VARCHAR, date_of_appointment VARCHAR, manner_of_departure VARCHAR, position_in_table VARCHAR)
SELECT SUM(poles) FROM table_name_73 WHERE series = "firestone indy lights series" AND season < 2009
What is the sum of poles of the firestone indy lights series before the 2009 season?
CREATE TABLE table_name_73 (poles INTEGER, series VARCHAR, season VARCHAR)
SELECT COUNT(points) FROM table_name_73 WHERE wins < 14 AND club = "sd indauchu" AND position > 12
WHAT ARE THE TOTAL NUMBER OF POINTS WITH WINS SMALLER THAN 14, AT SD INDAUCHU, POSITION BIGGER THAN 12?
CREATE TABLE table_name_73 (points VARCHAR, position VARCHAR, wins VARCHAR, club VARCHAR)
SELECT MAX(position) FROM table_name_40 WHERE points > 16 AND conceded < 7
The highest position with more than 16 points and less than 7 concedes?
CREATE TABLE table_name_40 (position INTEGER, points VARCHAR, conceded VARCHAR)
SELECT party FROM table_25030512_12 WHERE incumbent = "Bill Young Redistricted from the 10th district"
When bill young redistricted from the 10th district is the incumbent what is the party?
CREATE TABLE table_25030512_12 (party VARCHAR, incumbent VARCHAR)
SELECT driver FROM table_name_35 WHERE laps > 72 AND grid = 2
What driver has grid 2 and over 72 laps?
CREATE TABLE table_name_35 (driver VARCHAR, laps VARCHAR, grid VARCHAR)
SELECT nhl_team FROM table_1473672_6 WHERE player = "Rob Palmer"
What NHL team drafted Rob Palmer?
CREATE TABLE table_1473672_6 (nhl_team VARCHAR, player VARCHAR)
SELECT place FROM table_name_98 WHERE score = 66 - 67 = 133
In what place did the player with a score of 66-67=133 come in?
CREATE TABLE table_name_98 (place VARCHAR, score VARCHAR)
SELECT year FROM table_name_72 WHERE points > 0
In which year were the points more than 0?
CREATE TABLE table_name_72 (year VARCHAR, points INTEGER)
SELECT outcome FROM table_name_83 WHERE tournament = "tokyo"
what is the outcome when the tournament is tokyo?
CREATE TABLE table_name_83 (outcome VARCHAR, tournament VARCHAR)
SELECT method FROM table_name_73 WHERE opponent = "chris herring"
Which method took place against Chris Herring?
CREATE TABLE table_name_73 (method VARCHAR, opponent VARCHAR)
SELECT record FROM table_name_41 WHERE loss = "wyatt (4–4)"
What was the record at the game that had a loss of Wyatt (4–4)?
CREATE TABLE table_name_41 (record VARCHAR, loss VARCHAR)
SELECT SUM(1938) FROM table_name_8 WHERE 1933 < 68.3 AND 1940 < 4.02
What is the sum of 1938 values where 1933 values are under 68.3 and 1940 valures are under 4.02?
CREATE TABLE table_name_8 (Id VARCHAR)
SELECT dance_song FROM table_2803106_1 WHERE total = "31"
What dance had a score total of 31?
CREATE TABLE table_2803106_1 (dance_song VARCHAR, total VARCHAR)
SELECT primary__6_13_years_ FROM table_25042332_22 WHERE preschool__0_5_years_ = "50.23"
What is the enrollment ration in primary in the region where the enrollment ratio in preschool is 50.23?
CREATE TABLE table_25042332_22 (primary__6_13_years_ VARCHAR, preschool__0_5_years_ VARCHAR)
SELECT call_sign FROM table_name_43 WHERE erp_w = 50 AND frequency_mhz < 103.5
Which call sign, broadcast at less than 103.5MHz, has an ERP W of 50?
CREATE TABLE table_name_43 (call_sign VARCHAR, erp_w VARCHAR, frequency_mhz VARCHAR)
SELECT name FROM table_name_62 WHERE perfection = "73.24%"
Who had a perfection percentage of 73.24%?
CREATE TABLE table_name_62 (name VARCHAR, perfection VARCHAR)
SELECT series_sorted FROM table_name_73 WHERE released = "may 2012"
what is the series sorted when the released is may 2012?
CREATE TABLE table_name_73 (series_sorted VARCHAR, released VARCHAR)
SELECT cyrillic_name_other_names FROM table_2562572_35 WHERE settlement = "Melenci"
Name the cyrillic name for melenci
CREATE TABLE table_2562572_35 (cyrillic_name_other_names VARCHAR, settlement VARCHAR)
SELECT MAX(against) FROM table_name_4 WHERE wins = 0 AND byes > 2
What is the highest score with 0 wins and more than 2 Byes?
CREATE TABLE table_name_4 (against INTEGER, wins VARCHAR, byes VARCHAR)
SELECT pole_position FROM table_name_93 WHERE round = 1
What is the pole position of the grand prix with 1 round?
CREATE TABLE table_name_93 (pole_position VARCHAR, round VARCHAR)
SELECT COUNT(launched) FROM table_28803803_1 WHERE original_channel = "CBS (2002)"
How many shows were launched on CBS (2002)?
CREATE TABLE table_28803803_1 (launched VARCHAR, original_channel VARCHAR)
SELECT director FROM table_name_57 WHERE title = "min dally nseek" AND result = "won"
Who is the director with the Min Dally Nseek title, and won?
CREATE TABLE table_name_57 (director VARCHAR, title VARCHAR, result VARCHAR)
SELECT Headquarters FROM company GROUP BY Headquarters ORDER BY COUNT(*) DESC LIMIT 1
Show the most common headquarter for companies.
CREATE TABLE company (Headquarters VARCHAR)
SELECT mascot FROM table_name_82 WHERE county = "43 kosciusko"
what is the mascot when the county is 43 kosciusko?
CREATE TABLE table_name_82 (mascot VARCHAR, county VARCHAR)
SELECT chart_positions FROM table_name_1 WHERE format = "ep"
What chart positions did the album reach when ep was the format?
CREATE TABLE table_name_1 (chart_positions VARCHAR, format VARCHAR)
SELECT _percentage_of_1_rep_max_last_set_ FROM table_name_28 WHERE set_4 = "145lb x 5reps"
How many % of 1 Rep Max(Last Set) has a Set 4 of 145lb x 5reps?
CREATE TABLE table_name_28 (_percentage_of_1_rep_max_last_set_ VARCHAR, set_4 VARCHAR)
SELECT date FROM table_name_50 WHERE venue = "vfl park"
On what date was the venue VFL Park?
CREATE TABLE table_name_50 (date VARCHAR, venue VARCHAR)
SELECT venue FROM table_name_80 WHERE goal < 2
What venue had less than 2 goals?
CREATE TABLE table_name_80 (venue VARCHAR, goal INTEGER)
SELECT race_caller FROM table_22514845_3 WHERE year = 1994
Who is the race caller for the year 1994?
CREATE TABLE table_22514845_3 (race_caller VARCHAR, year VARCHAR)
SELECT MIN(uni_number) FROM table_name_25 WHERE surname = "wiltshire"
What is the uniform number of the player whose last name is Wiltshire?
CREATE TABLE table_name_25 (uni_number INTEGER, surname VARCHAR)
SELECT replaced_by FROM table_name_73 WHERE date_of_appointment = "12 october 2007"
I want the replaced for date of appointment being 12 october 2007
CREATE TABLE table_name_73 (replaced_by VARCHAR, date_of_appointment VARCHAR)
SELECT SUM(finale) FROM table_name_64 WHERE chinese_title = "女人唔易做"
What is the Total Finale of 女人唔易做?
CREATE TABLE table_name_64 (finale INTEGER, chinese_title VARCHAR)
SELECT SUM(championship) FROM table_name_4 WHERE league_cup > 1 AND name = "james henry"
What is the total championships of James Henry that has a league cup more than 1?
CREATE TABLE table_name_4 (championship INTEGER, league_cup VARCHAR, name VARCHAR)
SELECT family_families FROM table_19897294_5 WHERE no_overall = "UK17"
Name the family/families uk17
CREATE TABLE table_19897294_5 (family_families VARCHAR, no_overall VARCHAR)
SELECT AVG(draws) FROM table_name_67 WHERE total = 1 AND goal_difference = "2:0"
What is the average number of draws that have a total of 1 and a goal difference of 2:0?
CREATE TABLE table_name_67 (draws INTEGER, total VARCHAR, goal_difference VARCHAR)
SELECT cell_mobile_number, email_address FROM STUDENTS
Return the cell phone number and email address for all students.
CREATE TABLE STUDENTS (cell_mobile_number VARCHAR, email_address VARCHAR)
SELECT draft FROM table_name_9 WHERE pick = "46"
In which year was the Pick #46?
CREATE TABLE table_name_9 (draft VARCHAR, pick VARCHAR)
SELECT last_name FROM Teachers EXCEPT SELECT T1.last_name FROM Teachers AS T1 JOIN Detention AS T2 ON T1.teacher_id = T2.teacher_id
Find the last names of teachers who are not involved in any detention.
CREATE TABLE Teachers (last_name VARCHAR); CREATE TABLE Teachers (last_name VARCHAR, teacher_id VARCHAR); CREATE TABLE Detention (teacher_id VARCHAR)
SELECT Nationality, COUNT(*) FROM HOST GROUP BY Nationality
Show different nationalities along with the number of hosts of each nationality.
CREATE TABLE HOST (Nationality VARCHAR)
SELECT open_year, name FROM manufacturer ORDER BY num_of_shops DESC LIMIT 1
Which manufacturer has the most number of shops? List its name and year of opening.
CREATE TABLE manufacturer (open_year VARCHAR, name VARCHAR, num_of_shops VARCHAR)
SELECT frequency FROM table_name_91 WHERE location = "davao city"
What is the Frequency in Davao City?
CREATE TABLE table_name_91 (frequency VARCHAR, location VARCHAR)
SELECT original_air_date__uk_ FROM table_2570269_2 WHERE episode__number = "2-01"
If the episode number is 2-01 what is the original UK air date?
CREATE TABLE table_2570269_2 (original_air_date__uk_ VARCHAR, episode__number VARCHAR)
SELECT player FROM table_name_97 WHERE pick__number < 29 AND mls_team = "chicago fire"
Tell me the player for pick number less than 29 and mls team of chicago fire
CREATE TABLE table_name_97 (player VARCHAR, pick__number VARCHAR, mls_team VARCHAR)
SELECT part_2 FROM table_name_67 WHERE part_4 = "*blōtanaz"
What was part 2 when part 4 was *blōtanaz?
CREATE TABLE table_name_67 (part_2 VARCHAR, part_4 VARCHAR)
SELECT height_in_ft FROM table_11734041_7 WHERE school_club_team_country = "Clemson"
What is the height of the school club team members in clemson?
CREATE TABLE table_11734041_7 (height_in_ft VARCHAR, school_club_team_country VARCHAR)
SELECT team_2 FROM table_name_61 WHERE team_1 = "numancia"
What is team 2 if Team 1 is Numancia?
CREATE TABLE table_name_61 (team_2 VARCHAR, team_1 VARCHAR)
SELECT AVG(crowd) FROM table_name_35 WHERE away_team = "geelong"
How is the crowd of the team Geelong?
CREATE TABLE table_name_35 (crowd INTEGER, away_team VARCHAR)
SELECT title FROM table_name_96 WHERE language = "korean" AND network = "kbs2"
What is the title for the Korean progran on KBS2?
CREATE TABLE table_name_96 (title VARCHAR, language VARCHAR, network VARCHAR)
SELECT SUM(poles) FROM table_name_35 WHERE podiums = 0 AND races = 17
What is the sum of Poles, when Podiums is 0, and when Races is 17?
CREATE TABLE table_name_35 (poles INTEGER, podiums VARCHAR, races VARCHAR)
SELECT sprint_classification FROM table_23944514_15 WHERE aggressive_rider = "Michael Barry"
Name the sprint classification for michael barry
CREATE TABLE table_23944514_15 (sprint_classification VARCHAR, aggressive_rider VARCHAR)
SELECT termination_of_mission FROM table_name_40 WHERE appointed_by = "barack obama"
What was the Termination of Mission date for the ambassador who was appointed by Barack Obama?
CREATE TABLE table_name_40 (termination_of_mission VARCHAR, appointed_by VARCHAR)
SELECT country FROM table_name_57 WHERE rank = "24"
Which country is ranked 24?
CREATE TABLE table_name_57 (country VARCHAR, rank VARCHAR)
SELECT type FROM table_name_8 WHERE location = "cooperstown"
What type of bridge is in Cooperstown?
CREATE TABLE table_name_8 (type VARCHAR, location VARCHAR)
SELECT joined FROM table_1971074_1 WHERE location = "Logan Township, Pennsylvania"
When did the school from Logan Township, Pennsylvania join the Conference?
CREATE TABLE table_1971074_1 (joined VARCHAR, location VARCHAR)
SELECT largest_ethnic_group__2002_ FROM table_2562572_52 WHERE cyrillic_name = "Брестач"
What is the largest ethnic group (2002) when cyrillic name is брестач?
CREATE TABLE table_2562572_52 (largest_ethnic_group__2002_ VARCHAR, cyrillic_name VARCHAR)
SELECT 1958 FROM table_name_67 WHERE 1957 = "2" AND 1956 = "3"
what is 1958 when 1957 is 2 and 1956 is 3?
CREATE TABLE table_name_67 (Id VARCHAR)
SELECT DISTINCT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available = 7
Return the unique name for stations that have ever had 7 bikes available.
CREATE TABLE station (name VARCHAR, id VARCHAR); CREATE TABLE status (station_id VARCHAR, bikes_available VARCHAR)
SELECT district FROM table_name_7 WHERE first_elected < 2006 AND towns_represented = "broken arrow, tulsa"
Which district had first elected earlier than 2006 for representation of Broken Arrow, Tulsa?
CREATE TABLE table_name_7 (district VARCHAR, first_elected VARCHAR, towns_represented VARCHAR)
SELECT home__1st_leg_ FROM table_17968233_2 WHERE aggregate = "3-4"
If the aggregate is 3-4, what is the first leg?
CREATE TABLE table_17968233_2 (home__1st_leg_ VARCHAR, aggregate VARCHAR)
SELECT segment_b FROM table_15187735_10 WHERE segment_a = "s Dress Form"
Name the segment b for s dress form
CREATE TABLE table_15187735_10 (segment_b VARCHAR, segment_a VARCHAR)
SELECT province FROM table_name_98 WHERE centers = "parun"
Which province is Parun in?
CREATE TABLE table_name_98 (province VARCHAR, centers VARCHAR)
SELECT pick FROM table_name_54 WHERE position = "defensive end" AND team = "new york jets"
What's the pick for the New York jets with a defensive end?
CREATE TABLE table_name_54 (pick VARCHAR, position VARCHAR, team VARCHAR)