answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
484
SELECT entered_office_as_head_of_state_or_government FROM table_10026563_1 WHERE office = "Prime Minister of Italy"
When did the Prime Minister of Italy take office?
CREATE TABLE table_10026563_1 (entered_office_as_head_of_state_or_government VARCHAR, office VARCHAR)
SELECT character FROM table_name_68 WHERE category = "favourite naya sadasya"
Which Character has a Category of favourite naya sadasya?
CREATE TABLE table_name_68 (character VARCHAR, category VARCHAR)
SELECT MAX(drawn) FROM table_name_81 WHERE points_for > 545
What is the highest drawn for points over 545?
CREATE TABLE table_name_81 (drawn INTEGER, points_for INTEGER)
SELECT COUNT(position) FROM table_10705060_1 WHERE season = "2009"
how many positions in 2009?
CREATE TABLE table_10705060_1 (position VARCHAR, season VARCHAR)
SELECT MIN(week) FROM table_name_77 WHERE attendance < 32 OFFSET 738
Tell me the lowest week for attedance less thaan 32,738
CREATE TABLE table_name_77 (week INTEGER, attendance INTEGER)
SELECT 4 AS th_place FROM table_11577996_1 WHERE year = 2002
What school took 4th place in 2002?
CREATE TABLE table_11577996_1 (year VARCHAR)
SELECT COUNT(DISTINCT dst_apid) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines'
Find the number of different airports which are the destinations of the American Airlines.
CREATE TABLE routes (alid VARCHAR); CREATE TABLE airlines (alid VARCHAR, name VARCHAR)
SELECT position FROM table_name_95 WHERE round = 7 AND college = "oklahoma"
What position does the player from Oklahoma who was drafted in round 7 play?
CREATE TABLE table_name_95 (position VARCHAR, round VARCHAR, college VARCHAR)
SELECT MIN(africa) FROM table_1914090_2 WHERE year = 2001
What is the minimum number of members Africa had in 2001?
CREATE TABLE table_1914090_2 (africa INTEGER, year VARCHAR)
SELECT working_force_of_hk FROM table_27257896_2 WHERE nepalese = "37.1%"
If the nepalese is 37.1%, what is the working force of HK?
CREATE TABLE table_27257896_2 (working_force_of_hk VARCHAR, nepalese VARCHAR)
SELECT points FROM table_name_52 WHERE score = "3–1" AND record = "25–19–11"
What is the points when the score was 3–1, and record was 25–19–11?
CREATE TABLE table_name_52 (points VARCHAR, score VARCHAR, record VARCHAR)
SELECT score FROM table_17360840_9 WHERE record = "21-31-13"
What was the score when the record was 21-31-13?
CREATE TABLE table_17360840_9 (score VARCHAR, record VARCHAR)
SELECT team FROM table_name_58 WHERE lost < 13 AND position < 4 AND difference = "42"
What is the Team when the lost is less than 13, and the position is less than 4, with a Difference of 42?
CREATE TABLE table_name_58 (team VARCHAR, difference VARCHAR, lost VARCHAR, position VARCHAR)
SELECT MIN(total) FROM table_name_5 WHERE rank = "11" AND bronze < 1
When the rank is 11, and bronze a smaller than 1 what is the lowest total?
CREATE TABLE table_name_5 (total INTEGER, rank VARCHAR, bronze VARCHAR)
SELECT MAX(pennant_number) FROM table_name_54 WHERE ships_in_class = "raahe"
What is the highest pennant number with ships in raahe class?
CREATE TABLE table_name_54 (pennant_number INTEGER, ships_in_class VARCHAR)
SELECT MAX(year) FROM table_name_49 WHERE runner_s__up = "kathy whitworth"
When was the most recent year that kathy whitworth was the runner-up?
CREATE TABLE table_name_49 (year INTEGER, runner_s__up VARCHAR)
SELECT MAX(v_mph_) FROM table_15416002_1 WHERE chi = "13.5"
What is the maximum miles per hour recorded when the CHI (Carvill Hurricane Index) is equal to 13.5
CREATE TABLE table_15416002_1 (v_mph_ INTEGER, chi VARCHAR)
SELECT player FROM table_12962773_1 WHERE position = "Forward" AND current_club = "Real Madrid"
what's player with position being forward and current club being real madrid
CREATE TABLE table_12962773_1 (player VARCHAR, position VARCHAR, current_club VARCHAR)
SELECT AVG(points) FROM table_name_96 WHERE class = "250cc" AND wins < 0
What is the average number of points for a team in the 250cc class with fewer than 0 wins?
CREATE TABLE table_name_96 (points INTEGER, class VARCHAR, wins VARCHAR)
SELECT MIN(series_no) FROM table_19236587_4 WHERE season_no = 2
What's the series number of the episode with season number 2?
CREATE TABLE table_19236587_4 (series_no INTEGER, season_no VARCHAR)
SELECT COUNT(rank) FROM table_name_7 WHERE col__m_ > 0
What is the rank when the col is larger than 0?
CREATE TABLE table_name_7 (rank VARCHAR, col__m_ INTEGER)
SELECT COUNT(industrial_and_commercial_panel) FROM table_name_45 WHERE labour_panel > 1 AND nominated_by_the_taoiseach < 11 AND cultural_and_educational_panel < 0
What is the total of Industrial and Commercial Panels that have a Labour Panel greater than 1, a Nominated by the Taoiseach lesss than 11 and a Cultural and Educational Panel smaller than 0
CREATE TABLE table_name_45 (industrial_and_commercial_panel VARCHAR, cultural_and_educational_panel VARCHAR, labour_panel VARCHAR, nominated_by_the_taoiseach VARCHAR)
SELECT result FROM table_name_32 WHERE opponent = "cincinnati bengals"
What is Result, when Opponent is Cincinnati Bengals?
CREATE TABLE table_name_32 (result VARCHAR, opponent VARCHAR)
SELECT points FROM table_name_29 WHERE country = "united kingdom" AND place = 10
What points has united kingdom as the country, and 10 as the place?
CREATE TABLE table_name_29 (points VARCHAR, country VARCHAR, place VARCHAR)
SELECT viewers__in_millions_ FROM table_1723080_1 WHERE broadcast_date = "1August1964"
How many viewers were there on 1august1964?
CREATE TABLE table_1723080_1 (viewers__in_millions_ VARCHAR, broadcast_date VARCHAR)
SELECT year FROM table_name_52 WHERE venue = "algiers, algeria" AND extra < 8.03 AND meeting = "all africa games"
What year has a venue of algiers, algeria, extra smaller than 8.03, and a Meeting of all africa games?
CREATE TABLE table_name_52 (year VARCHAR, meeting VARCHAR, venue VARCHAR, extra VARCHAR)
SELECT format_s_ FROM table_name_40 WHERE date = "september 23, 2008"
What is the Format(s) of the release on September 23, 2008?
CREATE TABLE table_name_40 (format_s_ VARCHAR, date VARCHAR)
SELECT score_points FROM table_name_4 WHERE total = "20"
What is the score points when the total is 20?
CREATE TABLE table_name_4 (score_points VARCHAR, total VARCHAR)
SELECT label FROM table_name_60 WHERE catalog = "b0011141-01"
What is the Label of the B0011141-01 Catalog?
CREATE TABLE table_name_60 (label VARCHAR, catalog VARCHAR)
SELECT team FROM table_name_31 WHERE location_attendance = "boston garden" AND series = "0-1"
what is the team when the location attendace is boston garden and the series is 0-1?
CREATE TABLE table_name_31 (team VARCHAR, location_attendance VARCHAR, series VARCHAR)
SELECT winner FROM table_27887723_1 WHERE location = "Souderton, PA"
who was the winner for souderton, pa?
CREATE TABLE table_27887723_1 (winner VARCHAR, location VARCHAR)
SELECT drawn FROM table_name_74 WHERE lost = "3"
What is the number drawn when 3 have been lost?
CREATE TABLE table_name_74 (drawn VARCHAR, lost VARCHAR)
SELECT Shared AS titles FROM table_2869837_1 WHERE last_final = 2012
How many shared titles does the club whose last final was 2012 have?
CREATE TABLE table_2869837_1 (Shared VARCHAR, last_final VARCHAR)
SELECT date FROM table_name_38 WHERE attendance = "bye" AND week = 11
What was date of the bye week 11?
CREATE TABLE table_name_38 (date VARCHAR, attendance VARCHAR, week VARCHAR)
SELECT name FROM table_name_61 WHERE year < 1954 AND floors > 15
What is the name before 1954 with more than 15 floors?
CREATE TABLE table_name_61 (name VARCHAR, year VARCHAR, floors VARCHAR)
SELECT result FROM table_name_9 WHERE site = "rice stadium • houston, tx"
Which Result has a Site of rice stadium • houston, tx?
CREATE TABLE table_name_9 (result VARCHAR, site VARCHAR)
SELECT AVG(top_10) FROM table_name_31 WHERE top_25 = 2 AND cuts_made < 10
What is the average number of top-10s for the major with 2 top-25s and fewer than 10 cuts made?
CREATE TABLE table_name_31 (top_10 INTEGER, top_25 VARCHAR, cuts_made VARCHAR)
SELECT trainer FROM table_name_93 WHERE odds > 36 AND post = 11
Who trained the horse on post 11 with over 36 odds?
CREATE TABLE table_name_93 (trainer VARCHAR, odds VARCHAR, post VARCHAR)
SELECT 2 AS nd_leg FROM table_14219514_1 WHERE home__1st_leg_ = "Independiente"
How many 2nd legs are there where home (1st leg) is Independiente?
CREATE TABLE table_14219514_1 (home__1st_leg_ VARCHAR)
SELECT country FROM table_name_70 WHERE series_finale = "present" AND weekly_schedule = "monday to sunday" AND timeslot = "18:45-21:00"
What country was the series finale present and was shown Monday to Sunday at 18:45-21:00?
CREATE TABLE table_name_70 (country VARCHAR, timeslot VARCHAR, series_finale VARCHAR, weekly_schedule VARCHAR)
SELECT dance FROM table_name_68 WHERE worst_dancer_s_ = "priscilla presley" AND worst_score = "21"
What is the dance that has priscilla presley is the worst dancer(s), and the worst score of 21?
CREATE TABLE table_name_68 (dance VARCHAR, worst_dancer_s_ VARCHAR, worst_score VARCHAR)
SELECT date FROM table_name_78 WHERE week > 7 AND result = "l 23–17"
What date had a Result of l 23–17 in a week later than 7?
CREATE TABLE table_name_78 (date VARCHAR, week VARCHAR, result VARCHAR)
SELECT MAX(2004) FROM table_name_86 WHERE 2009 > 26.1
What is the maximum in 2004 when 2009 is higher than 26.1?
CREATE TABLE table_name_86 (Id VARCHAR)
SELECT team FROM table_name_40 WHERE qual_1 = "1:01.342"
Which team had a qualifying 1 time of 1:01.342?
CREATE TABLE table_name_40 (team VARCHAR, qual_1 VARCHAR)
SELECT tournament FROM table_name_38 WHERE date = "9 august 1993"
What is Tournament, when Date is "9 August 1993"?
CREATE TABLE table_name_38 (tournament VARCHAR, date VARCHAR)
SELECT T1.product_id FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id = T2.product_id WHERE T1.supplier_id = 2 AND T2.product_price > (SELECT AVG(product_price) FROM products)
Return ids of all the products that are supplied by supplier id 2 and are more expensive than the average price of all products.
CREATE TABLE products (product_id VARCHAR, product_price INTEGER); CREATE TABLE product_suppliers (product_id VARCHAR, supplier_id VARCHAR); CREATE TABLE products (product_price INTEGER)
SELECT third_place FROM table_21632864_1 WHERE runners_up = "Laranja Kyoto"
who got the third position when laranja kyoto got the second position?
CREATE TABLE table_21632864_1 (third_place VARCHAR, runners_up VARCHAR)
SELECT MIN(s_spoilt_vote) FROM table_15082102_3 WHERE electorate = 83850
in electorate of 83850 what is the minimum s split vote
CREATE TABLE table_15082102_3 (s_spoilt_vote INTEGER, electorate VARCHAR)
SELECT away_team FROM table_name_5 WHERE home_team = "cheltenham town"
What is the away team when the home team is Cheltenham Town?
CREATE TABLE table_name_5 (away_team VARCHAR, home_team VARCHAR)
SELECT result FROM table_name_14 WHERE competition = "2000 afc asian cup qualification"
Name the result for 2000 afc asian cup qualification
CREATE TABLE table_name_14 (result VARCHAR, competition VARCHAR)
SELECT MAX(tonnage) FROM table_11662133_3 WHERE date_entered_service = "25 March 1986"
what is the maximum tonnage where date entered service is 25 march 1986
CREATE TABLE table_11662133_3 (tonnage INTEGER, date_entered_service VARCHAR)
SELECT MIN(points) AS defending FROM table_24431264_18 WHERE player = "Radek Štěpánek"
List the total number of defensive points for radek štěpánek?
CREATE TABLE table_24431264_18 (points INTEGER, player VARCHAR)
SELECT away_team AS score FROM table_name_90 WHERE home_team = "carlton"
When the Home team was Carlton, what was the Away team score?
CREATE TABLE table_name_90 (away_team VARCHAR, home_team VARCHAR)
SELECT winner FROM table_name_53 WHERE year = "2003"
who was the winner in 2003?
CREATE TABLE table_name_53 (winner VARCHAR, year VARCHAR)
SELECT ring_name FROM table_name_48 WHERE current_rank = "e0 maegashira 9 west"
What is Ring Name, when Current Rank is E0 Maegashira 9 West?
CREATE TABLE table_name_48 (ring_name VARCHAR, current_rank VARCHAR)
SELECT SUM(bronze) FROM table_name_35 WHERE gold = 27 AND silver > 30
Tell me the sum of bronze for gold being 27 and silver more than 30
CREATE TABLE table_name_35 (bronze INTEGER, gold VARCHAR, silver VARCHAR)
SELECT AVG(year) FROM table_name_31 WHERE issue_price = "$1,295.95"
What was the year that had an issue price of $1,295.95?
CREATE TABLE table_name_31 (year INTEGER, issue_price VARCHAR)
SELECT marks FROM table_2814720_1 WHERE tackles = 3
How many marks are there when tackles are 3?
CREATE TABLE table_2814720_1 (marks VARCHAR, tackles VARCHAR)
SELECT SUM(capacity__mw_) FROM table_name_31 WHERE size__mw_ = "0.85" AND wind_farm = "carrigh" AND turbines > 3
What is the sum of the capacities for Carrigh wind warm that has a size of 0.85 MW and more than 3 turbines?
CREATE TABLE table_name_31 (capacity__mw_ INTEGER, turbines VARCHAR, size__mw_ VARCHAR, wind_farm VARCHAR)
SELECT date FROM table_name_53 WHERE home_team = "luton town"
What is Date, when Home Team is "Luton Town"?
CREATE TABLE table_name_53 (date VARCHAR, home_team VARCHAR)
SELECT country FROM table_name_11 WHERE place = "t8" AND player = "byron nelson"
Which Country has a Place of t8 and byron nelson?
CREATE TABLE table_name_11 (country VARCHAR, place VARCHAR, player VARCHAR)
SELECT entrant FROM table_name_70 WHERE rounds = "16" AND constructor = "ferrari"
What was the entrant in round 16 were Ferrari was the constructor?
CREATE TABLE table_name_70 (entrant VARCHAR, rounds VARCHAR, constructor VARCHAR)
SELECT MAX(competition_finish) FROM table_name_4 WHERE average > 32.9 AND number_of_dances > 16
Name the greatest competition finish with average more than 32.9 and number of dances more than 16
CREATE TABLE table_name_4 (competition_finish INTEGER, average VARCHAR, number_of_dances VARCHAR)
SELECT opponent FROM table_name_27 WHERE record = "17-19-4"
Who is the opponent when the record is 17-19-4?
CREATE TABLE table_name_27 (opponent VARCHAR, record VARCHAR)
SELECT MIN(año) FROM table_27501971_2
What is the smallest año?
CREATE TABLE table_27501971_2 (año INTEGER)
SELECT MIN(attendance) FROM table_10566855_1 WHERE score = "8.16 (64) – 8.12 (60)"
what is the minimum attendance with score 8.16 (64) – 8.12 (60)
CREATE TABLE table_10566855_1 (attendance INTEGER, score VARCHAR)
SELECT tournament FROM table_name_8 WHERE 2013 = "1r"
Which tournament had 1R in 2013?
CREATE TABLE table_name_8 (tournament VARCHAR)
SELECT 1986 AS _87 FROM table_14489821_1 WHERE team = "Argentinos Juniors"
how many points did the argentinos juniors team score during the 1986-87 season?
CREATE TABLE table_14489821_1 (team VARCHAR)
SELECT author FROM table_name_22 WHERE company = "semeio theatre"
Which author has a company of the Semeio Theatre?
CREATE TABLE table_name_22 (author VARCHAR, company VARCHAR)
SELECT birth FROM table_name_79 WHERE became_queen = "15 april 1820"
When was the person who became queen on 15 April 1820 born?
CREATE TABLE table_name_79 (birth VARCHAR, became_queen VARCHAR)
SELECT project FROM table_name_92 WHERE missile = "agni-iii"
Name the project which has a missle of agni-iii
CREATE TABLE table_name_92 (project VARCHAR, missile VARCHAR)
SELECT location FROM table_name_29 WHERE record = "9-7"
What is the location when the record is 9-7?
CREATE TABLE table_name_29 (location VARCHAR, record VARCHAR)
SELECT year FROM table_1990460_1 WHERE regular_season = "4th, Midwest"
When did the 4th, Midwest season happen?
CREATE TABLE table_1990460_1 (year VARCHAR, regular_season VARCHAR)
SELECT district FROM table_2668352_14 WHERE incumbent = "Hugh Glasgow"
Name the district for hugh glasgow
CREATE TABLE table_2668352_14 (district VARCHAR, incumbent VARCHAR)
SELECT bowling FROM table_name_23 WHERE season = "1907"
What is the bowling score of season 1907?
CREATE TABLE table_name_23 (bowling VARCHAR, season VARCHAR)
SELECT dimensions FROM table_298883_5 WHERE obverse = "Kim Il-sung" AND date_of_issue = "1992"
What are the dimensions of the coin issued in 1992 with kim il-sung on the obverse?
CREATE TABLE table_298883_5 (dimensions VARCHAR, obverse VARCHAR, date_of_issue VARCHAR)
SELECT MAX(goals) FROM table_name_18 WHERE years = "1922–1935"
What was the highest number of goals for 1922–1935?
CREATE TABLE table_name_18 (goals INTEGER, years VARCHAR)
SELECT opponent FROM table_24951872_2 WHERE game_site = "Waldstadion"
What opponents played Waldstadion in a game?
CREATE TABLE table_24951872_2 (opponent VARCHAR, game_site VARCHAR)
SELECT date_of_appointment FROM table_27683516_3 WHERE date_of_vacancy = "24 November 2010"
What is the date of appointment when the date of vacancy is 24 november 2010?
CREATE TABLE table_27683516_3 (date_of_appointment VARCHAR, date_of_vacancy VARCHAR)
SELECT original_name FROM table_name_44 WHERE language = "portuguese"
Which film was translated from portuguese?
CREATE TABLE table_name_44 (original_name VARCHAR, language VARCHAR)
SELECT MIN(lost) FROM table_name_30 WHERE drawn > 1 AND played > 14
Which Lost has Drawn larger than 1, and a Played larger than 14?
CREATE TABLE table_name_30 (lost INTEGER, drawn VARCHAR, played VARCHAR)
SELECT AVG(social_democratic_party) FROM table_name_10 WHERE green < 0
Which Social Democratic Party has a Green smaller than 0?
CREATE TABLE table_name_10 (social_democratic_party INTEGER, green INTEGER)
SELECT Studio FROM film GROUP BY Studio HAVING COUNT(*) >= 2
List the names of studios that have at least two films.
CREATE TABLE film (Studio VARCHAR)
SELECT name_in_polish FROM table_name_36 WHERE seat = "radom"
Tell me the name in polish for radom seat
CREATE TABLE table_name_36 (name_in_polish VARCHAR, seat VARCHAR)
SELECT MIN(completed) FROM table_name_97 WHERE quantity > 10 AND numbers = "53-58, 61-72"
For the item with more than 10, and numbers of 53-58, 61-72, what is the lowest completed?
CREATE TABLE table_name_97 (completed INTEGER, quantity VARCHAR, numbers VARCHAR)
SELECT partnering FROM table_name_8 WHERE against = "greece"
Who was partnering when nueza silva played against greece?
CREATE TABLE table_name_8 (partnering VARCHAR, against VARCHAR)
SELECT displacement FROM table_name_68 WHERE model = "180 multijet power/3.0 hdi"
What is the Displacement of the 180 Multijet Power/3.0 HDI Model?
CREATE TABLE table_name_68 (displacement VARCHAR, model VARCHAR)
SELECT MAX(year) FROM table_name_92 WHERE championship = "olympics" AND event = "men's eight" AND nation = "canada" AND result = "silver"
What year was olympics, Canada and the Men's Eight Event ended with a silver medal?
CREATE TABLE table_name_92 (year INTEGER, result VARCHAR, nation VARCHAR, championship VARCHAR, event VARCHAR)
SELECT COUNT(tv_season) FROM table_19188562_2 WHERE rating__adults_18_49_ = "1.2"
How many tv series had an adult rating of 1.2?
CREATE TABLE table_19188562_2 (tv_season VARCHAR, rating__adults_18_49_ VARCHAR)
SELECT nuts_3_region FROM table_name_38 WHERE area__km²_ = "41.58"
What is the NUT 3 region with area of 41.58?
CREATE TABLE table_name_38 (nuts_3_region VARCHAR, area__km²_ VARCHAR)
SELECT COUNT(decile) FROM table_name_90 WHERE roll = 251
tell me the total number of decile with a roll showing 251.
CREATE TABLE table_name_90 (decile VARCHAR, roll VARCHAR)
SELECT MIN(steals) FROM table_25353861_5 WHERE player = "Kelly Miller"
How many steals did Kelly Miller have?
CREATE TABLE table_25353861_5 (steals INTEGER, player VARCHAR)
SELECT SUM(wins) FROM table_name_35 WHERE rank = "22nd" AND top_fives = 3
What is the sum of wins for casey mears when the player ranked 22nd and was in teh top fives 3 times?
CREATE TABLE table_name_35 (wins INTEGER, rank VARCHAR, top_fives VARCHAR)
SELECT accession_number FROM table_name_5 WHERE common_name = "purple sea urchin"
What is the accession number of the protein with the common name Purple Sea Urchin?
CREATE TABLE table_name_5 (accession_number VARCHAR, common_name VARCHAR)
SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Bob'
Find the name of persons who are friends with Bob.
CREATE TABLE PersonFriend (name VARCHAR, friend VARCHAR); CREATE TABLE Person (name VARCHAR)
SELECT COUNT(enrollment) FROM table_19210115_1 WHERE founded = 1863
How many University founded in 1863?
CREATE TABLE table_19210115_1 (enrollment VARCHAR, founded VARCHAR)
SELECT became_duchess FROM table_name_84 WHERE death = "26 october 1614"
WHo Became Duchess that has a Death of 26 october 1614?
CREATE TABLE table_name_84 (became_duchess VARCHAR, death VARCHAR)
SELECT manner_of_departure FROM table_17085981_2 WHERE team = "Stuttgarter Kickers" AND outgoing_manager = "Edgar Schmitt"
What was the manner of departure for Edgar Schmitt of the Stuttgarter Kickers?
CREATE TABLE table_17085981_2 (manner_of_departure VARCHAR, team VARCHAR, outgoing_manager VARCHAR)
SELECT AVG(crowd) FROM table_name_36 WHERE venue = "junction oval"
What was the average crowd attendance for the Junction Oval venue?
CREATE TABLE table_name_36 (crowd INTEGER, venue VARCHAR)
SELECT score FROM table_name_45 WHERE opponents = "amanda brown brenda remilton"
What is the Score with an Opponent that is amanda brown brenda remilton?
CREATE TABLE table_name_45 (score VARCHAR, opponents VARCHAR)