sql
stringlengths
9
2.37k
table
stringclasses
9 values
query
stringlengths
51
503
SELECT MIN Year FROM table WHERE Wins > 0
CREATE TABLE INST, Here is a database schema( table schema);
What is the lowest year that have wins greater than 0?.It is not neccessary to use all the tables.
SELECT Winners FROM table WHERE Third Place = 0 AND Team = minas
CREATE TABLE INST, Here is a database schema( table schema);
How many winners did Minas, which has 0 third places, have?.It is not neccessary to use all the tables.
SELECT founder FROM table_11256021_1 WHERE date = "c. 1900"
CREATE TABLE INST, Here is a database schema( table schema);
who is the founder where date is c. 1900It is not neccessary to use all the tables.
SELECT LMP2 Winning Team FROM table WHERE FLM Winning Team = No. 99 JMB Racing
CREATE TABLE INST, Here is a database schema( table schema);
if the flm winning team is no. 99 jmb racing what is the name of the lmp2 winning team .It is not neccessary to use all the tables.
SELECT candidates FROM table_1341690_5 WHERE district = "California 10"
CREATE TABLE INST, Here is a database schema( table schema);
Who was running for office in the California 10 district?It is not neccessary to use all the tables.
SELECT "Episode No." FROM table_1208 WHERE "Presenter" = 'Ben Okri'
CREATE TABLE INST, Here is a database schema( table schema);
What episode number is presented by Ben Okri ?It is not neccessary to use all the tables.
SELECT MAX(swimsuit) FROM table_name_91 WHERE evening_gown > 9.175 AND interview < 8.425
CREATE TABLE INST, Here is a database schema( table schema);
What is the highest swimsuit score of the contestant with an evening gown larger than 9.175 and an interview score less than 8.425?It is not neccessary to use all the tables.
SELECT ground FROM table_16388047_1 WHERE home_team = "Essendon"
CREATE TABLE INST, Here is a database schema( table schema);
Name the ground for essendonIt is not neccessary to use all the tables.
SELECT COUNT(*) FROM school
CREATE TABLE INST, Here is a database schema( table schema);
How many schools are there?It is not neccessary to use all the tables.
SELECT MIN Year FROM table WHERE Finish = 29 AND Start < 24
CREATE TABLE INST, Here is a database schema( table schema);
What is the lowest Year, when Finish is "29", and when Start is less than 24?.It is not neccessary to use all the tables.
SELECT method FROM table_name_71 WHERE time = "2:32"
CREATE TABLE INST, Here is a database schema( table schema);
What win method has a time of 2:32?It is not neccessary to use all the tables.
SELECT location FROM table_name_81 WHERE year = "2013" AND country = "egypt"
CREATE TABLE INST, Here is a database schema( table schema);
What is the location for Egypt in 2013?It is not neccessary to use all the tables.
SELECT Record FROM table WHERE Opponent = pittsburgh pirates AND Date = may 5
CREATE TABLE INST, Here is a database schema( table schema);
Which Record has an Opponent of pittsburgh pirates, and a Date of may 5?.It is not neccessary to use all the tables.
SELECT incumbent FROM table_19753079_4 WHERE district = "Alabama 6"
CREATE TABLE INST, Here is a database schema( table schema);
Name the incumbent for alabama 6It is not neccessary to use all the tables.
SELECT career_sr FROM table_name_43 WHERE 1985 = "1r"
CREATE TABLE INST, Here is a database schema( table schema);
What is the career SR with a 1r in 1985?It is not neccessary to use all the tables.
SELECT SUM Gold FROM table WHERE Nation = russia AND Rank > 1
CREATE TABLE INST, Here is a database schema( table schema);
What amount of Gold does Russia have and have a rank larger than 1?.It is not neccessary to use all the tables.
SELECT COUNT(game) FROM table_11965481_13 WHERE date = "June 12"
CREATE TABLE INST, Here is a database schema( table schema);
Name the number of games on june 12It is not neccessary to use all the tables.
SELECT MAX(year_named) FROM table_name_78 WHERE latitude = "76.0n" AND diameter__km_ > 548
CREATE TABLE INST, Here is a database schema( table schema);
What year was the geological feature with a latitude of 76.0n and a diameter larger than 548 km was named?It is not neccessary to use all the tables.
SELECT record FROM table_28768469_9 WHERE team = "Washington"
CREATE TABLE INST, Here is a database schema( table schema);
What was the record after the game against Washington?It is not neccessary to use all the tables.
SELECT date_of_birth FROM table_name_18 WHERE block > 342
CREATE TABLE INST, Here is a database schema( table schema);
What is the Date of Birth with a Block that is larger than 342?It is not neccessary to use all the tables.
SELECT Record FROM table WHERE Visitor = calgary
CREATE TABLE INST, Here is a database schema( table schema);
Visitor of calgary has what record?.It is not neccessary to use all the tables.
SELECT MIN Points FROM table WHERE Places = 81
CREATE TABLE INST, Here is a database schema( table schema);
What is the low point total for teams with 81 places?.It is not neccessary to use all the tables.
SELECT incumbent FROM table_name_95 WHERE district = "colorado 4"
CREATE TABLE INST, Here is a database schema( table schema);
Who is the incumbent for the Colorado 4 district?It is not neccessary to use all the tables.
SELECT rank___number_ FROM table_11274401_2 WHERE viewers__m_ = "2.65"
CREATE TABLE INST, Here is a database schema( table schema);
How did the episode rank that had 2.65 million viewers?It is not neccessary to use all the tables.
SELECT winner_2nd FROM table_name_84 WHERE jockey = "c. symons"
CREATE TABLE INST, Here is a database schema( table schema);
WHo is Winner/2nd that has c. symons?It is not neccessary to use all the tables.
SELECT championship FROM table_name_27 WHERE score = "6–3, 2–6, 3–6, 6–3, 3–6"
CREATE TABLE INST, Here is a database schema( table schema);
What Championship has Scores of 6–3 2–6 3–6 6–3 3–6?It is not neccessary to use all the tables.
SELECT Country FROM table WHERE Total = 302
CREATE TABLE INST, Here is a database schema( table schema);
What country has 302 as the total?.It is not neccessary to use all the tables.
SELECT COUNT(sets_lost) FROM table_name_15 WHERE sets_won < 0
CREATE TABLE INST, Here is a database schema( table schema);
How many sets lost have a sets won less than 0?It is not neccessary to use all the tables.
SELECT Opponent FROM table WHERE Date = november 26, 1989
CREATE TABLE INST, Here is a database schema( table schema);
Who was the opponent on November 26, 1989?.It is not neccessary to use all the tables.
SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT outputevents.itemid FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 53863)) AND STRFTIME('%y-%m-%d', outputevents.charttime) <= '2101-03-15' ORDER BY outputevents.charttime DESC LIMIT 1)
CREATE TABLE INST, Here is a database schema( table schema);
tell me the name of an output that patient 53863 has last had until 03/15/2101?It is not neccessary to use all the tables.
SELECT Home FROM table WHERE Record = 24–16–6
CREATE TABLE INST, Here is a database schema( table schema);
What team was home, when the record was 24–16–6?.It is not neccessary to use all the tables.
SELECT team FROM table_24587026_1 WHERE points = "22"
CREATE TABLE INST, Here is a database schema( table schema);
Name the team for 22 pointsIt is not neccessary to use all the tables.
SELECT MIN Area ( ha ) FROM table WHERE No. of villages = 18
CREATE TABLE INST, Here is a database schema( table schema);
If there are 18 villages, what is the minimum area ?.It is not neccessary to use all the tables.
SELECT MAX Total FROM table WHERE Game 1 = 105,011 AND Game 3 > 102,989
CREATE TABLE INST, Here is a database schema( table schema);
What is the highest total attendance of the team with a game 1 attendance of 105,011 and a game 3 greater than 102,989?.It is not neccessary to use all the tables.
SELECT AVG Attendance FROM table WHERE Opponent = new york giants AND Week < 5
CREATE TABLE INST, Here is a database schema( table schema);
Which Attendance has an Opponent of new york giants, and a Week smaller than 5?.It is not neccessary to use all the tables.
SELECT Socialist Workers ticket FROM table WHERE Republican ticket = malcolm wilson
CREATE TABLE INST, Here is a database schema( table schema);
What socialist workers ticket has malcolm wilson as the Republican ticket?.It is not neccessary to use all the tables.
SELECT regular_season FROM table_1427998_1 WHERE playoffs = "divisional Finals"
CREATE TABLE INST, Here is a database schema( table schema);
Where did the team finish in the season when the playoff result was divisional finals.It is not neccessary to use all the tables.
SELECT Player name FROM table WHERE College = Emporia State
CREATE TABLE INST, Here is a database schema( table schema);
Which player went to Emporia State?.It is not neccessary to use all the tables.
SELECT Profession FROM table WHERE Entered the house = day 1 AND Evicted = day 29 AND Name = skaj vikler
CREATE TABLE INST, Here is a database schema( table schema);
What is the profession of Skaj Vikler, who entered the house on day 1 and was evicted on day 29?.It is not neccessary to use all the tables.
SELECT COUNT S ÷ D FROM table WHERE [ 3 H]Nisoxetine = 3298 (1986) AND N ÷ D > 37.01
CREATE TABLE INST, Here is a database schema( table schema);
What is the total S ÷ D with a 3298 (1986) [3 H] nizoxetine and an N ÷ D greater than 37.01?.It is not neccessary to use all the tables.
SELECT MAX Year FROM table WHERE Start = 3 AND Team = morgan-mcclure AND Finish = 40
CREATE TABLE INST, Here is a database schema( table schema);
What's the latest year with a start of 3 and a finish of 40 for the morgan-mcclure team?.It is not neccessary to use all the tables.
SELECT release_date FROM table_name_96 WHERE sspec_number = "sl5xl, sl657, sl6by, sl6jp"
CREATE TABLE INST, Here is a database schema( table schema);
What is the Release Date when sSpec Number is sl5xl sl657 sl6by sl6jp?It is not neccessary to use all the tables.
SELECT record FROM table_name_14 WHERE opponent = "john flemming"
CREATE TABLE INST, Here is a database schema( table schema);
Which record has john flemming as the opponent?It is not neccessary to use all the tables.
SELECT party FROM table_name_49 WHERE district = "6th"
CREATE TABLE INST, Here is a database schema( table schema);
Which party has the 6th district?It is not neccessary to use all the tables.
SELECT high_points FROM table_23286112_7 WHERE location_attendance = "Verizon Center 17,152"
CREATE TABLE INST, Here is a database schema( table schema);
Who has high points when verizon center 17152 is location attendance?It is not neccessary to use all the tables.
SELECT song FROM table_name_9 WHERE artist = "sex pistols"
CREATE TABLE INST, Here is a database schema( table schema);
What song was made by the sex pistols?It is not neccessary to use all the tables.
SELECT series FROM table_name_15 WHERE days > 99 AND prize = "€50,000"
CREATE TABLE INST, Here is a database schema( table schema);
What is Series when Days is greater than 99 and when Prize is €50000?It is not neccessary to use all the tables.
SELECT Rider FROM table WHERE Fri 28 Aug = 24' 23.36 92.820mph
CREATE TABLE INST, Here is a database schema( table schema);
Who was the rider when Fri 28 Aug was 24' 23.36 92.820mph?.It is not neccessary to use all the tables.
SELECT Score FROM table WHERE Home = blazers
CREATE TABLE INST, Here is a database schema( table schema);
What was the score in the game where the Blazers were the home team?.It is not neccessary to use all the tables.
SELECT AVG(acquired) FROM table_name_49 WHERE design = "1a1" AND name = "wallenstein"
CREATE TABLE INST, Here is a database schema( table schema);
What is the average year for Wallenstein with 1a1 design?It is not neccessary to use all the tables.
SELECT MAX(rank) FROM table_name_38 WHERE nationality = "belgium" AND react > 0.162
CREATE TABLE INST, Here is a database schema( table schema);
What is the highest rank of an athlete from Belgium with react greater than 0.162?It is not neccessary to use all the tables.
SELECT away_team FROM table_29728596_2 WHERE competition = "1st ``Republic of Srpska Football Day``" AND home_team = "U 14 Republic of Srpska"
CREATE TABLE INST, Here is a database schema( table schema);
Who were the away teams when the competition was the 1st ``republic of srpska football day`` and the home team was u 14 republic of srpska?It is not neccessary to use all the tables.
SELECT SUM Long FROM table WHERE Yards = 926 AND Avg/G < 84.2
CREATE TABLE INST, Here is a database schema( table schema);
What is the sum for the long that has 926 yards and an avg/g less than 84.2?.It is not neccessary to use all the tables.
SELECT opponents FROM table_name_50 WHERE h___a = "a" AND result_f___a = "2 – 0" AND attendance > 30 OFFSET 000
CREATE TABLE INST, Here is a database schema( table schema);
Which Opponent has a H / A of a and a Result F – A of 2 – 0 and a Attendance larger than 30000?It is not neccessary to use all the tables.
SELECT MIN("Stolen Ends") FROM table_4234 WHERE "Locale" = 'British Columbia'
CREATE TABLE INST, Here is a database schema( table schema);
How many stolen ends did the skipper whose locale was British Columbia have?It is not neccessary to use all the tables.
SELECT Silver FROM table WHERE Bronze = hong chia-yuh
CREATE TABLE INST, Here is a database schema( table schema);
Who won the silver medal in the games where Hong Chia-yuh took home bronze?.It is not neccessary to use all the tables.
SELECT college FROM table_name_36 WHERE player = "shabazz muhammad"
CREATE TABLE INST, Here is a database schema( table schema);
Which college has a Player of shabazz muhammad?It is not neccessary to use all the tables.
SELECT COUNT Victory Margin (in lengths) FROM table WHERE Date = 8/3/08
CREATE TABLE INST, Here is a database schema( table schema);
With a date of 8/3/08, what was the length of the victory margin?.It is not neccessary to use all the tables.
SELECT notes FROM table_name_82 WHERE vehicle = "scout x-4" AND ceased_operation = "june 1971"
CREATE TABLE INST, Here is a database schema( table schema);
What are the notes regarding the scout x-4 vehicle which ceased operation in June 1971?It is not neccessary to use all the tables.
SELECT Institution FROM table WHERE Year > 2007 AND Award = 2nd AND Chief Judge = peter agre
CREATE TABLE INST, Here is a database schema( table schema);
What institution won 2nd more recently than 2007 with Peter Agre as Chief Judge?.It is not neccessary to use all the tables.
SELECT 1880 FROM table_name_19 WHERE 1860 = "n/a" AND 1910 = 494
CREATE TABLE INST, Here is a database schema( table schema);
What is the 1880 figure when 1860 is N/A and 1910 is 494?It is not neccessary to use all the tables.
SELECT result FROM table_name_85 WHERE date = "13 october 2004"
CREATE TABLE INST, Here is a database schema( table schema);
Name the result for 13 october 2004It is not neccessary to use all the tables.
SELECT location FROM table_name_8 WHERE date = "january 23, 2008"
CREATE TABLE INST, Here is a database schema( table schema);
Where was the game played on January 23 2008?It is not neccessary to use all the tables.
SELECT COUNT Crowd FROM table WHERE Away team score = 10.14 (74)
CREATE TABLE INST, Here is a database schema( table schema);
What is the number of people in the crowd when the away team scored 10.14 (74)?.It is not neccessary to use all the tables.
SELECT COUNT(total) FROM table_name_53 WHERE average < 8 AND matches < 4
CREATE TABLE INST, Here is a database schema( table schema);
How many totals are there for players with an average under 8 and less than 4 matches?It is not neccessary to use all the tables.
SELECT MAX Silver FROM table WHERE Bronze = 1 AND Gold < 4
CREATE TABLE INST, Here is a database schema( table schema);
What is the highest number of silver when there is 1 bronze and less than 4 golds?.It is not neccessary to use all the tables.
SELECT Date FROM table WHERE Result = draw AND Venue = oval
CREATE TABLE INST, Here is a database schema( table schema);
What Date that had a Result of draw, with Oval as a venue?.It is not neccessary to use all the tables.
SELECT champion FROM table_name_87 WHERE runner_up = "dick chapman" AND venue = "st. andrews links"
CREATE TABLE INST, Here is a database schema( table schema);
Who was the champion in the game played at the St. Andrews Links with Dick Chapman as the runner-up?It is not neccessary to use all the tables.
SELECT roll FROM table_name_42 WHERE authority = "state" AND decile = 9
CREATE TABLE INST, Here is a database schema( table schema);
What is the roll for the school with state authority and a decile of 9?It is not neccessary to use all the tables.
SELECT LNER 1946 No. FROM table WHERE Order No. = s24
CREATE TABLE INST, Here is a database schema( table schema);
What is order S24's LNER 1946 number?.It is not neccessary to use all the tables.
SELECT headquarters FROM table_1506619_1 WHERE school_board = "Renfrew County Catholic District school_board"
CREATE TABLE INST, Here is a database schema( table schema);
Which headquarters are associated with the school board Renfrew County Catholic District School Board?It is not neccessary to use all the tables.
SELECT week_4_sept_21 FROM table_name_30 WHERE week_10_nov_2 = "michigan state (8-2)"
CREATE TABLE INST, Here is a database schema( table schema);
What is the week 4 opponent for the year with a week 10 opponent of Michigan State (8-2)?It is not neccessary to use all the tables.
SELECT MAX Attendance FROM table WHERE Record = 7-3
CREATE TABLE INST, Here is a database schema( table schema);
The record of 7-3 had the largest attendance of what?.It is not neccessary to use all the tables.
SELECT SUM(pick) FROM table_name_99 WHERE position = "guard"
CREATE TABLE INST, Here is a database schema( table schema);
What is the sum of the pick of the guard position player?It is not neccessary to use all the tables.
SELECT date FROM table_24732149_2 WHERE fastest_lap = "Mike Rockenfeller"
CREATE TABLE INST, Here is a database schema( table schema);
What date did Mike Rockenfeller have the fastest lap?It is not neccessary to use all the tables.
SELECT DISTINCT t2.TagName AS Other FROM Tags AS t INNER JOIN PostTags AS pt ON t.Id = pt.TagId INNER JOIN PostTags AS pt2 ON pt.PostId = pt2.PostId INNER JOIN Tags AS t2 ON pt2.TagId = t2.Id WHERE t.TagName = 'MySQL'
CREATE TABLE INST, Here is a database schema( table schema);
DEMO for Need help with a complex SQL query. http://stackoverflow.com/q/4015915/119477It is not neccessary to use all the tables.
SELECT round FROM table_name_51 WHERE surface = "hard" AND opponent = "jelena simic"
CREATE TABLE INST, Here is a database schema( table schema);
What's Round has a Surface of hard and Opponent of Jelena Simic?It is not neccessary to use all the tables.
SELECT Id AS "post_link" FROM Posts WHERE Body LIKE '%<li><blockquote>%' AND OwnerUserId = 106224
CREATE TABLE INST, Here is a database schema( table schema);
Quoted part-questions in list format. Examples of quoted part-questions in list format. See http://meta.stackoverflow.com/a/266976It is not neccessary to use all the tables.
SELECT Player FROM table WHERE 50s = 2
CREATE TABLE INST, Here is a database schema( table schema);
Which player has a 50 of 2?.It is not neccessary to use all the tables.
SELECT score FROM table_name_81 WHERE record = "2-1"
CREATE TABLE INST, Here is a database schema( table schema);
What is the score for the team with a record of 2-1?It is not neccessary to use all the tables.
SELECT away_captain FROM table_name_5 WHERE venue = "adelaide oval"
CREATE TABLE INST, Here is a database schema( table schema);
What is the name of the away captain when the game was at Adelaide Oval?It is not neccessary to use all the tables.
SELECT English Translation FROM table WHERE Articles = 24
CREATE TABLE INST, Here is a database schema( table schema);
Can you tell me the English Translation that has the Articles of 24?.It is not neccessary to use all the tables.
SELECT Constructor FROM table WHERE Driver = pedro diniz
CREATE TABLE INST, Here is a database schema( table schema);
Who constructed pedro diniz's car?.It is not neccessary to use all the tables.
SELECT length__miles_ FROM table_1817879_2 WHERE endpoints = "Pico to 7th St/Metro Center"
CREATE TABLE INST, Here is a database schema( table schema);
What is the length (miles) when pico to 7th st/metro center are the endpoints?It is not neccessary to use all the tables.
SELECT Seconds FROM table WHERE From > 1971 AND Place < 2
CREATE TABLE INST, Here is a database schema( table schema);
How many seconds did the champion who started in 1971 and placed above 2 have?.It is not neccessary to use all the tables.
SELECT winning_team FROM table_name_75 WHERE fastest_lap = "brendon hartley" AND pole_position = "oliver turvey" AND circuit = "spa-francorchamps" AND winning_driver = "brendon hartley"
CREATE TABLE INST, Here is a database schema( table schema);
Which Winning Team has the Fastest Lap of brendon hartley and a Pole Position of oliver turvey and a Circuit of spa-francorchamps and the Winning Driver of brendon hartley?It is not neccessary to use all the tables.
SELECT COUNT(gold) FROM table_name_26 WHERE silver < 3 AND total = 9 AND bronze < 1
CREATE TABLE INST, Here is a database schema( table schema);
How much Gold has a Silver smaller than 3, and a Total of 9, and a Bronze smaller than 1?It is not neccessary to use all the tables.
SELECT AVG(overall) FROM table_name_4 WHERE position = "guard" AND round < 9
CREATE TABLE INST, Here is a database schema( table schema);
What was the overall pick for the player who was a guard and had a round less than 9?It is not neccessary to use all the tables.
SELECT Director FROM table WHERE Film title used in nomination = floating life
CREATE TABLE INST, Here is a database schema( table schema);
Who was the director that had a film titled "Floating Life"?.It is not neccessary to use all the tables.
SELECT job, COUNT(job) FROM Person GROUP BY job
CREATE TABLE INST, Here is a database schema( table schema);
Count the job title of all people using a pie chart.It is not neccessary to use all the tables.
SELECT COUNT Rank FROM table WHERE Notes = r AND Country = brazil
CREATE TABLE INST, Here is a database schema( table schema);
What's Brazil's rank when it has notes of R?.It is not neccessary to use all the tables.
SELECT Date FROM table WHERE Surface = hard AND Tournament = usa f5, brownsville
CREATE TABLE INST, Here is a database schema( table schema);
Name the date with a hard surface and tournament of usa f5, brownsville.It is not neccessary to use all the tables.
SELECT nhl_team FROM table_2850912_10 WHERE player = "Joakim Persson"
CREATE TABLE INST, Here is a database schema( table schema);
Which team drafted Joakim Persson?It is not neccessary to use all the tables.
SELECT Week 1 Aug 26 FROM table WHERE Week 7 Oct 6 = usc (3-2)
CREATE TABLE INST, Here is a database schema( table schema);
What is listed for the Week 1 Aug 26 that has a Week 7 Oct 6 of USC (3-2)?.It is not neccessary to use all the tables.
SELECT production_code FROM table_26702204_1 WHERE us_viewers__million_ = "11.76"
CREATE TABLE INST, Here is a database schema( table schema);
What is the production code when the u.s. viewers (million) is 11.76?It is not neccessary to use all the tables.
SELECT Home team FROM table WHERE Away team = hawthorn
CREATE TABLE INST, Here is a database schema( table schema);
Who was the home team when Hawthorn was the away team?.It is not neccessary to use all the tables.
SELECT city_of_license FROM table_name_93 WHERE power = "1,400 watts"
CREATE TABLE INST, Here is a database schema( table schema);
what is the City of license that has a 1400 watts PowerIt is not neccessary to use all the tables.
SELECT Away FROM table WHERE Club = apoel
CREATE TABLE INST, Here is a database schema( table schema);
Which away has apoel as the club?.It is not neccessary to use all the tables.
SELECT MAX("Points won") FROM table_3051 WHERE "Player" = 'Aravane Rezaï'
CREATE TABLE INST, Here is a database schema( table schema);
What is the highest points won when the player is aravane reza ?It is not neccessary to use all the tables.
SELECT MAX(season) FROM table_25740774_1 WHERE podiums > 2.0
CREATE TABLE INST, Here is a database schema( table schema);
What is the season with podiums more than 2.0?It is not neccessary to use all the tables.