question
stringlengths
14
216
context
stringlengths
45
458
answer
stringlengths
18
463
Find the number of players for each hand type.
create table players (hand varchar, PRIMARY KEY (hand))
select count(*), hand from players group by hand
How had the high points when the high assists were from J. Johnson (7)?
create table table_11961582_10 (high_points varchar, high_assists varchar, PRIMARY KEY (high_points))
select high_points from table_11961582_10 where high_assists = "j. johnson (7)"
What is the average and total transaction amount?
create table financial_transactions (transaction_amount integer, PRIMARY KEY (transaction_amount))
select avg(transaction_amount), sum(transaction_amount) from financial_transactions
what is the state for reason for change is resigned may 15, 1820?
create table table_225099_3 (state__class_ varchar, reason_for_change varchar, PRIMARY KEY (state__class_))
select state__class_ from table_225099_3 where reason_for_change = "resigned may 15, 1820"
What are the nationalities that are shared by at least two people?
create table people (nationality varchar, PRIMARY KEY (nationality))
select nationality from people group by nationality having count(*) >= 2
List the distinct police forces of counties whose location is not on east side.
create table county_public_safety (police_force varchar, location varchar, PRIMARY KEY (police_force))
select distinct police_force from county_public_safety where location <> "east"
what are all the open 1st viii with u15 4th iv being gt
create table table_11318462_5 (open_1st_viii varchar, u15_4th_iv varchar, PRIMARY KEY (open_1st_viii))
select open_1st_viii from table_11318462_5 where u15_4th_iv = "gt"
When tim mack is on team usa what is the progressive total?
create table table_19072602_3 (progressive_total varchar, team_usa varchar, PRIMARY KEY (progressive_total))
select progressive_total from table_19072602_3 where team_usa = "tim mack"
What is the code of the school where the accounting department belongs to?
create table department (school_code varchar, dept_name varchar, PRIMARY KEY (school_code))
select school_code from department where dept_name = "accounting"
What is the family of the constellation that has lyncis /ˈlɪnsɨs/ as genitive?
create table table_287159_1 (family varchar, genitive varchar, PRIMARY KEY (family))
select family from table_287159_1 where genitive = "lyncis /ˈlɪnsɨs/"
Who is every vacator with reason for change as resigned December 31, 1959?
create table table_2159571_2 (vacator varchar, reason_for_change varchar, PRIMARY KEY (vacator))
select vacator from table_2159571_2 where reason_for_change = "resigned december 31, 1959"
How many times was team 1 the wykeham wonderers?
create table table_18733480_1 (players_left_after_round_1 varchar, team_1 varchar, PRIMARY KEY (players_left_after_round_1))
select count(players_left_after_round_1) from table_18733480_1 where team_1 = "wykeham wonderers"
display the department name and number of employees in each of the department.
create table employees (department_id varchar, PRIMARY KEY (department_id)); create table departments (department_id varchar, PRIMARY KEY (department_id))
select department_name, count(*) from employees as t1 join departments as t2 on t1.department_id = t2.department_id group by department_name
What is the modified torque (lb/ft) when the standard hp n/a?
create table table_19704392_1 (modified_torque__lb_ft_ varchar, standard_hp varchar, PRIMARY KEY (modified_torque__lb_ft_))
select count(modified_torque__lb_ft_) from table_19704392_1 where standard_hp = "n/a"
What is the 20 year for Sulfur Hexafluoride?
create table table_21350772_2 (gas_name varchar, PRIMARY KEY (gas_name))
select 20 as _yr from table_21350772_2 where gas_name = "sulfur hexafluoride"
what is the total number of reasons for change where the date the successor was seated is june 8, 1876?
create table table_2192067_4 (reason_for_change varchar, date_successor_seated varchar, PRIMARY KEY (reason_for_change))
select count(reason_for_change) from table_2192067_4 where date_successor_seated = "june 8, 1876"
What is every value for % 20-39 if % 60-74 is 10,46%?
create table table_23606500_4 (_percentage_20_39 varchar, _percentage_60_74 varchar, PRIMARY KEY (_percentage_20_39))
select _percentage_20_39 from table_23606500_4 where _percentage_60_74 = "10,46%"
What is the Hadeda Ibis when the Whitefaced Duck is Blacksmith Plover?
create table table_20042805_2 (hadeda_ibis varchar, whitefaced_duck varchar, PRIMARY KEY (hadeda_ibis))
select hadeda_ibis from table_20042805_2 where whitefaced_duck = "blacksmith plover"
What record was set when the result/game was montreal 20 @ ottawa 10?
create table table_21436373_8 (type_of_record varchar, result_games varchar, PRIMARY KEY (type_of_record))
select type_of_record from table_21436373_8 where result_games = "montreal 20 @ ottawa 10"
who directed the episode that have 0.25 million u.s viewers
create table table_29803475_3 (directed_by varchar, us_viewers__million_ varchar, PRIMARY KEY (directed_by))
select directed_by from table_29803475_3 where us_viewers__million_ = "0.25"
what are all the adversary where the beginning is 1899
create table table_2846320_4 (rival varchar, first_meeting varchar, PRIMARY KEY (rival))
select rival from table_2846320_4 where first_meeting = 1899
Who was the cover model when the issue's pictorials was pmoy - sara jean underwood?
create table table_1566852_8 (cover_model varchar, pictorials varchar, PRIMARY KEY (cover_model))
select cover_model from table_1566852_8 where pictorials = "pmoy - sara jean underwood"
What is the percent for in manitoba?
create table table_120778_1 (percent_for varchar, jurisdiction varchar, PRIMARY KEY (percent_for))
select percent_for from table_120778_1 where jurisdiction = "manitoba"
What is the position of tickets sold/available when the sellout is 82%?
create table table_16331025_2 (tickets_sold___available varchar, sellout___percentage_ varchar, PRIMARY KEY (tickets_sold___available))
select count(tickets_sold___available) from table_16331025_2 where sellout___percentage_ = "82%"
Hom many albums does the artist "Metallica" have?
create table artist (artistid varchar, name varchar, PRIMARY KEY (artistid)); create table album (artistid varchar, PRIMARY KEY (artistid))
select count(*) from album as t1 join artist as t2 on t1.artistid = t2.artistid where t2.name = "metallica"
Find the branch names of banks in the New York state.
create table bank (bname varchar, state varchar, PRIMARY KEY (bname))
select bname from bank where state = 'new york'
Show ids for all transactions whose amounts are greater than the average.
create table financial_transactions (transaction_id varchar, transaction_amount integer, PRIMARY KEY (transaction_id))
select transaction_id from financial_transactions where transaction_amount > (select avg(transaction_amount) from financial_transactions)
what type of record was made where result/games is 10 games (29,606 avg.)
create table table_21436373_12 (type_of_record varchar, result_games varchar, PRIMARY KEY (type_of_record))
select type_of_record from table_21436373_12 where result_games = "10 games (29,606 avg.)"
What was the date of appointment for the manager replacing Kadir Özcan?
create table table_27091128_2 (date_of_appointment varchar, outgoing_manager varchar, PRIMARY KEY (date_of_appointment))
select date_of_appointment from table_27091128_2 where outgoing_manager = "kadir özcan"
What is the variant when Alexander was the bodybuilder?
create table table_28035004_1 (variant varchar, bodybuilder varchar, PRIMARY KEY (variant))
select variant from table_28035004_1 where bodybuilder = "alexander"
Which title, directed by David Kendall, had 3.7 million viewers?
create table table_18054886_1 (title varchar, viewers__millions_ varchar, directed_by varchar, PRIMARY KEY (title))
select title from table_18054886_1 where viewers__millions_ = "3.7" and directed_by = "david kendall"
If Safari is 3.76%, what is the other Mozilla amount?
create table table_1876262_10 (other_mozilla varchar, safari varchar, PRIMARY KEY (other_mozilla))
select other_mozilla from table_1876262_10 where safari = "3.76%"
Which school would you come across if you were in Kirksville?
create table table_2076463_2 (school varchar, location_s_ varchar, PRIMARY KEY (school))
select school from table_2076463_2 where location_s_ = "kirksville"
state el canal de las estrellas where mañana es para siempre is impreuna pentru totdeauna
create table table_18498743_1 (el_canal_de_las_estrellas varchar, mañana_es_para_siempre varchar, PRIMARY KEY (el_canal_de_las_estrellas))
select el_canal_de_las_estrellas from table_18498743_1 where mañana_es_para_siempre = "impreuna pentru totdeauna"
What is the density of yushan county?
create table table_1300525_1 (density varchar, english_name varchar, PRIMARY KEY (density))
select count(density) from table_1300525_1 where english_name = "yushan county"
What's the overall record of the team with 4-3 road record?
create table table_22993636_2 (overall_record varchar, road_record varchar, PRIMARY KEY (overall_record))
select overall_record from table_22993636_2 where road_record = "4-3"
How many parties were for candidates newt gingrich (r) 59.1% dock h. davis (d) 40.9%?
create table table_1341640_11 (party varchar, candidates varchar, PRIMARY KEY (party))
select count(party) from table_1341640_11 where candidates = "newt gingrich (r) 59.1% dock h. davis (d) 40.9%"
Name the date of birth for 27/07/86
create table table_22705586_1 (name varchar, date_of_birth varchar, PRIMARY KEY (name))
select name from table_22705586_1 where date_of_birth = "27/07/86"
Name who directed the episode by joe sachs and david zabel
create table table_17355743_1 (directed_by varchar, written_by varchar, PRIMARY KEY (directed_by))
select directed_by from table_17355743_1 where written_by = "joe sachs and david zabel"
What was the premiere date for the episode whose alternate title was miłość i przeznaczenie?
create table table_29799700_2 (series_premiere varchar, alternante_title varchar, PRIMARY KEY (series_premiere))
select series_premiere from table_29799700_2 where alternante_title = "miłość i przeznaczenie"
What is the director name is the U.S. viewers is 2.22 million?
create table table_23399481_2 (directed_by varchar, us_viewers__in_millions_ varchar, PRIMARY KEY (directed_by))
select directed_by from table_23399481_2 where us_viewers__in_millions_ = "2.22"
What are all the distinct premise types?
create table premises (premises_type varchar, PRIMARY KEY (premises_type))
select distinct premises_type from premises
Who wrote the episode that aired on September 26, 2010?
create table table_27169029_1 (written_by varchar, original_air_date varchar, PRIMARY KEY (written_by))
select written_by from table_27169029_1 where original_air_date = "september 26, 2010"
What were the years active where Asian Cup played as a captain is Iran 1976?
create table table_272865_20 (years_active varchar, asian_cup_played_as_a_captain varchar, PRIMARY KEY (years_active))
select years_active from table_272865_20 where asian_cup_played_as_a_captain = "iran 1976"
What is every origin for the destination of Manchester?
create table table_3005999_1 (origin varchar, destination varchar, PRIMARY KEY (origin))
select origin from table_3005999_1 where destination = "manchester"
Show all destinations and the number of flights to each destination.
create table flight (destination varchar, PRIMARY KEY (destination))
select destination, count(*) from flight group by destination
Who build the boat where Ken Read was the skipper?
create table table_19872699_1 (builder varchar, skipper varchar, PRIMARY KEY (builder))
select builder from table_19872699_1 where skipper = "ken read"
How many Spanish word is there for the Portuguese bem-vindo?
create table table_26614365_5 (spanish varchar, portuguese varchar, PRIMARY KEY (spanish))
select count(spanish) from table_26614365_5 where portuguese = "bem-vindo"
What is the id of the product that is booked for 3 times?
create table products_booked (product_id varchar, PRIMARY KEY (product_id))
select product_id from products_booked group by product_id having count(*) = 3
What was the epicenter latitude for the quake that started at 17:09?
create table table_25643046_1 (epicentre__lat varchar, _s_ varchar, origin_time varchar, PRIMARY KEY (epicentre__lat))
select epicentre__lat, _s_ from table_25643046_1 where origin_time = "17:09"
Show ids for all templates that are used by more than one document.
create table documents (template_id varchar, PRIMARY KEY (template_id))
select template_id from documents group by template_id having count(*) > 1
What is the average ROM size of phones produced by the company named "Nokia Corporation"?
create table phone (chip_model varchar, company_name varchar, PRIMARY KEY (chip_model)); create table chip_model (rom_mib integer, model_name varchar, PRIMARY KEY (rom_mib))
select avg(t1.rom_mib) from chip_model as t1 join phone as t2 on t1.model_name = t2.chip_model where t2.company_name = "nokia corporation"
Which play-by-play has mike milbury as the studio analyst and darren pang as the ice level reporters?
create table table_22485543_1 (play_by_play varchar, studio_analysts varchar, ice_level_reporters varchar, PRIMARY KEY (play_by_play))
select play_by_play from table_22485543_1 where studio_analysts = "mike milbury" and ice_level_reporters = "darren pang"
Name the party/s when the polling percentage was 6.3% in Dec 2008.
create table table_23680576_2 (party varchar, dec_2008 varchar, PRIMARY KEY (party))
select party from table_23680576_2 where dec_2008 = "6.3%"
Name the opponent for 11-1
create table table_22847880_2 (opponent varchar, record varchar, PRIMARY KEY (opponent))
select opponent from table_22847880_2 where record = "11-1"
What is the lowest number of states contested under apna dal?
create table table_22582663_1 (states_contested integer, party_name varchar, PRIMARY KEY (states_contested))
select min(states_contested) from table_22582663_1 where party_name = "apna dal"
How many airports are there per country? Order the countries by decreasing number of airports.
create table airports (country varchar, PRIMARY KEY (country))
select count(*), country from airports group by country order by count(*) desc
How many episodes aired on february 13, 1954?
create table table_15824796_3 (title varchar, original_air_date varchar, PRIMARY KEY (title))
select count(title) from table_15824796_3 where original_air_date = "february 13, 1954"
Find the most prominent max page size among all the products.
create table product (max_page_size varchar, PRIMARY KEY (max_page_size))
select max_page_size from product group by max_page_size order by count(*) desc limit 1
Who won the Men's Doubles when Guo Xin won the Women's Singles?
create table table_12164707_1 (mens_doubles varchar, womens_singles varchar, PRIMARY KEY (mens_doubles))
select mens_doubles from table_12164707_1 where womens_singles = "guo xin"
What is the unemployment rate for the county with a market income per capita of $20,958?
create table table_22815568_2 (unemployment_rate varchar, market_income_per_capita varchar, PRIMARY KEY (unemployment_rate))
select count(unemployment_rate) from table_22815568_2 where market_income_per_capita = "$20,958"
Name the original air date for 7 1-07
create table table_24222929_4 (original_airdate varchar, episode_number_production_number varchar, PRIMARY KEY (original_airdate))
select original_airdate from table_24222929_4 where episode_number_production_number = "7 1-07"
What is the population in millions for 2011 where the HDI for 2011 is 0.453 (low)?
create table table_2155836_1 (population__millions varchar, _2011_ varchar, hdi__2011_ varchar, PRIMARY KEY (population__millions))
select population__millions, _2011_ from table_2155836_1 where hdi__2011_ = "0.453 (low)"
Name the bush% for where others # is 90
create table table_1733457_1 (bush_percentage varchar, others_number varchar, PRIMARY KEY (bush_percentage))
select bush_percentage from table_1733457_1 where others_number = 90
What is the £1 fraction when the reverse is hare?
create table table_1682865_1 (£1_fraction varchar, reverse varchar, PRIMARY KEY (£1_fraction))
select £1_fraction from table_1682865_1 where reverse = "hare"
How many providers are there where the resale category is yes and bandwith is up is 1024?
create table table_1773908_3 (provider varchar, resale varchar, up__up_to_kbit_s_ varchar, PRIMARY KEY (provider))
select count(provider) from table_1773908_3 where resale = "yes" and up__up_to_kbit_s_ = 1024
which affiliation is james h. morrison part of
create table table_1341930_18 (party varchar, incumbent varchar, PRIMARY KEY (party))
select party from table_1341930_18 where incumbent = "james h. morrison"
Name the total number of moto2 winners for laguna seca
create table table_27948565_1 (moto2_winner varchar, circuit varchar, PRIMARY KEY (moto2_winner))
select count(moto2_winner) from table_27948565_1 where circuit = "laguna seca"
Who is the operator to Highbury & Islington?
create table table_1612760_1 (operator varchar, destination varchar, PRIMARY KEY (operator))
select operator from table_1612760_1 where destination = "highbury & islington"
How many backgrounds are there represented from Memphis, Tennessee?
create table table_1289860_2 (background varchar, hometown varchar, PRIMARY KEY (background))
select count(background) from table_1289860_2 where hometown = "memphis, tennessee"
What candidates ran in the election when john s. wood was the incumbent?
create table table_1342331_11 (candidates varchar, incumbent varchar, PRIMARY KEY (candidates))
select candidates from table_1342331_11 where incumbent = "john s. wood"
Who replaced when position in table is pre-season?
create table table_10592536_8 (replaced_by varchar, position_in_table varchar, PRIMARY KEY (replaced_by))
select replaced_by from table_10592536_8 where position_in_table = "pre-season"
Show the school name and type for schools without a school bus.
create table school_bus (school varchar, type varchar, school_id varchar, PRIMARY KEY (school)); create table school (school varchar, type varchar, school_id varchar, PRIMARY KEY (school))
select school, type from school where not school_id in (select school_id from school_bus)
what's the chroma format with scalable modes being snr- or spatial-scalable and intra dc precbeingion being 8, 9, 10
create table table_1376890_2 (chroma_format varchar, scalable_modes varchar, intra_dc_precision varchar, PRIMARY KEY (chroma_format))
select chroma_format from table_1376890_2 where scalable_modes = "snr- or spatial-scalable" and intra_dc_precision = "8, 9, 10"
What is the language of the malacca fm station?
create table table_1601792_3 (language varchar, station varchar, PRIMARY KEY (language))
select language from table_1601792_3 where station = "malacca fm"
What is the cpu of the calculator released in 1993?
create table table_11703336_1 (cpu varchar, year_released varchar, PRIMARY KEY (cpu))
select cpu from table_11703336_1 where year_released = "1993"
Name the crew chief for rhonda thorson
create table table_24535095_2 (crew_chief varchar, listed_owner_s_ varchar, PRIMARY KEY (crew_chief))
select crew_chief from table_24535095_2 where listed_owner_s_ = "rhonda thorson"
How many appointed archbishops were ordained as priests on December 20, 1959
create table table_1656555_1 (appointed varchar, ordained_priest varchar, PRIMARY KEY (appointed))
select count(appointed) as archbishop from table_1656555_1 where ordained_priest = "december 20, 1959"
What is the color of the grape whose wine products has the highest average price?
create table grapes (color varchar, grape varchar, PRIMARY KEY (color)); create table wine (grape varchar, PRIMARY KEY (grape))
select t1.color from grapes as t1 join wine as t2 on t1.grape = t2.grape group by t2.grape order by avg(price) desc limit 1
what is the pole position for france?
create table table_29686983_1 (pole_position varchar, country varchar, PRIMARY KEY (pole_position))
select pole_position from table_29686983_1 where country = "france"
List all role codes, role names, and role descriptions.
create table roles (role_code varchar, role_name varchar, role_description varchar, PRIMARY KEY (role_code))
select role_code, role_name, role_description from roles
Name the awardees for best special effects
create table table_24446718_3 (awardee_s_ varchar, name_of_award varchar, PRIMARY KEY (awardee_s_))
select awardee_s_ from table_24446718_3 where name_of_award = "best special effects"
How many number of athletes were in round of 64 was llagostera Vives ( esp ) l 6–2, 3–6, 5–7?
create table table_17289604_38 (athlete varchar, round_of_64 varchar, PRIMARY KEY (athlete))
select count(athlete) from table_17289604_38 where round_of_64 = "llagostera vives ( esp ) l 6–2, 3–6, 5–7"
Find the number of songs in all the studio albums.
create table songs (title varchar, songid varchar, PRIMARY KEY (title)); create table albums (aid varchar, PRIMARY KEY (aid)); create table tracklists (albumid varchar, songid varchar, PRIMARY KEY (albumid))
select count(distinct t3.title) from albums as t1 join tracklists as t2 on t1.aid = t2.albumid join songs as t3 on t2.songid = t3.songid where t1.type = "studio"
What is the most common major among female (sex is F) students?
create table student (major varchar, major varchar, sex varchar, PRIMARY KEY (major))
select major from student where sex = "f" group by major order by count(*) desc limit 1
Name the number of tenants for russia at the saransk stadium
create table table_28281704_1 (tenant varchar, country varchar, stadium varchar, PRIMARY KEY (tenant))
select count(tenant) from table_28281704_1 where country = "russia" and stadium = "saransk stadium"
At a Saginaw fare of $470.47, what is the fare to Lansing?
create table table_1637981_7 (lansing__lan_ varchar, saginaw__mbs_ varchar, PRIMARY KEY (lansing__lan_))
select lansing__lan_ from table_1637981_7 where saginaw__mbs_ = "$470.47"
How many deaths per year have 66.3 as the life expectancy females?
create table table_23423_2 (deaths_per_year varchar, life_expectancy_females varchar, PRIMARY KEY (deaths_per_year))
select deaths_per_year from table_23423_2 where life_expectancy_females = "66.3"
Name the peletier for systematics being million 1
create table table_260938_1 (peletier varchar, systematics varchar, PRIMARY KEY (peletier))
select peletier from table_260938_1 where systematics = "million 1"
What was the Friday June 3 practice time of the rider who did 20' 50.45 108.623mph on Thursday, June 2?
create table table_29218221_3 (fri_3_june varchar, thurs_2_june varchar, PRIMARY KEY (fri_3_june))
select fri_3_june from table_29218221_3 where thurs_2_june = "20' 50.45 108.623mph"
What episode titles have 20.94 million U.S. viewers?
create table table_16617025_1 (title varchar, us_viewers__millions_ varchar, PRIMARY KEY (title))
select title from table_16617025_1 where us_viewers__millions_ = "20.94"
What is zip code of customer with first name as Carole and last name as Bernhard?
create table addresses (zip_postcode varchar, address_id varchar, PRIMARY KEY (zip_postcode)); create table customers (customer_address_id varchar, first_name varchar, last_name varchar, PRIMARY KEY (customer_address_id))
select t2.zip_postcode from customers as t1 join addresses as t2 on t1.customer_address_id = t2.address_id where t1.first_name = "carole" and t1.last_name = "bernhard"
If the constellation is Gemini, what is the spectral type?
create table table_1820752_1 (spectral_type varchar, constellation varchar, PRIMARY KEY (spectral_type))
select spectral_type from table_1820752_1 where constellation = "gemini"
What was the result of the ballot that had a 52.49% yes vote percentage?
create table table_256286_22 (passed varchar, _percentage_yes varchar, PRIMARY KEY (passed))
select passed from table_256286_22 where _percentage_yes = "52.49%"
What are the the University of Richmond's school colors?
create table table_1221089_1 (colors varchar, institution varchar, PRIMARY KEY (colors))
select colors from table_1221089_1 where institution = "university of richmond"
Where is the nickname the Red Raiders?
create table table_26476336_2 (location varchar, team_nickname varchar, PRIMARY KEY (location))
select location from table_26476336_2 where team_nickname = "red raiders"
Show the average amount of transactions for different lots, ordered by average amount of transactions.
create table transactions (transaction_id varchar, PRIMARY KEY (transaction_id)); create table transactions_lots (lot_id varchar, transaction_id varchar, PRIMARY KEY (lot_id))
select t2.lot_id, avg(amount_of_transaction) from transactions as t1 join transactions_lots as t2 on t1.transaction_id = t2.transaction_id group by t2.lot_id order by avg(amount_of_transaction)
How many current drivers, as of March 20, 2010 does Denmark have?
create table table_19487922_2 (current_march_20 varchar, _2010 varchar, country varchar, PRIMARY KEY (current_march_20))
select current_march_20, _2010 from table_19487922_2 where country = "denmark"
How many different outcomes did the final with Paul McNamee as a partner have?
create table table_2201541_3 (outcome varchar, partner varchar, PRIMARY KEY (outcome))
select count(outcome) from table_2201541_3 where partner = "paul mcnamee"
What is the Cook PVI for the location that has a representative of Mike Thompson?
create table table_19283806_4 (cook_pvi varchar, representative varchar, PRIMARY KEY (cook_pvi))
select cook_pvi from table_19283806_4 where representative = "mike thompson"