question
stringlengths 14
216
| context
stringlengths 45
458
| answer
stringlengths 18
463
|
---|---|---|
How many bank branches are there? | create table bank (id varchar, PRIMARY KEY (id)) | select count(*) from bank |
How much was the transfer fee when n is 2? | create table table_22810095_8 (transfer_fee varchar, n varchar, PRIMARY KEY (transfer_fee)) | select transfer_fee from table_22810095_8 where n = 2 |
How many different source system code for the cmi cross references are there? | create table cmi_cross_references (source_system_code varchar, PRIMARY KEY (source_system_code)) | select count(distinct source_system_code) from cmi_cross_references |
How many different directors are associated with the writer Gaby Chiappe? | create table table_15026994_2 (director varchar, writer varchar, PRIMARY KEY (director)) | select count(director) from table_15026994_2 where writer = "gaby chiappe" |
What is the number of wounded figures associated with a complement of 22 off 637 men? | create table table_2596811_12 (wounded varchar, complement varchar, PRIMARY KEY (wounded)) | select count(wounded) from table_2596811_12 where complement = "22 off 637 men" |
What is every deduction for pyramids of 49? | create table table_21995420_6 (deductions varchar, pyramids varchar, PRIMARY KEY (deductions)) | select deductions from table_21995420_6 where pyramids = "49" |
Name the landesliga nord for freier tus regensburg | create table table_20181270_3 (landesliga_nord varchar, landesliga_mitte varchar, PRIMARY KEY (landesliga_nord)) | select landesliga_nord from table_20181270_3 where landesliga_mitte = "freier tus regensburg" |
what is the number of relapsing fever when malaria is 3000 | create table table_1007688_1 (relapsing_fever integer, malaria varchar, PRIMARY KEY (relapsing_fever)) | select min(relapsing_fever) from table_1007688_1 where malaria = "3000" |
Show all product names and the number of customers having an order on each product. | create table order_items (product_id varchar, order_id varchar, PRIMARY KEY (product_id)); create table orders (order_id varchar, PRIMARY KEY (order_id)); create table products (product_name varchar, product_id varchar, PRIMARY KEY (product_name)) | select t2.product_name, count(*) from order_items as t1 join products as t2 on t1.product_id = t2.product_id join orders as t3 on t3.order_id = t1.order_id group by t2.product_name |
Who was the runner up when the won by 4 strokes? | create table table_21649285_2 (runner_s__up varchar, margin_of_victory varchar, PRIMARY KEY (runner_s__up)) | select runner_s__up from table_21649285_2 where margin_of_victory = "4 strokes" |
Find the ids and names of stations from which at least 200 trips started. | create table trip (start_station_id varchar, start_station_name varchar, PRIMARY KEY (start_station_id)) | select start_station_id, start_station_name from trip group by start_station_name having count(*) >= 200 |
How many values were used to express the years at school of the Maryland team? | create table table_28744929_2 (years_at_school varchar, team varchar, PRIMARY KEY (years_at_school)) | select count(years_at_school) from table_28744929_2 where team = "maryland" |
Find the names of employees who never won any award in the evaluation. | create table evaluation (name varchar, employee_id varchar, PRIMARY KEY (name)); create table employee (name varchar, employee_id varchar, PRIMARY KEY (name)) | select name from employee where not employee_id in (select employee_id from evaluation) |
Name the color analyst for terry bowden and 17.2 | create table table_2724704_5 (color_analyst_s_ varchar, studio_analyst_s_ varchar, tv_rating varchar, PRIMARY KEY (color_analyst_s_)) | select color_analyst_s_ from table_2724704_5 where studio_analyst_s_ = "terry bowden" and tv_rating = "17.2" |
What is the id of the order which has the most items? | create table orders (order_id varchar, PRIMARY KEY (order_id)); create table order_items (order_id varchar, PRIMARY KEY (order_id)) | select t1.order_id from orders as t1 join order_items as t2 on t1.order_id = t2.order_id group by t1.order_id order by count(*) desc limit 1 |
What was the data on November 3, if the data on January 15-16 is January 15, 2010? | create table table_25216791_3 (november_3 varchar, january_15_16 varchar, PRIMARY KEY (november_3)) | select november_3 from table_25216791_3 where january_15_16 = "january 15, 2010" |
In what location were the January (°F) temperatures 30/17? | create table table_21980_1 (location varchar, january__°f_ varchar, PRIMARY KEY (location)) | select location from table_21980_1 where january__°f_ = "30/17" |
What was the team classification where andré greipel was the winner and had the points classification? | create table table_25655781_17 (team_classification varchar, winner varchar, points_classification varchar, PRIMARY KEY (team_classification)) | select team_classification from table_25655781_17 where winner = "andré greipel" and points_classification = "andré greipel" |
What was the arrival for Wansford, Peterborough East? | create table table_18332845_2 (arrival varchar, calling_at varchar, PRIMARY KEY (arrival)) | select arrival from table_18332845_2 where calling_at = "wansford, peterborough east" |
When 5 is the rank of 2011 what is the country? | create table table_293465_1 (country varchar, rank_2011 varchar, PRIMARY KEY (country)) | select country from table_293465_1 where rank_2011 = 5 |
list the card number of all members whose hometown address includes word "Kentucky". | create table member (card_number varchar, hometown varchar, PRIMARY KEY (card_number)) | select card_number from member where hometown like "%kentucky%" |
Name the most municipalities for alto alentejo province (partly ribatejo) | create table table_221375_1 (municipalities integer, province_of_1936 varchar, PRIMARY KEY (municipalities)) | select max(municipalities) from table_221375_1 where province_of_1936 = "alto alentejo province (partly ribatejo)" |
Name the english title for album # 2nd | create table table_1893815_1 (english_title varchar, album_number varchar, PRIMARY KEY (english_title)) | select english_title from table_1893815_1 where album_number = "2nd" |
When did Orville H. Browning (r) succeed? | create table table_2417330_3 (date_of_successors_formal_installation varchar, successor varchar, PRIMARY KEY (date_of_successors_formal_installation)) | select date_of_successors_formal_installation from table_2417330_3 where successor = "orville h. browning (r)" |
Name the location for abraham baldwin agricultural college | create table table_16734640_1 (location varchar, institution varchar, PRIMARY KEY (location)) | select location from table_16734640_1 where institution = "abraham baldwin agricultural college" |
Who is the winner with an elapsed time of 12 h 42 min? | create table table_22050544_1 (winner varchar, elapsed_time varchar, PRIMARY KEY (winner)) | select winner from table_22050544_1 where elapsed_time = "12 h 42 min" |
What was the free dance score in the event where compulsory dance score was 15.99? | create table table_22644589_4 (free_dance__fd_ varchar, compulsory_dance__cd_ varchar, PRIMARY KEY (free_dance__fd_)) | select free_dance__fd_ from table_22644589_4 where compulsory_dance__cd_ = "15.99" |
Find the names of departments that are located in Houston. | create table dept_locations (dnumber varchar, dlocation varchar, PRIMARY KEY (dnumber)); create table department (dname varchar, dnumber varchar, PRIMARY KEY (dname)) | select t1.dname from department as t1 join dept_locations as t2 on t1.dnumber = t2.dnumber where t2.dlocation = 'houston' |
When 10th, south west district 1 is the mens 2nd xi what is the ladies 1st xi? | create table table_21576644_2 (ladies_1st_xi varchar, mens_2nd_xi varchar, PRIMARY KEY (ladies_1st_xi)) | select ladies_1st_xi from table_21576644_2 where mens_2nd_xi = "10th, south west district 1" |
Name the january 15-16 where march 27-29 where march 29, 2006 | create table table_1708610_3 (january_15_16 varchar, march_27_29 varchar, PRIMARY KEY (january_15_16)) | select january_15_16 from table_1708610_3 where march_27_29 = "march 29, 2006" |
For all directors who directed more than one movie, return the titles of all movies directed by them, along with the director name. Sort by director name, then movie title. | create table movie (title varchar, director varchar, PRIMARY KEY (title)); create table movie (director varchar, title varchar, PRIMARY KEY (director)) | select t1.title, t1.director from movie as t1 join movie as t2 on t1.director = t2.director where t1.title <> t2.title order by t1.director, t1.title |
Which branding has the callsign of DXGH? | create table table_28794440_1 (branding varchar, callsign varchar, PRIMARY KEY (branding)) | select branding from table_28794440_1 where callsign = "dxgh" |
What material is made with a rounded, plain edge? | create table table_1307572_1 (composition varchar, edge varchar, PRIMARY KEY (composition)) | select composition from table_1307572_1 where edge = "rounded, plain" |
Find the dates of the tests taken with result "Pass". | create table student_tests_taken (date_test_taken varchar, test_result varchar, PRIMARY KEY (date_test_taken)) | select date_test_taken from student_tests_taken where test_result = "pass" |
What is the total number of titles written by Casey Johnson? | create table table_12419515_4 (title varchar, written_by varchar, PRIMARY KEY (title)) | select count(title) from table_12419515_4 where written_by = "casey johnson" |
What years did Birger Ruud win the FIS Nordic World Ski Championships? | create table table_174491_2 (fis_nordic_world_ski_championships varchar, winner varchar, PRIMARY KEY (fis_nordic_world_ski_championships)) | select fis_nordic_world_ski_championships from table_174491_2 where winner = "birger ruud" |
Name the number for fox news channel | create table table_15887683_8 (n° varchar, television_service varchar, PRIMARY KEY (n°)) | select n° from table_15887683_8 where television_service = "fox news channel" |
How many students have a food allergy? | create table has_allergy (allergy varchar, PRIMARY KEY (allergy)); create table allergy_type (allergy varchar, allergytype varchar, PRIMARY KEY (allergy)) | select count(*) from has_allergy as t1 join allergy_type as t2 on t1.allergy = t2.allergy where t2.allergytype = "food" |
Which song was picked that was originally performed by Marisa Monte? | create table table_27616663_1 (song_choice varchar, original_artist varchar, PRIMARY KEY (song_choice)) | select song_choice from table_27616663_1 where original_artist = "marisa monte" |
what is the worlds smallest population? | create table table_19017269_5 (world integer, PRIMARY KEY (world)) | select min(world) from table_19017269_5 |
What are the official languages of the countries of players from Maryland or Duke college? | create table country (official_native_language varchar, country_id varchar, PRIMARY KEY (official_native_language)); create table match_season (country varchar, college varchar, PRIMARY KEY (country)) | select t1.official_native_language from country as t1 join match_season as t2 on t1.country_id = t2.country where t2.college = "maryland" or t2.college = "duke" |
What was the minimum OTL amount? | create table table_1888165_1 (otl integer, PRIMARY KEY (otl)) | select min(otl) from table_1888165_1 |
Name all the candidates listed in the race where the incumbent is Prince Hulon Preston, Jr. | create table table_1342013_10 (candidates varchar, incumbent varchar, PRIMARY KEY (candidates)) | select candidates from table_1342013_10 where incumbent = "prince hulon preston, jr." |
Show the headquarters that have at least two companies. | create table company (headquarters varchar, PRIMARY KEY (headquarters)) | select headquarters from company group by headquarters having count(*) >= 2 |
Show the premise type and address type code for all customer addresses. | create table premises (premises_type varchar, premise_id varchar, PRIMARY KEY (premises_type)); create table customer_addresses (address_type_code varchar, premise_id varchar, PRIMARY KEY (address_type_code)) | select t2.premises_type, t1.address_type_code from customer_addresses as t1 join premises as t2 on t1.premise_id = t2.premise_id |
When danilo di luca is the winner who is the general classification? | create table table_18733814_2 (general_classification varchar, winner varchar, PRIMARY KEY (general_classification)) | select general_classification from table_18733814_2 where winner = "danilo di luca" |
How many coins have a diameter of 23mm? | create table table_1307572_1 (reverse varchar, diameter varchar, PRIMARY KEY (reverse)) | select count(reverse) from table_1307572_1 where diameter = "23mm" |
Report the first name and last name of all the teachers. | create table teachers (firstname varchar, lastname varchar, PRIMARY KEY (firstname)) | select distinct firstname, lastname from teachers |
What was event 2 when event 1 was Atlasphere? | create table table_17257687_1 (event_2 varchar, event_1 varchar, PRIMARY KEY (event_2)) | select event_2 from table_17257687_1 where event_1 = "atlasphere" |
What is the location shared by most counties? | create table county_public_safety (location varchar, PRIMARY KEY (location)) | select location from county_public_safety group by location order by count(*) desc limit 1 |
In what urban area is the 2011 population 21561? | create table table_1940144_1 (urban_area varchar, population_2011 varchar, PRIMARY KEY (urban_area)) | select urban_area from table_1940144_1 where population_2011 = 21561 |
What is every pole position for the Castle Combe circuit and Robbie Kerr is the winning driver? | create table table_26137666_3 (pole_position varchar, circuit varchar, winning_driver varchar, PRIMARY KEY (pole_position)) | select pole_position from table_26137666_3 where circuit = "castle combe" and winning_driver = "robbie kerr" |
List phone number and email address of customer with more than 2000 outstanding balance. | create table customers (phone_number varchar, email_address varchar, amount_outstanding integer, PRIMARY KEY (phone_number)) | select phone_number, email_address from customers where amount_outstanding > 2000 |
The numbers 801-812 are in which country? | create table table_2351952_1 (country varchar, numbers varchar, PRIMARY KEY (country)) | select country from table_2351952_1 where numbers = "801-812" |
What was the standing in the season that the pct% was 0.769? | create table table_2110959_1 (standing varchar, pct__percentage varchar, PRIMARY KEY (standing)) | select standing from table_2110959_1 where pct__percentage = "0.769" |
What was the prize pool for the event number 27H? | create table table_22050544_4 (prize varchar, event__number varchar, PRIMARY KEY (prize)) | select prize as pool from table_22050544_4 where event__number = "27h" |
What is the original air date if the ratings is 1.92 million? | create table table_23705843_1 (original_air_date varchar, ratings__millions_ varchar, PRIMARY KEY (original_air_date)) | select original_air_date from table_23705843_1 where ratings__millions_ = "1.92" |
Name the languages for cyprus | create table table_21133193_1 (languages varchar, member_countries varchar, PRIMARY KEY (languages)) | select languages from table_21133193_1 where member_countries = "cyprus" |
Who was the interview subject when the centerfold model was Sherry Arnett? | create table table_1566848_7 (interview_subject varchar, centerfold_model varchar, PRIMARY KEY (interview_subject)) | select count(interview_subject) from table_1566848_7 where centerfold_model = "sherry arnett" |
List the number of vacators when successors were formally installed on June 22, 1868. | create table table_2417340_3 (vacator varchar, date_of_successors_formal_installation varchar, PRIMARY KEY (vacator)) | select count(vacator) from table_2417340_3 where date_of_successors_formal_installation = "june 22, 1868" |
List member names and their party names. | create table party (party_name varchar, party_id varchar, PRIMARY KEY (party_name)); create table member (member_name varchar, party_id varchar, PRIMARY KEY (member_name)) | select t1.member_name, t2.party_name from member as t1 join party as t2 on t1.party_id = t2.party_id |
What is the location code for the country "Canada"? | create table ref_locations (location_code varchar, location_name varchar, PRIMARY KEY (location_code)) | select location_code from ref_locations where location_name = "canada" |
how many times was the high rebounds by Mcdyess (9) and the high assists was by Billups (10)? | create table table_11960944_4 (high_points varchar, high_rebounds varchar, high_assists varchar, PRIMARY KEY (high_points)) | select count(high_points) from table_11960944_4 where high_rebounds = "mcdyess (9)" and high_assists = "billups (10)" |
What was the record when the high rebounds was from Nick Collison (11)? | create table table_11964154_11 (record varchar, high_rebounds varchar, PRIMARY KEY (record)) | select record from table_11964154_11 where high_rebounds = "nick collison (11)" |
How many ships ended up being 'Captured'? | create table ship (disposition_of_ship varchar, PRIMARY KEY (disposition_of_ship)) | select count(*) from ship where disposition_of_ship = 'captured' |
Was it a win or a loss for Wanganui in Paeroa? | create table table_26847237_1 (win_loss varchar, location varchar, PRIMARY KEY (win_loss)) | select win_loss from table_26847237_1 where location = "paeroa" |
How many directors have vietnamese titles of Gate, Gate, Paragate? | create table table_22128871_1 (director varchar, vietnamese_title varchar, PRIMARY KEY (director)) | select count(director) from table_22128871_1 where vietnamese_title = "gate, gate, paragate" |
Which states have both owners and professionals living there? | create table owners (state varchar, PRIMARY KEY (state)); create table professionals (state varchar, PRIMARY KEY (state)) | select state from owners intersect select state from professionals |
What was the to winning team when the tu winning team was joe amato carson baird? | create table table_13657883_2 (to_winning_team varchar, tu_winning_team varchar, PRIMARY KEY (to_winning_team)) | select to_winning_team from table_13657883_2 where tu_winning_team = "joe amato carson baird" |
Name the macedonian for il/elle avait entendu | create table table_1841901_1 (macedonian varchar, french varchar, PRIMARY KEY (macedonian)) | select macedonian from table_1841901_1 where french = "il/elle avait entendu" |
What was the little league team from Kentucky when the little league team from Illinois was Rock Falls LL Rock Falls? | create table table_18461045_1 (kentucky varchar, illinois varchar, PRIMARY KEY (kentucky)) | select kentucky from table_18461045_1 where illinois = "rock falls ll rock falls" |
Who were the candidates in the election where John Beatty was the incumbent? | create table table_1434788_5 (candidates varchar, incumbent varchar, PRIMARY KEY (candidates)) | select candidates from table_1434788_5 where incumbent = "john beatty" |
What is the name of tracks whose genre is Rock? | create table genres (id varchar, name varchar, PRIMARY KEY (id)); create table tracks (name varchar, genre_id varchar, PRIMARY KEY (name)) | select t2.name from genres as t1 join tracks as t2 on t1.id = t2.genre_id where t1.name = "rock" |
Who wrote the story that is cover date 19 October 1985? | create table table_18305523_2 (writer_s varchar, cover_date varchar, PRIMARY KEY (writer_s)) | select writer_s from table_18305523_2 where cover_date = "19 october 1985" |
What kind of hand guards are associated with a rear sight of A1 and stock of A2? | create table table_12834315_8 (hand_guards varchar, rear_sight varchar, stock varchar, PRIMARY KEY (hand_guards)) | select hand_guards from table_12834315_8 where rear_sight = "a1" and stock = "a2" |
Who was the champion prior to Xix Xavant? | create table table_1272033_1 (previous_champion_s_ varchar, champion_s_ varchar, PRIMARY KEY (previous_champion_s_)) | select previous_champion_s_ from table_1272033_1 where champion_s_ = "xix xavant" |
Show names of pilots that have more than one record. | create table pilot (pilot_name varchar, pilot_id varchar, PRIMARY KEY (pilot_name)); create table pilot_record (pilot_id varchar, PRIMARY KEY (pilot_id)) | select t2.pilot_name, count(*) from pilot_record as t1 join pilot as t2 on t1.pilot_id = t2.pilot_id group by t2.pilot_name having count(*) > 1 |
What location is farmer city speedway? | create table table_16275828_4 (location varchar, track_name varchar, PRIMARY KEY (location)) | select location from table_16275828_4 where track_name = "farmer city speedway" |
How many of the cmdlets are the 2008 version? | create table table_14465871_2 (cmdlets varchar, version varchar, PRIMARY KEY (cmdlets)) | select count(cmdlets) from table_14465871_2 where version = "2008" |
What is the name of the episode written by Michael Price? | create table table_2701851_2 (title varchar, written_by varchar, PRIMARY KEY (title)) | select title from table_2701851_2 where written_by = "michael price" |
Find the code of city where most of students are living in. | create table student (city_code varchar, PRIMARY KEY (city_code)) | select city_code from student group by city_code order by count(*) desc limit 1 |
What is the title of the episode with the original air date of 28 September 1969? | create table table_1439096_1 (title varchar, original_air_date__atv_ varchar, PRIMARY KEY (title)) | select title from table_1439096_1 where original_air_date__atv_ = "28 september 1969" |
If the writer is Mark Fink, who is the director? | create table table_25277262_2 (directed_by varchar, written_by varchar, PRIMARY KEY (directed_by)) | select directed_by from table_25277262_2 where written_by = "mark fink" |
Incumbent Tim Holden belonged to what party? | create table table_1341453_40 (party varchar, incumbent varchar, PRIMARY KEY (party)) | select party from table_1341453_40 where incumbent = "tim holden" |
Name the number of crews for light bombardment group | create table table_23508196_5 (number_of_crews varchar, type_of_unit varchar, PRIMARY KEY (number_of_crews)) | select number_of_crews from table_23508196_5 where type_of_unit = "light bombardment group" |
What was the percentage of muslims during a time where there were 614 registered mosques? | create table table_1532779_1 (muslim___percentage_of_total_population_ varchar, registered_mosques varchar, PRIMARY KEY (muslim___percentage_of_total_population_)) | select muslim___percentage_of_total_population_ from table_1532779_1 where registered_mosques = 614 |
Which headphone models correspond to the US MSRP of $150? | create table table_1601027_1 (headphone_model varchar, us_msrp varchar, PRIMARY KEY (headphone_model)) | select headphone_model from table_1601027_1 where us_msrp = "$150" |
What is the sexual abuse rate where the conflict is the Burundi Civil War? | create table table_15652027_1 (sexual_abuse_1 integer, conflict varchar, PRIMARY KEY (sexual_abuse_1)) | select min(sexual_abuse_1) from table_15652027_1 where conflict = "burundi civil war" |
who was the commentator when spokesperson was claude darget | create table table_184803_4 (commentator varchar, spokespersons varchar, PRIMARY KEY (commentator)) | select commentator from table_184803_4 where spokespersons = "claude darget" |
Who was the incumbent when henry e. barbour ran? | create table table_1342379_5 (candidates varchar, incumbent varchar, PRIMARY KEY (candidates)) | select candidates from table_1342379_5 where incumbent = "henry e. barbour" |
Name the air date for ratings of 2.19 million | create table table_27218002_1 (originalairdate varchar, ratings varchar, PRIMARY KEY (originalairdate)) | select originalairdate from table_27218002_1 where ratings = "2.19 million" |
Which province is Villa Bisonó in? | create table table_22447251_2 (province varchar, _community varchar, hometown varchar, PRIMARY KEY (province)) | select province, _community from table_22447251_2 where hometown = "villa bisonó" |
In how many teams is Waqar Younis the head coach? | create table table_19905183_1 (team varchar, head_coach varchar, PRIMARY KEY (team)) | select count(team) from table_19905183_1 where head_coach = "waqar younis" |
Show storm name with at least two regions and 10 cities affected. | create table affected_region (storm_id varchar, number_city_affected integer, PRIMARY KEY (storm_id)); create table storm (name varchar, storm_id varchar, PRIMARY KEY (name)) | select t1.name from storm as t1 join affected_region as t2 on t1.storm_id = t2.storm_id group by t1.storm_id having count(*) >= 2 intersect select t1.name from storm as t1 join affected_region as t2 on t1.storm_id = t2.storm_id group by t1.storm_id having sum(t2.number_city_affected) >= 10 |
When bill young redistricted from the 10th district is the incumbent what is the party? | create table table_25030512_12 (party varchar, incumbent varchar, PRIMARY KEY (party)) | select party from table_25030512_12 where incumbent = "bill young redistricted from the 10th district" |
What is every institution with the nickname of Wildcats? | create table table_261954_1 (institution varchar, nickname varchar, PRIMARY KEY (institution)) | select institution from table_261954_1 where nickname = "wildcats" |
How many launch dates are there for digital transmission? | create table table_22274142_1 (launch_date varchar, transmission varchar, PRIMARY KEY (launch_date)) | select count(launch_date) from table_22274142_1 where transmission = "digital" |
What is the first name of students who got grade C in any class? | create table student (stu_num varchar, PRIMARY KEY (stu_num)); create table enroll (stu_num varchar, PRIMARY KEY (stu_num)) | select distinct stu_fname from student as t1 join enroll as t2 on t1.stu_num = t2.stu_num where enroll_grade = 'c' |
Who was the writer for the episode originally airing on March 1, 2004? | create table table_23916272_6 (written_by varchar, original_air_date varchar, PRIMARY KEY (written_by)) | select written_by from table_23916272_6 where original_air_date = "march 1, 2004" |
what is the athens xi where dada xi b is strikers fc? | create table table_28759261_5 (athens_xi varchar, dadar_xi_‘b’ varchar, PRIMARY KEY (athens_xi)) | select athens_xi from table_28759261_5 where dadar_xi_‘b’ = "strikers fc" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.