answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
489
SELECT year_active FROM table_name_83 WHERE role = "rachel"
What year was the role of Rachel active in TV?
CREATE TABLE table_name_83 (year_active VARCHAR, role VARCHAR)
SELECT record FROM table_name_22 WHERE method = "tko (punches and elbows)"
What was the record when TKO (punches and elbows) was the method?
CREATE TABLE table_name_22 (record VARCHAR, method VARCHAR)
SELECT position FROM table_name_66 WHERE pick__number = 16
The position that has a pick # of 16 is what?
CREATE TABLE table_name_66 (position VARCHAR, pick__number VARCHAR)
SELECT MIN(total_passengers) FROM table_name_75 WHERE location = "salvador" AND rank > 5
Can you tell me the lowest Total Passengers than has the Location of salvador, and the Rank larger than 5?
CREATE TABLE table_name_75 (total_passengers INTEGER, location VARCHAR, rank VARCHAR)
SELECT wheels FROM table_name_99 WHERE builder = "baldwin locomotive works"
What type of wheels did the locomotive have that was built by Baldwin Locomotive Works?
CREATE TABLE table_name_99 (wheels VARCHAR, builder VARCHAR)
SELECT sport FROM table_name_64 WHERE club = "rayo vallecano"
What sport is the rayo vallecano club in?
CREATE TABLE table_name_64 (sport VARCHAR, club VARCHAR)
SELECT AVG(frequency) FROM table_name_31 WHERE webcast = "•" AND callsign = "xemr"
Which Frequency has a Webcast of •, and a Callsign of xemr?
CREATE TABLE table_name_31 (frequency INTEGER, webcast VARCHAR, callsign VARCHAR)
SELECT AVG(draw) FROM table_name_68 WHERE televote < 633 AND artist = "vilma voroblevaitė" AND place > 14
What draw average has a televote less than 633 and Vilma Voroblevaitė as artist and the place is greater than 14?
CREATE TABLE table_name_68 (draw INTEGER, place VARCHAR, televote VARCHAR, artist VARCHAR)
SELECT customer_name FROM Customers ORDER BY date_became_customer LIMIT 5
Find the name of the first 5 customers.
CREATE TABLE Customers (customer_name VARCHAR, date_became_customer VARCHAR)
SELECT COUNT(*) FROM country WHERE GovernmentForm = "Republic"
How many countries have a republic as their form of government?
CREATE TABLE country (GovernmentForm VARCHAR)
SELECT T2.concert_name, T2.theme, COUNT(*) FROM singer_in_concert AS T1 JOIN concert AS T2 ON T1.concert_id = T2.concert_id GROUP BY T2.concert_id
Show the name and theme for all concerts and the number of singers in each concert.
CREATE TABLE singer_in_concert (concert_id VARCHAR); CREATE TABLE concert (concert_name VARCHAR, theme VARCHAR, concert_id VARCHAR)
SELECT COUNT(matches) FROM table_name_15 WHERE prize_money = "£1,000,000"
How many matches were there in the round with £1,000,000 in prize money?
CREATE TABLE table_name_15 (matches VARCHAR, prize_money VARCHAR)
SELECT score FROM table_name_80 WHERE year = 2000
What score has 2000 as the year?
CREATE TABLE table_name_80 (score VARCHAR, year VARCHAR)
SELECT outcome FROM table_name_76 WHERE date = "july 16, 2011"
What's the Outcome for the Date of July 16, 2011?
CREATE TABLE table_name_76 (outcome VARCHAR, date VARCHAR)
SELECT creator FROM table_name_45 WHERE latest_stable_version = "0.5.2 (part of compiz fusion release)"
Who is the Creator that has a version of 0.5.2 (part of compiz fusion release)?
CREATE TABLE table_name_45 (creator VARCHAR, latest_stable_version VARCHAR)
SELECT cm_winning_team FROM table_29225103_2 WHERE fm_winning_team = "#17 Elva - Ford"
Who was the CM winning team when the FM winning team was #17 Elva - Ford?
CREATE TABLE table_29225103_2 (cm_winning_team VARCHAR, fm_winning_team VARCHAR)
SELECT allegiance FROM table_name_28 WHERE name = "winfield scott"
Who did Winfield Scott have an allegiance with?
CREATE TABLE table_name_28 (allegiance VARCHAR, name VARCHAR)
SELECT event FROM table_name_8 WHERE time = "2:19"
What was the name of the Event with a time of 2:19?
CREATE TABLE table_name_8 (event VARCHAR, time VARCHAR)
SELECT party FROM table_26129220_2 WHERE senator = "David Goodman"
What is the party affiliation for Senator David Goodman?
CREATE TABLE table_26129220_2 (party VARCHAR, senator VARCHAR)
SELECT away_team FROM table_name_61 WHERE home_team = "geelong"
Who went to Geelong to play?
CREATE TABLE table_name_61 (away_team VARCHAR, home_team VARCHAR)
SELECT MIN(expenditures_on_r) & d__billions_of_us$_, _ppp__ FROM table_name_94 WHERE country_region = "poland" AND year > 2011
What is the lowest expenditures on R&D for Poland after 2011?
CREATE TABLE table_name_94 (_ppp__ VARCHAR, d__billions_of_us$_ VARCHAR, expenditures_on_r INTEGER, country_region VARCHAR, year VARCHAR)
SELECT winner FROM table_name_76 WHERE name = "fedex tour of calabarzon"
Who won the Fedex tour of Calabarzon?
CREATE TABLE table_name_76 (winner VARCHAR, name VARCHAR)
SELECT driver FROM table_name_39 WHERE constructor = "maserati" AND grid < 6 AND time_retired = "+2 laps"
Who was driving the Maserati with a Grid smaller than 6, and a Time/Retired of +2 laps?
CREATE TABLE table_name_39 (driver VARCHAR, time_retired VARCHAR, constructor VARCHAR, grid VARCHAR)
SELECT MAX(cuts_made) FROM table_name_99 WHERE top_5 < 3 AND top_10 > 4
Name the highest cuts made when top 5 is less than 3 and top ten is more than 4
CREATE TABLE table_name_99 (cuts_made INTEGER, top_5 VARCHAR, top_10 VARCHAR)
SELECT left FROM table_11658094_3 WHERE founded = 1880
What year did a school leave that was founded in 1880?
CREATE TABLE table_11658094_3 (left VARCHAR, founded VARCHAR)
SELECT venue FROM table_name_2 WHERE result = "2–0"
Which Venue has a Result of 2–0?
CREATE TABLE table_name_2 (venue VARCHAR, result VARCHAR)
SELECT language FROM table_2509350_3 WHERE sopachuy_municipality = 10
Name the language for sopachuy 10
CREATE TABLE table_2509350_3 (language VARCHAR, sopachuy_municipality VARCHAR)
SELECT admits_boys_girls FROM table_104858_1 WHERE name_of_member_organization = "The Scout Association of Hong Kong"
Does the Scout Association of Hong Kong admit boys, girls, or both?
CREATE TABLE table_104858_1 (admits_boys_girls VARCHAR, name_of_member_organization VARCHAR)
SELECT MAX(lose) FROM table_name_88 WHERE name = "santos" AND point > 45
What was the highest number of lose for a player named Santos with more than 45 points?
CREATE TABLE table_name_88 (lose INTEGER, name VARCHAR, point VARCHAR)
SELECT seasons FROM table_178242_1 WHERE country___region = "Poland"
How many seasons did the show run in Poland?
CREATE TABLE table_178242_1 (seasons VARCHAR, country___region VARCHAR)
SELECT away_team AS score FROM table_name_17 WHERE home_team = "collingwood"
What was the away team's score when Collingwood was the home team?
CREATE TABLE table_name_17 (away_team VARCHAR, home_team VARCHAR)
SELECT stadium FROM table_name_60 WHERE visiting_team = "denver broncos"
What stadium did the Denver Broncos visit?
CREATE TABLE table_name_60 (stadium VARCHAR, visiting_team VARCHAR)
SELECT date FROM table_name_61 WHERE home = "detroit red wings" AND record = "10–41–6"
On what Date was the Home team Detroit Red Wings with a Record of 10–41–6?
CREATE TABLE table_name_61 (date VARCHAR, home VARCHAR, record VARCHAR)
SELECT record FROM table_name_7 WHERE round = "n/a" AND event = "ucs 2 - battle at the barn"
What's the record of the UCS 2 - Battle at the Barn when the round was n/a?
CREATE TABLE table_name_7 (record VARCHAR, round VARCHAR, event VARCHAR)
SELECT name FROM table_name_64 WHERE date_of_birth = "1980-07-29"
Who has a Date of Birth 1980-07-29?
CREATE TABLE table_name_64 (name VARCHAR, date_of_birth VARCHAR)
SELECT release_date___xbox360__ FROM table_26631526_1 WHERE artist = "Sea Wolf"
Name the release date xbox 360 for sea wolf
CREATE TABLE table_26631526_1 (release_date___xbox360__ VARCHAR, artist VARCHAR)
SELECT runners_up FROM table_name_84 WHERE team = "espartanos de margarita"
How many runners-up did Espartanos de Margarita have?
CREATE TABLE table_name_84 (runners_up VARCHAR, team VARCHAR)
SELECT institution FROM table_10577579_3 WHERE men’s_nickname = "Blazers"
Which college has the men's nickname of the blazers?
CREATE TABLE table_10577579_3 (institution VARCHAR, men’s_nickname VARCHAR)
SELECT tie_no FROM table_name_61 WHERE away_team = "scunthorpe & lindsey united"
What is the Tie number for the match that had away team of Scunthorpe & Lindsey United?
CREATE TABLE table_name_61 (tie_no VARCHAR, away_team VARCHAR)
SELECT final_score FROM table_name_82 WHERE visiting_team = "washington redskins" AND date = "september 4"
What is the final score when the visiting team is the Washington Redskins and the date is September 4?
CREATE TABLE table_name_82 (final_score VARCHAR, visiting_team VARCHAR, date VARCHAR)
SELECT 3 AS _september_2004 FROM table_23988726_2 WHERE saif_saaeed_shaheen___qat__ = "Daniel Lincoln ( USA )"
When daniel lincoln ( usa ) is the saif saaeed shaheen ( qat ) What is the date for September 3rd, 2004?
CREATE TABLE table_23988726_2 (saif_saaeed_shaheen___qat__ VARCHAR)
SELECT home FROM table_name_49 WHERE record = "3-2"
Which home team has a record of 3-2?
CREATE TABLE table_name_49 (home VARCHAR, record VARCHAR)
SELECT MAX(against) FROM table_name_20 WHERE wins < 3 AND losses < 15
What is the highest number listed under against when there were less than 3 wins and less than 15 losses?
CREATE TABLE table_name_20 (against INTEGER, wins VARCHAR, losses VARCHAR)
SELECT build_date FROM table_name_56 WHERE prr_class = "brs24"
What is the build date of the model with PRR Class brs24?
CREATE TABLE table_name_56 (build_date VARCHAR, prr_class VARCHAR)
SELECT year_location FROM table_28138035_13 WHERE mens_singles = "Chen Qi"
When and where did Chen Qi win in men singles?
CREATE TABLE table_28138035_13 (year_location VARCHAR, mens_singles VARCHAR)
SELECT tournament FROM table_name_67 WHERE 2009 = "w"
Which tournament had the result of a W in 2009?
CREATE TABLE table_name_67 (tournament VARCHAR)
SELECT band FROM table_name_87 WHERE purpose = "community" AND frequency = "0 96.9"
The community station broadcasting at frequency 0 96.9 is in what band?
CREATE TABLE table_name_87 (band VARCHAR, purpose VARCHAR, frequency VARCHAR)
SELECT AVG(grid) FROM table_name_55 WHERE laps < 3
What is the average grid for the competitiors who had laps smaller than 3?
CREATE TABLE table_name_55 (grid INTEGER, laps INTEGER)
SELECT ethernet_ports FROM table_name_86 WHERE name = "u150"
What is the ethernet ports of the u150 appliance?
CREATE TABLE table_name_86 (ethernet_ports VARCHAR, name VARCHAR)
SELECT COUNT(heat) FROM table_name_5 WHERE country = "british virgin islands"
What's the total number of Heat recorded for the british virgin islands?
CREATE TABLE table_name_5 (heat VARCHAR, country VARCHAR)
SELECT order__number FROM table_27616663_1 WHERE theme = "Male Singers"
What was the order # of the theme Male Singers?
CREATE TABLE table_27616663_1 (order__number VARCHAR, theme VARCHAR)
SELECT earpads FROM table_name_67 WHERE construction = "plastic" AND succeeded_by = "igrado"
What earpads does the headphone with plastic contruction and was succeeded by igrado have?
CREATE TABLE table_name_67 (earpads VARCHAR, construction VARCHAR, succeeded_by VARCHAR)
SELECT record FROM table_name_86 WHERE visitor = "dallas"
Name the record for dallas visitor
CREATE TABLE table_name_86 (record VARCHAR, visitor VARCHAR)
SELECT nationality FROM table_1013129_2 WHERE college_junior_club_team = "Thunder Bay Flyers (USHL)"
What are the nationalities of the player picked from Thunder Bay Flyers (ushl)
CREATE TABLE table_1013129_2 (nationality VARCHAR, college_junior_club_team VARCHAR)
SELECT COUNT(loss) FROM table_name_37 WHERE avg_g = 8.4
Name the total of Loss which has an Avg/G of 8.4?
CREATE TABLE table_name_37 (loss VARCHAR, avg_g VARCHAR)
SELECT position FROM table_name_75 WHERE round < 5 AND pick = 5
Which Position has a Round smaller than 5, and a Pick of 5?
CREATE TABLE table_name_75 (position VARCHAR, round VARCHAR, pick VARCHAR)
SELECT SUM(wins) FROM table_name_15 WHERE player = "greg norman"
How many wins does Greg Norman have?
CREATE TABLE table_name_15 (wins INTEGER, player VARCHAR)
SELECT country FROM table_name_7 WHERE winter_olympics = 1972
what is the country for the 1972 winter olympics?
CREATE TABLE table_name_7 (country VARCHAR, winter_olympics VARCHAR)
SELECT operator FROM table_28035004_1 WHERE bodybuilder = "Roe"
Who is the operator when Roe was the bodybuilder?
CREATE TABLE table_28035004_1 (operator VARCHAR, bodybuilder VARCHAR)
SELECT laps FROM table_name_51 WHERE time_retired = "+23.080"
How many laps have a time/retired of +23.080?
CREATE TABLE table_name_51 (laps VARCHAR, time_retired VARCHAR)
SELECT MAX(gold) FROM table_name_18 WHERE rank = "12" AND nation = "vietnam"
what is the highest gold when the rank is 12 for the nation vietnam?
CREATE TABLE table_name_18 (gold INTEGER, rank VARCHAR, nation VARCHAR)
SELECT country FROM table_15909409_2 WHERE agricultural_use__m_3__p_yr__in__percentage_ = "794(86%)"
What was the country in which the agricultural use (m 3 /p/yr)(in %) was 794(86%)?
CREATE TABLE table_15909409_2 (country VARCHAR, agricultural_use__m_3__p_yr__in__percentage_ VARCHAR)
SELECT opponent FROM table_name_6 WHERE result = "l 14–6"
Who was the opponent with a result of l 14–6?
CREATE TABLE table_name_6 (opponent VARCHAR, result VARCHAR)
SELECT oppose FROM table_name_22 WHERE poll_source = "time poll" AND unsure = "6%"
What percentage of people were opposed to the candidate based on the Time Poll poll that showed 6% of people were unsure?
CREATE TABLE table_name_22 (oppose VARCHAR, poll_source VARCHAR, unsure VARCHAR)
SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Jul OR T2.Mar > T2.Oct
Give me a list of cities whose temperature in March is lower than that in July or higher than that in Oct?
CREATE TABLE city (city VARCHAR, city_id VARCHAR); CREATE TABLE temperature (city_id VARCHAR, Mar VARCHAR, Jul VARCHAR, Oct VARCHAR)
SELECT storage_case FROM table_28652521_1 WHERE description = "ivory and red metal"
What's the storage case of the buttonholer described as ivory and red metal?
CREATE TABLE table_28652521_1 (storage_case VARCHAR, description VARCHAR)
SELECT sunday_surya__the_sun_ FROM table_1277350_3 WHERE thursday_guru__jupiter_ = "برس وار Bres'var"
In language where Thursday is برس وار bres'var, what is Sunday?
CREATE TABLE table_1277350_3 (sunday_surya__the_sun_ VARCHAR, thursday_guru__jupiter_ VARCHAR)
SELECT year__ceremony_ FROM table_13700749_1 WHERE film_title = "Tsotsi"
What year featured the film tsotsi?
CREATE TABLE table_13700749_1 (year__ceremony_ VARCHAR, film_title VARCHAR)
SELECT meet FROM table_name_22 WHERE event = "100m backstroke"
Which championship was the 100m backstroke performed?
CREATE TABLE table_name_22 (meet VARCHAR, event VARCHAR)
SELECT points_for FROM table_name_59 WHERE club = "castres"
How many points did the Castres have?
CREATE TABLE table_name_59 (points_for VARCHAR, club VARCHAR)
SELECT name FROM dogs WHERE NOT dog_id IN (SELECT dog_id FROM treatments GROUP BY dog_id HAVING SUM(cost_of_treatment) > 1000)
Which dogs have not cost their owner more than 1000 for treatment ? List the dog names .
CREATE TABLE dogs (name VARCHAR, dog_id VARCHAR, cost_of_treatment INTEGER); CREATE TABLE treatments (name VARCHAR, dog_id VARCHAR, cost_of_treatment INTEGER)
SELECT geographic_character FROM table_name_10 WHERE population__2007_ < 4346 AND population__2010_ > 3385 AND barangay = "manalongon"
WHAT IS THE TYPE OF LAND WITH A 2007 POPULATION SMALLER THAN 4346, 2010 POPULATION LARGER THAN 3385, FROM BARANGAY OF MANALONGON?
CREATE TABLE table_name_10 (geographic_character VARCHAR, barangay VARCHAR, population__2007_ VARCHAR, population__2010_ VARCHAR)
SELECT chinese_population FROM table_19149550_9 WHERE pakistani_population = 26347
What's the Chinese population in the borough with 26347 Pakistanis?
CREATE TABLE table_19149550_9 (chinese_population VARCHAR, pakistani_population VARCHAR)
SELECT pick FROM table_name_68 WHERE college = "far eastern / psba"
Which Pick has the College named Far Eastern / PSBA?
CREATE TABLE table_name_68 (pick VARCHAR, college VARCHAR)
SELECT attendance FROM table_name_54 WHERE date = "november 21, 2004"
Which attendance number was taken on november 21, 2004?
CREATE TABLE table_name_54 (attendance VARCHAR, date VARCHAR)
SELECT COUNT(year_named) FROM table_16799784_9 WHERE longitude = "20.0E"
How many years have a longitude measure of 20.0e?
CREATE TABLE table_16799784_9 (year_named VARCHAR, longitude VARCHAR)
SELECT MAX(heat) FROM table_name_79 WHERE lane > 1 AND mark = "1:48.61"
What is the highest heat for a lane past 1 and mark of 1:48.61?
CREATE TABLE table_name_79 (heat INTEGER, lane VARCHAR, mark 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 preliminary_average FROM table_name_34 WHERE state = "utah"
Name the preliminary average for utah
CREATE TABLE table_name_34 (preliminary_average VARCHAR, state VARCHAR)
SELECT AVG(rank) FROM table_name_82 WHERE country = "hungary"
What is the average rank for Hungary?
CREATE TABLE table_name_82 (rank INTEGER, country VARCHAR)
SELECT COUNT(points) FROM table_name_56 WHERE entrant = "stp march" AND year > 1971
In 1971, how many total points did the entrant stp march have?
CREATE TABLE table_name_56 (points VARCHAR, entrant VARCHAR, year VARCHAR)
SELECT date_of_appointment FROM table_name_49 WHERE outgoing_manager = "edoardo reja"
What is the date of appointment for the outgoing manager edoardo reja?
CREATE TABLE table_name_49 (date_of_appointment VARCHAR, outgoing_manager VARCHAR)
SELECT week__number FROM table_name_44 WHERE theme = "1960s"
In which week was the Theme 1960s?
CREATE TABLE table_name_44 (week__number VARCHAR, theme VARCHAR)
SELECT leading_lady FROM table_name_96 WHERE title = "the lonely trail"
Who is the leading lady in The Lonely Trail?
CREATE TABLE table_name_96 (leading_lady VARCHAR, title VARCHAR)
SELECT country FROM table_name_74 WHERE total = 148
Which Country has a Total of 148?
CREATE TABLE table_name_74 (country VARCHAR, total VARCHAR)
SELECT 2007 AS _estimate FROM table_12720275_1 WHERE combined_statistical_area__or_metropolitan_statistical_area_if_noted_ = "Tulsa-Bartlesville, OK CSA"
What is the 2007 estimate for tulsa-bartlesville, ok csa?
CREATE TABLE table_12720275_1 (combined_statistical_area__or_metropolitan_statistical_area_if_noted_ VARCHAR)
SELECT date FROM table_name_17 WHERE visiting_team = "san francisco 49ers" AND year > 2007
What Date after 2007 had the San Francisco 49ers as the Visiting Team?
CREATE TABLE table_name_17 (date VARCHAR, visiting_team VARCHAR, year VARCHAR)
SELECT location FROM table_name_62 WHERE round > 1 AND opponent = "yoshihiro akiyama"
What is the location of the match with a round bigger than 1 where the opponent was Yoshihiro Akiyama?
CREATE TABLE table_name_62 (location VARCHAR, round VARCHAR, opponent VARCHAR)
SELECT result FROM table_name_11 WHERE opponent = "igor samoilenco"
Opponent of igor samoilenco had what result?
CREATE TABLE table_name_11 (result VARCHAR, opponent VARCHAR)
SELECT venue FROM table_name_88 WHERE game = 3
What is the venue of game 3?
CREATE TABLE table_name_88 (venue VARCHAR, game VARCHAR)
SELECT date FROM table_name_35 WHERE record = "43.89 m"
On which date was the record of 43.89 m set?
CREATE TABLE table_name_35 (date VARCHAR, record VARCHAR)
SELECT home_team FROM table_name_73 WHERE away_team = "richmond"
What home team played against Richmond?
CREATE TABLE table_name_73 (home_team VARCHAR, away_team VARCHAR)
SELECT stadium FROM table_name_89 WHERE home_team = "dallas cowboys 21"
In what stadium was the home team Dallas Cowboys 21?
CREATE TABLE table_name_89 (stadium VARCHAR, home_team VARCHAR)
SELECT MIN(end_term) FROM table_name_39 WHERE start_term = 1913 AND name = "ludwig iii"
What is the smallest End term with a Start term of 1913, and a Name of ludwig iii?
CREATE TABLE table_name_39 (end_term INTEGER, start_term VARCHAR, name VARCHAR)
SELECT wrestler FROM table_name_63 WHERE elimination = "5"
Which Wrestler has an Elimination of 5?
CREATE TABLE table_name_63 (wrestler VARCHAR, elimination VARCHAR)
SELECT T1.course_name, COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name
What is the name of each course and the corresponding number of student enrollment?
CREATE TABLE Courses (course_name VARCHAR, course_id VARCHAR); CREATE TABLE Student_Course_Enrolment (course_id VARCHAR)
SELECT to_par FROM table_name_99 WHERE player = "lanny wadkins"
What is the To par for Lanny Wadkins?
CREATE TABLE table_name_99 (to_par VARCHAR, player VARCHAR)
SELECT memory FROM table_name_78 WHERE part_number_s_ = "ct80618005844ab"
What is the memory for ct80618005844ab?
CREATE TABLE table_name_78 (memory VARCHAR, part_number_s_ VARCHAR)
SELECT international_tourist_arrivals__2011_ FROM table_name_6 WHERE international_tourist_arrivals__2012_ = "23.4 million"
In 2011, how many tourists visited the country that had 23.4 million tourists in 2012?
CREATE TABLE table_name_6 (international_tourist_arrivals__2011_ VARCHAR, international_tourist_arrivals__2012_ VARCHAR)
SELECT place FROM table_name_46 WHERE score = 70 - 66 - 67 = 203
What is the place of the player with a 70-66-67=203 score?
CREATE TABLE table_name_46 (place VARCHAR, score VARCHAR)