question
stringlengths
14
216
context
stringlengths
45
458
answer
stringlengths
18
463
What are the countries of perpetrators? Show each country and the corresponding number of perpetrators there.
create table perpetrator (country varchar, PRIMARY KEY (country))
select country, count(*) from perpetrator group by country
Show all product names and the total quantity ordered for each product name.
create table products (product_name varchar, product_id varchar, PRIMARY KEY (product_name)); create table order_items (product_quantity integer, product_id varchar, PRIMARY KEY (product_quantity))
select t2.product_name, sum(t1.product_quantity) from order_items as t1 join products as t2 on t1.product_id = t2.product_id group by t2.product_name
How many values of HDTV apply when television service is elite shopping tv?
create table table_15887683_16 (hdtv varchar, television_service varchar, PRIMARY KEY (hdtv))
select count(hdtv) from table_15887683_16 where television_service = "elite shopping tv"
What party did incumbent Wright Patman belong to?
create table table_1342149_43 (party varchar, incumbent varchar, PRIMARY KEY (party))
select party from table_1342149_43 where incumbent = "wright patman"
Who were the champions in years where michigan technological university was in third place?
create table table_2331549_1 (champion varchar, third_place varchar, PRIMARY KEY (champion))
select champion from table_2331549_1 where third_place = "michigan technological university"
What is 454 gs flx when pacbio is 100-500 mb?
create table table_127511_1 (pacbio varchar, PRIMARY KEY (pacbio))
select 454 as _gs_flx from table_127511_1 where pacbio = "100-500 mb"
Name the feb 2010 for january 2010 for 6.2%
create table table_25256368_1 (february_2010 varchar, january_2010 varchar, PRIMARY KEY (february_2010))
select february_2010 from table_25256368_1 where january_2010 = "6.2%"
When вуха (vúkha) is the belarusian how many slovaks are there?
create table table_26757_4 (slovak varchar, belarusian varchar, PRIMARY KEY (slovak))
select count(slovak) from table_26757_4 where belarusian = "вуха (vúkha)"
Find the number of distinct type of pets.
create table pets (pettype varchar, PRIMARY KEY (pettype))
select count(distinct pettype) from pets
How many aircrafts do we have?
create table aircraft (id varchar, PRIMARY KEY (id))
select count(*) from aircraft
What's Blanco Encalada's main artillery?
create table table_23614702_1 (main_artillery varchar, warship varchar, PRIMARY KEY (main_artillery))
select main_artillery from table_23614702_1 where warship = "blanco encalada"
Where tower height in ft (m) is 46ft (14.0m) the focal plane is ft (m).
create table table_25597136_1 (focal_plane_in_ft__m_ varchar, tower_height_in_ft__m_ varchar, PRIMARY KEY (focal_plane_in_ft__m_))
select focal_plane_in_ft__m_ from table_25597136_1 where tower_height_in_ft__m_ = "46ft (14.0m)"
What is the airport with the IATA MEL?
create table table_17419587_1 (airport varchar, iata varchar, PRIMARY KEY (airport))
select count(airport) from table_17419587_1 where iata = "mel"
If the position in table is 10th, and the manner of departure was resigned, what was the date of vacancy?
create table table_27133147_3 (date_of_vacancy varchar, manner_of_departure varchar, position_in_table varchar, PRIMARY KEY (date_of_vacancy))
select date_of_vacancy from table_27133147_3 where manner_of_departure = "resigned" and position_in_table = "10th"
Who directed the episode that was written by Bill Lawrence?
create table table_25547943_1 (directed_by varchar, written_by varchar, PRIMARY KEY (directed_by))
select directed_by from table_25547943_1 where written_by = "bill lawrence"
find the location and Representative name of the gas stations owned by the companies with top 3 Asset amounts.
create table gas_station (location varchar, representative_name varchar, station_id varchar, PRIMARY KEY (location)); create table station_company (company_id varchar, station_id varchar, PRIMARY KEY (company_id)); create table company (company_id varchar, assets_billion varchar, PRIMARY KEY (company_id))
select t3.location, t3.representative_name from station_company as t1 join company as t2 on t1.company_id = t2.company_id join gas_station as t3 on t1.station_id = t3.station_id order by t2.assets_billion desc limit 3
When western michigan is the tournament winner how many conferences are there?
create table table_24160890_3 (conference varchar, tournament_winner varchar, PRIMARY KEY (conference))
select count(conference) from table_24160890_3 where tournament_winner = "western michigan"
What are the code and description of the least frequent detention type ?
create table ref_detention_type (detention_type_description varchar, detention_type_code varchar, PRIMARY KEY (detention_type_description)); create table detention (detention_type_code varchar, PRIMARY KEY (detention_type_code))
select t1.detention_type_code, t2.detention_type_description from detention as t1 join ref_detention_type as t2 on t1.detention_type_code = t2.detention_type_code group by t1.detention_type_code order by count(*) limit 1
Whats the song of name with an original artist Garth Brooks
create table table_21501518_1 (song_choice varchar, original_artist varchar, PRIMARY KEY (song_choice))
select song_choice from table_21501518_1 where original_artist = "garth brooks"
how many original air date where family/families is the ryder family and the schwartz family
create table table_19897294_9 (original_air_date varchar, family_families varchar, PRIMARY KEY (original_air_date))
select count(original_air_date) from table_19897294_9 where family_families = "the ryder family and the schwartz family"
Name the real life for eventual outcome is amtrak
create table table_243664_1 (real_life_eventual_outcome varchar, currently¹_part_of varchar, PRIMARY KEY (real_life_eventual_outcome))
select real_life_eventual_outcome from table_243664_1 where currently¹_part_of = "amtrak"
What's the singer part number of the buttonholer whose storage case is a green plastic box?
create table table_28652521_1 (singer_part_number varchar, storage_case varchar, PRIMARY KEY (singer_part_number))
select singer_part_number from table_28652521_1 where storage_case = "green plastic box"
How many millions of U.S viewers are there when the director is andy wolk?
create table table_29747178_2 (us_viewers__million_ varchar, directed_by varchar, PRIMARY KEY (us_viewers__million_))
select us_viewers__million_ from table_29747178_2 where directed_by = "andy wolk"
How many times does an occurance happen in June when it happens on NOvember 3, 1975?
create table table_25235489_2 (june_10_11 varchar, november_3 varchar, PRIMARY KEY (june_10_11))
select count(june_10_11) from table_25235489_2 where november_3 = "november_3, 1975"
WHAT WAS HER SONG CHOICE WHEN THE WEEK WAS TOP 10?
create table table_15778392_1 (song_choice varchar, week__number varchar, PRIMARY KEY (song_choice))
select song_choice from table_15778392_1 where week__number = "top 10"
If the parallel bars is 14.025, what is the total number of gymnasts?
create table table_18662026_10 (gymnast varchar, parallel_bars varchar, PRIMARY KEY (gymnast))
select count(gymnast) from table_18662026_10 where parallel_bars = "14.025"
Show the name of the conductor that has conducted the most number of orchestras.
create table orchestra (conductor_id varchar, PRIMARY KEY (conductor_id)); create table conductor (name varchar, conductor_id varchar, PRIMARY KEY (name))
select t1.name from conductor as t1 join orchestra as t2 on t1.conductor_id = t2.conductor_id group by t2.conductor_id order by count(*) desc limit 1
what was the name of the episode that got 3.3 (millions) of u.s viewers?
create table table_21313327_1 (title varchar, us_viewers__millions_ varchar, PRIMARY KEY (title))
select title from table_21313327_1 where us_viewers__millions_ = "3.3"
What is the greatest number of Pakistanis admitted to Canada during those times when the number of Nepalis admitted was 627?
create table table_1717824_3 (pakistanis_admitted integer, nepalis_admitted varchar, PRIMARY KEY (pakistanis_admitted))
select max(pakistanis_admitted) from table_1717824_3 where nepalis_admitted = 627
Find the name of the students and their department names sorted by their total credits in ascending order.
create table student (name varchar, dept_name varchar, tot_cred varchar, PRIMARY KEY (name))
select name, dept_name from student order by tot_cred
How many distinct parties are there for representatives?
create table representative (party varchar, PRIMARY KEY (party))
select count(distinct party) from representative
Who won the Modena circuit?
create table table_1140116_5 (winning_driver varchar, circuit varchar, PRIMARY KEY (winning_driver))
select winning_driver from table_1140116_5 where circuit = "modena"
What is the poor law union on Marshalstown?
create table table_28802165_1 (poor_law_union varchar, townland varchar, PRIMARY KEY (poor_law_union))
select poor_law_union from table_28802165_1 where townland = "marshalstown"
Who was supporting in the round when the gt winning car was dino crescentini?
create table table_28490105_1 (supporting varchar, gt_winning_car varchar, PRIMARY KEY (supporting))
select supporting from table_28490105_1 where gt_winning_car = "dino crescentini"
What are the ids of the two department store chains with the largest number of department stores?
create table department_stores (dept_store_chain_id varchar, PRIMARY KEY (dept_store_chain_id))
select dept_store_chain_id from department_stores group by dept_store_chain_id order by count(*) desc limit 2
How many different SEC Win counts does the team with an overall record of 30-4 have?
create table table_22993636_2 (sec_wins varchar, overall_record varchar, PRIMARY KEY (sec_wins))
select count(sec_wins) from table_22993636_2 where overall_record = "30-4"
When momoiro clover z is the vocalist what is the japanese translation?
create table table_2144389_9 (japanese_translation varchar, vocalist varchar, PRIMARY KEY (japanese_translation))
select japanese_translation from table_2144389_9 where vocalist = "momoiro clover z"
How many race 3 winners were there when Mitch Evans won race 2?
create table table_22905641_2 (race_3_winner varchar, race_2_winner varchar, PRIMARY KEY (race_3_winner))
select count(race_3_winner) from table_22905641_2 where race_2_winner = "mitch evans"
Location for focal plane in ft (m) is naidi hills, basco.
create table table_25597136_1 (focal_plane_in_ft__m_ varchar, location varchar, PRIMARY KEY (focal_plane_in_ft__m_))
select focal_plane_in_ft__m_ from table_25597136_1 where location = "naidi hills, basco"
Find the list of page size which have more than 3 product listed
create table product (max_page_size varchar, PRIMARY KEY (max_page_size))
select max_page_size from product group by max_page_size having count(*) > 3
What is the pole position for the race with the fastest lap by Nelson Piquet and the constructor is Ferrari?
create table table_1140076_2 (pole_position varchar, fastest_lap varchar, constructor varchar, PRIMARY KEY (pole_position))
select pole_position from table_1140076_2 where fastest_lap = "nelson piquet" and constructor = "ferrari"
what is the arabic capital name wher the english capital name is manama?
create table table_15694696_1 (arabic_capital_name varchar, english_capital_name varchar, PRIMARY KEY (arabic_capital_name))
select arabic_capital_name from table_15694696_1 where english_capital_name = "manama"
What is every conflict in Iraq?
create table table_1921_1 (conflict varchar, location varchar, PRIMARY KEY (conflict))
select conflict from table_1921_1 where location = "iraq"
Name the votes given for michael russo, genevy dimitrion , manny ortega
create table table_1855841_1 (votes_given varchar, running_with__in_team_ varchar, PRIMARY KEY (votes_given))
select votes_given from table_1855841_1 where running_with__in_team_ = "michael russo, genevy dimitrion , manny ortega"
How many times has Sun Jin won the women's doubles?
create table table_28138035_33 (mens_doubles varchar, womens_singles varchar, PRIMARY KEY (mens_doubles))
select count(mens_doubles) from table_28138035_33 where womens_singles = "sun jin"
How many times was there a class A winner when Gregory-Portland was the class AAAA?
create table table_14603057_2 (class_a varchar, class_aaaa varchar, gregory varchar, portland varchar, PRIMARY KEY (class_a))
select count(class_a) from table_14603057_2 where class_aaaa = gregory - portland
What's the name of the team who had a Honda motorcycle?
create table table_20016339_1 (team varchar, motorcycle varchar, PRIMARY KEY (team))
select team from table_20016339_1 where motorcycle = "honda"
Which store owns most items?
create table inventory (store_id varchar, PRIMARY KEY (store_id))
select store_id from inventory group by store_id order by count(*) desc limit 1
Who is the percussionist for The Coral?
create table table_28715942_6 (vocal_percussionist varchar, original_artist varchar, PRIMARY KEY (vocal_percussionist))
select vocal_percussionist from table_28715942_6 where original_artist = "the coral"
How many houses are green?
create table table_11464746_1 (house_name varchar, colours varchar, PRIMARY KEY (house_name))
select count(house_name) from table_11464746_1 where colours = "green"
What are all the locations with a cinema?
create table cinema (location varchar, PRIMARY KEY (location))
select distinct location from cinema
What are the changes (2010 to 2011) where the International Tourist Arrivals is 1.7 million?
create table table_14752049_2 (change__2010_to_2011_ varchar, international_tourist_arrivals__2011_ varchar, PRIMARY KEY (change__2010_to_2011_))
select change__2010_to_2011_ from table_14752049_2 where international_tourist_arrivals__2011_ = "1.7 million"
Name the race caller for jim mckay and howard cosell
create table table_22514845_5 (race_caller varchar, s_host varchar, reporters varchar, PRIMARY KEY (race_caller))
select race_caller from table_22514845_5 where s_host = "jim mckay" and reporters = "howard cosell"
What are all the title directed by reginald hudlin
create table table_21994729_3 (title varchar, directed_by varchar, PRIMARY KEY (title))
select count(title) from table_21994729_3 where directed_by = "reginald hudlin"
Name the naming for fluent and poor comprehension
create table table_2088_1 (naming varchar, fluency varchar, auditory_comprehension varchar, PRIMARY KEY (naming))
select naming from table_2088_1 where fluency = "fluent" and auditory_comprehension = "poor"
What place did the Sake Tuyas come in when the Denim Demons were 4th?
create table table_29619494_2 (sake_tuyas varchar, denim_demons varchar, PRIMARY KEY (sake_tuyas))
select sake_tuyas from table_29619494_2 where denim_demons = "4th"
List the names of all distinct nurses ordered by alphabetical order?
create table nurse (name varchar, PRIMARY KEY (name))
select distinct name from nurse order by name
Where is the service pattern sydenham then fast to norwood junction?
create table table_1569516_1 (destination varchar, service_pattern varchar, PRIMARY KEY (destination))
select destination from table_1569516_1 where service_pattern = "sydenham then fast to norwood junction"
What is the name of the speaker if the chief minister is M.G. Ramachandran?
create table table_23512864_4 (speaker varchar, chief_minister varchar, PRIMARY KEY (speaker))
select speaker from table_23512864_4 where chief_minister = "m.g. ramachandran"
What is listed in p when the type is listed as free agent 1?
create table table_17634290_7 (p varchar, type varchar, PRIMARY KEY (p))
select p from table_17634290_7 where type = "free agent 1"
Which country has at most 3 stadiums listed?
create table stadium (country varchar, PRIMARY KEY (country))
select country from stadium group by country having count(*) <= 3
Find the name of amenities of the dorm where the student with last name Smith is living in.
create table student (stuid varchar, lname varchar, PRIMARY KEY (stuid)); create table dorm (dormid varchar, PRIMARY KEY (dormid)); create table lives_in (dormid varchar, stuid varchar, PRIMARY KEY (dormid)); create table has_amenity (dormid varchar, amenid varchar, PRIMARY KEY (dormid)); create table dorm_amenity (amenity_name varchar, amenid varchar, PRIMARY KEY (amenity_name))
select t3.amenity_name from dorm as t1 join has_amenity as t2 on t1.dormid = t2.dormid join dorm_amenity as t3 on t2.amenid = t3.amenid join lives_in as t4 on t4.dormid = t1.dormid join student as t5 on t5.stuid = t4.stuid where t5.lname = 'smith'
What is the population for the place with an area of 2.33 km2?
create table table_2588674_1 (population__2000_census__ integer, area_km² varchar, PRIMARY KEY (population__2000_census__))
select max(population__2000_census__) from table_2588674_1 where area_km² = "2.33"
What was the passing result for the measure with 61307 no votes?
create table table_256286_19 (passed varchar, no_votes varchar, PRIMARY KEY (passed))
select passed from table_256286_19 where no_votes = 61307
What is the propulsion when the vessel is marianarray?
create table table_28132970_5 (propulsion varchar, vessel varchar, PRIMARY KEY (propulsion))
select propulsion from table_28132970_5 where vessel = "marianarray"
how many callsigns are for the branding telemundo 47
create table table_1979203_1 (callsign varchar, branding varchar, PRIMARY KEY (callsign))
select count(callsign) from table_1979203_1 where branding = "telemundo 47"
What was the original air date of the episode written by Michelle Offen?
create table table_19517621_4 (original_airdate varchar, written_by varchar, PRIMARY KEY (original_airdate))
select original_airdate from table_19517621_4 where written_by = "michelle offen"
Who directed the episode written by Jason Yoshimura?
create table table_2345558_1 (director varchar, writer_s_ varchar, PRIMARY KEY (director))
select director from table_2345558_1 where writer_s_ = "jason yoshimura"
Who was the successor for the new seat?
create table table_2147588_3 (successor varchar, vacator varchar, PRIMARY KEY (successor))
select successor from table_2147588_3 where vacator = "new seat"
What is the prize money for Virginia?
create table table_11622496_1 (location varchar, PRIMARY KEY (location))
select 1 as st_prize__$__ from table_11622496_1 where location = "virginia"
How many sports do we have?
create table sportsinfo (sportname varchar, PRIMARY KEY (sportname))
select count(distinct sportname) from sportsinfo
Name the number of class aa for bridgeport and 1999-2000
create table table_14601528_2 (class_aa varchar, class_aaa varchar, bridgeport varchar, school_year varchar, PRIMARY KEY (class_aa))
select count(class_aa) from table_14601528_2 where class_aaa = bridgeport and school_year = "1999-2000"
What brakes for the 4-speed automatic gearbox?
create table table_250230_2 (brakes varchar, gearbox varchar, PRIMARY KEY (brakes))
select brakes from table_250230_2 where gearbox = "4-speed automatic"
Give me a list of all spanish officer titles that could receive recognition as group captain in english
create table table_1015521_2 (rank_in_english varchar, commonwealth_equivalent varchar, PRIMARY KEY (rank_in_english))
select rank_in_english from table_1015521_2 where commonwealth_equivalent = "group captain"
How many parties does william b. cravens represent?
create table table_1342292_4 (party varchar, incumbent varchar, PRIMARY KEY (party))
select count(party) from table_1342292_4 where incumbent = "william b. cravens"
What was the urban settlement when the city / municipality was kovin?
create table table_2562572_7 (urban_settlement varchar, city___municipality varchar, PRIMARY KEY (urban_settlement))
select urban_settlement from table_2562572_7 where city___municipality = "kovin"
What was the department that got $626,798 in local investments?
create table table_17118006_2 (department varchar, local_investment__us$_ varchar, PRIMARY KEY (department))
select department from table_17118006_2 where local_investment__us$_ = "626,798"
What is the prize pool if the entries is 1,132?
create table table_2534387_11 (prize varchar, entries varchar, PRIMARY KEY (prize))
select prize as pool from table_2534387_11 where entries = "1,132"
List document type codes and the number of documents in each code.
create table documents (document_type_code varchar, PRIMARY KEY (document_type_code))
select document_type_code, count(*) from documents group by document_type_code
What day was kibawe created?
create table table_261222_1 (date_of_creation varchar, city___municipality varchar, PRIMARY KEY (date_of_creation))
select date_of_creation from table_261222_1 where city___municipality = "kibawe"
What is every media type for the Psychedelic Trance genre?
create table table_23829490_1 (media_type varchar, genre varchar, PRIMARY KEY (media_type))
select media_type from table_23829490_1 where genre = "psychedelic trance"
How many women from Uruguay has become third runner-up in this pageant?
create table table_29942205_1 (country_territory varchar, PRIMARY KEY (country_territory))
select count(*) from table_29942205_1 where country_territory = "uruguay"
What is the name of the claim processing stage that most of the claims are on?
create table claims_processing (claim_stage_id varchar, PRIMARY KEY (claim_stage_id)); create table claims_processing_stages (claim_status_name varchar, claim_stage_id varchar, PRIMARY KEY (claim_status_name))
select t2.claim_status_name from claims_processing as t1 join claims_processing_stages as t2 on t1.claim_stage_id = t2.claim_stage_id group by t1.claim_stage_id order by count(*) desc limit 1
What is the rev of the 2003-2004 Mustang Cobra?
create table table_1310499_1 (rev varchar, application varchar, PRIMARY KEY (rev))
select rev from table_1310499_1 where application = "2003-2004 mustang cobra"
Name the 26 august 2005 asian record
create table table_24011830_2 (world_record varchar, PRIMARY KEY (world_record))
select 26 as _august_2005 from table_24011830_2 where world_record = "asian record"
What are all the run times with 8.2 million viewers?
create table table_1429629_1 (run_time varchar, viewers__in_millions_ varchar, PRIMARY KEY (run_time))
select run_time from table_1429629_1 where viewers__in_millions_ = "8.2"
Name the total number of opponent of record 9-2
create table table_17186229_4 (opponent varchar, record varchar, PRIMARY KEY (opponent))
select count(opponent) from table_17186229_4 where record = "9-2"
How many vacancies happened on 25 May?
create table table_17327458_1 (manner_of_departure varchar, date_of_vacancy varchar, PRIMARY KEY (manner_of_departure))
select count(manner_of_departure) from table_17327458_1 where date_of_vacancy = "25 may"
Name the parishes for beira baixa province
create table table_221375_1 (parishes varchar, province_of_1936 varchar, PRIMARY KEY (parishes))
select count(parishes) from table_221375_1 where province_of_1936 = "beira baixa province"
What was the team's record when they played at Rheinenergiestadion?
create table table_24989925_2 (team_record varchar, game_site varchar, PRIMARY KEY (team_record))
select team_record from table_24989925_2 where game_site = "rheinenergiestadion"
How many players has the highest points in the game against the Heat?
create table table_23285849_6 (high_points varchar, team varchar, PRIMARY KEY (high_points))
select count(high_points) from table_23285849_6 where team = "heat"
How many records show Utah as the opponent?
create table table_22815265_1 (record varchar, opponent varchar, PRIMARY KEY (record))
select count(record) from table_22815265_1 where opponent = "utah"
Name the lunar landing site for 19 november 1969
create table table_1558077_8 (lunar_landing_site varchar, lunar_landing_date varchar, PRIMARY KEY (lunar_landing_site))
select lunar_landing_site from table_1558077_8 where lunar_landing_date = "19 november 1969"
Name the republican steve sauerberg where dates administered september 15-september 18, 2008
create table table_16751596_2 (republican varchar, dates_administered varchar, PRIMARY KEY (republican))
select republican from table_16751596_2 where dates_administered = "september 15-september 18, 2008"
When chris barnes is on team usa how many europe teams are there?
create table table_19072602_3 (team_europe varchar, team_usa varchar, PRIMARY KEY (team_europe))
select count(team_europe) from table_19072602_3 where team_usa = "chris barnes"
What are the racing teams for which the average finish is 23.3?
create table table_2190919_1 (team_s_ varchar, avg_finish varchar, PRIMARY KEY (team_s_))
select team_s_ from table_2190919_1 where avg_finish = "23.3"
What are the names of the stations which serve both "Ananthapuri Express" and "Guruvayur Express" trains?
create table station (name varchar, station_id varchar, PRIMARY KEY (name)); create table train (train_id varchar, name varchar, PRIMARY KEY (train_id)); create table train_station (station_id varchar, train_id varchar, PRIMARY KEY (station_id))
select t2.name from train_station as t1 join station as t2 on t1.station_id = t2.station_id join train as t3 on t3.train_id = t1.train_id where t3.name = "ananthapuri express" intersect select t2.name from train_station as t1 join station as t2 on t1.station_id = t2.station_id join train as t3 on t3.train_id = t1.train_id where t3.name = "guruvayur express"
Who played in the semi finals matches at the Buick WCT finals?
create table table_2413292_1 (semifinal_matches varchar, commercial_name varchar, PRIMARY KEY (semifinal_matches))
select semifinal_matches from table_2413292_1 where commercial_name = "buick wct finals"
What race number had sail number AUS 98888?
create table table_20854943_2 (race_number varchar, sail_number varchar, PRIMARY KEY (race_number))
select race_number from table_20854943_2 where sail_number = "aus 98888"
How many states had a population density of 10188.8?
create table table_22916979_1 (state varchar, population_density__people_per_mi_2__ varchar, PRIMARY KEY (state))
select count(state) from table_22916979_1 where population_density__people_per_mi_2__ = "10188.8"