sql
stringlengths
9
2.37k
table
stringclasses
9 values
query
stringlengths
51
503
SELECT Committee, COUNT(Committee) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = "Democratic" GROUP BY Committee ORDER BY COUNT(Committee)
CREATE TABLE INST, Here is a database schema( table schema);
Return all the committees that have delegates from Democratic party, and count them by a bar chart, and sort in asc by the y-axis.It is not neccessary to use all the tables.
SELECT nationality FROM table_name_6 WHERE college_junior_club_team__league_ = "peterborough petes (ohl)"
CREATE TABLE INST, Here is a database schema( table schema);
What is the nationality of the player who played for the Peterborough Petes (OHL)?It is not neccessary to use all the tables.
SELECT Goals FROM table WHERE Ends = 30 june 2010 AND Since > 2007
CREATE TABLE INST, Here is a database schema( table schema);
Which Goals have Ends of 30 june 2010, and Since larger than 2007?.It is not neccessary to use all the tables.
SELECT MAX(season) FROM table_29434211_1 WHERE podiums = 2
CREATE TABLE INST, Here is a database schema( table schema);
What is the maximum season that has exactly 2 podiums?It is not neccessary to use all the tables.
SELECT MIN(bronze) FROM table_name_56 WHERE silver = 9 AND total < 27
CREATE TABLE INST, Here is a database schema( table schema);
WHat is the lowest amount of bronze medals for teams with 9 silvers and less than 27 points?It is not neccessary to use all the tables.
SELECT Name FROM table WHERE Qual 1 = 59.578
CREATE TABLE INST, Here is a database schema( table schema);
Who got 59.578 for Qual 1?.It is not neccessary to use all the tables.
SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 24762) AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-40 month')
CREATE TABLE INST, Here is a database schema( table schema);
is patient 24762 given medication until 40 months ago?It is not neccessary to use all the tables.
SELECT Dates active FROM table WHERE Max 1-min wind mph (km/h) = 65 (100)
CREATE TABLE INST, Here is a database schema( table schema);
What is the active Date that has a 65 (100) Max 1-min wind?.It is not neccessary to use all the tables.
SELECT "Result" FROM table_26152 WHERE "Opponent" = 'Loic Didavi'
CREATE TABLE INST, Here is a database schema( table schema);
What was the score against Loic Didavi?It is not neccessary to use all the tables.
SELECT Opponent FROM table WHERE Date = October 2, 1983
CREATE TABLE INST, Here is a database schema( table schema);
Name the opponent for october 2, 1983.It is not neccessary to use all the tables.
SELECT 1st leg FROM table WHERE Team 1 = tuilla
CREATE TABLE INST, Here is a database schema( table schema);
WHAT IS THE FIRST LEG OF TUILLA?.It is not neccessary to use all the tables.
SELECT Date FROM table WHERE Competition = uncaf nations cup 2009
CREATE TABLE INST, Here is a database schema( table schema);
Name the date of the uncaf nations cup 2009.It is not neccessary to use all the tables.
SELECT driver FROM table_name_95 WHERE grid = 18
CREATE TABLE INST, Here is a database schema( table schema);
What driver shows grid as 18?It is not neccessary to use all the tables.
SELECT MAX(losses) FROM table_name_45 WHERE goal_difference > 26
CREATE TABLE INST, Here is a database schema( table schema);
What is the losses when the goal difference is larger than 26?It is not neccessary to use all the tables.
SELECT Main contestant FROM table WHERE Total score/week = 42/60 AND Co-contestant (Yaar vs. Pyaar) = tina sachdev
CREATE TABLE INST, Here is a database schema( table schema);
Who is the main contestant with a total score/week of 42/60 and a co-contestant (Yaar vs. Pyaa) of Tina Sachdev?.It is not neccessary to use all the tables.
SELECT Record FROM table WHERE December < 22 AND Score = 4–3
CREATE TABLE INST, Here is a database schema( table schema);
Which Record has a December smaller than 22 and a Score of 4–3?.It is not neccessary to use all the tables.
SELECT COUNT(channel) FROM table_14902507_2 WHERE year = "2001-02"
CREATE TABLE INST, Here is a database schema( table schema);
How many channels were the games shown on in 2001-02?It is not neccessary to use all the tables.
SELECT MIN Top-10 FROM table WHERE Cuts made > 42
CREATE TABLE INST, Here is a database schema( table schema);
Which Top-10 has a Cuts made larger than 42?.It is not neccessary to use all the tables.
SELECT MIN Enrollment FROM table WHERE Mascot = trojans
CREATE TABLE INST, Here is a database schema( table schema);
What's the least enrolled when the mascot was the Trojans?.It is not neccessary to use all the tables.
SELECT SUM Year FROM table WHERE Silver = japan
CREATE TABLE INST, Here is a database schema( table schema);
How many years has Japan won silver?.It is not neccessary to use all the tables.
SELECT StuID FROM Sportsinfo INTERSECT SELECT StuID FROM Plays_games
CREATE TABLE INST, Here is a database schema( table schema);
Show ids of students who play video game and play sports.It is not neccessary to use all the tables.
SELECT MAX Insurgents FROM table WHERE Total per period = 602
CREATE TABLE INST, Here is a database schema( table schema);
How many insurgents have 602 as the total per period?.It is not neccessary to use all the tables.
SELECT MAX Total FROM table WHERE Player = Aiden McGeady
CREATE TABLE INST, Here is a database schema( table schema);
Name the max total for aiden mcgeady.It is not neccessary to use all the tables.
SELECT venue FROM table_name_13 WHERE home_team = "south melbourne"
CREATE TABLE INST, Here is a database schema( table schema);
Where was South Melbourne played?It is not neccessary to use all the tables.
SELECT home_team FROM table_name_81 WHERE venue = "princes park"
CREATE TABLE INST, Here is a database schema( table schema);
What home team plays at princes park?It is not neccessary to use all the tables.
SELECT finish FROM table_name_22 WHERE league = "nl" AND percentage < 0.726 AND year > 1897 AND franchise = "pittsburgh pirates"
CREATE TABLE INST, Here is a database schema( table schema);
What was the Finish when NL was the League the Percentage was under 0.726 the Year was larger than 1897 and the Franchies was the Pittsburgh Pirates?It is not neccessary to use all the tables.
SELECT Bonus Points FROM table WHERE Points for = 385
CREATE TABLE INST, Here is a database schema( table schema);
How many bonus points are there when points for is 385?.It is not neccessary to use all the tables.
SELECT Position FROM table WHERE Name = allen gamboa
CREATE TABLE INST, Here is a database schema( table schema);
What is the position of Allen Gamboa?.It is not neccessary to use all the tables.
SELECT tournament FROM table_name_90 WHERE 2003 = "a"
CREATE TABLE INST, Here is a database schema( table schema);
What is Tournament when 2003 is "A"?It is not neccessary to use all the tables.
SELECT High points FROM table WHERE Score = W 112-110
CREATE TABLE INST, Here is a database schema( table schema);
Who had the high points when the score was w 112-110?.It is not neccessary to use all the tables.
SELECT MIN(wins) FROM table_name_33 WHERE tournament = "pga championship" AND events > 3
CREATE TABLE INST, Here is a database schema( table schema);
For more than 3 events in the PGA Championship what is the fewest number of wins?It is not neccessary to use all the tables.
SELECT high_rebounds FROM table_27734577_8 WHERE game = 45
CREATE TABLE INST, Here is a database schema( table schema);
What are the high rebounds in the 45 game?It is not neccessary to use all the tables.
SELECT AVG(T1.ROM_MiB) FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T2.Company_name = "Nokia Corporation"
CREATE TABLE INST, Here is a database schema( table schema);
What is the average ROM size of phones produced by the company named "Nokia Corporation"?It is not neccessary to use all the tables.
SELECT Class FROM table WHERE Wins > 0 AND Points = 42
CREATE TABLE INST, Here is a database schema( table schema);
What class has over 0 wins and 42 points?.It is not neccessary to use all the tables.
SELECT Closest approach FROM table WHERE Launched = 3 july 1998
CREATE TABLE INST, Here is a database schema( table schema);
With a Launched of 3 July 1998 what is the Closest approach?.It is not neccessary to use all the tables.
SELECT "Game" FROM table_14276 WHERE "Record" = '9-7'
CREATE TABLE INST, Here is a database schema( table schema);
Which game had a 9-7 record?It is not neccessary to use all the tables.
SELECT winner FROM table_22050544_1 WHERE event__number = "15H"
CREATE TABLE INST, Here is a database schema( table schema);
What is the winner in event number 15h?It is not neccessary to use all the tables.
SELECT COUNT Song title FROM table WHERE Artist = Chubby Checker
CREATE TABLE INST, Here is a database schema( table schema);
how many song title with artbeingt being chubby checker.It is not neccessary to use all the tables.
SELECT MAX(bronze) FROM table_name_74 WHERE silver = 1 AND gold = 0 AND rank = "11" AND total > 1
CREATE TABLE INST, Here is a database schema( table schema);
what is the bronze when silver is 1 gold is 0 the rank is 11 and the total is more than 1?It is not neccessary to use all the tables.
SELECT Player FROM table WHERE Pick = 24
CREATE TABLE INST, Here is a database schema( table schema);
Which player is the 24 pick?.It is not neccessary to use all the tables.
SELECT max_1_min_wind_mph__km_h_ FROM table_name_26 WHERE dates_active = "september22– september28"
CREATE TABLE INST, Here is a database schema( table schema);
Which Max 1-min wind mph (km/h) that has Dates active on september22 september28?It is not neccessary to use all the tables.
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%saarbr%cken%' AND Reputation >= 1000 ORDER BY Reputation DESC
CREATE TABLE INST, Here is a database schema( table schema);
Top users from Saarbr cken, Germany.It is not neccessary to use all the tables.
SELECT truck_s_ FROM table_name_23 WHERE driver_s_ = "brett moffitt" AND team = "hattori racing enterprises"
CREATE TABLE INST, Here is a database schema( table schema);
What is the truck used by Brett Moffitt from Hattori Racing Enterprises?It is not neccessary to use all the tables.
SELECT MAX 1930 FROM table WHERE 2000 = 43,966 AND 1900 < 8,401
CREATE TABLE INST, Here is a database schema( table schema);
What is the highest 1930 population when the 2000 population is 43,966 and the 1900 population is less than 8,401?.It is not neccessary to use all the tables.
SELECT Score FROM table WHERE Player = craig stadler
CREATE TABLE INST, Here is a database schema( table schema);
What was Craig Stadler's score?.It is not neccessary to use all the tables.
SELECT First FROM table WHERE Surname = cook
CREATE TABLE INST, Here is a database schema( table schema);
Which first's surname is Cook?.It is not neccessary to use all the tables.
SELECT country FROM table_name_95 WHERE year > 2008
CREATE TABLE INST, Here is a database schema( table schema);
Name the country with year more than 2008It is not neccessary to use all the tables.
SELECT AVG Top-10 FROM table WHERE Cuts made = 10 AND Top-25 > 6
CREATE TABLE INST, Here is a database schema( table schema);
Name the average top-10 for cuts made of 10 and top-25 more than 6.It is not neccessary to use all the tables.
SELECT Market Share FROM table WHERE Assets (USD) Millions = 25 AND Rank = 23
CREATE TABLE INST, Here is a database schema( table schema);
What is the Market Share that has Assets of 25 Million and a rank of 23?.It is not neccessary to use all the tables.
SELECT 2009 FROM table_name_77 WHERE tournament = "year-end ranking"
CREATE TABLE INST, Here is a database schema( table schema);
What is 2009 when Tournament is "Year-End Ranking"?It is not neccessary to use all the tables.
SELECT general_classification FROM table_26010857_13 WHERE stage = 3
CREATE TABLE INST, Here is a database schema( table schema);
Who leads the general classification in stage 3?It is not neccessary to use all the tables.
SELECT Losses FROM table WHERE Awards = mike miller (smoy)
CREATE TABLE INST, Here is a database schema( table schema);
What are the losses where the award is Mike Miller (Smoy)?.It is not neccessary to use all the tables.
SELECT College FROM table WHERE Overall = 17
CREATE TABLE INST, Here is a database schema( table schema);
Name the college with overall of 17.It is not neccessary to use all the tables.
SELECT historical_references FROM table_name_38 WHERE podcast_date = "october 23, 2005"
CREATE TABLE INST, Here is a database schema( table schema);
What is the historical reference of the episode that aired on October 23 2005?It is not neccessary to use all the tables.
SELECT Length FROM table WHERE Body style = Sedan
CREATE TABLE INST, Here is a database schema( table schema);
What's the length of the model with Sedan body style?.It is not neccessary to use all the tables.
SELECT 250cc winner FROM table WHERE Grand Prix = Spanish Grand Prix
CREATE TABLE INST, Here is a database schema( table schema);
Who won the spanish grand prix?.It is not neccessary to use all the tables.
SELECT Date of vacancy FROM table WHERE Team = Plymouth Argyle
CREATE TABLE INST, Here is a database schema( table schema);
When did the old manager vacate his position in Plymouth Argyle?.It is not neccessary to use all the tables.
SELECT Wickets FROM table WHERE Overs Bowled = 9
CREATE TABLE INST, Here is a database schema( table schema);
Name the wickets when overs bowled is 9.It is not neccessary to use all the tables.
SELECT s_mestizo FROM table_1333612_1 WHERE asians = "0.2%" AND whites = "74.8%"
CREATE TABLE INST, Here is a database schema( table schema);
what's the s mestizo with asians being 0.2% and whites being 74.8%It is not neccessary to use all the tables.
SELECT COUNT Game FROM table WHERE High rebounds = Derrick Favors (8)
CREATE TABLE INST, Here is a database schema( table schema);
In how many games were the high rebounds made by Derrick Favors (8)?.It is not neccessary to use all the tables.
SELECT Manufacturer FROM table WHERE Driver = Matt Kenseth AND Date = March 7
CREATE TABLE INST, Here is a database schema( table schema);
Who was the manufacturer for Matt Kenseth on March 7?.It is not neccessary to use all the tables.
SELECT MIN Lane FROM table WHERE Rank = 6
CREATE TABLE INST, Here is a database schema( table schema);
What is the smallest lane for rank 6?.It is not neccessary to use all the tables.
SELECT COUNT Norwegian Americans (2009) FROM table WHERE Norwegian Americans (2000) = 109,744
CREATE TABLE INST, Here is a database schema( table schema);
How many Norwegian Americans have Norwegian Americans (2000) of 109,744?.It is not neccessary to use all the tables.
SELECT Date FROM table WHERE Result = 82-92
CREATE TABLE INST, Here is a database schema( table schema);
On what Date was the Result 82-92?.It is not neccessary to use all the tables.
SELECT COUNT Year FROM table WHERE Baden = freiburger fc
CREATE TABLE INST, Here is a database schema( table schema);
What's the year that has a Baden Freiburger FC?.It is not neccessary to use all the tables.
SELECT AVG(finish) FROM table_name_19 WHERE start < 11 AND engine = "honda" AND year < 2003
CREATE TABLE INST, Here is a database schema( table schema);
What was the finish associated with under 11 starts a honda engine before 2003?It is not neccessary to use all the tables.
SELECT finish FROM table_name_12 WHERE total = 288
CREATE TABLE INST, Here is a database schema( table schema);
Which Finish has a Total of 288?It is not neccessary to use all the tables.
SELECT score FROM table_name_28 WHERE opponent = "devil rays" AND date = "april 24"
CREATE TABLE INST, Here is a database schema( table schema);
What is the score of the Devil Rays on April 24?It is not neccessary to use all the tables.
SELECT To par FROM table WHERE Score = 1 up
CREATE TABLE INST, Here is a database schema( table schema);
How many strokes to par when the score is 1 up?.It is not neccessary to use all the tables.
SELECT rider FROM table_name_8 WHERE rank < 5 AND time = "31’ 03.093"
CREATE TABLE INST, Here is a database schema( table schema);
Rank smaller than 5 and a Time of 31’ 03.093 is what rider?It is not neccessary to use all the tables.
SELECT age at appointment FROM table WHERE Chinese name = 孫明揚
CREATE TABLE INST, Here is a database schema( table schema);
How old was the official with Chinese name 孫明揚?.It is not neccessary to use all the tables.
SELECT AVG Grid FROM table WHERE Driver = piers courage
CREATE TABLE INST, Here is a database schema( table schema);
What is the average grid for piers courage?.It is not neccessary to use all the tables.
SELECT home FROM table_name_5 WHERE aggregate = "2-3"
CREATE TABLE INST, Here is a database schema( table schema);
Tell me the home of 2-3It is not neccessary to use all the tables.
SELECT SUM Wins FROM table WHERE Draws = 0 AND Season = 1964
CREATE TABLE INST, Here is a database schema( table schema);
What is the sum of Wins when draws shows 0 in 1964?.It is not neccessary to use all the tables.
SELECT frequency FROM table_name_33 WHERE branding = "dzec radyo agila 1062"
CREATE TABLE INST, Here is a database schema( table schema);
What frequency does branding dzec radyo agila 1062 have?It is not neccessary to use all the tables.
SELECT Men's doubles FROM table WHERE Year < 1979 AND Women's doubles = carol silman prina ben shushan
CREATE TABLE INST, Here is a database schema( table schema);
Who won the men's doubles before 1979 when carol silman prina ben shushan won the women's doubles?.It is not neccessary to use all the tables.
SELECT location FROM table_name_90 WHERE time = "1:54:21"
CREATE TABLE INST, Here is a database schema( table schema);
At what location was the time 1:54:21?It is not neccessary to use all the tables.
SELECT mlb_draft FROM table_11677100_3 WHERE player = "Shion Newton"
CREATE TABLE INST, Here is a database schema( table schema);
What's Shion Newton's MLB draft result?It is not neccessary to use all the tables.
SELECT MIN(losses) FROM table_name_13 WHERE draws > 0 AND season < 1926
CREATE TABLE INST, Here is a database schema( table schema);
What is the least amount of losses for the team that had more than 0 draws during the seasons earlier than 1926?It is not neccessary to use all the tables.
SELECT result_f___a FROM table_name_8 WHERE opponents = "rosenborg"
CREATE TABLE INST, Here is a database schema( table schema);
Which Result F-A has Opponents of rosenborg?It is not neccessary to use all the tables.
SELECT Club FROM table WHERE Round = group stage round 1 and 5
CREATE TABLE INST, Here is a database schema( table schema);
Which club had round of group stage round 1 and 5?.It is not neccessary to use all the tables.
SELECT conv FROM table_name_37 WHERE player = "dick hyland"
CREATE TABLE INST, Here is a database schema( table schema);
What was Dick Hyland's conv?It is not neccessary to use all the tables.
SELECT COUNT District FROM table WHERE Income poverty f = 27.7
CREATE TABLE INST, Here is a database schema( table schema);
How many districts had an depravity level of 27.7.It is not neccessary to use all the tables.
SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.City = "Aberdeen"
CREATE TABLE INST, Here is a database schema( table schema);
What are flight numbers of flights arriving at City "Aberdeen"?It is not neccessary to use all the tables.
SELECT MAX(bronze) FROM table_name_69 WHERE silver > 0 AND rank > 3
CREATE TABLE INST, Here is a database schema( table schema);
What is the highest number of bronze when silver is larger than 0 rank is larger than 3?It is not neccessary to use all the tables.
SELECT Binibining Pilipinas International FROM table WHERE Binibining Pilipinas-World = sharmaine gutierrez
CREATE TABLE INST, Here is a database schema( table schema);
Which Binibining Pilipinas International has a Binibining Pilipinas-World of sharmaine gutierrez?.It is not neccessary to use all the tables.
SELECT race_number FROM table_20854943_2 WHERE sail_number = "AUS 98888"
CREATE TABLE INST, Here is a database schema( table schema);
What race number had sail number AUS 98888?It is not neccessary to use all the tables.
SELECT pal_m FROM table_name_54 WHERE ntsc_m = "4.5mhz"
CREATE TABLE INST, Here is a database schema( table schema);
What is the PAL M for the NTSC M 4.5mhz?It is not neccessary to use all the tables.
SELECT street_address FROM table_name_74 WHERE name = "new york life insurance building"
CREATE TABLE INST, Here is a database schema( table schema);
What's the Street address with a Name of New York Life Insurance building?It is not neccessary to use all the tables.
SELECT MIN("Byes") FROM table_65614 WHERE "Against" > '1018' AND "Wimmera FL" = 'horsham diggers'
CREATE TABLE INST, Here is a database schema( table schema);
Which Byes have an Against larger than 1018, and a Wimmera FL of horsham diggers?It is not neccessary to use all the tables.
SELECT Mountain Peak FROM table WHERE Location = 37.5775°n 105.4856°w
CREATE TABLE INST, Here is a database schema( table schema);
what is the mountain peak when the location is 37.5775°n 105.4856°w?.It is not neccessary to use all the tables.
SELECT place FROM table_name_64 WHERE country = "australia" AND score = 70 - 70 - 72 = 212
CREATE TABLE INST, Here is a database schema( table schema);
Which Place has a Country of australia and a Score of 70-70-72=212?It is not neccessary to use all the tables.
SELECT MIN 2011 FROM table WHERE 1948 < 15872624 AND 1966 = 263103 AND 1992 > 266308
CREATE TABLE INST, Here is a database schema( table schema);
Which 2011 is the lowest one that has a 1948 smaller than 15872624, and a 1966 of 263103, and a 1992 larger than 266308?.It is not neccessary to use all the tables.
SELECT COUNT Reason for change FROM table WHERE Date successor seated = Not filled this congress
CREATE TABLE INST, Here is a database schema( table schema);
Name the total number of reason for change for not filled this congress.It is not neccessary to use all the tables.
SELECT party FROM table_1341604_11 WHERE incumbent = "Jack Thomas Brinkley"
CREATE TABLE INST, Here is a database schema( table schema);
Name the party for jack thomas brinkleyIt is not neccessary to use all the tables.
SELECT SUM(draws) FROM table_name_27 WHERE el_zamalek_wins < 36 AND total > 2 AND al_ahly_wins > 37
CREATE TABLE INST, Here is a database schema( table schema);
What is the sum of draws for El Zamalek wins under 36, total over 2, and Al Ahly wins over 37?It is not neccessary to use all the tables.
SELECT MAX Weight FROM table WHERE Player = Hugh White
CREATE TABLE INST, Here is a database schema( table schema);
What is hugh white's weight?.It is not neccessary to use all the tables.
SELECT Winner FROM table WHERE Course = florence to genoa
CREATE TABLE INST, Here is a database schema( table schema);
Who is the winner of the Florence to Genoa course?.It is not neccessary to use all the tables.
SELECT COUNT(college) FROM table_10975034_4 WHERE position = "DB"
CREATE TABLE INST, Here is a database schema( table schema);
How many colleges have a DB position?It is not neccessary to use all the tables.
SELECT MIN No. in season FROM table WHERE Production code = 2T6206
CREATE TABLE INST, Here is a database schema( table schema);
What is the number of this season's episode that had the production code 2t6206?.It is not neccessary to use all the tables.