answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
484
SELECT COUNT(2010 AS _population) FROM table_name_23 WHERE district = "klang" AND area__km_2__ > 636
What is the total population of the district of Klang, with an area larger than 636?
CREATE TABLE table_name_23 (district VARCHAR, area__km_2__ VARCHAR)
SELECT COUNT(overall) FROM table_name_4 WHERE position = "s"
How many times is the postion S?
CREATE TABLE table_name_4 (overall VARCHAR, position VARCHAR)
SELECT investor_id, AVG(amount_of_transaction) FROM TRANSACTIONS GROUP BY investor_id
Show the average amount of transactions for different investors.
CREATE TABLE TRANSACTIONS (investor_id VARCHAR, amount_of_transaction INTEGER)
SELECT dadar_xi_‘b’ FROM table_28759261_5 WHERE good_shepherd = "Sea Liner FC"
what is the dadar xi b where the good shepherd is sea liner fc?
CREATE TABLE table_28759261_5 (dadar_xi_‘b’ VARCHAR, good_shepherd VARCHAR)
SELECT population FROM table_25200461_9 WHERE city = "Gilroy"
What is the population if the city is Gilroy?
CREATE TABLE table_25200461_9 (population VARCHAR, city VARCHAR)
SELECT SUM(time) FROM table_name_82 WHERE lane < 5 AND nationality = "united states"
What is the time with fewer than 5 lanes for the United States?
CREATE TABLE table_name_82 (time INTEGER, lane VARCHAR, nationality VARCHAR)
SELECT try_bonus FROM table_name_87 WHERE "played" = "played"
What is the try bonus of the club with played?
CREATE TABLE table_name_87 (try_bonus VARCHAR)
SELECT original_air_date FROM table_29584044_1 WHERE no_in_series = 31
What is the original air date of the episode that was number 31 in the series?
CREATE TABLE table_29584044_1 (original_air_date VARCHAR, no_in_series VARCHAR)
SELECT week_of FROM table_name_88 WHERE winner = "mary joe fernández 6–4, 7–5"
What is the Week when the winner was mary joe fernández 6–4, 7–5?
CREATE TABLE table_name_88 (week_of VARCHAR, winner VARCHAR)
SELECT player FROM table_11303072_9 WHERE rank = 2
What are the players whose rank is 2?
CREATE TABLE table_11303072_9 (player VARCHAR, rank VARCHAR)
SELECT date_of_vacancy FROM table_27133147_3 WHERE incoming_head_coach = "Carlos Azenha"
If the incoming head coach is Carlos Azenha, what is the date of vacancy?
CREATE TABLE table_27133147_3 (date_of_vacancy VARCHAR, incoming_head_coach VARCHAR)
SELECT visitor FROM table_name_30 WHERE home = "vancouver" AND decision = "cloutier"
Which Visitor has a Home of vancouver, and a Decision of cloutier?
CREATE TABLE table_name_30 (visitor VARCHAR, home VARCHAR, decision VARCHAR)
SELECT MIN(year) FROM table_name_25 WHERE wins < 0
What is listed as the lowest Year with a Wins that's smaller than 0?
CREATE TABLE table_name_25 (year INTEGER, wins INTEGER)
SELECT opponent FROM table_name_44 WHERE date = "july 27"
Who was the opponent on July 27?
CREATE TABLE table_name_44 (opponent VARCHAR, date VARCHAR)
SELECT player FROM table_name_79 WHERE score = 66 - 73 = 139
WHAT PLAYER HAS A SCORE OF 66-73=139?
CREATE TABLE table_name_79 (player VARCHAR, score VARCHAR)
SELECT circuit FROM table_24732149_2 WHERE round = 5
What is the circuit of round 5?
CREATE TABLE table_24732149_2 (circuit VARCHAR, round VARCHAR)
SELECT MIN(Otl) FROM table_1888165_1
What was the minimum OTL amount?
CREATE TABLE table_1888165_1 (Otl INTEGER)
SELECT launch_date FROM table_name_22 WHERE designation = "atv-002"
When did the atv-002 launch?
CREATE TABLE table_name_22 (launch_date VARCHAR, designation VARCHAR)
SELECT MAX(area_2006_km²) FROM table_name_22 WHERE city = "sopot" AND area_1996_km² < 17.31
Which area 2006 km² has a city of sopot, and an area 1996 km² smaller than 17.31?
CREATE TABLE table_name_22 (area_2006_km² INTEGER, city VARCHAR, area_1996_km² VARCHAR)
SELECT player_name FROM table_10360823_1 WHERE round = 17
Which player was chosen in round 17?
CREATE TABLE table_10360823_1 (player_name VARCHAR, round VARCHAR)
SELECT venue FROM table_name_24 WHERE away_team = "carlton"
what was the venue that hosted Carlton as the away team?
CREATE TABLE table_name_24 (venue VARCHAR, away_team VARCHAR)
SELECT MIN(crowd) FROM table_name_5 WHERE home_team = "brisbane lions"
What is Lowest Crowd, when Home Team is Brisbane Lions?
CREATE TABLE table_name_5 (crowd INTEGER, home_team VARCHAR)
SELECT _number___county FROM table_name_13 WHERE year_joined > 1926 AND previous_conference = "olympic"
Which #/ County has a Year Joined larger than 1926, and a Previous Conference of olympic?
CREATE TABLE table_name_13 (_number___county VARCHAR, year_joined VARCHAR, previous_conference VARCHAR)
SELECT T1.first_name, T1.country_code, T1.birth_date FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id ORDER BY T2.winner_rank_points DESC LIMIT 1
Find the first name, country code and birth date of the winner who has the highest rank points in all matches.
CREATE TABLE players (first_name VARCHAR, country_code VARCHAR, birth_date VARCHAR, player_id VARCHAR); CREATE TABLE matches (winner_id VARCHAR, winner_rank_points VARCHAR)
SELECT AVG(total) FROM table_name_32 WHERE nation = "guatemala" AND bronze < 2
Tell me the average total for guatemala and bronze less than 2
CREATE TABLE table_name_32 (total INTEGER, nation VARCHAR, bronze VARCHAR)
SELECT high_points FROM table_10812293_4 WHERE date = "December 20"
For games on December 20, how many points did the scoring leaders get?
CREATE TABLE table_10812293_4 (high_points VARCHAR, date VARCHAR)
SELECT _percentage_of_total_capacity FROM table_11456251_5 WHERE annual_energy__billion_kwh_ = "120.2"
What is the percentage of total capacity when the energy is 120.2?
CREATE TABLE table_11456251_5 (_percentage_of_total_capacity VARCHAR, annual_energy__billion_kwh_ VARCHAR)
SELECT place FROM table_name_87 WHERE player = "fredrik jacobson"
What place is Fredrik Jacobson from?
CREATE TABLE table_name_87 (place VARCHAR, player VARCHAR)
SELECT episode_no_episode_no_refers_to_the_episodes_number_in_the_overall_series, _whereas_series_no_refers_to_the_episodes_number_in_this_particular_series FROM table_27208311_1 WHERE series_no = 3
What is every episode number for the series number 3?
CREATE TABLE table_27208311_1 (episode_no_episode_no_refers_to_the_episodes_number_in_the_overall_series VARCHAR, _whereas_series_no_refers_to_the_episodes_number_in_this_particular_series VARCHAR, series_no VARCHAR)
SELECT Song FROM volume ORDER BY Weeks_on_Top DESC LIMIT 1
What is the song in the volume with the maximum weeks on top?
CREATE TABLE volume (Song VARCHAR, Weeks_on_Top VARCHAR)
SELECT golden_tickets FROM table_22897967_1 WHERE audition_venue = "Invesco Field"
Name the golden ticket for invesco field
CREATE TABLE table_22897967_1 (golden_tickets VARCHAR, audition_venue VARCHAR)
SELECT MAX(aggregate) FROM table_25931938_1 WHERE celebrity = "Ricky Groves"
What was the aggregate for Ricky Groves?
CREATE TABLE table_25931938_1 (aggregate INTEGER, celebrity VARCHAR)
SELECT player FROM table_name_92 WHERE place = "t7" AND country = "england"
WHAT IS THE PLAYER WITH T7 PLACE, FOR ENGLAND?
CREATE TABLE table_name_92 (player VARCHAR, place VARCHAR, country VARCHAR)
SELECT nation FROM table_name_22 WHERE places = 122.5
What Nation Placed 122.5?
CREATE TABLE table_name_22 (nation VARCHAR, places VARCHAR)
SELECT COUNT(complement) FROM table_name_28 WHERE commander = "valkenburg"
What is the sum of complement commander Valkenburg received?
CREATE TABLE table_name_28 (complement VARCHAR, commander VARCHAR)
SELECT record FROM table_name_47 WHERE date = "december 3"
Tell me the record for december 3
CREATE TABLE table_name_47 (record VARCHAR, date VARCHAR)
SELECT score FROM table_name_62 WHERE attendance < 10 OFFSET 553
What score has an attendance less than 10,553?
CREATE TABLE table_name_62 (score VARCHAR, attendance INTEGER)
SELECT MIN(population) FROM table_name_64 WHERE type = "m" AND name = "saint-blaise-sur-richelieu" AND area__km_2__ < 68.42
Saint-Blaise-Sur-Richelieu is smaller than 68.42 km^2, what is the population of this type M municipality?
CREATE TABLE table_name_64 (population INTEGER, area__km_2__ VARCHAR, type VARCHAR, name VARCHAR)
SELECT MIN(top_10) FROM table_2626564_2 WHERE position = "8th"
How many top 10's did Pearson have the year he was in 8th position?
CREATE TABLE table_2626564_2 (top_10 INTEGER, position VARCHAR)
SELECT commissioned FROM table_name_40 WHERE launched = "28 june 1934" AND pennant_number = "h.78"
Which commission was launched 28 june 1934, and has a Pennant number of h.78?
CREATE TABLE table_name_40 (commissioned VARCHAR, launched VARCHAR, pennant_number VARCHAR)
SELECT conversion_from_patent_application FROM table_2279413_1 WHERE maximum_term = "10 years" AND pct_route_available = "Yes"
When the PCT route available is yes and the maximum term is 10 years, what are the available conversions from patent applications?
CREATE TABLE table_2279413_1 (conversion_from_patent_application VARCHAR, maximum_term VARCHAR, pct_route_available VARCHAR)
SELECT MIN(points_won) FROM table_name_66 WHERE total_matches = 4 AND total_w_l_h = "4-0-0"
Can you tell me the lowest Points won that has the Total matches of 4, and the Total W-L-H of 4-0-0?
CREATE TABLE table_name_66 (points_won INTEGER, total_matches VARCHAR, total_w_l_h VARCHAR)
SELECT MIN(points) FROM table_name_59 WHERE year = 1954
Which line has the lowest amount of points and a year of 1954?
CREATE TABLE table_name_59 (points INTEGER, year VARCHAR)
SELECT total FROM table_name_70 WHERE finish = "t66"
What is the total for the player whose finish was t66?
CREATE TABLE table_name_70 (total VARCHAR, finish VARCHAR)
SELECT additional_major_sponsor_s_ FROM table_name_91 WHERE main_colour_s_ = "red" AND year > 1991
What is the additional major sponsor(s) that has red as its main color after 1991?
CREATE TABLE table_name_91 (additional_major_sponsor_s_ VARCHAR, main_colour_s_ VARCHAR, year VARCHAR)
SELECT opponent FROM table_name_97 WHERE attendance = "68,436"
What is the Opponent at the game with Attendance of 68,436?
CREATE TABLE table_name_97 (opponent VARCHAR, attendance VARCHAR)
SELECT nation FROM table_name_76 WHERE silver > 4 AND gold > 3 AND total = 18
What Nation has more than 4 silver, more than 3 gold and 18 total medals?
CREATE TABLE table_name_76 (nation VARCHAR, total VARCHAR, silver VARCHAR, gold VARCHAR)
SELECT margin_of_victory FROM table_name_56 WHERE date = "apr 23, 1967"
What was the margin of victory on Apr 23, 1967?
CREATE TABLE table_name_56 (margin_of_victory VARCHAR, date VARCHAR)
SELECT election FROM table_2231241_1 WHERE seat_no_1 = "Jacques Lachapelle" AND seat_no_5 = "G. Sanscartier"
which election had seat no 1 filled by jacques lachapelle but seat no 5 was filled by g. sanscartier
CREATE TABLE table_2231241_1 (election VARCHAR, seat_no_1 VARCHAR, seat_no_5 VARCHAR)
SELECT developer FROM table_18138132_2 WHERE title = "Windows Live Messenger"
Who is the developer for Windows live messenger?
CREATE TABLE table_18138132_2 (developer VARCHAR, title VARCHAR)
SELECT date FROM table_23286158_7 WHERE team = "Cleveland"
When did the Portland Trail Blazers play against Cleveland?
CREATE TABLE table_23286158_7 (date VARCHAR, team VARCHAR)
SELECT air_date FROM table_25816476_2 WHERE team_guest_captain = "John Bishop"
What was the air date when the team guest captain was john bishop?
CREATE TABLE table_25816476_2 (air_date VARCHAR, team_guest_captain VARCHAR)
SELECT time_retired FROM table_name_78 WHERE grid > 1 AND driver = "damon hill"
Which Time/Retired had a grid number bigger than 1 and whose driver was Damon Hill?
CREATE TABLE table_name_78 (time_retired VARCHAR, grid VARCHAR, driver VARCHAR)
SELECT team FROM table_name_52 WHERE shirt_sponsor = "carlsberg"
What team does Carlsberg sponsor?
CREATE TABLE table_name_52 (team VARCHAR, shirt_sponsor VARCHAR)
SELECT notes FROM table_name_32 WHERE date = "1989 may 7"
What do the notes say for 1989 May 7?
CREATE TABLE table_name_32 (notes VARCHAR, date VARCHAR)
SELECT home FROM table_name_96 WHERE date = "march 13"
On the Date of March 13, who was the Home team?
CREATE TABLE table_name_96 (home VARCHAR, date VARCHAR)
SELECT COUNT(*) FROM Documents_with_expenses
How many documents have expenses?
CREATE TABLE Documents_with_expenses (Id VARCHAR)
SELECT high_points FROM table_name_26 WHERE date = "may 27"
Who had the highest points of the game on May 27?
CREATE TABLE table_name_26 (high_points VARCHAR, date VARCHAR)
SELECT d_erp FROM table_name_12 WHERE city_of_license = "san martin texmelucan, puebla"
What's the D ERP in San Martin Texmelucan, Puebla?
CREATE TABLE table_name_12 (d_erp VARCHAR, city_of_license VARCHAR)
SELECT date FROM table_name_93 WHERE home_team = "crystal palace"
What date was the game when home team crystal palace played?
CREATE TABLE table_name_93 (date VARCHAR, home_team VARCHAR)
SELECT record FROM table_name_82 WHERE time = "3:01"
Which date has the record time of 3:01?
CREATE TABLE table_name_82 (record VARCHAR, time VARCHAR)
SELECT position FROM table_10015132_7 WHERE school_club_team = "Connecticut"
what position did the player from connecticut play
CREATE TABLE table_10015132_7 (position VARCHAR, school_club_team VARCHAR)
SELECT AVG(roll) FROM table_name_93 WHERE authority = "state" AND decile = 9
What is the average roll of a school with state authority and a decile of 9?
CREATE TABLE table_name_93 (roll INTEGER, authority VARCHAR, decile VARCHAR)
SELECT title FROM Movie WHERE director = 'James Cameron' AND YEAR > 2000
What is the name of the movie produced after 2000 and directed by James Cameron?
CREATE TABLE Movie (title VARCHAR, director VARCHAR, YEAR VARCHAR)
SELECT COUNT(year) FROM table_name_30 WHERE result = "2nd" AND venue = "auckland, new zealand"
How many years did the team place 2nd in Auckland, New Zealand?
CREATE TABLE table_name_30 (year VARCHAR, result VARCHAR, venue VARCHAR)
SELECT COUNT(rnd) FROM table_1140083_2 WHERE pole_position = "James Hunt" AND fastest_lap = "John Watson"
How many rounds were won with James Hunt as pole position and John Watson as fastest lap?
CREATE TABLE table_1140083_2 (rnd VARCHAR, pole_position VARCHAR, fastest_lap VARCHAR)
SELECT position FROM table_name_15 WHERE years_in_orlando = "2000"
Which position was in Orlando in 2000?
CREATE TABLE table_name_15 (position VARCHAR, years_in_orlando VARCHAR)
SELECT score FROM table_name_9 WHERE location_attendance = "madison square garden unknown" AND high_rebounds = "sidney green (10)"
What is Score, when Location Attendance is "Madison Square Garden Unknown", and when High Rebounds is "Sidney Green (10)"?
CREATE TABLE table_name_9 (score VARCHAR, location_attendance VARCHAR, high_rebounds VARCHAR)
SELECT COUNT(1961) FROM table_name_47 WHERE macedonian_population_in_vojvodina = "plandište" AND 1981 > 1027
What is the total 1961 number of the plandište Macedonian population with a 1981 value greater than 1027?
CREATE TABLE table_name_47 (macedonian_population_in_vojvodina VARCHAR)
SELECT artist FROM table_name_32 WHERE year = 2003
Which artist was 2003?
CREATE TABLE table_name_32 (artist VARCHAR, year VARCHAR)
SELECT poll FROM table_name_71 WHERE april_14 = "13"
What Poll was on April 14 of 13?
CREATE TABLE table_name_71 (poll VARCHAR, april_14 VARCHAR)
SELECT score FROM table_name_51 WHERE record = "84-56"
What game score was there for the team with a record of 84-56?
CREATE TABLE table_name_51 (score VARCHAR, record VARCHAR)
SELECT high_points FROM table_23285849_5 WHERE record = "3-0"
How scored the most points where the record is 3-0 for the season?
CREATE TABLE table_23285849_5 (high_points VARCHAR, record VARCHAR)
SELECT MIN(height__m_) FROM table_name_94 WHERE parent = "grasmoor" AND prom__m_ > 117
What is the lowest height for Parent grasmoor when it has a Prom larger than 117?
CREATE TABLE table_name_94 (height__m_ INTEGER, parent VARCHAR, prom__m_ VARCHAR)
SELECT Open_Date, Open_Year FROM shop WHERE Shop_Name = "Apple"
List the open date of open year of the shop named "Apple".
CREATE TABLE shop (Open_Date VARCHAR, Open_Year VARCHAR, Shop_Name VARCHAR)
SELECT year FROM table_name_60 WHERE name = "asi peko"
What year was Asi Peko?
CREATE TABLE table_name_60 (year VARCHAR, name VARCHAR)
SELECT description FROM table_256286_23 WHERE _percentage_yes = "39.57%"
What is the description of the measure that got 39.57% yes votes?
CREATE TABLE table_256286_23 (description VARCHAR, _percentage_yes VARCHAR)
SELECT nationality FROM table_name_89 WHERE goals = 14
Which nation had 14 goals?
CREATE TABLE table_name_89 (nationality VARCHAR, goals VARCHAR)
SELECT home FROM table_name_47 WHERE date = "november 22"
Who was the home team on November 22?
CREATE TABLE table_name_47 (home VARCHAR, date VARCHAR)
SELECT location FROM table_name_29 WHERE length___m__ = "64.2"
Where is the longest arch with a length in meters of 64.2?
CREATE TABLE table_name_29 (location VARCHAR, length___m__ VARCHAR)
SELECT qualities FROM table_name_59 WHERE sign = "cancer"
What is the qualities of the sign cancer?
CREATE TABLE table_name_59 (qualities VARCHAR, sign VARCHAR)
SELECT class FROM table_name_44 WHERE year > 1985 AND wins > 0
What engine class is associated with a year after 1985 and over 0 wins?
CREATE TABLE table_name_44 (class VARCHAR, year VARCHAR, wins VARCHAR)
SELECT opponent FROM table_name_97 WHERE method = "submission"
Which Opponent has a Method of submission?
CREATE TABLE table_name_97 (opponent VARCHAR, method VARCHAR)
SELECT MAX(wins) FROM table_name_86 WHERE earnings___$__ = 130 OFFSET 002
Name the most wins for earnings of 130,002
CREATE TABLE table_name_86 (wins INTEGER, earnings___$__ VARCHAR)
SELECT viewers__m_ FROM table_11251109_3 WHERE air_date = "November 9, 2007"
What is the viewership on november 9, 2007?
CREATE TABLE table_11251109_3 (viewers__m_ VARCHAR, air_date VARCHAR)
SELECT result FROM table_name_21 WHERE attendance = "54,418"
What is the result when there was an attendance of 54,418?
CREATE TABLE table_name_21 (result VARCHAR, attendance VARCHAR)
SELECT COUNT(population) FROM table_name_1 WHERE median_family_income = "$50,553"
What's the population that has a median family income of $50,553?
CREATE TABLE table_name_1 (population VARCHAR, median_family_income VARCHAR)
SELECT speed FROM table_name_13 WHERE rider = "chris swallow"
What is the Speed for Chris Swallow?
CREATE TABLE table_name_13 (speed VARCHAR, rider VARCHAR)
SELECT COUNT(date) FROM table_21330550_2 WHERE big_ten_team = "#10 Purdue"
How many dates have a big ten team of #10 purdue?
CREATE TABLE table_21330550_2 (date VARCHAR, big_ten_team VARCHAR)
SELECT SUM(wins) FROM table_name_12 WHERE latest_win = "1999 italian grand prix" AND rank > 15
How many total wins with the latest win at the 1999 Italian Grand Prix at a rank of 15?
CREATE TABLE table_name_12 (wins INTEGER, latest_win VARCHAR, rank VARCHAR)
SELECT written_by FROM table_21726793_1 WHERE no = 2
who wrote the no 2?
CREATE TABLE table_21726793_1 (written_by VARCHAR, no VARCHAR)
SELECT winners_share__$_ FROM table_15315816_1 WHERE year = "2004"
How much are all winners share ($) in the year 2004?
CREATE TABLE table_15315816_1 (winners_share__$_ VARCHAR, year VARCHAR)
SELECT location FROM table_25773116_2 WHERE winning_team = "Audette Racing"
Where did Audette Racing win?
CREATE TABLE table_25773116_2 (location VARCHAR, winning_team VARCHAR)
SELECT performance FROM table_name_89 WHERE athlete = "dire tune"
What's the performance of Dire Tune?
CREATE TABLE table_name_89 (performance VARCHAR, athlete VARCHAR)
SELECT to_par FROM table_name_26 WHERE player = "tiger woods"
What is Tiger Woods' to par?
CREATE TABLE table_name_26 (to_par VARCHAR, player VARCHAR)
SELECT title FROM table_25356350_2 WHERE written_by = "Jack Orman"
What is the title of the episode written by Jack Orman?
CREATE TABLE table_25356350_2 (title VARCHAR, written_by VARCHAR)
SELECT T1.template_type_code, COUNT(*) FROM Templates AS T1 JOIN Documents AS T2 ON T1.template_id = T2.template_id GROUP BY T1.template_type_code
Show all template type codes and the number of documents using each type.
CREATE TABLE Documents (template_id VARCHAR); CREATE TABLE Templates (template_type_code VARCHAR, template_id VARCHAR)
SELECT sanction FROM table_name_5 WHERE location = "nashville, illinois"
What was the sanction of the event at Nashville, Illinois?
CREATE TABLE table_name_5 (sanction VARCHAR, location VARCHAR)
SELECT international_competition FROM table_18042409_1 WHERE national_lacrosse_league = "Toronto Rock"
List all the international lacrosse league competitions for Toronto Rock.
CREATE TABLE table_18042409_1 (international_competition VARCHAR, national_lacrosse_league VARCHAR)
SELECT round FROM table_name_32 WHERE method = "decision (unanimous)" AND event = "ufc 145"
Which Round has a Method of decision (unanimous), and an Event of ufc 145?
CREATE TABLE table_name_32 (round VARCHAR, method VARCHAR, event VARCHAR)