answer stringlengths 18 557 | question stringlengths 12 244 | context stringlengths 27 484 |
|---|---|---|
SELECT AVG(played) FROM table_name_4 WHERE points > 14 AND against > 17 | How many average plays have points greater than 14, with an against greater than 17? | CREATE TABLE table_name_4 (played INTEGER, points VARCHAR, against VARCHAR) |
SELECT category FROM table_name_21 WHERE year < 2012 | What is a category before 2012? | CREATE TABLE table_name_21 (category VARCHAR, year INTEGER) |
SELECT democratic_ticket FROM table_name_71 WHERE socialist_ticket = "edna mitchell blue" | Which Democrtic candidate ran against the Socialist candidate Edna Mitchell Blue? | CREATE TABLE table_name_71 (democratic_ticket VARCHAR, socialist_ticket VARCHAR) |
SELECT MAX(total_days_in_pbb_house) FROM table_19061741_1 WHERE name = "Yen Galagnara" | When yen galagnara is the name what is the highest total days in the pbb house? | CREATE TABLE table_19061741_1 (total_days_in_pbb_house INTEGER, name VARCHAR) |
SELECT AVG(races) FROM table_name_98 WHERE final_placing = "15th" AND season = "2005" | In the 2005 season, how many races did the 15th place team complete? | CREATE TABLE table_name_98 (races INTEGER, final_placing VARCHAR, season VARCHAR) |
SELECT AVG(age), job FROM Person WHERE gender = 'male' GROUP BY job | What is average age of male for different job title? | CREATE TABLE Person (job VARCHAR, age INTEGER, gender VARCHAR) |
SELECT campus FROM degrees GROUP BY campus ORDER BY SUM(degrees) DESC LIMIT 1 | Which campus has the most degrees conferred in all times? | CREATE TABLE degrees (campus VARCHAR, degrees INTEGER) |
SELECT class_aAA FROM table_14603212_5 WHERE school_year = "2005-06" | What are all the AAA classes in the school years of 2005-06? | CREATE TABLE table_14603212_5 (class_aAA VARCHAR, school_year VARCHAR) |
SELECT margin_of_victory FROM table_name_38 WHERE winning_score = 71 - 69 - 71 - 70 = 281 | What was the margin of victory for the win with a score of 71-69-71-70=281? | CREATE TABLE table_name_38 (margin_of_victory VARCHAR, winning_score VARCHAR) |
SELECT part_3 FROM table_20159025_1 WHERE driver = "Nick Heidfeld" | What was the time in part 3 when Nick Heidfeld was the driver? | CREATE TABLE table_20159025_1 (part_3 VARCHAR, driver VARCHAR) |
SELECT high_points FROM table_28768469_9 WHERE date = "March 7" | Who had the most points in the game on March 7? | CREATE TABLE table_28768469_9 (high_points VARCHAR, date VARCHAR) |
SELECT background FROM table_name_71 WHERE hometown = "los angeles, california" | What is the Background of the contestant with a Hometown listed as Los Angeles, California? | CREATE TABLE table_name_71 (background VARCHAR, hometown VARCHAR) |
SELECT COUNT(seat_order__right_to_left_) FROM table_name_83 WHERE series_3 = "deborah meaden" | How many Seat Orders (Right to Left) have a Series 3 of deborah meaden? | CREATE TABLE table_name_83 (seat_order__right_to_left_ VARCHAR, series_3 VARCHAR) |
SELECT date FROM table_name_45 WHERE home_team = "watford" AND tie_no = "2" | On what date does Watford have a Tie no of 2? | CREATE TABLE table_name_45 (date VARCHAR, home_team VARCHAR, tie_no VARCHAR) |
SELECT SUM(laps) FROM table_name_2 WHERE grid < 14 AND time_retired = "out of fuel" | How many laps have a grid under 14 and a time/retired of out of fuel? | CREATE TABLE table_name_2 (laps INTEGER, grid VARCHAR, time_retired VARCHAR) |
SELECT T2.emp_fname, T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num ORDER BY T2.emp_fname | Find the first names and offices of all professors sorted by alphabetical order of their first name. | CREATE TABLE professor (prof_office VARCHAR, emp_num VARCHAR); CREATE TABLE employee (emp_fname VARCHAR, emp_num VARCHAR) |
SELECT MAX(pa) FROM table_15333005_1 WHERE locale = Ontario | Name the most pa for ontario | CREATE TABLE table_15333005_1 (pa INTEGER, locale VARCHAR, Ontario VARCHAR) |
SELECT runner_s__up FROM table_name_23 WHERE winner = "sarah brice" | Who was the runner(s)-Up to winner Sarah Brice? | CREATE TABLE table_name_23 (runner_s__up VARCHAR, winner VARCHAR) |
SELECT score FROM table_name_5 WHERE to_par = 5 AND player = "brian watts" | What is the score of player brian watts, who has a to par of 5? | CREATE TABLE table_name_5 (score VARCHAR, to_par VARCHAR, player VARCHAR) |
SELECT track FROM table_22673872_1 WHERE race_name = "International 500 Mile Sweepstakes" | What is the name of the track for the International 500 mile Sweepstakes race? | CREATE TABLE table_22673872_1 (track VARCHAR, race_name VARCHAR) |
SELECT event FROM table_name_79 WHERE competition = "chicago marathon" AND year > 2004 | Which Event has a Competition of chicago marathon, and a Year larger than 2004? | CREATE TABLE table_name_79 (event VARCHAR, competition VARCHAR, year VARCHAR) |
SELECT home_team AS score FROM table_name_2 WHERE home_team = "south melbourne" | What was the score for south melbourne at home? | CREATE TABLE table_name_2 (home_team VARCHAR) |
SELECT COUNT(points) FROM table_14342592_7 WHERE position = "Right guard" | How many points did the player who was right guard score? | CREATE TABLE table_14342592_7 (points VARCHAR, position VARCHAR) |
SELECT AVG(number) FROM table_name_90 WHERE name = "cooper, c. kenneth" AND year_end > 1984 | Which Number has a Name of cooper, c. kenneth, and a Year End larger than 1984? | CREATE TABLE table_name_90 (number INTEGER, name VARCHAR, year_end VARCHAR) |
SELECT time FROM table_name_44 WHERE show_name = "mornings with neil mitchell" | What Time has a Show Name of mornings with neil mitchell? | CREATE TABLE table_name_44 (time VARCHAR, show_name VARCHAR) |
SELECT MIN(total) FROM table_name_78 WHERE nation = "canada (can)" AND bronze < 0 | what is the least total when the nation is canada (can) and bronze is less than 0? | CREATE TABLE table_name_78 (total INTEGER, nation VARCHAR, bronze VARCHAR) |
SELECT manufacturer FROM table_name_68 WHERE rider = "makoto tamada" | Who manufactures Makoto Tamada's vehicle? | CREATE TABLE table_name_68 (manufacturer VARCHAR, rider VARCHAR) |
SELECT institution FROM table_2419754_1 WHERE nickname = "Tigers" | What university team is referred to as the tigers? | CREATE TABLE table_2419754_1 (institution VARCHAR, nickname VARCHAR) |
SELECT administrative_division FROM table_21734764_1 WHERE population_2011_siak_database = "3,672,994" | Which administrative division had a population of 2011 according to the siak database of 3,672,994? | CREATE TABLE table_21734764_1 (administrative_division VARCHAR, population_2011_siak_database VARCHAR) |
SELECT opponent FROM table_name_16 WHERE date = "may 20" | Who was the opponent on May 20? | CREATE TABLE table_name_16 (opponent VARCHAR, date VARCHAR) |
SELECT SUM(blackpool) FROM table_name_94 WHERE preston_north_end < 46 AND competition = "other" AND draw > 1 | Which Blackpool has a Preston North End smaller than 46, and a Competition of other, and a Draw larger than 1? | CREATE TABLE table_name_94 (blackpool INTEGER, draw VARCHAR, preston_north_end VARCHAR, competition VARCHAR) |
SELECT MAX(rank) FROM table_name_31 WHERE runner__up < 0 | Which Rank has a Runner -up smaller than 0? | CREATE TABLE table_name_31 (rank INTEGER, runner__up INTEGER) |
SELECT independent_regional_force FROM table_2651755_1 WHERE democratic_coalition = "(R) Jorge Tarud ( PPD )" | Who is the independent regional force when democratic coalition is (r) jorge tarud ( ppd )? | CREATE TABLE table_2651755_1 (independent_regional_force VARCHAR, democratic_coalition VARCHAR) |
SELECT written_by FROM table_18424435_3 WHERE canadian_viewers__million_ = "1.575" | Who wrote the episodes watched by 1.575 million people in Canada? | CREATE TABLE table_18424435_3 (written_by VARCHAR, canadian_viewers__million_ VARCHAR) |
SELECT arena FROM table_name_84 WHERE points = "65" | What is the Arena when there were 65 points? | CREATE TABLE table_name_84 (arena VARCHAR, points VARCHAR) |
SELECT date FROM table_name_91 WHERE "score" = "score" | What date was the score "score"? | CREATE TABLE table_name_91 (date VARCHAR) |
SELECT date FROM table_name_12 WHERE race = "italian grand prix" | What date was the Italian Grand Prix? | CREATE TABLE table_name_12 (date VARCHAR, race VARCHAR) |
SELECT mixed_doubles FROM table_14904221_1 WHERE mens_doubles = "no competition" | What is the result of men's doubles when there was no competition? | CREATE TABLE table_14904221_1 (mixed_doubles VARCHAR, mens_doubles VARCHAR) |
SELECT AVG(rank) FROM table_name_31 WHERE date = "2007-06-21" AND mark < 91.29 | What is the average rank of the record on 2007-06-21 with a mark less than 91.29? | CREATE TABLE table_name_31 (rank INTEGER, date VARCHAR, mark VARCHAR) |
SELECT agg FROM table_name_42 WHERE team_2 = "mukungwa" | What is Agg., when Team 2 is Mukungwa? | CREATE TABLE table_name_42 (agg VARCHAR, team_2 VARCHAR) |
SELECT MIN(round) FROM table_name_97 WHERE college_junior_club_team__league_ = "kitchener rangers (oha)" | What is the lowest round of the Kitchener Rangers (OHA)? | CREATE TABLE table_name_97 (round INTEGER, college_junior_club_team__league_ VARCHAR) |
SELECT population FROM table_name_51 WHERE deed_number = "21352021" | What is the population for Deed number of 21352021? | CREATE TABLE table_name_51 (population VARCHAR, deed_number VARCHAR) |
SELECT result FROM table_name_80 WHERE date = "2003" | What is Result, when Date is 2003? | CREATE TABLE table_name_80 (result VARCHAR, date VARCHAR) |
SELECT home_team FROM table_name_38 WHERE venue = "punt road oval" | What is the home team for punt road oval? | CREATE TABLE table_name_38 (home_team VARCHAR, venue VARCHAR) |
SELECT social_software FROM table_name_18 WHERE discussion = "no" AND time_tracking = "no" AND charting = "no" | WHAT IS THE SOCIAL SOFTWARE WITH NO DISCUSSION, NO TIME TRACKING, AND NO CHARTING? | CREATE TABLE table_name_18 (social_software VARCHAR, charting VARCHAR, discussion VARCHAR, time_tracking VARCHAR) |
SELECT SUM(total) FROM table_name_37 WHERE gold = "3" AND bronze < "3" AND silver = "3" | How many totals have golds of 3, silvers of 3, and bronzes under 3? | CREATE TABLE table_name_37 (total INTEGER, silver VARCHAR, gold VARCHAR, bronze VARCHAR) |
SELECT COUNT(judges) FROM table_16884579_1 WHERE host_s_ = "Dré Steemans Ann Van Elsen" | Name the number of judges for dré steemans ann van elsen | CREATE TABLE table_16884579_1 (judges VARCHAR, host_s_ VARCHAR) |
SELECT average FROM table_27922491_8 WHERE bbm = "5/85" | What is the average for the player with BBM 5/85? | CREATE TABLE table_27922491_8 (average VARCHAR, bbm VARCHAR) |
SELECT position FROM table_20898602_1 WHERE height = "ft0in (m)" | what is the position of the player of height ft0in (m) | CREATE TABLE table_20898602_1 (position VARCHAR, height VARCHAR) |
SELECT SUM(lane) FROM table_name_77 WHERE heat = 2 AND name = "susanna kallur" | How many lanes have 2 as the heat, and susanna kallur as the name? | CREATE TABLE table_name_77 (lane INTEGER, heat VARCHAR, name VARCHAR) |
SELECT AVG(pick) FROM table_name_97 WHERE school_club_team = "pennsylvania" | What is the average pick number of Pennsylvania? | CREATE TABLE table_name_97 (pick INTEGER, school_club_team VARCHAR) |
SELECT MAX(norwegian_americans__2000_) FROM table_1182314_5 WHERE norwegian_americans__1990_ = 9170 | what is the maximum norwegian americans (2000) where norwegian americans (1990) is 9170 | CREATE TABLE table_1182314_5 (norwegian_americans__2000_ INTEGER, norwegian_americans__1990_ VARCHAR) |
SELECT award FROM table_name_27 WHERE result = "won" AND category = "most popular star" AND year = 2007 | For the category of most popular star with a result of won for 2007, what was the award? | CREATE TABLE table_name_27 (award VARCHAR, year VARCHAR, result VARCHAR, category VARCHAR) |
SELECT manufacturer FROM table_name_47 WHERE class = "b-2" | What manufacturer made class b-2? | CREATE TABLE table_name_47 (manufacturer VARCHAR, class VARCHAR) |
SELECT kickoff FROM table_name_12 WHERE game_site = "fawcett stadium" | Which Kickoff had a Game Site of fawcett stadium? | CREATE TABLE table_name_12 (kickoff VARCHAR, game_site VARCHAR) |
SELECT attendance FROM table_name_13 WHERE opponent = "new england patriots" | Opponent of new england patriots had what attendance? | CREATE TABLE table_name_13 (attendance VARCHAR, opponent VARCHAR) |
SELECT AVG(attendance) FROM table_name_92 WHERE record = "1–5–0" | What was the average attendance for a Kings game when they had a record of 1–5–0? | CREATE TABLE table_name_92 (attendance INTEGER, record VARCHAR) |
SELECT semifinalists FROM table_30008638_1 WHERE country_territory = "Romania" | How many semifinalists has Romania had? | CREATE TABLE table_30008638_1 (semifinalists VARCHAR, country_territory VARCHAR) |
SELECT injured FROM table_name_98 WHERE killed = "29" | What was the injured entry for the row with a killed entry of 29? | CREATE TABLE table_name_98 (injured VARCHAR, killed VARCHAR) |
SELECT AVG(mintage) FROM table_name_75 WHERE artist = "celia godkin" AND year < 2010 | What was the average mintage for that of artist Celia Godkin, before the year 2010? | CREATE TABLE table_name_75 (mintage INTEGER, artist VARCHAR, year VARCHAR) |
SELECT discipline FROM table_name_31 WHERE championship = "usac national championship" | For the USAC National Championship, what is the Discipline? | CREATE TABLE table_name_31 (discipline VARCHAR, championship VARCHAR) |
SELECT college_junior_club_team FROM table_1965650_1 WHERE player = "Ian Turnbull" | Name the college/junior club team for ian turnbull | CREATE TABLE table_1965650_1 (college_junior_club_team VARCHAR, player VARCHAR) |
SELECT result FROM table_1342359_4 WHERE district = "Arkansas 4" | What was the result of the election in the Arkansas 4 district? | CREATE TABLE table_1342359_4 (result VARCHAR, district VARCHAR) |
SELECT * FROM COURSE ORDER BY Credits | List all information about courses sorted by credits in the ascending order. | CREATE TABLE COURSE (Credits VARCHAR) |
SELECT country FROM table_name_22 WHERE publication = "drowned in sound" | What country had the publication, Drowned in Sound? | CREATE TABLE table_name_22 (country VARCHAR, publication VARCHAR) |
SELECT catalog_nr FROM table_name_41 WHERE format = "stereo lp" AND label = "epic" AND title = "for little ones" | What is the Catalog-Nr of the Epic Label Stereo LP named For Little Ones? | CREATE TABLE table_name_41 (catalog_nr VARCHAR, title VARCHAR, format VARCHAR, label VARCHAR) |
SELECT MAX(points) FROM table_14342592_7 WHERE position = "Left tackle" AND extra_points = 5 | How many maximum points were there when the left tackle was played and there were 5 extra points? | CREATE TABLE table_14342592_7 (points INTEGER, position VARCHAR, extra_points VARCHAR) |
SELECT location_attendance FROM table_17080868_8 WHERE date = "February 12" | February 12 is the date for all location attendance. | CREATE TABLE table_17080868_8 (location_attendance VARCHAR, date VARCHAR) |
SELECT MAX(total) FROM table_20325360_2 WHERE country_territory = "Brazil" | How many competitors in total, for the Mr. International competition, does Brazil have? | CREATE TABLE table_20325360_2 (total INTEGER, country_territory VARCHAR) |
SELECT 2008 AS _status FROM table_17503169_1 WHERE democratic = "Glenn Nye" | What was the 2008 election status when glenn nye was the running democrat? | CREATE TABLE table_17503169_1 (democratic VARCHAR) |
SELECT SUM(points) FROM table_name_40 WHERE goals_scored < 27 AND goals_conceded = 24 AND lost < 6 | How many points are there when they have under 27 goals scored, conceded 24 goals, and lost less than 6 times? | CREATE TABLE table_name_40 (points INTEGER, lost VARCHAR, goals_scored VARCHAR, goals_conceded VARCHAR) |
SELECT MIN(lane) FROM table_name_17 WHERE name = "sue rolph" AND rank < 5 | What is the lowest numbered lane of Sue Rolph with a rank under 5? | CREATE TABLE table_name_17 (lane INTEGER, name VARCHAR, rank VARCHAR) |
SELECT first_elected FROM table_1341738_34 WHERE district = "North Carolina 8" | Who was the first person elected in North Carolina 8? | CREATE TABLE table_1341738_34 (first_elected VARCHAR, district VARCHAR) |
SELECT date FROM table_2268216_1 WHERE race_time = "2:43:19" | What is the date for the race that had the time of 2:43:19? | CREATE TABLE table_2268216_1 (date VARCHAR, race_time VARCHAR) |
SELECT COUNT(runs) FROM table_name_51 WHERE average > 31.25 AND innings < 24 | What is the total number of runs when the average was less than 31.25 and there were fewer than 24 innings? | CREATE TABLE table_name_51 (runs VARCHAR, average VARCHAR, innings VARCHAR) |
SELECT nhl_team FROM table_name_97 WHERE player = "steve durbano" | Which NHL team has a Player of steve durbano? | CREATE TABLE table_name_97 (nhl_team VARCHAR, player VARCHAR) |
SELECT AVG(draws) FROM table_name_30 WHERE central_murray = "leitchville gunbower" AND byes < 0 | What is the average number of draws of the central murray of leitchville gunbower, which has less than 0 byes? | CREATE TABLE table_name_30 (draws INTEGER, central_murray VARCHAR, byes VARCHAR) |
SELECT SUM(played) FROM table_name_34 WHERE points = 15 | How many games were played where exactly 15 points were scored? | CREATE TABLE table_name_34 (played INTEGER, points VARCHAR) |
SELECT population FROM table_name_83 WHERE total_congregations < 4 AND _percentage_lds = "0.54%" | What is Population, when Total Congregations is less than 4, and when % LDS is 0.54%? | CREATE TABLE table_name_83 (population VARCHAR, total_congregations VARCHAR, _percentage_lds VARCHAR) |
SELECT MIN(crowd) FROM table_name_44 WHERE home_team = "fitzroy" | What was the lowest attendance when Fitzroy was the home team? | CREATE TABLE table_name_44 (crowd INTEGER, home_team VARCHAR) |
SELECT driver_s_ FROM table_name_44 WHERE crew_chief = "scott zipadelli" | What driver has Scott Zipadelli as a crew chief? | CREATE TABLE table_name_44 (driver_s_ VARCHAR, crew_chief VARCHAR) |
SELECT AVG(bronze) FROM table_name_52 WHERE gold > 1 AND total = 14 AND silver > 3 | Name the average Bronze when silver is more than 3, gold is more than 1 and the total is 14 | CREATE TABLE table_name_52 (bronze INTEGER, silver VARCHAR, gold VARCHAR, total VARCHAR) |
SELECT COUNT(votes) FROM table_name_28 WHERE candidate = "ron paul" AND counties < 0 | What is the number of votes when Ron Paul is the candidate with less than 0 counties? | CREATE TABLE table_name_28 (votes VARCHAR, candidate VARCHAR, counties VARCHAR) |
SELECT result FROM table_name_37 WHERE competition = "friendly" | What is the result of the friendly match? | CREATE TABLE table_name_37 (result VARCHAR, competition VARCHAR) |
SELECT win__percentage FROM table_name_4 WHERE conference = "metro" | What is Metro's win percentage? | CREATE TABLE table_name_4 (win__percentage VARCHAR, conference VARCHAR) |
SELECT date FROM table_name_33 WHERE score = "0-0" | On what date was the score 0-0? | CREATE TABLE table_name_33 (date VARCHAR, score VARCHAR) |
SELECT population_est__2012_ FROM table_name_61 WHERE capital = "santa fe" | What is the 2012 population for the state whose capital is Santa Fe? | CREATE TABLE table_name_61 (population_est__2012_ VARCHAR, capital VARCHAR) |
SELECT year FROM table_name_11 WHERE rank > 35 AND out_of = 167 | Tell me the year for rank more than 35 and out of 167 | CREATE TABLE table_name_11 (year VARCHAR, rank VARCHAR, out_of VARCHAR) |
SELECT team FROM table_24231638_3 WHERE position_in_table = "19th" | What is the team for the position in table 19th? | CREATE TABLE table_24231638_3 (team VARCHAR, position_in_table VARCHAR) |
SELECT location FROM table_name_89 WHERE "time" = "time" | Which Location has a Time of time? | CREATE TABLE table_name_89 (location VARCHAR) |
SELECT MAX(attendance) FROM table_name_25 WHERE date = "october 25, 1981" AND week < 8 | What was the highest number of attendance in a week before 8 and game on October 25, 1981? | CREATE TABLE table_name_25 (attendance INTEGER, date VARCHAR, week VARCHAR) |
SELECT termination_of_mission FROM table_name_34 WHERE title = "ambassador extraordinary and plenipotentiary" AND representative = "marsha e. barnes" | What is the Termination of Mission date for Marsha E. Barnes, the Ambassador Extraordinary and Plenipotentiary? | CREATE TABLE table_name_34 (termination_of_mission VARCHAR, title VARCHAR, representative VARCHAR) |
SELECT T1.FullName, T1.Id, COUNT(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id | How many models does each car maker produce? List maker full name, id and the number. | CREATE TABLE MODEL_LIST (Maker VARCHAR); CREATE TABLE CAR_MAKERS (FullName VARCHAR, Id VARCHAR) |
SELECT region FROM table_name_82 WHERE label = "bronze" AND catalogue = "202 876-270" | What region has a bronze label and a catalogue of 202 876-270? | CREATE TABLE table_name_82 (region VARCHAR, label VARCHAR, catalogue VARCHAR) |
SELECT australian_marquee FROM table_1301373_7 WHERE international_marquee = "Alessandro Del Piero" | Name the australian marquee for alessandro del piero | CREATE TABLE table_1301373_7 (australian_marquee VARCHAR, international_marquee VARCHAR) |
SELECT result FROM table_name_41 WHERE losses = "did not qualify" | What is Result, when Losses is "Did Not Qualify"? | CREATE TABLE table_name_41 (result VARCHAR, losses VARCHAR) |
SELECT COUNT(gold) FROM table_name_61 WHERE total = 1 AND bronze < 1 AND nation = "west germany" | What is the total number of golds having a total of 1, bronzes of 0, and from West Germany? | CREATE TABLE table_name_61 (gold VARCHAR, nation VARCHAR, total VARCHAR, bronze VARCHAR) |
SELECT document_type_code FROM documents GROUP BY document_type_code HAVING SUM(access_count) > 10000 | What document types do have more than 10000 total access number. | CREATE TABLE documents (document_type_code VARCHAR, access_count INTEGER) |
SELECT loss FROM table_name_16 WHERE date = "september 2" | What was the loss on September 2? | CREATE TABLE table_name_16 (loss VARCHAR, date VARCHAR) |
SELECT title FROM table_18424435_3 WHERE production_code = 217 | Which episodes had production code 217? | CREATE TABLE table_18424435_3 (title VARCHAR, production_code VARCHAR) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.