question
stringlengths
12
244
context
stringlengths
27
489
answer
stringlengths
18
557
Who are the hosts from the event with a theme of codehunters and the host city of Bangkok?
CREATE TABLE table_name_88 (hosts VARCHAR, host_city VARCHAR, theme VARCHAR)
SELECT hosts FROM table_name_88 WHERE host_city = "bangkok" AND theme = "codehunters"
List official names of cities in descending order of population.
CREATE TABLE city (Official_Name VARCHAR, Population VARCHAR)
SELECT Official_Name FROM city ORDER BY Population DESC
What is the power output (kw) of model hxd2b?
CREATE TABLE table_name_32 (power_output__kw_ VARCHAR, model VARCHAR)
SELECT power_output__kw_ FROM table_name_32 WHERE model = "hxd2b"
When the crowd was greater than 19,498 who was the away team?
CREATE TABLE table_name_5 (away_team VARCHAR, crowd INTEGER)
SELECT away_team FROM table_name_5 WHERE crowd > 19 OFFSET 498
What ga date do the models with 1.0, 1.2, 1.4ghz processor frequencies have?
CREATE TABLE table_10818465_1 (ga_date VARCHAR, processor_frequency VARCHAR)
SELECT ga_date FROM table_10818465_1 WHERE processor_frequency = "1.0, 1.2, 1.4GHz"
Name the least season number for two marriage proposals
CREATE TABLE table_25363904_2 (season__number INTEGER, title_english VARCHAR)
SELECT MIN(season__number) FROM table_25363904_2 WHERE title_english = "Two marriage proposals"
What is the Record when Buffalo is at Home?
CREATE TABLE table_name_36 (record VARCHAR, home VARCHAR)
SELECT record FROM table_name_36 WHERE home = "buffalo"
What Location has a Partner of app, a Population Served larger than 2000, and a Design flow (LPM) of 375?
CREATE TABLE table_name_31 (location VARCHAR, design_flow__lpm_ VARCHAR, partner VARCHAR, population_served VARCHAR)
SELECT location FROM table_name_31 WHERE partner = "app" AND population_served > 2000 AND design_flow__lpm_ = 375
What is the average total score of Belarus, which had an E score less than 8.2?
CREATE TABLE table_name_71 (total INTEGER, nation VARCHAR, e_score VARCHAR)
SELECT AVG(total) FROM table_name_71 WHERE nation = "belarus" AND e_score < 8.2
Which Score had an Opponent of chris evert-lloyd?
CREATE TABLE table_name_53 (score VARCHAR, opponent VARCHAR)
SELECT score FROM table_name_53 WHERE opponent = "chris evert-lloyd"
What position does Alexei Lazarenko have?
CREATE TABLE table_name_62 (position VARCHAR, player VARCHAR)
SELECT position FROM table_name_62 WHERE player = "alexei lazarenko"
Which tournament had a 1994 finish of RR and 1996 and 1998 finishes of A?
CREATE TABLE table_name_75 (tournament VARCHAR)
SELECT tournament FROM table_name_75 WHERE 1996 = "a" AND 1998 = "a" AND 1994 = "rr"
if the flm winning team is no. 99 jmb racing what is the name of the lmp2 winning team
CREATE TABLE table_29826467_2 (lmp2_winning_team VARCHAR, flm_winning_team VARCHAR)
SELECT lmp2_winning_team FROM table_29826467_2 WHERE flm_winning_team = "No. 99 JMB Racing"
What is the Tie no of the Carlisle United Away game on 17/11/1990 with a Score of 5–0?
CREATE TABLE table_name_27 (tie_no VARCHAR, away_team VARCHAR, date VARCHAR, score VARCHAR)
SELECT tie_no FROM table_name_27 WHERE date = "17/11/1990" AND score = "5–0" AND away_team = "carlisle united"
Which Laps is the highest one that has a Time/Retired of +3.370 secs?
CREATE TABLE table_name_52 (laps INTEGER, time_retired VARCHAR)
SELECT MAX(laps) FROM table_name_52 WHERE time_retired = "+3.370 secs"
What is the average no opinion score during 1954 November that is more favorable than 35?
CREATE TABLE table_name_94 (no_opinion INTEGER, date VARCHAR, favorable VARCHAR)
SELECT AVG(no_opinion) FROM table_name_94 WHERE date = "1954 november" AND favorable > 35
What was the Constructor for the race that had Derek Warwick as its Fastest Lap?
CREATE TABLE table_name_36 (constructor VARCHAR, fastest_lap VARCHAR)
SELECT constructor FROM table_name_36 WHERE fastest_lap = "derek warwick"
Who is the shirt sponsor for FC Bunyodkor?
CREATE TABLE table_25527255_2 (shirt_sponsor VARCHAR, team VARCHAR)
SELECT shirt_sponsor FROM table_25527255_2 WHERE team = "FC Bunyodkor"
Which school year was the Class AAA dalhart and the class AAAAA edinburg?
CREATE TABLE table_name_73 (school_year VARCHAR, class_aAA VARCHAR, dalhart VARCHAR, class_aAAAA VARCHAR, edinburg VARCHAR)
SELECT school_year FROM table_name_73 WHERE class_aAA = dalhart AND class_aAAAA = edinburg
Show all the Store_Name of drama workshop groups.
CREATE TABLE Drama_Workshop_Groups (Store_Name VARCHAR)
SELECT Store_Name FROM Drama_Workshop_Groups
Which NHL team has a League from of western hockey league and a Pick # smaller than 23 and a Team from of prince george cougars?
CREATE TABLE table_name_97 (nhl_team VARCHAR, team_from VARCHAR, league_from VARCHAR, pick__number VARCHAR)
SELECT nhl_team FROM table_name_97 WHERE league_from = "western hockey league" AND pick__number < 23 AND team_from = "prince george cougars"
What is the team when the economy is 5.73?
CREATE TABLE table_27268238_5 (team VARCHAR, economy VARCHAR)
SELECT team FROM table_27268238_5 WHERE economy = "5.73"
How many games did they play on october 9?
CREATE TABLE table_27539808_3 (opponent VARCHAR, october VARCHAR)
SELECT COUNT(opponent) FROM table_27539808_3 WHERE october = 9
What is the township at longitude -100.680772?
CREATE TABLE table_18600760_18 (township VARCHAR, longitude VARCHAR)
SELECT township FROM table_18600760_18 WHERE longitude = "-100.680772"
What is GDP 2012 Millions of Euro, when Population in Millions is less than 1.3, and when GDP (Nominal) Per Capita 2012 Euro is 20,700(p)?
CREATE TABLE table_name_51 (gdp_2012_millions_of_euro VARCHAR, population_in_millions VARCHAR, gdp__nominal__per_capita_2012_euro VARCHAR)
SELECT gdp_2012_millions_of_euro FROM table_name_51 WHERE population_in_millions < 1.3 AND gdp__nominal__per_capita_2012_euro = "20,700(p)"
How many areas are named West Isles?
CREATE TABLE table_170969_2 (area_km_2 VARCHAR, official_name VARCHAR)
SELECT COUNT(area_km_2) FROM table_170969_2 WHERE official_name = "West Isles"
How many losses did the team, Sturt, have when they had more than 0 wins?
CREATE TABLE table_name_85 (losses VARCHAR, team VARCHAR, wins VARCHAR)
SELECT COUNT(losses) FROM table_name_85 WHERE team = "sturt" AND wins > 0
Who was the home team of the game at the time of 14:00?
CREATE TABLE table_name_53 (home VARCHAR, time VARCHAR)
SELECT home FROM table_name_53 WHERE time = "14:00"
Who won Miss Universe Philippines when the first runner-up was Danielle Castaño and Janina San Miguel won Binibining Pilipinas-World?
CREATE TABLE table_name_82 (miss_universe_philippines VARCHAR, first_runner_up VARCHAR, binibining_pilipinas_world VARCHAR)
SELECT miss_universe_philippines FROM table_name_82 WHERE first_runner_up = "danielle castaño" AND binibining_pilipinas_world = "janina san miguel"
During which stage was gatorade the Trofeo Fast Team?
CREATE TABLE table_name_35 (stage VARCHAR, trofeo_fast_team VARCHAR)
SELECT stage FROM table_name_35 WHERE trofeo_fast_team = "gatorade"
Who voiced Drizella in the English version?
CREATE TABLE table_25173505_15 (english_version VARCHAR, character VARCHAR)
SELECT english_version FROM table_25173505_15 WHERE character = "Drizella"
What was the record for the game on Sept. 14?
CREATE TABLE table_16677887_2 (record VARCHAR, date VARCHAR)
SELECT record FROM table_16677887_2 WHERE date = "Sept. 14"
What is the candidates for fred e. busbey?
CREATE TABLE table_1342149_13 (candidates VARCHAR, incumbent VARCHAR)
SELECT candidates FROM table_1342149_13 WHERE incumbent = "Fred E. Busbey"
What was the HT for the game at Zagreb, with a full-time score of 0-2?
CREATE TABLE table_name_54 (ht VARCHAR, venue VARCHAR, score VARCHAR)
SELECT ht FROM table_name_54 WHERE venue = "zagreb" AND score = "0-2"
What is the Nationality for the university of wisconsin (wcha), and a Player of bob lundeen?
CREATE TABLE table_name_30 (nationality VARCHAR, college_junior_club_team VARCHAR, player VARCHAR)
SELECT nationality FROM table_name_30 WHERE college_junior_club_team = "university of wisconsin (wcha)" AND player = "bob lundeen"
What date has an against of 7?
CREATE TABLE table_name_95 (date VARCHAR, against VARCHAR)
SELECT date FROM table_name_95 WHERE against = 7
How many parties do we have?
CREATE TABLE party (party_name VARCHAR)
SELECT COUNT(DISTINCT party_name) FROM party
What was the away team score at the game held on 17 August 1935?
CREATE TABLE table_name_65 (away_team VARCHAR, date VARCHAR)
SELECT away_team AS score FROM table_name_65 WHERE date = "17 august 1935"
WHAT WAS THE LOWEST CAR # WITH SON-E-WA, AND 2012 START YEAR?
CREATE TABLE table_name_11 (car__number INTEGER, current_car VARCHAR, year_started VARCHAR)
SELECT MIN(car__number) FROM table_name_11 WHERE current_car = "son-e-wa" AND year_started < 2012
Show the years, book titles, and publishers for all books, in descending order by year.
CREATE TABLE book_club (YEAR VARCHAR, book_title VARCHAR, publisher VARCHAR)
SELECT YEAR, book_title, publisher FROM book_club ORDER BY YEAR DESC
Find the number of phones for each accreditation type.
CREATE TABLE phone (Accreditation_type VARCHAR)
SELECT Accreditation_type, COUNT(*) FROM phone GROUP BY Accreditation_type
what is the airport for the country tunisia with the icao dtaa?
CREATE TABLE table_name_68 (airport VARCHAR, country VARCHAR, icao VARCHAR)
SELECT airport FROM table_name_68 WHERE country = "tunisia" AND icao = "dtaa"
What Engine does the w123.026 chassis have?
CREATE TABLE table_name_53 (engine VARCHAR, chassis_code VARCHAR)
SELECT engine FROM table_name_53 WHERE chassis_code = "w123.026"
if the matches are 16 what is the wc matches
CREATE TABLE table_30085411_1 (WC INTEGER, matches VARCHAR)
SELECT MAX(WC) AS matches FROM table_30085411_1 WHERE matches = 16
How many Total medals did the country with 16 Silver and less than 32 Bronze receive?
CREATE TABLE table_name_65 (total INTEGER, silver VARCHAR, bronze VARCHAR)
SELECT MIN(total) FROM table_name_65 WHERE silver = 16 AND bronze < 32
When steve mcclaren is the replacer what is the manner of departure?
CREATE TABLE table_24162080_3 (manner_of_departure VARCHAR, replaced_by VARCHAR)
SELECT manner_of_departure FROM table_24162080_3 WHERE replaced_by = "Steve McClaren"
Which race had a distance of 4 miles where the runner-up was not known?
CREATE TABLE table_name_22 (race_name VARCHAR, dist__miles_ VARCHAR, runner_up VARCHAR)
SELECT race_name FROM table_name_22 WHERE dist__miles_ = "4" AND runner_up = "not known"
Which Total has a League Cup smaller than 0?
CREATE TABLE table_name_69 (total INTEGER, league_cup INTEGER)
SELECT MAX(total) FROM table_name_69 WHERE league_cup < 0
What is the total rank with more than 392 total points and an 24.8 average?
CREATE TABLE table_name_12 (rank_by_average VARCHAR, total_points VARCHAR, average VARCHAR)
SELECT COUNT(rank_by_average) FROM table_name_12 WHERE total_points > 392 AND average = 24.8
How many directors worked on the episode written by Brent Fletcher & Miranda Kwok?
CREATE TABLE table_23918997_1 (directed_by VARCHAR, written_by VARCHAR)
SELECT COUNT(directed_by) FROM table_23918997_1 WHERE written_by = "Brent Fletcher & Miranda Kwok"
Find the name of medication used on the patient who stays in room 111?
CREATE TABLE Prescribes (Patient VARCHAR, Medication VARCHAR); CREATE TABLE Medication (name VARCHAR, Code VARCHAR); CREATE TABLE patient (SSN VARCHAR); CREATE TABLE stay (Patient VARCHAR)
SELECT T4.name FROM stay AS T1 JOIN patient AS T2 ON T1.Patient = T2.SSN JOIN Prescribes AS T3 ON T3.Patient = T2.SSN JOIN Medication AS T4 ON T3.Medication = T4.Code WHERE room = 111
What was the lowest score.
CREATE TABLE table_24565004_21 (goals¹ INTEGER)
SELECT MIN(goals¹) FROM table_24565004_21
Name the median family income for riverside
CREATE TABLE table_1356555_2 (median_family_income VARCHAR, county VARCHAR)
SELECT median_family_income FROM table_1356555_2 WHERE county = "Riverside"
What week had attendance of 48,667?
CREATE TABLE table_name_59 (week VARCHAR, attendance VARCHAR)
SELECT COUNT(week) FROM table_name_59 WHERE attendance = 48 OFFSET 667
Which Score has a Game larger than 40, and a Record of 25-10-8?
CREATE TABLE table_name_81 (score VARCHAR, game VARCHAR, record VARCHAR)
SELECT score FROM table_name_81 WHERE game > 40 AND record = "25-10-8"
How many Latin Americans lived in 2011 in Saskatchewan?
CREATE TABLE table_1939405_2 (latin_americans_2011 INTEGER, province VARCHAR)
SELECT MIN(latin_americans_2011) FROM table_1939405_2 WHERE province = "Saskatchewan"
Who was in Human Resources & Operations when David Hornsby was in Academic & University Affairs?
CREATE TABLE table_name_56 (human_resources_ VARCHAR, _operations VARCHAR, academic_ VARCHAR, _university_affairs VARCHAR)
SELECT human_resources_ & _operations FROM table_name_56 WHERE academic_ & _university_affairs = "david hornsby"
What was the surface on the game with margit rüütel anett schutting as the opponent?
CREATE TABLE table_name_7 (surface VARCHAR, opponents VARCHAR)
SELECT surface FROM table_name_7 WHERE opponents = "margit rüütel anett schutting"
What is the total number of games at Toronto with less than 31 points?
CREATE TABLE table_name_87 (game VARCHAR, location VARCHAR, points VARCHAR)
SELECT COUNT(game) FROM table_name_87 WHERE location = "toronto" AND points < 31
Who got the most points in game number 5?
CREATE TABLE table_27312918_5 (high_points VARCHAR, game VARCHAR)
SELECT high_points FROM table_27312918_5 WHERE game = 5
What was the Score of the Spain F32, Gran Canaria Tournament?
CREATE TABLE table_name_70 (score VARCHAR, tournament VARCHAR)
SELECT score FROM table_name_70 WHERE tournament = "spain f32, gran canaria"
What is the production code for the episode that had 1.32 million U.S. viewers?
CREATE TABLE table_22347090_6 (production_code VARCHAR, us_viewers__million_ VARCHAR)
SELECT production_code FROM table_22347090_6 WHERE us_viewers__million_ = "1.32"
What is Score, when Home Team is "Manchester United"?
CREATE TABLE table_name_50 (score VARCHAR, home_team VARCHAR)
SELECT score FROM table_name_50 WHERE home_team = "manchester united"
Who won best actor?
CREATE TABLE table_25926120_3 (awardee_s_ VARCHAR, name_of_award VARCHAR)
SELECT awardee_s_ FROM table_25926120_3 WHERE name_of_award = "Best Actor"
What is the average number of goals with more than 9 points, less than 14 goals against, and a goal difference less than 17?
CREATE TABLE table_name_81 (goals_for INTEGER, goal_difference VARCHAR, points VARCHAR, goals_against VARCHAR)
SELECT AVG(goals_for) FROM table_name_81 WHERE points > 9 AND goals_against < 14 AND goal_difference < 17
When Tom Watson (5/6) won the Senior British Open who won the Senior PGA Championship?
CREATE TABLE table_name_41 (senior_pga_championship VARCHAR, senior_british_open VARCHAR)
SELECT senior_pga_championship FROM table_name_41 WHERE senior_british_open = "tom watson (5/6)"
When the laps driven were under 9 and the time/retired recorded was engine, what's the total number of grid values?
CREATE TABLE table_name_69 (grid VARCHAR, laps VARCHAR, time_retired VARCHAR)
SELECT COUNT(grid) FROM table_name_69 WHERE laps < 9 AND time_retired = "engine"
WHich Surface has an Opponent of gustavo kuerten?
CREATE TABLE table_name_13 (surface VARCHAR, opponent VARCHAR)
SELECT surface FROM table_name_13 WHERE opponent = "gustavo kuerten"
What is ICAO, when IATA is "HKG"?
CREATE TABLE table_name_99 (icao VARCHAR, iata VARCHAR)
SELECT icao FROM table_name_99 WHERE iata = "hkg"
What is Position, when Overallis less than 314, and when Pick is less than 8?
CREATE TABLE table_name_84 (position VARCHAR, overall VARCHAR, pick VARCHAR)
SELECT position FROM table_name_84 WHERE overall < 314 AND pick < 8
Name the start date with party of pd
CREATE TABLE table_name_28 (start_date VARCHAR, party VARCHAR)
SELECT start_date FROM table_name_28 WHERE party = "pd"
What was the attendance at the game when the record was 74-77?
CREATE TABLE table_name_5 (attendance VARCHAR, record VARCHAR)
SELECT attendance FROM table_name_5 WHERE record = "74-77"
Where did Richmond play as an away team?
CREATE TABLE table_name_70 (venue VARCHAR, away_team VARCHAR)
SELECT venue FROM table_name_70 WHERE away_team = "richmond"
What is the name of the game with a top prize of $888?
CREATE TABLE table_name_55 (game_name VARCHAR, top_prize VARCHAR)
SELECT game_name FROM table_name_55 WHERE top_prize = "$888"
How many racing points did England get?
CREATE TABLE table_23293785_3 (race_total_pts_ INTEGER, country VARCHAR)
SELECT MAX(race_total_pts_) FROM table_23293785_3 WHERE country = "England"
I want the tuner for hybrid video recorder and Digital of dvb-t (zl10353), and a Model of hvr-900
CREATE TABLE table_name_32 (tuner VARCHAR, model VARCHAR, type VARCHAR, digital VARCHAR)
SELECT tuner FROM table_name_32 WHERE type = "hybrid video recorder" AND digital = "dvb-t (zl10353)" AND model = "hvr-900"
What is the date for the UTC time of 03:15:46?
CREATE TABLE table_26950408_1 (date__yyyy_mm_dd_ VARCHAR, time___utc__ VARCHAR)
SELECT date__yyyy_mm_dd_ FROM table_26950408_1 WHERE time___utc__ = "03:15:46"
What are the staff ids and genders of all staffs whose job title is Department Manager?
CREATE TABLE staff_department_assignments (staff_id VARCHAR, job_title_code VARCHAR); CREATE TABLE staff (staff_id VARCHAR, staff_gender VARCHAR)
SELECT T1.staff_id, T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.job_title_code = "Department Manager"
WHAT TEAM HAS A PICK LARGER THAN 29?
CREATE TABLE table_name_59 (team VARCHAR, pick INTEGER)
SELECT team FROM table_name_59 WHERE pick > 29
Who is the coach for the Adelaide Galaxy team?
CREATE TABLE table_name_95 (coach VARCHAR, team VARCHAR)
SELECT coach FROM table_name_95 WHERE team = "adelaide galaxy"
What was the team that scored 56 points?Qh
CREATE TABLE table_25369796_1 (team VARCHAR, points VARCHAR)
SELECT team FROM table_25369796_1 WHERE points = "56"
What country is Nick Price from?
CREATE TABLE table_name_35 (country VARCHAR, player VARCHAR)
SELECT country FROM table_name_35 WHERE player = "nick price"
Name the result for venue of lord's
CREATE TABLE table_name_82 (result VARCHAR, venue VARCHAR)
SELECT result FROM table_name_82 WHERE venue = "lord's"
what is the population where the area (sq. mi.) is area (sq. mi.)?
CREATE TABLE table_12108_1 (population VARCHAR)
SELECT population FROM table_12108_1 WHERE "area__sq_mi_" = "area__sq_mi_"
What is the Place when Steve Pate was the player?
CREATE TABLE table_name_52 (place VARCHAR, player VARCHAR)
SELECT place FROM table_name_52 WHERE player = "steve pate"
Which number has Engine Shed as the location
CREATE TABLE table_142159_1 (no VARCHAR, location VARCHAR)
SELECT no FROM table_142159_1 WHERE location = "Engine shed"
What was the loss of the game that had an attendance of 18,769?
CREATE TABLE table_name_22 (loss VARCHAR, attendance VARCHAR)
SELECT loss FROM table_name_22 WHERE attendance = "18,769"
Which team was team 1 that had a team 2 that was la nuova piovese (veneto a)?
CREATE TABLE table_name_2 (team_1 VARCHAR, team_2 VARCHAR)
SELECT team_1 FROM table_name_2 WHERE team_2 = "la nuova piovese (veneto a)"
What game number had a record of 3-1?
CREATE TABLE table_20849830_1 (game VARCHAR, record VARCHAR)
SELECT game FROM table_20849830_1 WHERE record = "3-1"
What County scored with a speed of 98.09mph?
CREATE TABLE table_name_7 (country VARCHAR, speed VARCHAR)
SELECT country FROM table_name_7 WHERE speed = "98.09mph"
What is the attendance of the match with rosso kumamoto as the away team?
CREATE TABLE table_name_82 (attendance VARCHAR, away_team VARCHAR)
SELECT attendance FROM table_name_82 WHERE away_team = "rosso kumamoto"
What is Official Name, when Census Ranking is 769 of 5,008?
CREATE TABLE table_name_70 (official_name VARCHAR, census_ranking VARCHAR)
SELECT official_name FROM table_name_70 WHERE census_ranking = "769 of 5,008"
What is the date where the result was L 27-10 in a week before week 9?
CREATE TABLE table_name_94 (date VARCHAR, week VARCHAR, result VARCHAR)
SELECT date FROM table_name_94 WHERE week < 9 AND result = "l 27-10"
Show all template type codes and number of templates for each.
CREATE TABLE Templates (template_type_code VARCHAR)
SELECT template_type_code, COUNT(*) FROM Templates GROUP BY template_type_code
How many viewers in millions watched the episode with the production code 6acx16?
CREATE TABLE table_22261877_1 (us_viewers__million_ VARCHAR, production_code VARCHAR)
SELECT us_viewers__million_ FROM table_22261877_1 WHERE production_code = "6ACX16"
How many apartments do not have any facility?
CREATE TABLE Apartment_Facilities (apt_id VARCHAR); CREATE TABLE Apartments (apt_id VARCHAR)
SELECT COUNT(*) FROM Apartments WHERE NOT apt_id IN (SELECT apt_id FROM Apartment_Facilities)
In what place did hubert green score below 70 in the united states?
CREATE TABLE table_name_91 (place VARCHAR, player VARCHAR, score VARCHAR, country VARCHAR)
SELECT place FROM table_name_91 WHERE score < 70 AND country = "united states" AND player = "hubert green"
What country has the SBA Towers Tower Hayneville?
CREATE TABLE table_name_71 (country VARCHAR, name VARCHAR)
SELECT country FROM table_name_71 WHERE name = "sba towers tower hayneville"
which pilot is in charge of the most number of flights?
CREATE TABLE flight (pilot VARCHAR)
SELECT pilot FROM flight GROUP BY pilot ORDER BY COUNT(*) DESC LIMIT 1
What is the video ratio on channel 14.2?
CREATE TABLE table_name_75 (video VARCHAR, channel VARCHAR)
SELECT video FROM table_name_75 WHERE channel = 14.2