sql
stringlengths
9
2.37k
table
stringclasses
9 values
query
stringlengths
51
503
SELECT COUNT(pac_12_sports) FROM table_27816698_2 WHERE institution = "California Polytechnic State University"
CREATE TABLE INST, Here is a database schema( table schema);
How many pac-12 sports are shown for california polytechnic state university?It is not neccessary to use all the tables.
SELECT status FROM table_name_83 WHERE name = "mexborough"
CREATE TABLE INST, Here is a database schema( table schema);
What is the Status of Mexborough?It is not neccessary to use all the tables.
SELECT Age FROM Student WHERE Fname = "Linda" AND Lname = "Smith"
CREATE TABLE INST, Here is a database schema( table schema);
What is the age of student Linda Smith?It is not neccessary to use all the tables.
SELECT T3.Player_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID WHERE T2.Rank = 1
CREATE TABLE INST, Here is a database schema( table schema);
Show the names of players coached by the rank 1 coach.It is not neccessary to use all the tables.
SELECT Record FROM table WHERE Game = 7
CREATE TABLE INST, Here is a database schema( table schema);
What is the record of game 7?.It is not neccessary to use all the tables.
SELECT MIN(week) FROM table_name_93 WHERE date = "october 5, 2003"
CREATE TABLE INST, Here is a database schema( table schema);
What is the Week number on October 5 2003?It is not neccessary to use all the tables.
SELECT track FROM table_name_23 WHERE time = "2:30"
CREATE TABLE INST, Here is a database schema( table schema);
What track has a time of 2:30?It is not neccessary to use all the tables.
SELECT MIN(wins) FROM table_name_21 WHERE team = "olimpia" AND draws < 4
CREATE TABLE INST, Here is a database schema( table schema);
What is the lowest Wins that has the Team of Olimpia and Draws that's smaller than 4?It is not neccessary to use all the tables.
SELECT Branding FROM table WHERE Callsign = DYPV
CREATE TABLE INST, Here is a database schema( table schema);
What is the branding for callsign dypv?.It is not neccessary to use all the tables.
SELECT Award FROM table WHERE Film/Show = east west 101 AND Year < 2009 AND Group = logie award
CREATE TABLE INST, Here is a database schema( table schema);
What is the Award, when the Film/Show is East West 101, and when the year is before 2009, and when the Group is Logie Award?.It is not neccessary to use all the tables.
SELECT COUNT(california__san_francisco_) FROM table_16105186_2 WHERE vehicle = "Ford Focus Electric"
CREATE TABLE INST, Here is a database schema( table schema);
How many Ford Focus electric vehicle emission test scores were recorded in California?It is not neccessary to use all the tables.
SELECT COUNT Maidens FROM table WHERE E.R. < 9.5 AND Overs Bowled > 57 AND Wickets = 9
CREATE TABLE INST, Here is a database schema( table schema);
What is the total number of Maidens when E.R. is less than 9.5, and a Overs Bowled larger than 57, and a Wickets of 9?.It is not neccessary to use all the tables.
SELECT Profits (billion $) FROM table WHERE Company = Wells Fargo
CREATE TABLE INST, Here is a database schema( table schema);
What are the profits of Wells Fargo (in billions)?.It is not neccessary to use all the tables.
SELECT Population, in thousands,( 1905 ) FROM table WHERE Name in Polish = gubernia łomżyńska
CREATE TABLE INST, Here is a database schema( table schema);
Tell me the population for gubernia łomżyńska.It is not neccessary to use all the tables.
SELECT Torque (Nm)/rpm FROM table WHERE Model/Engine = 1.6 Duratec Ti-VCT
CREATE TABLE INST, Here is a database schema( table schema);
What is the torque formula for the 1.6 Duratec ti-vct model/engine?.It is not neccessary to use all the tables.
SELECT last_win FROM table_name_34 WHERE last_final_lost = "2011"
CREATE TABLE INST, Here is a database schema( table schema);
When was the last win for the club that had a final loss in 2011?It is not neccessary to use all the tables.
SELECT winner FROM table_name_47 WHERE course = "forlì to carpi"
CREATE TABLE INST, Here is a database schema( table schema);
Who won at course Forlì to Carpi?It is not neccessary to use all the tables.
SELECT Tournament FROM table WHERE Date = october 1, 2006
CREATE TABLE INST, Here is a database schema( table schema);
Which tournament was played on October 1, 2006?.It is not neccessary to use all the tables.
SELECT points FROM table_name_47 WHERE score = "2 - 2"
CREATE TABLE INST, Here is a database schema( table schema);
Score of 2 - 2 had what points?It is not neccessary to use all the tables.
SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid HAVING COUNT(*) >= 2
CREATE TABLE INST, Here is a database schema( table schema);
Show names for all aircraft with at least two flights.It is not neccessary to use all the tables.
SELECT current_club FROM table_name_28 WHERE first_team_appearances = "ongoing" AND position = "midfielder" AND player = "samir carruthers"
CREATE TABLE INST, Here is a database schema( table schema);
What is the name of the club that has ongoing first-team appearances a midfielder and whose player is Samir Carruthers?It is not neccessary to use all the tables.
SELECT Overall WC points (Rank) FROM table WHERE 2nd (m) = 139
CREATE TABLE INST, Here is a database schema( table schema);
What is the overall WC points (rank) that has 139 as the 2nd (m)?.It is not neccessary to use all the tables.
SELECT Away team score FROM table WHERE Away team = melbourne
CREATE TABLE INST, Here is a database schema( table schema);
When Melbourne was the Away team, what was their score?.It is not neccessary to use all the tables.
SELECT AVG Pick FROM table WHERE Team = texas rangers
CREATE TABLE INST, Here is a database schema( table schema);
What was the average pick made by the Texas Rangers?.It is not neccessary to use all the tables.
SELECT label FROM table_name_93 WHERE region = "spain"
CREATE TABLE INST, Here is a database schema( table schema);
What label is from the Region of Spain?It is not neccessary to use all the tables.
SELECT "Record" FROM table_46180 WHERE "Opponent" = 'matt serra'
CREATE TABLE INST, Here is a database schema( table schema);
What was the record for opponent Matt Serra?It is not neccessary to use all the tables.
SELECT Report FROM table WHERE Year = 2003
CREATE TABLE INST, Here is a database schema( table schema);
Name the report for 2003.It is not neccessary to use all the tables.
SELECT SUM(total) FROM invoices WHERE billing_city = "Chicago" AND billing_state = "IL"
CREATE TABLE INST, Here is a database schema( table schema);
List total amount of invoice from Chicago IL.It is not neccessary to use all the tables.
SELECT Place FROM table WHERE Country = south africa
CREATE TABLE INST, Here is a database schema( table schema);
What place did the player from South Africa finish?.It is not neccessary to use all the tables.
SELECT opponent FROM table_name_17 WHERE date = "april 14"
CREATE TABLE INST, Here is a database schema( table schema);
Which opponent was present on April 14?It is not neccessary to use all the tables.
SELECT Method FROM table WHERE Result = loss AND Date = january 19, 2008
CREATE TABLE INST, Here is a database schema( table schema);
what is the method when the result is loss on january 19, 2008?.It is not neccessary to use all the tables.
SELECT COUNT(*) FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.number = 542 AND instructor.name LIKE '%Pelham Barron%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = course_offering.offering_id
CREATE TABLE INST, Here is a database schema( table schema);
For 542 , how many times has Prof. Pelham Barron taught ?It is not neccessary to use all the tables.
SELECT Result FROM table WHERE Nominated work = white valentine
CREATE TABLE INST, Here is a database schema( table schema);
Did the nominated work of white valentine win an award?.It is not neccessary to use all the tables.
SELECT radio_stations FROM table_23143607_1 WHERE organization = "Ente Público Radio Televisión Madrid (EPRTVM)"
CREATE TABLE INST, Here is a database schema( table schema);
Which of the radio stations has the organization of ente público radio televisión madrid (eprtvm)?It is not neccessary to use all the tables.
SELECT res FROM table_name_89 WHERE record = "2-0"
CREATE TABLE INST, Here is a database schema( table schema);
What was the resolution of the fight when matt grice had a record of 2-0?It is not neccessary to use all the tables.
SELECT etymology FROM table_name_10 WHERE rank = 14
CREATE TABLE INST, Here is a database schema( table schema);
What is Etymology when Rank is 14?It is not neccessary to use all the tables.
SELECT "Record" FROM table_33883 WHERE "Loss" = 'finley (8-7)'
CREATE TABLE INST, Here is a database schema( table schema);
Loss of finley (8-7) had what record?It is not neccessary to use all the tables.
SELECT College/junior/club team FROM table WHERE Player = John Campbell
CREATE TABLE INST, Here is a database schema( table schema);
Name the college/junior club team for john campbell.It is not neccessary to use all the tables.
SELECT MAX Mir-Hossein Mousavi FROM table WHERE Province = Azarbaijan, West
CREATE TABLE INST, Here is a database schema( table schema);
What was the highest score of candidate mir-hossein mousavi in the location known as azarbaijan, west?.It is not neccessary to use all the tables.
SELECT AVG Week FROM table WHERE Opponent = baltimore colts AND Attendance < 55,137
CREATE TABLE INST, Here is a database schema( table schema);
Which Week has an Opponent of baltimore colts, and an Attendance smaller than 55,137?.It is not neccessary to use all the tables.
SELECT AVG(total) FROM table_name_5 WHERE rank = "33" AND bronze > 1
CREATE TABLE INST, Here is a database schema( table schema);
What is the Total medals for the Nation ranking 33 with more than 1 Bronze?It is not neccessary to use all the tables.
SELECT 2012 FROM table_name_31 WHERE 2010 = "q2" AND tournament = "wimbledon"
CREATE TABLE INST, Here is a database schema( table schema);
What 2012 has q2 as the 2010 and wimbledon as the tournament?It is not neccessary to use all the tables.
SELECT directed_by FROM table_16384596_4 WHERE production_code = 209
CREATE TABLE INST, Here is a database schema( table schema);
Who directed the episode with the production code 209?It is not neccessary to use all the tables.
SELECT COUNT(byes) FROM table_name_84 WHERE against = 1136 AND draws < 0
CREATE TABLE INST, Here is a database schema( table schema);
What was the total number of Byes for the team that had 1136 Against and fewer than 0 Draws?It is not neccessary to use all the tables.
SELECT SUM TD's FROM table WHERE Car. = 88 AND Avg. < 3
CREATE TABLE INST, Here is a database schema( table schema);
How many TDs have a Car of 88 and an Avg smaller than 3?.It is not neccessary to use all the tables.
SELECT Candidates FROM table WHERE Result = Re-elected AND District = Texas 7
CREATE TABLE INST, Here is a database schema( table schema);
What candidate has a result of being re-elected in the Texas 7 District?.It is not neccessary to use all the tables.
SELECT SUM("votes") FROM table_202_271 WHERE "party" IN ('conservative', 'rainbow dream ticket')
CREATE TABLE INST, Here is a database schema( table schema);
how many votes did both the conservative party and the rainbow dream ticket party receive ?It is not neccessary to use all the tables.
SELECT AVG Points FROM table WHERE Wins < 0
CREATE TABLE INST, Here is a database schema( table schema);
What is the average points won when Carlos had 0 wins?.It is not neccessary to use all the tables.
SELECT opponent FROM table_name_70 WHERE date = "november 15, 1981"
CREATE TABLE INST, Here is a database schema( table schema);
Who was the opponent on November 15 1981?It is not neccessary to use all the tables.
SELECT Long FROM table WHERE TD's = 4
CREATE TABLE INST, Here is a database schema( table schema);
Tell me the long for TD's of 4.It is not neccessary to use all the tables.
SELECT MAX Population (2011) FROM table WHERE Land area (km²) = 6.00
CREATE TABLE INST, Here is a database schema( table schema);
When 6.00 is the land area in kilometers squared what is the highest population of 2011?.It is not neccessary to use all the tables.
SELECT region FROM table_name_5 WHERE catalog = "sm 2965-05"
CREATE TABLE INST, Here is a database schema( table schema);
What is the Region when the Catalog is SM 2965-05?It is not neccessary to use all the tables.
SELECT Team_Name, ACC_Percent FROM basketball_match
CREATE TABLE INST, Here is a database schema( table schema);
Draw a pie chart about the proportion of Team_Name and ACC_Percent.It is not neccessary to use all the tables.
SELECT road_team FROM table_name_64 WHERE game = "game 3"
CREATE TABLE INST, Here is a database schema( table schema);
What is the Road Team of Game 3?It is not neccessary to use all the tables.
SELECT YEAR(CreationDate) AS y, TagName, COUNT(*) FROM Posts AS p JOIN PostTags AS pt ON p.Id = pt.PostId JOIN (SELECT tb.Id, tb.TagName, COUNT(*) AS cnt FROM PostTags AS b LEFT OUTER JOIN Tags AS tb ON b.TagId = tb.Id GROUP BY tb.Id, tb.TagName HAVING COUNT(*) > 1000 AND tb.TagName IN ('dojo', 'jquery', 'java')) AS t ON pt.TagId = t.Id GROUP BY YEAR(CreationDate), TagName ORDER BY TagName, y
CREATE TABLE INST, Here is a database schema( table schema);
Trend of popular tags ('dojo', 'jquery', 'java') on stats.SE.It is not neccessary to use all the tables.
SELECT Visitor FROM table WHERE Decision = ward AND Record = 22–21–4
CREATE TABLE INST, Here is a database schema( table schema);
Who was the visitor when ward recorded the decision with a record of 22–21–4?.It is not neccessary to use all the tables.
SELECT score FROM table_name_13 WHERE country = "united states" AND player = "jack nicklaus"
CREATE TABLE INST, Here is a database schema( table schema);
Name the Score of jack nicklaus united states ?It is not neccessary to use all the tables.
SELECT winner FROM table_name_12 WHERE location = "iowa"
CREATE TABLE INST, Here is a database schema( table schema);
Which winner had a location of Iowa?It is not neccessary to use all the tables.
SELECT Local/Networked FROM table WHERE Ad Freq = n/a
CREATE TABLE INST, Here is a database schema( table schema);
What is the local/networked value for the show with an ad frequency of N/A?.It is not neccessary to use all the tables.
SELECT Comment FROM table WHERE Model name = 2.4 (2001-2007)
CREATE TABLE INST, Here is a database schema( table schema);
what's the comment with model name being 2.4 (2001-2007).It is not neccessary to use all the tables.
SELECT entrant FROM table_name_87 WHERE points < 7 AND chassis = "lola t86/50"
CREATE TABLE INST, Here is a database schema( table schema);
with lola t86/50 chassis and less than 7 points what is the entrant?It is not neccessary to use all the tables.
SELECT hanyu_pinyin FROM table_name_53 WHERE hanzi = "依兰县"
CREATE TABLE INST, Here is a database schema( table schema);
What is the Pinyin for 依兰县?It is not neccessary to use all the tables.
SELECT Player FROM table WHERE Score = 70
CREATE TABLE INST, Here is a database schema( table schema);
Which player had a score of 70?.It is not neccessary to use all the tables.
SELECT U.S. viewers (millions) FROM table WHERE Directed by = Michael Lembeck
CREATE TABLE INST, Here is a database schema( table schema);
how many millions of north american viewers had the episode whose director was Michael Lembeck? .It is not neccessary to use all the tables.
SELECT Nominated For FROM table WHERE Year < 2002 AND Award = national television awards AND Category = most popular comedy performer
CREATE TABLE INST, Here is a database schema( table schema);
Name what was nominated in years before 2002 for most popular comedy performer at the national television awards.It is not neccessary to use all the tables.
SELECT COUNT Persian War FROM table WHERE School = rashtriya indian military college AND 1860-1878 < 0
CREATE TABLE INST, Here is a database schema( table schema);
How many Persian Wars have a School of rashtriya indian military college, and an 1860-1878 smaller than 0?.It is not neccessary to use all the tables.
SELECT "Date" FROM table_8573 WHERE "Format" = 'ed remaster cd'
CREATE TABLE INST, Here is a database schema( table schema);
On what date was the format of ed remaster cd?It is not neccessary to use all the tables.
SELECT MAX Comp FROM table WHERE Rating < 52.8 AND Yards < 0
CREATE TABLE INST, Here is a database schema( table schema);
What is the highest comp for ratings less than 52.8 and yards less than 0?.It is not neccessary to use all the tables.
SELECT fa_cup_apps FROM table_name_73 WHERE total_goals < 4 AND league_cup_goals = 0 AND league_apps = "8 (10)"
CREATE TABLE INST, Here is a database schema( table schema);
What is the FA Cup Apps when total goals is smaller than 4 League Cup Goals is 0 and League Apps is 8 (10)?It is not neccessary to use all the tables.
SELECT us_viewers__million_ FROM table_25997153_1 WHERE directed_by = "Dan Lerner"
CREATE TABLE INST, Here is a database schema( table schema);
how many million u.s. viewers watched the episode directed by dan lerner?It is not neccessary to use all the tables.
SELECT entrant FROM table_name_42 WHERE chassis = "maserati 250f" AND points = "6" AND year < 1957
CREATE TABLE INST, Here is a database schema( table schema);
What is the entrant of a chassis maserati 250f also has 6 points and older than year 1957?It is not neccessary to use all the tables.
SELECT opponent_in_final FROM table_name_55 WHERE surface = "carpet"
CREATE TABLE INST, Here is a database schema( table schema);
Who was the opponent on carpet in a final?It is not neccessary to use all the tables.
SELECT Round FROM table WHERE Home = alianza
CREATE TABLE INST, Here is a database schema( table schema);
In what round was the Alianza home game?.It is not neccessary to use all the tables.
SELECT COUNT Position FROM table WHERE Team = figueirense AND Played > 38
CREATE TABLE INST, Here is a database schema( table schema);
How many positions have figueirense as the team, with a played greater than 38?.It is not neccessary to use all the tables.
SELECT MIN Top-5 FROM table WHERE Top-25 < 4 AND Cuts made < 7
CREATE TABLE INST, Here is a database schema( table schema);
What is the lowest Top-5, when Top-25 is less than 4, and when Cuts made is less than 7?.It is not neccessary to use all the tables.
SELECT AVG Points FROM table WHERE December < 6 AND Game > 26
CREATE TABLE INST, Here is a database schema( table schema);
What is the average points that have a December less than 6, with a game greater than 26?.It is not neccessary to use all the tables.
SELECT MIN DMA FROM table
CREATE TABLE INST, Here is a database schema( table schema);
What is dma?.It is not neccessary to use all the tables.
SELECT Round FROM table WHERE Competition = uefa cup AND Club = kolkheti-1913 poti
CREATE TABLE INST, Here is a database schema( table schema);
Which round is the UEFA Cup Compeition and the Kolkheti-1913 Poti Cub?.It is not neccessary to use all the tables.
SELECT skip FROM table_name_51 WHERE second = "martin hejhal"
CREATE TABLE INST, Here is a database schema( table schema);
Which skip's second is Martin Hejhal?It is not neccessary to use all the tables.
SELECT volume FROM table_name_38 WHERE isbn = "978-1-59582-712-8 (hc) 978-1-59582-713-5 (tpb)"
CREATE TABLE INST, Here is a database schema( table schema);
What volume number has the ISBN of 978-1-59582-712-8 (hc) 978-1-59582-713-5 (tpb)?It is not neccessary to use all the tables.
SELECT president FROM table_name_26 WHERE treasurer = "james davidson" AND season = "2006–2007"
CREATE TABLE INST, Here is a database schema( table schema);
Name the President who has a Treasurer of james davidson and a Season of 2006–2007?It is not neccessary to use all the tables.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "URGENT" AND prescriptions.route = "PO/NG"
CREATE TABLE INST, Here is a database schema( table schema);
how many patients whose admission type is urgent and drug route is po/ng?It is not neccessary to use all the tables.
SELECT results FROM table_name_94 WHERE record = "28-12"
CREATE TABLE INST, Here is a database schema( table schema);
What Results has the Record of 28-12?It is not neccessary to use all the tables.
SELECT AVG(apps) FROM table_name_51 WHERE team = "kairat" AND level > 1
CREATE TABLE INST, Here is a database schema( table schema);
What is the average Apps for the team Kairat with level larger than 1?It is not neccessary to use all the tables.
SELECT To par FROM table WHERE Player = steve elkington
CREATE TABLE INST, Here is a database schema( table schema);
What was steve elkington's to par?.It is not neccessary to use all the tables.
SELECT MAX("Capacity") FROM table_156 WHERE "Stadium" = 'Pittodrie'
CREATE TABLE INST, Here is a database schema( table schema);
What is Pittodrie Stadium's maximum capacity?It is not neccessary to use all the tables.
SELECT film_title_used_in_nomination FROM table_name_98 WHERE original_name = "okkar á milli: í hita og þunga dagsins"
CREATE TABLE INST, Here is a database schema( table schema);
Name the film title for okkar á milli: í hita og þunga dagsinsIt is not neccessary to use all the tables.
SELECT name FROM table_name_32 WHERE rank > 3 AND lane < 6 AND time = "1:58.15"
CREATE TABLE INST, Here is a database schema( table schema);
Who had a larger rank than 3 less than 6 lanes and a time of 1:58.15?It is not neccessary to use all the tables.
SELECT home_team AS score FROM table_16387653_1 WHERE away_team = "Collingwood"
CREATE TABLE INST, Here is a database schema( table schema);
What was the home team score against Collingwood?It is not neccessary to use all the tables.
SELECT composer FROM table_name_8 WHERE duration = "3:31"
CREATE TABLE INST, Here is a database schema( table schema);
What composer has a duration time of 3:31?It is not neccessary to use all the tables.
SELECT Away team FROM table WHERE Tie no = 11
CREATE TABLE INST, Here is a database schema( table schema);
Who is the away team for tie no 11?.It is not neccessary to use all the tables.
SELECT No. in season FROM table WHERE Original air date = February 11, 2005
CREATE TABLE INST, Here is a database schema( table schema);
The episode which originally aired on February 11, 2005 had which episode # of the season?.It is not neccessary to use all the tables.
SELECT kr_narayanan__values_ FROM table_22897453_1 WHERE states = "Pondicherry"
CREATE TABLE INST, Here is a database schema( table schema);
Name the k. r. narayanan values for pondicherryIt is not neccessary to use all the tables.
SELECT MIN(swimsuit) FROM table_name_87 WHERE interview < 8.574 AND average > 8.532
CREATE TABLE INST, Here is a database schema( table schema);
Which smallest swimsuit number's interview was less than 8.574 when the average number was bigger than 8.532?It is not neccessary to use all the tables.
SELECT thai_name FROM table_name_29 WHERE transcription = "wan phruehatsabodi"
CREATE TABLE INST, Here is a database schema( table schema);
Show the Thai name of wan phruehatsabodi?It is not neccessary to use all the tables.
SELECT College FROM table WHERE Pick # < 98 AND Round = round 4
CREATE TABLE INST, Here is a database schema( table schema);
What college(s) did the player(s) picked in round 4 with a pick number less than 98 play for?.It is not neccessary to use all the tables.
SELECT position FROM table_name_24 WHERE round > 5 AND player = "matthew tassone"
CREATE TABLE INST, Here is a database schema( table schema);
Who position did matthew tassone who was drafted after round 5 play?It is not neccessary to use all the tables.
SELECT MAX m/v ft/s FROM table WHERE Time to ft (m) at 55° (seconds) = 22.1
CREATE TABLE INST, Here is a database schema( table schema);
What is the maximum foot per second speed where time to feet ratio is 22.1 at 55 degrees?.It is not neccessary to use all the tables.
SELECT Publisher, COUNT(*) FROM publication GROUP BY Publisher ORDER BY COUNT(*) DESC
CREATE TABLE INST, Here is a database schema( table schema);
Draw a bar chart of publisher versus the total number, and list in descending by the the total number .It is not neccessary to use all the tables.
SELECT Score FROM table WHERE Date = 20/6/97
CREATE TABLE INST, Here is a database schema( table schema);
What was the score on 20/6/97?.It is not neccessary to use all the tables.