sql
stringlengths
9
2.37k
table
stringclasses
9 values
query
stringlengths
51
503
SELECT COUNT(*) FROM Companies
CREATE TABLE INST, Here is a database schema( table schema);
How many companies are there?It is not neccessary to use all the tables.
SELECT College FROM table WHERE Round < 2
CREATE TABLE INST, Here is a database schema( table schema);
Which college has fewer than 2 rounds?.It is not neccessary to use all the tables.
SELECT grid FROM table_name_24 WHERE constructor = "toyota" AND time_retired = "+1:09.718"
CREATE TABLE INST, Here is a database schema( table schema);
What is the grid with a Toyota constructor and +1:09.718 as time/retired?It is not neccessary to use all the tables.
SELECT "yacht" FROM table_204_431 WHERE "yacht" IN ('cougar ii', 'aurora') ORDER BY "launch year" LIMIT 1
CREATE TABLE INST, Here is a database schema( table schema);
which yacht launched first : cougar ii or aurora ?It is not neccessary to use all the tables.
SELECT CONCAT('https://stackoverflow.com/a/', PostId), Upvotes, Downvotes FROM (SELECT PostId, Upvotes, Downvotes, 2 * Downvotes / NULLIF(Upvotes, 0) AS Ratio FROM (SELECT PostId, Upvotes = SUM(CASE WHEN VoteTypeId = 2 THEN 1 ELSE 0 END), Downvotes = SUM(CASE WHEN VoteTypeId = 3 THEN 1 ELSE 0 END) FROM Votes WHERE Vote...
CREATE TABLE INST, Here is a database schema( table schema);
Selects all posts where the number of upvotes is greater than the number of downvotes, but where the number of downvotes is at least half the number of upvotes. The result is ordered by the number of upvotes (the highest on top).. Selects all posts where the number of upvotes is greater than the number of downvotes, bu...
SELECT Engine FROM table WHERE Number Range = 8–9, 13–16
CREATE TABLE INST, Here is a database schema( table schema);
what's the engine where number range is 8–9, 13–16.It is not neccessary to use all the tables.
SELECT Team FROM table WHERE Score = L 102–122 (OT)
CREATE TABLE INST, Here is a database schema( table schema);
Name the team for score l 102–122 (ot).It is not neccessary to use all the tables.
SELECT 54 holes FROM table WHERE Runner(s)-up = Jimmy Demaret
CREATE TABLE INST, Here is a database schema( table schema);
what is the number where the player was jimmy demaret.It is not neccessary to use all the tables.
SELECT Distinguished Service Cross FROM table WHERE Navy Cross = Coast Guard Commendation Medal
CREATE TABLE INST, Here is a database schema( table schema);
What is the distinguished service cross when the navy cross is Coast Guard commendation medal?.It is not neccessary to use all the tables.
SELECT position FROM table_11677691_2 WHERE school = "South Pointe High school"
CREATE TABLE INST, Here is a database schema( table schema);
WHAT POSITION DOES THE PLAYER FROM SOUTH POINTE HIGH SCHOOL PLAY?It is not neccessary to use all the tables.
SELECT to_par FROM table_name_68 WHERE place = "8"
CREATE TABLE INST, Here is a database schema( table schema);
Which To par has a Place in 8?It is not neccessary to use all the tables.
SELECT constructor FROM table_name_61 WHERE laps = 35 AND grid > 5
CREATE TABLE INST, Here is a database schema( table schema);
Tell me the constructor that has 35 Laps with a grid more than 5It is not neccessary to use all the tables.
SELECT MAX(lane) FROM table_name_38 WHERE name = "nimrod shapira bar-or"
CREATE TABLE INST, Here is a database schema( table schema);
What is the highest lane that has nimrod shapira bar-or as the name?It is not neccessary to use all the tables.
SELECT opponent FROM table_name_21 WHERE points < 18 AND november > 11
CREATE TABLE INST, Here is a database schema( table schema);
Which opponent has points less than 18 and a november greater than 11?It is not neccessary to use all the tables.
SELECT place FROM table_name_50 WHERE silver = "valeri postoianov ( urs )" AND year > 1969 AND bronze = "alexander gazov ( urs )"
CREATE TABLE INST, Here is a database schema( table schema);
In which Place was the Silver won by valeri postoianov ( urs ) later than 1969 and the Bronze won by alexander gazov ( urs )?It is not neccessary to use all the tables.
SELECT MAX(total_votes) FROM table_name_7 WHERE outcome = "elected" AND candidate = "lee teng-hui"
CREATE TABLE INST, Here is a database schema( table schema);
How many votes did Lee Teng-Hui receive when he was elected?It is not neccessary to use all the tables.
SELECT record FROM table_name_3 WHERE game = 11
CREATE TABLE INST, Here is a database schema( table schema);
what team has a score of 11It is not neccessary to use all the tables.
SELECT course_name FROM courses ORDER BY course_name
CREATE TABLE INST, Here is a database schema( table schema);
List the names of courses in alphabetical order?It is not neccessary to use all the tables.
SELECT team FROM table_name_90 WHERE make = "chevrolet" AND pos < 7 AND car__number = 88
CREATE TABLE INST, Here is a database schema( table schema);
Who is the team of the Chevrolet, and has a position less than 7, for car # 88?It is not neccessary to use all the tables.
SELECT Date FROM table WHERE Score = 6–4, 7–5
CREATE TABLE INST, Here is a database schema( table schema);
On what date was the score 6–4, 7–5?.It is not neccessary to use all the tables.
SELECT SUM Round FROM table WHERE Name = mitch davis AND Overall < 118
CREATE TABLE INST, Here is a database schema( table schema);
What round did Mitch Davis, with an overall higher than 118, have?.It is not neccessary to use all the tables.
SELECT Users.Id, DisplayName, Reputation, COUNT(Posts.Id) AS Answers FROM Posts INNER JOIN Users ON Users.Id = OwnerUserId WHERE PostTypeId = 2 GROUP BY Users.Id, DisplayName, Reputation ORDER BY Reputation DESC LIMIT 50000
CREATE TABLE INST, Here is a database schema( table schema);
Top 50000 Users by Reputation.It is not neccessary to use all the tables.
SELECT round FROM table_name_36 WHERE event = "cage rage 17"
CREATE TABLE INST, Here is a database schema( table schema);
What Round is the Event cage rage 17?It is not neccessary to use all the tables.
SELECT vacated_throne FROM table_name_63 WHERE archbishop = "albert daeger"
CREATE TABLE INST, Here is a database schema( table schema);
When did Archbishop Albert Daeger vacate the throne?It is not neccessary to use all the tables.
SELECT MIN Year FROM table WHERE Event = 100 m AND Venue = thessaloniki, greece
CREATE TABLE INST, Here is a database schema( table schema);
Which year was the 100 m event played in Thessaloniki, Greece?.It is not neccessary to use all the tables.
SELECT MIN League apps FROM table WHERE Total apps = 5
CREATE TABLE INST, Here is a database schema( table schema);
Name the least league apps for total apps of 5 .It is not neccessary to use all the tables.
SELECT AVG(draw) FROM table_name_15 WHERE points = 42 AND played < 36
CREATE TABLE INST, Here is a database schema( table schema);
What's the draw that's played less than 36 and has 42 points?It is not neccessary to use all the tables.
SELECT Country FROM table WHERE Total = 293
CREATE TABLE INST, Here is a database schema( table schema);
What country has a total of 293?.It is not neccessary to use all the tables.
SELECT COUNT(result) FROM table_26250253_1 WHERE theme = "Group Round"
CREATE TABLE INST, Here is a database schema( table schema);
How many results are there with the theme Group Round?It is not neccessary to use all the tables.
SELECT away_team AS score FROM table_16388478_3 WHERE home_team = "Port Adelaide"
CREATE TABLE INST, Here is a database schema( table schema);
What score did the away team receive against home team Port Adelaide?It is not neccessary to use all the tables.
SELECT surface FROM table_name_84 WHERE championship = "australian open (1)"
CREATE TABLE INST, Here is a database schema( table schema);
What surface was the Australian Open (1) played on?It is not neccessary to use all the tables.
SELECT date FROM table_name_86 WHERE psoe = "36.1%"
CREATE TABLE INST, Here is a database schema( table schema);
Which date has a PSOE of 36.1%?It is not neccessary to use all the tables.
SELECT Leading scorer FROM table WHERE Visitor = trail blazers
CREATE TABLE INST, Here is a database schema( table schema);
Who was the leading scorer that was a visitor of the Trail Blazers?.It is not neccessary to use all the tables.
SELECT DISTINCT product_name FROM products ORDER BY product_name
CREATE TABLE INST, Here is a database schema( table schema);
List the names of all distinct products in alphabetical order.It is not neccessary to use all the tables.
SELECT College FROM table WHERE Pick # > 195 AND Player = mark brown
CREATE TABLE INST, Here is a database schema( table schema);
Which College has Player Mark Brown and a Pick # greater than 195?.It is not neccessary to use all the tables.
SELECT Race Winner FROM table WHERE Pole Position = niki lauda
CREATE TABLE INST, Here is a database schema( table schema);
Who was the winner when Niki Lauda held pole position?.It is not neccessary to use all the tables.
SELECT MAX 2005 FROM table WHERE Güzelçamlı’s Lost Panther = the muse
CREATE TABLE INST, Here is a database schema( table schema);
Which 2005 has a Güzelçamlı’s Lost Panther of the muse?.It is not neccessary to use all the tables.
SELECT other FROM table_27003186_3 WHERE registered_voters = "50.7%"
CREATE TABLE INST, Here is a database schema( table schema);
What is other when registered voters is 50.7%?It is not neccessary to use all the tables.
SELECT AVG("Position") FROM table_47740 WHERE "Wins" < '14' AND "Draws" < '3'
CREATE TABLE INST, Here is a database schema( table schema);
What is the position when wins are fewer than 14 and draws are fewer than 3?It is not neccessary to use all the tables.
SELECT 1944 FROM table WHERE Tournament = u.s. championships
CREATE TABLE INST, Here is a database schema( table schema);
What is the 1944 result for the U.S. Championships?.It is not neccessary to use all the tables.
SELECT High rebounds FROM table WHERE Date = October 16
CREATE TABLE INST, Here is a database schema( table schema);
Who had the most rebounds and how many did they have on October 16?.It is not neccessary to use all the tables.
SELECT Replica FROM table WHERE Race = supersport race 1
CREATE TABLE INST, Here is a database schema( table schema);
What Replica has a race of supersport race 1?.It is not neccessary to use all the tables.
SELECT name FROM table_name_72 WHERE transfer_window = "winter" AND transfer_fee = "free"
CREATE TABLE INST, Here is a database schema( table schema);
What player had a transfer window of winter and free as the transfer fee?It is not neccessary to use all the tables.
SELECT SUM(gold) FROM table_name_15 WHERE nation = "new zealand" AND total < 2
CREATE TABLE INST, Here is a database schema( table schema);
How many gold have a National of New Zealand with a total less than 2?It is not neccessary to use all the tables.
SELECT position FROM table_name_96 WHERE round < 3 AND overall < 48
CREATE TABLE INST, Here is a database schema( table schema);
Which position had fewer rounds than 3 and an overall of less than 48?It is not neccessary to use all the tables.
SELECT Branding FROM table WHERE Frequency = 93.1mhz AND Callsign = dwrx
CREATE TABLE INST, Here is a database schema( table schema);
What is the branding for the station with a frequency of 93.1mhz and a callsign of DWRX?.It is not neccessary to use all the tables.
SELECT "Institution" FROM table_18975 WHERE "Founded" = '1923'
CREATE TABLE INST, Here is a database schema( table schema);
Which institution was founded in 1923?It is not neccessary to use all the tables.
SELECT COUNT Driver FROM table WHERE Entrant = Bob Gerard Racing
CREATE TABLE INST, Here is a database schema( table schema);
How many drivers did Bob Gerard Racing have?.It is not neccessary to use all the tables.
SELECT COUNT District FROM table WHERE Candidates = Eliot L. Engel (D) 85.2% Martin Richman (R) 14.8%
CREATE TABLE INST, Here is a database schema( table schema);
how many district with candidates being eliot l. engel (d) 85.2% martin richman (r) 14.8%.It is not neccessary to use all the tables.
SELECT Ship FROM table WHERE Pennant number = h05
CREATE TABLE INST, Here is a database schema( table schema);
What ship has a pennant number h05?.It is not neccessary to use all the tables.
SELECT sales_breakdown FROM table_21458142_1 WHERE publisher = "Nintendo" AND release_date = "May 15, 2006"
CREATE TABLE INST, Here is a database schema( table schema);
What's the sales breakdown of the Nintendo game released on May 15 2006?It is not neccessary to use all the tables.
SELECT category FROM table_1430913_1 WHERE name_of_place = "Hemkunt Sahib"
CREATE TABLE INST, Here is a database schema( table schema);
If the place is hemkunt sahib what is the category?It is not neccessary to use all the tables.
SELECT MIN Drop Goals FROM table
CREATE TABLE INST, Here is a database schema( table schema);
Lowest number of drop goals?.It is not neccessary to use all the tables.
SELECT Hometown/School FROM table WHERE Position = of AND Player = mike white
CREATE TABLE INST, Here is a database schema( table schema);
What is the hometown of Mike White?.It is not neccessary to use all the tables.
SELECT segment_b FROM table_name_54 WHERE netflix = "s03e01"
CREATE TABLE INST, Here is a database schema( table schema);
What was the B segmint for Netlix S03E01?It is not neccessary to use all the tables.
SELECT tournament FROM table_name_4 WHERE outcome = "winner" AND surface = "hard (i)"
CREATE TABLE INST, Here is a database schema( table schema);
Which Tournament has an Outcome of winner and a Surface of hard (i)?It is not neccessary to use all the tables.
SELECT result FROM table_name_47 WHERE opponent = "brechin city" AND attendance = 656
CREATE TABLE INST, Here is a database schema( table schema);
When the opponent was Brechin City and the attendance was 656 what was the Result?It is not neccessary to use all the tables.
SELECT Original air date FROM table WHERE U.S. viewers (millions) = 14.55
CREATE TABLE INST, Here is a database schema( table schema);
when did 14.55 people watch?.It is not neccessary to use all the tables.
SELECT scores_by_each_individual_judge FROM table_name_87 WHERE date_performed = "august 7" AND main_contestant = "karanvir bohra"
CREATE TABLE INST, Here is a database schema( table schema);
Which Scores by each individual judge has a Date performed of august 7 and a Main contestant of karanvir bohra?It is not neccessary to use all the tables.
SELECT Date FROM table WHERE Away team = footscray
CREATE TABLE INST, Here is a database schema( table schema);
What day did Footscray play as the away team?.It is not neccessary to use all the tables.
SELECT Height (f) FROM table WHERE Position = Center
CREATE TABLE INST, Here is a database schema( table schema);
For all players playing at the center, list the height in feet..It is not neccessary to use all the tables.
SELECT score FROM table_name_81 WHERE year = "2006-2007"
CREATE TABLE INST, Here is a database schema( table schema);
What is the score during the 2006-2007 year?It is not neccessary to use all the tables.
SELECT segment_b FROM table_15187735_12 WHERE series_ep = "12-08"
CREATE TABLE INST, Here is a database schema( table schema);
What is Segment B for series episode 12-08?It is not neccessary to use all the tables.
SELECT Incumbent FROM table WHERE First elected = 1940
CREATE TABLE INST, Here is a database schema( table schema);
Who was the incumbent in 1940?.It is not neccessary to use all the tables.
SELECT "Sport" FROM table_57283 WHERE "Country" = 'puerto rico' AND "Year" = '2000'
CREATE TABLE INST, Here is a database schema( table schema);
Name the sport for puerto rico and year of 2000It is not neccessary to use all the tables.
SELECT Competition FROM table WHERE Report = aiff
CREATE TABLE INST, Here is a database schema( table schema);
Which competition has a report of AIFF?.It is not neccessary to use all the tables.
SELECT Weight FROM table WHERE 2008 club = dynamo moscow
CREATE TABLE INST, Here is a database schema( table schema);
What is the weight for the 2008 club Dynamo Moscow?.It is not neccessary to use all the tables.
SELECT MIN Pick # FROM table WHERE Player = Graeme Bonar
CREATE TABLE INST, Here is a database schema( table schema);
What is Graeme Bonar's lowest pick number?.It is not neccessary to use all the tables.
SELECT MAX("Events") FROM table_76399 WHERE "Cuts made" < '34' AND "Top-25" < '5' AND "Top-10" > '1'
CREATE TABLE INST, Here is a database schema( table schema);
what is the highest events when the cuts made is less than 34, the top-25 is less than 5 and the top-10 is more than 1?It is not neccessary to use all the tables.
SELECT COUNT(content) FROM table_15887683_19 WHERE television_service = "R-LIGHT"
CREATE TABLE INST, Here is a database schema( table schema);
How many times was something listed under content when the television was R-light?It is not neccessary to use all the tables.
SELECT Record Company FROM table WHERE Year of Recording = 1964 AND Format = cd
CREATE TABLE INST, Here is a database schema( table schema);
What record company released a CD in 1964?.It is not neccessary to use all the tables.
SELECT extra FROM table_name_2 WHERE tournament = "world championships" AND result = "1st"
CREATE TABLE INST, Here is a database schema( table schema);
What extra has world championships as the tournament and 1st as the result?It is not neccessary to use all the tables.
SELECT Ceremony FROM table WHERE Award = vijay award AND Outcome = nominated AND Name = anuya bhagvath
CREATE TABLE INST, Here is a database schema( table schema);
What is the category Anuya Bhagvath was nominated for at vijay award?.It is not neccessary to use all the tables.
SELECT condition FROM table_1099080_1 WHERE partial_thromboplastin_time = "Prolonged" AND bleeding_time = "Prolonged"
CREATE TABLE INST, Here is a database schema( table schema);
What conditions had both prolonged bleeding times and prolonged partial thromboplastin timesIt is not neccessary to use all the tables.
SELECT position FROM table_21321804_1 WHERE cfl_team = "Edmonton Eskimos" AND college = "Weber State"
CREATE TABLE INST, Here is a database schema( table schema);
Which position is cfl team edmonton eskimos for weber state college?It is not neccessary to use all the tables.
SELECT MAX Position FROM table WHERE Goals against < 54 AND Losses = 7 AND Goal Difference > 23
CREATE TABLE INST, Here is a database schema( table schema);
Which position is the highest to have less than 54 goals, a loss of 7 and a goal difference higher than 23?.It is not neccessary to use all the tables.
SELECT won FROM table_12807904_3 WHERE try_bonus = "11"
CREATE TABLE INST, Here is a database schema( table schema);
HOW MANY GAMES HAD A WIN WITH A BONUS OF 11It is not neccessary to use all the tables.
SELECT to_par FROM table_name_37 WHERE total < 297 AND finish = "1"
CREATE TABLE INST, Here is a database schema( table schema);
What is To par when Total is less than 297 and when Finish is "1"?It is not neccessary to use all the tables.
SELECT Principal FROM table WHERE School = Northfield Junior-Senior High School
CREATE TABLE INST, Here is a database schema( table schema);
Name the principal of Northfield Junior-Senior High School..It is not neccessary to use all the tables.
SELECT COUNT(series) FROM table_24425976_2 WHERE production_code = "111"
CREATE TABLE INST, Here is a database schema( table schema);
How many episodes in the series has a production code of 111?It is not neccessary to use all the tables.
SELECT Road team FROM table WHERE Date = may 2
CREATE TABLE INST, Here is a database schema( table schema);
Who was the road team on May 2?.It is not neccessary to use all the tables.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "URGENT" AND procedures.long_title = "Open and other right hemicolectomy"
CREATE TABLE INST, Here is a database schema( table schema);
how many of the patients on urgent admission had open and other right hemicolectomy?It is not neccessary to use all the tables.
SELECT COUNT(prodcode) FROM table_13403120_1 WHERE originalairdate = "01/12/1968"
CREATE TABLE INST, Here is a database schema( table schema);
what is the prod.code of the episode with original air date 01/12/1968?It is not neccessary to use all the tables.
SELECT AVG Bronze FROM table WHERE Total = 7 AND Silver > 1
CREATE TABLE INST, Here is a database schema( table schema);
What is the average Bronze, when Total is 7, and when Silver is greater than 1?.It is not neccessary to use all the tables.
SELECT MAX Cuts made FROM table WHERE Top-25 = 3 AND Events < 13
CREATE TABLE INST, Here is a database schema( table schema);
How many cuts did he make in the tournament with 3 top 25s and under 13 events?.It is not neccessary to use all the tables.
SELECT Date FROM table WHERE Away team = barnet
CREATE TABLE INST, Here is a database schema( table schema);
What is Date, when Away Team is "Barnet"?.It is not neccessary to use all the tables.
SELECT Competing entities FROM table WHERE First held < 1970
CREATE TABLE INST, Here is a database schema( table schema);
Can you tell me the Competing entities that has the First held smaller than 1970?.It is not neccessary to use all the tables.
SELECT stopping_pattern FROM table_name_50 WHERE platform = "[2777] mciver station platforms"
CREATE TABLE INST, Here is a database schema( table schema);
Which Stopping pattern has a Platform of [2777] mciver station platforms?It is not neccessary to use all the tables.
SELECT Date FROM table WHERE Partner = daniella dominikovic
CREATE TABLE INST, Here is a database schema( table schema);
Which Date has a Partner of daniella dominikovic?.It is not neccessary to use all the tables.
SELECT Party FROM table WHERE Residence = san diego
CREATE TABLE INST, Here is a database schema( table schema);
Which Party has a Residence of san diego?.It is not neccessary to use all the tables.
SELECT ERP W FROM table WHERE Frequency MHz = 91.3
CREATE TABLE INST, Here is a database schema( table schema);
What is the ERP W for the frequency of 91.3MHz?.It is not neccessary to use all the tables.
SELECT iheartradio FROM table_name_74 WHERE show = "bronson and christine"
CREATE TABLE INST, Here is a database schema( table schema);
What is the iHeartRadio of the Bronson and Christine Show?It is not neccessary to use all the tables.
SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT t1.itemid FROM (SELECT inputevents_cv.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM inputevents_cv WHERE DATETIME(inputevents_cv.charttime) <= DATETIME(CURRENT_TIME(), '-3 year') GROUP BY inputevents_cv.itemid) AS t1 WHERE t1.c1 <= 5)
CREATE TABLE INST, Here is a database schema( table schema);
until 3 years ago, what were the top five most common intakes?It is not neccessary to use all the tables.
SELECT wrestler FROM table_name_23 WHERE entered = 5 AND pinned = "mvp"
CREATE TABLE INST, Here is a database schema( table schema);
Which Wrestler has an Entered of 5 and a Pinned of mvp?It is not neccessary to use all the tables.
SELECT college_junior_club_team__league_ FROM table_name_18 WHERE position = "defence" AND nationality = "canada" AND round < 5 AND player = "josiah didier"
CREATE TABLE INST, Here is a database schema( table schema);
What is College/Junior/Club Team (League) when Position is "Defence" when Nationality is "Canada" when Round is less than 5 and when Player is "Josiah Didier"?It is not neccessary to use all the tables.
SELECT COUNT Week FROM table WHERE Attendance > 21,231 AND Result = l 38-10
CREATE TABLE INST, Here is a database schema( table schema);
How many weeks have an attendance greater than 21,231, with l 38-10 as the result?.It is not neccessary to use all the tables.
SELECT artist FROM table_name_48 WHERE date = "june 1979"
CREATE TABLE INST, Here is a database schema( table schema);
What is the Artist with a Date that is june 1979?It is not neccessary to use all the tables.
SELECT attendance FROM table_name_49 WHERE date = "november 19, 1990"
CREATE TABLE INST, Here is a database schema( table schema);
What is the attendance of the November 19, 1990 game?It is not neccessary to use all the tables.
SELECT MAX(crowd) FROM table_name_48 WHERE home_team = "north melbourne"
CREATE TABLE INST, Here is a database schema( table schema);
What is the largest crowd for North Melbourne home games?It is not neccessary to use all the tables.
SELECT T1.country_code, T1.first_name FROM players AS T1 JOIN rankings AS T2 ON T1.player_id = T2.player_id ORDER BY T2.tours DESC LIMIT 1
CREATE TABLE INST, Here is a database schema( table schema);
Find the first name and country code of the player who did the most number of tours.It is not neccessary to use all the tables.