answer stringlengths 18 557 | question stringlengths 12 244 | context stringlengths 27 489 |
|---|---|---|
SELECT Police_force FROM county_public_safety WHERE LOCATION = "East" INTERSECT SELECT Police_force FROM county_public_safety WHERE LOCATION = "West" | Show the police force shared by counties with location on the east and west. | CREATE TABLE county_public_safety (Police_force VARCHAR, LOCATION VARCHAR) |
SELECT AVG(bronze) FROM table_name_96 WHERE gold = 1 AND nation = "hungary" AND rank < 3 | what is the average bronze when gold is 1, the nation is hungary and the rank is less than 3? | CREATE TABLE table_name_96 (bronze INTEGER, rank VARCHAR, gold VARCHAR, nation VARCHAR) |
SELECT loss FROM table_name_10 WHERE opponent = "angels" | Name the loss for the angels opponent | CREATE TABLE table_name_10 (loss VARCHAR, opponent VARCHAR) |
SELECT competing_entities FROM table_name_37 WHERE age_groups = "18 or younger" AND held_every = "one year" AND sport = "table tennis" | what is the competing entities when the age group is 18 or younger, held every is one year and the sport is table tennis? | CREATE TABLE table_name_37 (competing_entities VARCHAR, sport VARCHAR, age_groups VARCHAR, held_every VARCHAR) |
SELECT licence_award_date FROM table_name_67 WHERE on_air_date = "july 2001" AND region = "south wales and the severn estuary" | What was the license award date for the ensemble from South Wales and the Severn Estuary that was on air in July 2001? | CREATE TABLE table_name_67 (licence_award_date VARCHAR, on_air_date VARCHAR, region VARCHAR) |
SELECT driver_s FROM table_name_81 WHERE class = "sports car" AND race_title = "xxiv gran premio di pescara" | Who won the XXIV Gran Premio di Pescara in the sports car class? | CREATE TABLE table_name_81 (driver_s VARCHAR, class VARCHAR, race_title VARCHAR) |
SELECT position FROM table_name_26 WHERE school_club_team_country = "valparaiso" | Name the position for the player that is from valparaiso | CREATE TABLE table_name_26 (position VARCHAR, school_club_team_country VARCHAR) |
SELECT date FROM table_name_95 WHERE opponent = "angels" AND loss = "sanderson (0–1)" | Which date has an Opponent of angels, and a Loss of sanderson (0–1)? | CREATE TABLE table_name_95 (date VARCHAR, opponent VARCHAR, loss VARCHAR) |
SELECT crowd FROM table_name_17 WHERE home_team = "st kilda" | What is the crowd size for st kilda as the home team? | CREATE TABLE table_name_17 (crowd VARCHAR, home_team VARCHAR) |
SELECT division_record FROM table_name_26 WHERE team = "spartans" | What division record did the Spartans hold? | CREATE TABLE table_name_26 (division_record VARCHAR, team VARCHAR) |
SELECT try_bonus FROM table_name_67 WHERE points = "58" | What is the try bonus when there were 58 points? | CREATE TABLE table_name_67 (try_bonus VARCHAR, points VARCHAR) |
SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE lastname = "Heilo" GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1 | Which vocal type has the band mate with last name "Heilo" played the most? | CREATE TABLE vocals (bandmate VARCHAR); CREATE TABLE band (id VARCHAR) |
SELECT player FROM table_name_51 WHERE pl_gp > 0 | What player has a number of playoff games played greater than 0? | CREATE TABLE table_name_51 (player VARCHAR, pl_gp INTEGER) |
SELECT pos FROM table_name_56 WHERE tyres = "m" AND laps > 352 | What position that has m tyres and 352 or more laps? | CREATE TABLE table_name_56 (pos VARCHAR, tyres VARCHAR, laps VARCHAR) |
SELECT date FROM table_name_84 WHERE tournament = "lagos" | When was the Lagos tournament? | CREATE TABLE table_name_84 (date VARCHAR, tournament VARCHAR) |
SELECT school_club_team FROM table_name_5 WHERE round < 2 | Which School/Club Team did not make it to round 2? | CREATE TABLE table_name_5 (school_club_team VARCHAR, round INTEGER) |
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 tournament FROM table_name_50 WHERE result = "18th" | What is Tournament, when Result is 18th? | CREATE TABLE table_name_50 (tournament VARCHAR, result VARCHAR) |
SELECT home FROM table_name_26 WHERE record = "11–8–2" | What team was the home team when the record was 11–8–2? | CREATE TABLE table_name_26 (home VARCHAR, record VARCHAR) |
SELECT team FROM table_23248910_9 WHERE date = "March 5" | What is every team on March 5? | CREATE TABLE table_23248910_9 (team VARCHAR, date VARCHAR) |
SELECT 2 AS nd_leg FROM table_27603010_14 WHERE team__number1 = "Deportivo Pasto" | What was the 2nd leg score if the team 1 is Deportivo Pasto? | CREATE TABLE table_27603010_14 (team__number1 VARCHAR) |
SELECT driver FROM table_name_68 WHERE laps < 84 AND points > 9 AND team = "rocketsports racing" | Which Driver has less than 84 laps, more than 9 points and is on Rocketsports Racing Team? | CREATE TABLE table_name_68 (driver VARCHAR, team VARCHAR, laps VARCHAR, points VARCHAR) |
SELECT city_of_license FROM table_name_20 WHERE frequency = "101.1" | What is City of License, when Frequency is 101.1? | CREATE TABLE table_name_20 (city_of_license VARCHAR, frequency VARCHAR) |
SELECT home FROM table_name_96 WHERE score = "2 – 2" | Who was the home team at the game that had a score of 2 – 2? | CREATE TABLE table_name_96 (home VARCHAR, score VARCHAR) |
SELECT MAX(wins) FROM table_name_99 WHERE against = 1637 AND byes > 0 | What are the most wins with byes more than 0 and 1637 against? | CREATE TABLE table_name_99 (wins INTEGER, against VARCHAR, byes VARCHAR) |
SELECT batting_partners FROM table_1670921_2 WHERE batting_team = "Pakistan" | What batting partners batted for pakistan? | CREATE TABLE table_1670921_2 (batting_partners VARCHAR, batting_team VARCHAR) |
SELECT projects_templates FROM table_name_39 WHERE intellitrace = "no" AND windows_phone_development = "yes" AND test_impact_analysis = "no" | Which Projects template has an IntelliTrace of no, and a Windows Phone development of yes, and a Test impact analysis of no? | CREATE TABLE table_name_39 (projects_templates VARCHAR, test_impact_analysis VARCHAR, intellitrace VARCHAR, windows_phone_development VARCHAR) |
SELECT total_viewers__in_millions_ FROM table_12419515_4 WHERE season__number = 8 | How many millions of total viewers watched season #8? | CREATE TABLE table_12419515_4 (total_viewers__in_millions_ VARCHAR, season__number VARCHAR) |
SELECT ground FROM table_name_42 WHERE date = "2008-06-20" | What is the Ground with a Date that is 2008-06-20? | CREATE TABLE table_name_42 (ground VARCHAR, date VARCHAR) |
SELECT index FROM table_name_23 WHERE country = "singapore" AND name = "chen bangjun andie" | What is the Index number of Chen Bangjun Andie from Singapore? | CREATE TABLE table_name_23 (index VARCHAR, country VARCHAR, name VARCHAR) |
SELECT T1.County_name, COUNT(*) FROM county AS T1 JOIN election AS T2 ON T1.County_id = T2.District GROUP BY T1.County_id | Show the name of each county along with the corresponding number of delegates from that county. | CREATE TABLE election (District VARCHAR); CREATE TABLE county (County_name VARCHAR, County_id VARCHAR) |
SELECT AVG(total) FROM table_name_33 WHERE bronze > 3 AND gold > 8 | What is the average total for teams with over 3 bronzes and over 8 golds? | CREATE TABLE table_name_33 (total INTEGER, bronze VARCHAR, gold VARCHAR) |
SELECT place FROM table_name_51 WHERE score > 68 AND player = "camilo villegas" | What place has a score greater than 68, and camilo villegas as the player? | CREATE TABLE table_name_51 (place VARCHAR, score VARCHAR, player VARCHAR) |
SELECT COUNT(television_station) FROM table_2879165_1 WHERE ioc_code = "MAS" | How many television station listings have a ioc code as mas? | CREATE TABLE table_2879165_1 (television_station VARCHAR, ioc_code VARCHAR) |
SELECT third_member FROM table_name_30 WHERE third_party = "conservative" AND second_party = "liberal" | Who is the third member of the third conservative party, and the second liberal party? | CREATE TABLE table_name_30 (third_member VARCHAR, third_party VARCHAR, second_party VARCHAR) |
SELECT position FROM table_name_92 WHERE birthplace = "buffalo, new york" | What is the Position, when the Birthplace is Buffalo, New York? | CREATE TABLE table_name_92 (position VARCHAR, birthplace VARCHAR) |
SELECT AVG(wins) FROM table_name_94 WHERE matches = 14 AND no_result < 0 | What is the number of wins when there are 14 matches, and the No Result was less than 0? | CREATE TABLE table_name_94 (wins INTEGER, matches VARCHAR, no_result VARCHAR) |
SELECT 3 AS _dart_average FROM table_20301877_2 WHERE player = "Raymond van Barneveld" | what is the 3-dart average of raymond van barneveld | CREATE TABLE table_20301877_2 (player VARCHAR) |
SELECT COUNT(highest_position) FROM table_name_14 WHERE issue_date < 9 AND album_title = "where we belong" | What is the highest position the album Where we belong, which had an issue date higher than 9, had? | CREATE TABLE table_name_14 (highest_position VARCHAR, issue_date VARCHAR, album_title VARCHAR) |
SELECT venue FROM table_name_59 WHERE status = "five nations" AND against > 12 AND date = "15/02/1975" | Which venue had a status of five nations, an against larger than 12 and took place on 15/02/1975? | CREATE TABLE table_name_59 (venue VARCHAR, date VARCHAR, status VARCHAR, against VARCHAR) |
SELECT gdp__billion_us$_ FROM table_1307842_6 WHERE area__km²_ = 83871 | What is the gdp of the country with an area of 83871 (km2)? | CREATE TABLE table_1307842_6 (gdp__billion_us$_ VARCHAR, area__km²_ VARCHAR) |
SELECT COUNT(silver) FROM table_name_57 WHERE gold < 1 AND total < 1 | How many silver medals for the nation with fewer than 1 golds and total less than 1? | CREATE TABLE table_name_57 (silver VARCHAR, gold VARCHAR, total VARCHAR) |
SELECT height FROM table_12962773_15 WHERE player = "Marco Belinelli" | How tall is Marco Belinelli? | CREATE TABLE table_12962773_15 (height VARCHAR, player VARCHAR) |
SELECT occupation FROM table_name_90 WHERE residence = "red bank" | What job is at red bank? | CREATE TABLE table_name_90 (occupation VARCHAR, residence VARCHAR) |
SELECT SUM(series) FROM table_name_54 WHERE sixth_place = "joan tena" | What series had Joan Tena in sixth place? | CREATE TABLE table_name_54 (series INTEGER, sixth_place VARCHAR) |
SELECT COUNT(grid) FROM table_name_60 WHERE time_retired = "34:22.335" | What is the total number of grids where there were races that had a time of 34:22.335? | CREATE TABLE table_name_60 (grid VARCHAR, time_retired VARCHAR) |
SELECT COUNT(team_record) FROM table_10392906_2 WHERE date = "Friday, May 25" | How many records are listed on Friday, May 25? | CREATE TABLE table_10392906_2 (team_record VARCHAR, date VARCHAR) |
SELECT dist__f_ FROM table_name_75 WHERE race = "irish derby" | Which Dist (f) has a Race of irish derby? | CREATE TABLE table_name_75 (dist__f_ VARCHAR, race VARCHAR) |
SELECT MIN(round) FROM table_name_96 WHERE time = "1:12" | What is the smallest round with a time of 1:12? | CREATE TABLE table_name_96 (round INTEGER, time VARCHAR) |
SELECT COUNT(position) FROM table_name_56 WHERE points > 5 AND drawn = 3 AND lost < 2 | What is the total number of positions for teams with more than 5 points, 3 draws, and under 2 losses? | CREATE TABLE table_name_56 (position VARCHAR, lost VARCHAR, points VARCHAR, drawn VARCHAR) |
SELECT delegate FROM table_27050336_7 WHERE committee = "Judiciary" AND party = "Democratic" AND counties_represented = "Montgomery" | For democratic party, countries represented is montgomery and where committee is judiciary mention all the delegate name. | CREATE TABLE table_27050336_7 (delegate VARCHAR, counties_represented VARCHAR, committee VARCHAR, party VARCHAR) |
SELECT record FROM table_name_80 WHERE res = "loss" AND event = "rsf: shooto challenge 2" | What is the record that resulted in a loss at the RSF: Shooto Challenge 2? | CREATE TABLE table_name_80 (record VARCHAR, res VARCHAR, event VARCHAR) |
SELECT name FROM table_name_54 WHERE year = "junior" AND high_school = "wheatley" | What is the Name with a Year of junior, and a High School with wheatley? | CREATE TABLE table_name_54 (name VARCHAR, year VARCHAR, high_school VARCHAR) |
SELECT order__number FROM table_26250227_1 WHERE original_artist = "Maroon 5" | What are all of the order # where authentic artist is maroon 5 | CREATE TABLE table_26250227_1 (order__number VARCHAR, original_artist VARCHAR) |
SELECT total FROM table_name_86 WHERE set_2 = "24:22" | What is the Total of Set 2 of 24:22? | CREATE TABLE table_name_86 (total VARCHAR, set_2 VARCHAR) |
SELECT introductory_phrase FROM table_14835674_1 WHERE guest = "Neil Shubin" | What was the inroductory phase for the episode with neil shubin as a guest? | CREATE TABLE table_14835674_1 (introductory_phrase VARCHAR, guest VARCHAR) |
SELECT original_air_date FROM table_29436238_1 WHERE no_in_season = 4 | What date did episode 4 in the season originally air? | CREATE TABLE table_29436238_1 (original_air_date VARCHAR, no_in_season VARCHAR) |
SELECT number FROM table_name_11 WHERE language = "belarusian" | What is the number of the belarusian language? | CREATE TABLE table_name_11 (number VARCHAR, language VARCHAR) |
SELECT Vice AS president FROM table_name_29 WHERE president = "daniel masny" AND treasurer = "rebecca t. altmann" | Which Vice President has a President of daniel masny, and a Treasurer of rebecca t. altmann? | CREATE TABLE table_name_29 (Vice VARCHAR, president VARCHAR, treasurer VARCHAR) |
SELECT r1st FROM table_name_49 WHERE ryds = "36" | Who is the R1st that has 36 RYds? | CREATE TABLE table_name_49 (r1st VARCHAR, ryds VARCHAR) |
SELECT MAX(total) FROM table_name_27 WHERE player = "bernhard langer" | Bernhard Langer maximum total was what? | CREATE TABLE table_name_27 (total INTEGER, player VARCHAR) |
SELECT lead FROM table_name_10 WHERE skip = "ritvars gulbis" | Who was the lead when Ritvars Gulbis was the skip? | CREATE TABLE table_name_10 (lead VARCHAR, skip VARCHAR) |
SELECT internet_explorer FROM table_name_66 WHERE mobile = "2.1%" | What percentage of users were using Internet Explorer during the period in which 2.1% were using mobile browsers? | CREATE TABLE table_name_66 (internet_explorer VARCHAR, mobile VARCHAR) |
SELECT COUNT(votes) FROM table_name_4 WHERE artist = "sahlene" AND place > 1 | What is the total number of votes Sahlene with a place below 1 has? | CREATE TABLE table_name_4 (votes VARCHAR, artist VARCHAR, place VARCHAR) |
SELECT player FROM table_name_76 WHERE place = "t5" AND score = 73 - 69 - 68 = 210 | Who placed in t5 and scored 73-69-68=210? | CREATE TABLE table_name_76 (player VARCHAR, place VARCHAR, score VARCHAR) |
SELECT venue FROM table_name_7 WHERE competition = "friendly match" | Which venue is the friendly match in? | CREATE TABLE table_name_7 (venue VARCHAR, competition VARCHAR) |
SELECT type FROM table_name_79 WHERE cancelable = "no" AND attribute = "ondragend" | Name the type with cancelable of no and attribute of ondragend | CREATE TABLE table_name_79 (type VARCHAR, cancelable VARCHAR, attribute VARCHAR) |
SELECT dorm_name FROM dorm WHERE NOT dormid IN (SELECT dormid FROM has_amenity) | Find the name of dorms that do not have any amenity | CREATE TABLE dorm (dorm_name VARCHAR, dormid VARCHAR); CREATE TABLE has_amenity (dorm_name VARCHAR, dormid VARCHAR) |
SELECT gold FROM table_name_97 WHERE bronze = "kim hyang-mi" | Who won the gold when Kim Hyang-Mi won the bronze? | CREATE TABLE table_name_97 (gold VARCHAR, bronze VARCHAR) |
SELECT MAX(bronze) FROM table_name_11 WHERE silver < 1 AND gold > 0 | what is the highest bronze when silver is less than 1 and gold is more than 0? | CREATE TABLE table_name_11 (bronze INTEGER, silver VARCHAR, gold VARCHAR) |
SELECT score_in_the_final FROM table_name_7 WHERE championship = "french open" | What was the score of the French Open? | CREATE TABLE table_name_7 (score_in_the_final VARCHAR, championship VARCHAR) |
SELECT COUNT(DISTINCT payment_method) FROM customers | How many different payment methods are there? | CREATE TABLE customers (payment_method VARCHAR) |
SELECT COUNT(production_code) FROM table_2409041_3 WHERE no_in_series = 39 | How many production codes were in series 39? | CREATE TABLE table_2409041_3 (production_code VARCHAR, no_in_series VARCHAR) |
SELECT reporters FROM table_22514845_4 WHERE year = 1984 | Who are the reporters for the year of 1984? | CREATE TABLE table_22514845_4 (reporters VARCHAR, year VARCHAR) |
SELECT season FROM table_237757_10 WHERE low_team = "Chicago Sting" | What was the season when the low team is chicago sting? | CREATE TABLE table_237757_10 (season VARCHAR, low_team VARCHAR) |
SELECT position FROM table_1013129_1 WHERE college_junior_club_team = "Molot Perm (Russia)" | What positions does the college/junior/club team, molot perm (russia) have? | CREATE TABLE table_1013129_1 (position VARCHAR, college_junior_club_team VARCHAR) |
SELECT id FROM station WHERE city = "San Francisco" INTERSECT SELECT station_id FROM status GROUP BY station_id HAVING AVG(bikes_available) > 10 | What are the ids of stations that are located in San Francisco and have average bike availability above 10. | CREATE TABLE status (id VARCHAR, station_id VARCHAR, city VARCHAR, bikes_available INTEGER); CREATE TABLE station (id VARCHAR, station_id VARCHAR, city VARCHAR, bikes_available INTEGER) |
SELECT 1998 FROM table_name_65 WHERE 2002 = "2–4" | Which 1998 has a 2002 of 2–4? | CREATE TABLE table_name_65 (Id VARCHAR) |
SELECT years_for_grizzlies FROM table_name_96 WHERE position = "small forward" AND school_club_team = "providence" | Which years did the player from Providence play for the Grizzlies as small forward? | CREATE TABLE table_name_96 (years_for_grizzlies VARCHAR, position VARCHAR, school_club_team VARCHAR) |
SELECT song_choice FROM table_21501518_1 WHERE original_artist = "Garth Brooks" | Whats the song of name with an original artist Garth Brooks | CREATE TABLE table_21501518_1 (song_choice VARCHAR, original_artist VARCHAR) |
SELECT district FROM table_1341843_19 WHERE incumbent = "Otto Passman" | What's the district that Otto Passman is the incumbent of? | CREATE TABLE table_1341843_19 (district VARCHAR, incumbent VARCHAR) |
SELECT COUNT(*) FROM review | Find the number of reviews. | CREATE TABLE review (Id VARCHAR) |
SELECT 2008 FROM table_name_17 WHERE 2011 = "1r" AND 2010 = "2r" AND tournament = "us open" | What's the 2008 of the US Open when 2010 was 2R and 2011 was 1R? | CREATE TABLE table_name_17 (tournament VARCHAR) |
SELECT high_points FROM table_name_54 WHERE date = "june 13" | Who was the leading scorer and how many did he score for the game on June 13? | CREATE TABLE table_name_54 (high_points VARCHAR, date VARCHAR) |
SELECT d_48 FROM table_name_29 WHERE d_44 = "d 33" | Name the D 48 when it has a D 44 of d 33 | CREATE TABLE table_name_29 (d_48 VARCHAR, d_44 VARCHAR) |
SELECT score FROM table_name_5 WHERE lineup = "match reports" | What is the score with the Lineup match reports? | CREATE TABLE table_name_5 (score VARCHAR, lineup VARCHAR) |
SELECT country FROM table_21690339_1 WHERE _percentage_of_imports_from_russia = "20%" | What country had 20% imports from russia? | CREATE TABLE table_21690339_1 (country VARCHAR, _percentage_of_imports_from_russia VARCHAR) |
SELECT tournament FROM table_29127804_3 WHERE outcome = "Runner-up" | what is the name of the tournament where outcome is runner-up | CREATE TABLE table_29127804_3 (tournament VARCHAR, outcome VARCHAR) |
SELECT cons FROM table_2651755_2 WHERE together_we_can_do_more = "Gloria Mujica ( PH )" | where together we can do more is gloria mujica ( ph ) what are all the cons. | CREATE TABLE table_2651755_2 (cons VARCHAR, together_we_can_do_more VARCHAR) |
SELECT SUM(wins) FROM table_name_42 WHERE class = "350cc" AND year < 1973 | Name the Wins which has a Class of 350cc, and a Year smaller than 1973? | CREATE TABLE table_name_42 (wins INTEGER, class VARCHAR, year VARCHAR) |
SELECT date FROM table_name_40 WHERE week = 6 | On what date did week 6 occur? | CREATE TABLE table_name_40 (date VARCHAR, week VARCHAR) |
SELECT constructor FROM table_name_3 WHERE driver = "jackie stewart" | What is the constructor for Jackie Stewart's car? | CREATE TABLE table_name_3 (constructor VARCHAR, driver VARCHAR) |
SELECT tournament FROM table_name_16 WHERE opponents = "marc lópez santiago ventura" | Which Tournament has Opponents of marc lópez santiago ventura? | CREATE TABLE table_name_16 (tournament VARCHAR, opponents VARCHAR) |
SELECT score FROM table_name_3 WHERE date = "april 20" | What was the score on April 20? | CREATE TABLE table_name_3 (score VARCHAR, date VARCHAR) |
SELECT name, city, country FROM airports ORDER BY elevation LIMIT 1 | Find the name, city, and country of the airport that has the lowest altitude. | CREATE TABLE airports (name VARCHAR, city VARCHAR, country VARCHAR, elevation VARCHAR) |
SELECT result FROM table_1342331_6 WHERE incumbent = "Denver S. Church" | What was the result in the election in which the incumbent was Denver S. Church? | CREATE TABLE table_1342331_6 (result VARCHAR, incumbent VARCHAR) |
SELECT tuesday_day_three FROM table_1277350_7 WHERE thursday_day_five = "Kamis" | What is tuesday day three when thursday day five is kamis? | CREATE TABLE table_1277350_7 (tuesday_day_three VARCHAR, thursday_day_five VARCHAR) |
SELECT pashto FROM table_name_76 WHERE malayalam = "വ്യാഴം vyazham" | What is the Pashto word for the Malayalam word വ്യാഴം vyazham? | CREATE TABLE table_name_76 (pashto VARCHAR, malayalam VARCHAR) |
SELECT ending FROM table_name_49 WHERE british = "iz" AND examples = "achilles, appendices, fæces" | Which Ending has British of iz, and Examples of achilles, appendices, fæces? | CREATE TABLE table_name_49 (ending VARCHAR, british VARCHAR, examples VARCHAR) |
SELECT season FROM table_name_61 WHERE wins = "0" AND losses = "5" AND team = "surrey" | Which season had 0 wins and 5 losses for the Surrey team? | CREATE TABLE table_name_61 (season VARCHAR, team VARCHAR, wins VARCHAR, losses VARCHAR) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.