answer
stringlengths
18
557
question
stringlengths
12
244
context
stringlengths
27
484
SELECT Country_name, COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name
Show the country names and the corresponding number of players.
CREATE TABLE match_season (Country VARCHAR); CREATE TABLE country (Country_name VARCHAR, Country_id VARCHAR)
SELECT AVG(enr) FROM College
What is the average enrollment number?
CREATE TABLE College (enr INTEGER)
SELECT MAX(losses) FROM table_name_45 WHERE goal_difference > 26
What is the losses when the goal difference is larger than 26?
CREATE TABLE table_name_45 (losses INTEGER, goal_difference INTEGER)
SELECT position FROM table_name_8 WHERE venue = "valencia, spain"
What was the position of the event held in Valencia, Spain?
CREATE TABLE table_name_8 (position VARCHAR, venue VARCHAR)
SELECT MAX(asian_american_population__2010_) FROM table_18963843_1 WHERE combined_statistical_area = "Kansas City-Overland Park-Kansas City, MO-KS CSA"
Name the asian american population 2010 for kansas city-overland park-kansas city, mo-ks csa
CREATE TABLE table_18963843_1 (asian_american_population__2010_ INTEGER, combined_statistical_area VARCHAR)
SELECT home_team FROM table_name_52 WHERE tie_no = "7"
WHAT IS THE HOME TEAM WITH A TIE NUMBER OF 7?
CREATE TABLE table_name_52 (home_team VARCHAR, tie_no VARCHAR)
SELECT t1.name, t1.age FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id ORDER BY t2.num_of_ticket DESC LIMIT 1
Find the name and age of the visitor who bought the most tickets at once.
CREATE TABLE visitor (name VARCHAR, age VARCHAR, id VARCHAR); CREATE TABLE visit (visitor_id VARCHAR, num_of_ticket VARCHAR)
SELECT championship FROM table_name_10 WHERE total = 2 AND league_cup > 0 AND name = "jem karacan"
What is the championship of Jem Karacan that has a total of 2 and a league cup more than 0?
CREATE TABLE table_name_10 (championship VARCHAR, name VARCHAR, total VARCHAR, league_cup VARCHAR)
SELECT democratic_ticket FROM table_name_68 WHERE office = "u.s. senator"
The person who is on the Democratic ticket for the position of Office of U.S. Senator was who?
CREATE TABLE table_name_68 (democratic_ticket VARCHAR, office VARCHAR)
SELECT date FROM table_name_40 WHERE venue = "antigua recreation ground"
When did a Venue of Antigua Recreation Ground happen?
CREATE TABLE table_name_40 (date VARCHAR, venue VARCHAR)
SELECT first_performance FROM table_name_80 WHERE status = "replacement cast"
When was the first performance with a replacement cast?
CREATE TABLE table_name_80 (first_performance VARCHAR, status VARCHAR)
SELECT score FROM table_name_34 WHERE total_points = 50
What was the score where the total points was 50?
CREATE TABLE table_name_34 (score VARCHAR, total_points VARCHAR)
SELECT player FROM table_name_67 WHERE place = "t8"
Who is the player with a t8 place?
CREATE TABLE table_name_67 (player VARCHAR, place VARCHAR)
SELECT AVG(sales__billion_) AS $_ FROM table_name_18 WHERE market_value__billion_$_ = 204.9 AND profits__billion_$_ < 20.6
What is the average sales for the company with market value of 204.9bil and profits under 20.6bil?
CREATE TABLE table_name_18 (sales__billion_ INTEGER, market_value__billion_$_ VARCHAR, profits__billion_$_ VARCHAR)
SELECT district FROM table_2192067_4 WHERE vacator = "Vacant"
what is the district where the vacator is vacant?
CREATE TABLE table_2192067_4 (district VARCHAR, vacator VARCHAR)
SELECT MIN(lane) FROM table_name_28 WHERE country = "france" AND react < 0.14100000000000001
What is the lowest Lane, when Country is France, and when React is less than 0.14100000000000001?
CREATE TABLE table_name_28 (lane INTEGER, country VARCHAR, react VARCHAR)
SELECT SUM(grid) FROM table_name_35 WHERE constructor = "renault" AND laps < 4
How many grids had a constructor of renault and less than 4 laps?
CREATE TABLE table_name_35 (grid INTEGER, constructor VARCHAR, laps VARCHAR)
SELECT sliding_tackle FROM table_name_3 WHERE dump_tackle = "no" AND shoulder_charge = "restricted"
Which sliding tackle has no dump tackle and a restricted shoulder charge?
CREATE TABLE table_name_3 (sliding_tackle VARCHAR, dump_tackle VARCHAR, shoulder_charge VARCHAR)
SELECT jump_2 FROM table_name_62 WHERE jump_3 = "7.77"
What is the Jump 2 of the person that has a Jump 3 of 7.77?
CREATE TABLE table_name_62 (jump_2 VARCHAR, jump_3 VARCHAR)
SELECT COUNT(score) FROM table_23281862_5 WHERE team = "Sacramento"
Name the number of score for sacramento
CREATE TABLE table_23281862_5 (score VARCHAR, team VARCHAR)
SELECT award FROM table_name_92 WHERE result = "nominated" AND category = "outstanding choreography"
Which Award has a nominated, and outstanding choreography?
CREATE TABLE table_name_92 (award VARCHAR, result VARCHAR, category VARCHAR)
SELECT genre FROM table_name_23 WHERE year < 2002 AND game = "the sims"
What's the genre of The Sims before 2002?
CREATE TABLE table_name_23 (genre VARCHAR, year VARCHAR, game VARCHAR)
SELECT MIN(taijiquan) FROM table_name_90 WHERE taijijian = 9.7 AND total > 19.34
What is the lowest Taijiquan of the athlete who has a Taijijian of 9.7 and a total more than 19.34?
CREATE TABLE table_name_90 (taijiquan INTEGER, taijijian VARCHAR, total VARCHAR)
SELECT SUM(Last) AS runners_up FROM table_name_63 WHERE club = "dempo sc"
What is the number of Last Runners-up that has the club name of dempo sc?
CREATE TABLE table_name_63 (Last INTEGER, club VARCHAR)
SELECT whenbuilt FROM table_name_28 WHERE name = "fighter command"
When was the locomotive named fighter command built?
CREATE TABLE table_name_28 (whenbuilt VARCHAR, name VARCHAR)
SELECT call_sign FROM table_name_16 WHERE city_of_license = "spring valley, nevada"
What is the call sign of the translator in Spring Valley, Nevada?
CREATE TABLE table_name_16 (call_sign VARCHAR, city_of_license VARCHAR)
SELECT MIN(money___) AS $__ FROM table_name_13 WHERE country = "south africa" AND to_par < 8
What is the lowest amount of money a player from South Africa with a to par less than 8 has?
CREATE TABLE table_name_13 (money___ INTEGER, country VARCHAR, to_par VARCHAR)
SELECT COUNT(*) FROM artwork
How many artworks are there?
CREATE TABLE artwork (Id VARCHAR)
SELECT weight FROM table_name_92 WHERE shape = "scalloped" AND size = "20mm (across scallops)"
What is the weight with the shape of scalloped, and that is a size of 20mm (across scallops)?
CREATE TABLE table_name_92 (weight VARCHAR, shape VARCHAR, size VARCHAR)
SELECT MAX(assists) FROM table_22875514_3 WHERE points = "129-3.9"
What is the most assists for points 129-3.9?
CREATE TABLE table_22875514_3 (assists INTEGER, points VARCHAR)
SELECT MIN(green__sw_) FROM table_2066296_5 WHERE interior_roof = "Charcoal/white"
What's the green (SW) of the model with charcoal/white interior/roof?
CREATE TABLE table_2066296_5 (green__sw_ INTEGER, interior_roof VARCHAR)
SELECT australian_role FROM table_10121127_1 WHERE un_operation_name = "UNAMA"
What is Australia's role in the UN operation Unama?
CREATE TABLE table_10121127_1 (australian_role VARCHAR, un_operation_name VARCHAR)
SELECT result FROM table_1341640_14 WHERE first_elected = 1960
What was the result of the election when someone was first elected in 1960?
CREATE TABLE table_1341640_14 (result VARCHAR, first_elected VARCHAR)
SELECT opponent FROM table_name_37 WHERE game = 29
What team were the Opponent in Game 29?
CREATE TABLE table_name_37 (opponent VARCHAR, game VARCHAR)
SELECT date FROM table_name_17 WHERE visitor = "st. louis"
What was the date of the game when St. Louis was the visiting team?
CREATE TABLE table_name_17 (date VARCHAR, visitor VARCHAR)
SELECT COUNT(position) FROM table_1965650_6 WHERE player = "Denis Patry"
How many positions for denis patry?
CREATE TABLE table_1965650_6 (position VARCHAR, player VARCHAR)
SELECT publication_date FROM table_name_90 WHERE reported_price = "$500,000" AND publisher_s_ = "people" AND person_s_ = "sean preston federline"
What was the publication date of the photos of Sean Preston Federline that cost $500,000 and were published by People?
CREATE TABLE table_name_90 (publication_date VARCHAR, person_s_ VARCHAR, reported_price VARCHAR, publisher_s_ VARCHAR)
SELECT MAX(draws) FROM table_name_20 WHERE losses < 3 AND wins > 16
What is the draws when there are less than 3 losses and more than 16 wins?
CREATE TABLE table_name_20 (draws INTEGER, losses VARCHAR, wins VARCHAR)
SELECT team FROM table_name_20 WHERE goals_against < 64 AND points_2 = 63 AND goals_for = 101
What team has less than 64 goals against, 101 goals for, and a Points 2 total of 63?
CREATE TABLE table_name_20 (team VARCHAR, goals_for VARCHAR, goals_against VARCHAR, points_2 VARCHAR)
SELECT laps FROM table_name_36 WHERE grid = "3"
What is the number of laps for Grid 3?
CREATE TABLE table_name_36 (laps VARCHAR, grid VARCHAR)
SELECT record FROM table_name_57 WHERE event = "ufc 40"
What is Record, when Event is "UFC 40"?
CREATE TABLE table_name_57 (record VARCHAR, event VARCHAR)
SELECT event FROM table_name_35 WHERE opponent = "yasuhito namekawa" AND method = "decision"
Which event had an opponent of Yasuhito Namekawa with a decision method?
CREATE TABLE table_name_35 (event VARCHAR, opponent VARCHAR, method VARCHAR)
SELECT COUNT(population__2011_) FROM table_2562572_37 WHERE cyrillic_name_other_names = "Александрово"
Name the population for александрово
CREATE TABLE table_2562572_37 (population__2011_ VARCHAR, cyrillic_name_other_names VARCHAR)
SELECT opponent FROM table_name_46 WHERE loss = "erickson (8-19)"
Which opponent has a loss of erickson (8-19)?
CREATE TABLE table_name_46 (opponent VARCHAR, loss VARCHAR)
SELECT MAX(top_5) FROM table_2181798_1 WHERE avg_finish = "27.6"
Name the max top 5 for avg finish being 27.6
CREATE TABLE table_2181798_1 (top_5 INTEGER, avg_finish VARCHAR)
SELECT COUNT(vehicle) FROM table_20090682_4 WHERE top_13_time = "1:18.72"
how many vehicles where top 13 time is 1:18.72
CREATE TABLE table_20090682_4 (vehicle VARCHAR, top_13_time VARCHAR)
SELECT time FROM table_name_59 WHERE grid = 19
Which Time has a Grid of 19?
CREATE TABLE table_name_59 (time VARCHAR, grid VARCHAR)
SELECT tournament FROM table_name_76 WHERE outcome = "winner" AND surface = "hard" AND date = "august 26, 2006"
Which tournament had an outcome of winner, a hard surface, and happened on August 26, 2006?
CREATE TABLE table_name_76 (tournament VARCHAR, date VARCHAR, outcome VARCHAR, surface VARCHAR)
SELECT MAX(events) FROM table_name_38 WHERE top_25 = 1 AND cuts_made < 1
How many events have a Top-25 of 1 and made less than 1 cut?
CREATE TABLE table_name_38 (events INTEGER, top_25 VARCHAR, cuts_made VARCHAR)
SELECT enrollment FROM table_2076608_3 WHERE location_s_ = "Alexandria"
Where are the Alexandria enrollment locations?
CREATE TABLE table_2076608_3 (enrollment VARCHAR, location_s_ VARCHAR)
SELECT school FROM table_name_47 WHERE hometown = "dallas, tx"
What is the school of the player from Dallas, TX?
CREATE TABLE table_name_47 (school VARCHAR, hometown VARCHAR)
SELECT LOCATION, COUNT(*) FROM gas_station GROUP BY LOCATION ORDER BY COUNT(*)
Show all locations and the number of gas stations in each location ordered by the count.
CREATE TABLE gas_station (LOCATION VARCHAR)
SELECT record FROM table_name_63 WHERE date = "april 7"
What was the record on April 7?
CREATE TABLE table_name_63 (record VARCHAR, date VARCHAR)
SELECT manager FROM table_name_16 WHERE club = "stenhousemuir"
Who is the manager of the Stenhousemuir club?
CREATE TABLE table_name_16 (manager VARCHAR, club VARCHAR)
SELECT opponent FROM table_name_25 WHERE week < 7 AND game_site = "tulane stadium"
Who did the Giants play before week 7 in Tulane Stadium?
CREATE TABLE table_name_25 (opponent VARCHAR, week VARCHAR, game_site VARCHAR)
SELECT SUM(goals_for) FROM table_name_19 WHERE goal_difference > -3 AND club = "real avilés cf" AND goals_against > 60
what is the goals when the goal difference is more than -3, the club is real avilés cf and the goals against is more than 60?
CREATE TABLE table_name_19 (goals_for INTEGER, goals_against VARCHAR, goal_difference VARCHAR, club VARCHAR)
SELECT COUNT(period) FROM table_24565004_13 WHERE name = "Yvon Le Roux"
Name the total number of period for yvon le roux
CREATE TABLE table_24565004_13 (period VARCHAR, name VARCHAR)
SELECT 2008 FROM table_name_42 WHERE 2006 = "brikajdri wilson"
Who attended the school in 2008, that Brikajdri Wilson attended in 2006?
CREATE TABLE table_name_42 (Id VARCHAR)
SELECT MAX(no) FROM table_1590652_4 WHERE tournament = "Madrid Masters"
Name the most number when tournament is madrid masters
CREATE TABLE table_1590652_4 (no INTEGER, tournament VARCHAR)
SELECT result FROM table_name_84 WHERE date = "11/02/1946"
What was the Result on 11/02/1946?
CREATE TABLE table_name_84 (result VARCHAR, date VARCHAR)
SELECT model_name FROM table_1147701_5 WHERE engine_code = "D5244 T"
What is the model of the engine d5244 t?
CREATE TABLE table_1147701_5 (model_name VARCHAR, engine_code VARCHAR)
SELECT population_density___km²_2010_ FROM table_21734764_1 WHERE population_2010_census = 264170
What is the population density of the administrative division with a population in 2010 of 264170 according to the census?
CREATE TABLE table_21734764_1 (population_density___km²_2010_ VARCHAR, population_2010_census VARCHAR)
SELECT date FROM table_name_13 WHERE result = "0–2" AND opponent = "aberdeen"
When has a Result of 0–2 and a Opponent of aberdeen?
CREATE TABLE table_name_13 (date VARCHAR, result VARCHAR, opponent VARCHAR)
SELECT MIN(week) FROM table_name_31 WHERE date = "december 26, 1999"
What is the lowest week for December 26, 1999
CREATE TABLE table_name_31 (week INTEGER, date VARCHAR)
SELECT date FROM table_name_59 WHERE score = "6–4, 6–2"
On what Date was the Score 6–4, 6–2?
CREATE TABLE table_name_59 (date VARCHAR, score VARCHAR)
SELECT to_par FROM table_name_35 WHERE score = 73 - 70 - 71 - 72 = 286
What is the To par of the Player with a Score of 73-70-71-72=286?
CREATE TABLE table_name_35 (to_par VARCHAR, score VARCHAR)
SELECT home_team FROM table_name_90 WHERE venue = "western oval"
Which Team plays at Western Oval?
CREATE TABLE table_name_90 (home_team VARCHAR, venue VARCHAR)
SELECT home FROM table_name_63 WHERE score = "0:2"
Which Home has a Score of 0:2?
CREATE TABLE table_name_63 (home VARCHAR, score VARCHAR)
SELECT pick__number FROM table_name_69 WHERE nhl_team = "detroit red wings"
Which Pick # has an NHL team of detroit red wings?
CREATE TABLE table_name_69 (pick__number VARCHAR, nhl_team VARCHAR)
SELECT T1.good_or_bad_customer FROM customers AS T1 JOIN discount_coupons AS T2 ON T1.coupon_id = T2.coupon_id WHERE T2.coupon_amount = 500
Are the customers holding coupons with amount 500 bad or good?
CREATE TABLE discount_coupons (coupon_id VARCHAR, coupon_amount VARCHAR); CREATE TABLE customers (good_or_bad_customer VARCHAR, coupon_id VARCHAR)
SELECT MIN(year) FROM table_name_41 WHERE seat_factor = "68%" AND flying_hours > 105 OFFSET 579
What was the earliest year that had more than 105,579 flying hours and a seat factor of 68%?
CREATE TABLE table_name_41 (year INTEGER, seat_factor VARCHAR, flying_hours VARCHAR)
SELECT result FROM table_name_55 WHERE week = 11
What was the result of the game on week 11?
CREATE TABLE table_name_55 (result VARCHAR, week VARCHAR)
SELECT date FROM table_name_17 WHERE score = "104-113"
What date has 104-113 as the score?
CREATE TABLE table_name_17 (date VARCHAR, score VARCHAR)
SELECT COUNT(train_name) FROM table_29301050_1 WHERE train_number = 99808
how many trains have the number 99808
CREATE TABLE table_29301050_1 (train_name VARCHAR, train_number VARCHAR)
SELECT name FROM player WHERE points > (SELECT AVG(points) FROM player)
what are the name of players who get more than the average points.
CREATE TABLE player (name VARCHAR, points INTEGER)
SELECT score FROM table_name_42 WHERE home = "new jersey"
What is the score of the New Jersey home game?
CREATE TABLE table_name_42 (score VARCHAR, home VARCHAR)
SELECT to_par FROM table_name_3 WHERE place = "t6" AND country = "united states" AND player = "leonard thompson"
What is the to par for Leonard Thompson from the United States with a place of T6?
CREATE TABLE table_name_3 (to_par VARCHAR, player VARCHAR, place VARCHAR, country VARCHAR)
SELECT losing_bonus FROM table_name_35 WHERE tries_against = "33" AND lost = "5"
What is the losing bonus for the team that has 33 tries against and 5 lost?
CREATE TABLE table_name_35 (losing_bonus VARCHAR, tries_against VARCHAR, lost VARCHAR)
SELECT title FROM table_19401346_1 WHERE production_code = 10018
What's the title of the episode with production code 10018?
CREATE TABLE table_19401346_1 (title VARCHAR, production_code VARCHAR)
SELECT cust_name FROM customer WHERE credit_score < (SELECT AVG(credit_score) FROM customer)
Find the name of customers whose credit score is below the average credit scores of all customers.
CREATE TABLE customer (cust_name VARCHAR, credit_score INTEGER)
SELECT award FROM table_name_55 WHERE category = "best music video"
Which award is in the category of best music video?
CREATE TABLE table_name_55 (award VARCHAR, category VARCHAR)
SELECT icao FROM table_name_88 WHERE iata = "bvc"
What is the ICAO for the IATA bvc?
CREATE TABLE table_name_88 (icao VARCHAR, iata VARCHAR)
SELECT COUNT(result) FROM table_19744915_15 WHERE couple = "Ellery and Frankie"
How many results do Ellery and Frankie have?
CREATE TABLE table_19744915_15 (result VARCHAR, couple VARCHAR)
SELECT COUNT(wins) FROM table_name_70 WHERE central_murray = "koondrook-barham" AND draws > 0
What is the total number of wins of the central murray of koondrook-barham, which has more than 0 draws?
CREATE TABLE table_name_70 (wins VARCHAR, central_murray VARCHAR, draws VARCHAR)
SELECT COUNT(*) FROM FLIGHTS
How many flights do we have?
CREATE TABLE FLIGHTS (Id VARCHAR)
SELECT time FROM table_name_96 WHERE round > 2 AND opponent = "jesse brock"
Which Time has a Round larger than 2, and an Opponent of jesse brock?
CREATE TABLE table_name_96 (time VARCHAR, round VARCHAR, opponent VARCHAR)
SELECT marowijne FROM table_name_2 WHERE saramacca = "18.8%"
What is the marowijne with an 18.8% saramacca?
CREATE TABLE table_name_2 (marowijne VARCHAR, saramacca VARCHAR)
SELECT rank FROM table_name_92 WHERE season = "2006/07"
What was the rank of the team during season 2006/07?
CREATE TABLE table_name_92 (rank VARCHAR, season VARCHAR)
SELECT occupation² FROM table_name_52 WHERE age¹ > 24 AND alias = "black"
What is Occupation², when Age¹ is greater than 24, when Alias is "Black"?
CREATE TABLE table_name_52 (occupation² VARCHAR, age¹ VARCHAR, alias VARCHAR)
SELECT T1.account_name, T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Meaghan" AND T2.customer_last_name = "Keeling"
Show the account name and other account detail for all accounts by the customer with first name Meaghan and last name Keeling.
CREATE TABLE Customers (customer_id VARCHAR, customer_first_name VARCHAR, customer_last_name VARCHAR); CREATE TABLE Accounts (account_name VARCHAR, other_account_details VARCHAR, customer_id VARCHAR)
SELECT COUNT(standard) FROM table_19246_1 WHERE launch_date__ddmmyyyy_ = "17.04.2006"
How many standards are there, when the launch date was 17.04.2006?
CREATE TABLE table_19246_1 (standard VARCHAR, launch_date__ddmmyyyy_ VARCHAR)
SELECT season_1 FROM table_name_5 WHERE season_7 = "david chilton"
Which Season 1 has a Season 7 of david chilton?
CREATE TABLE table_name_5 (season_1 VARCHAR, season_7 VARCHAR)
SELECT indication FROM table_name_50 WHERE status = "phase 2b"
What did the phase 2b status target?
CREATE TABLE table_name_50 (indication VARCHAR, status VARCHAR)
SELECT route_via FROM table_29202276_2 WHERE train_name = "Parasuram Express"
What is the route/via when the train name is Parasuram Express?
CREATE TABLE table_29202276_2 (route_via VARCHAR, train_name VARCHAR)
SELECT region FROM table_name_98 WHERE catalog = "kem 072"
Which Region has a Catalog of kem 072?
CREATE TABLE table_name_98 (region VARCHAR, catalog VARCHAR)
SELECT classroom FROM list GROUP BY classroom ORDER BY COUNT(*) DESC LIMIT 1
Which classroom has the most students?
CREATE TABLE list (classroom VARCHAR)
SELECT AVG(ties) FROM table_name_21 WHERE wins < 5 AND goals_against > 37 AND games_played < 8
For teams with fewer than 5 wins, goals against over 37, and fewer than 8 games played, what is the average number of ties?
CREATE TABLE table_name_21 (ties INTEGER, games_played VARCHAR, wins VARCHAR, goals_against VARCHAR)
SELECT frequency FROM table_name_10 WHERE power__kw_ = "25kw"
What is the frequency where the power is 25kw?
CREATE TABLE table_name_10 (frequency VARCHAR, power__kw_ VARCHAR)
SELECT candidates FROM table_1342233_24 WHERE district = "Mississippi 6"
What candidates are from mississippi 6?
CREATE TABLE table_1342233_24 (candidates VARCHAR, district VARCHAR)
SELECT time_retired FROM table_name_45 WHERE grid < 11 AND driver = "jo siffert"
What is the time/retired for jo siffert with a grid under 11?
CREATE TABLE table_name_45 (time_retired VARCHAR, grid VARCHAR, driver VARCHAR)