sql
stringlengths
9
2.37k
table
stringclasses
9 values
query
stringlengths
51
503
SELECT Title FROM table WHERE Directed by = John Rogers
CREATE TABLE INST, Here is a database schema( table schema);
What episode did John Rogers direct?.It is not neccessary to use all the tables.
SELECT Venue FROM table WHERE Away team = hawthorn
CREATE TABLE INST, Here is a database schema( table schema);
Hawthorn played as an Away team in which venue?.It is not neccessary to use all the tables.
SELECT city, COUNT(*) FROM station GROUP BY city HAVING COUNT(*) >= 15
CREATE TABLE INST, Here is a database schema( table schema);
List the name and the number of stations for all the cities that have at least 15 stations.It is not neccessary to use all the tables.
SELECT COUNT(director) FROM table_25800134_11 WHERE series__number = 431
CREATE TABLE INST, Here is a database schema( table schema);
How many directors were there for series # 431?It is not neccessary to use all the tables.
SELECT Island FROM table WHERE Peak = Mount Gauttier
CREATE TABLE INST, Here is a database schema( table schema);
When mount gauttier is the peak what is the island?.It is not neccessary to use all the tables.
SELECT D 49 √ FROM table WHERE D 41 √ = d 61 √
CREATE TABLE INST, Here is a database schema( table schema);
What is the D 49 √ number when the D 41 √ is d 61 √?.It is not neccessary to use all the tables.
SELECT Date FROM table WHERE Away team = richmond
CREATE TABLE INST, Here is a database schema( table schema);
When was the game with richmond as Away team?.It is not neccessary to use all the tables.
SELECT Away team FROM table WHERE Home team = fitzroy
CREATE TABLE INST, Here is a database schema( table schema);
What was the away team that played Fitzroy?.It is not neccessary to use all the tables.
SELECT type FROM table_name_53 WHERE principal_activities = "headquarters"
CREATE TABLE INST, Here is a database schema( table schema);
Name the type for headquarters principal activites.It is not neccessary to use all the tables.
SELECT Away team score FROM table WHERE Home team score = 16.14 (110)
CREATE TABLE INST, Here is a database schema( table schema);
What was the away team's score when the home team scored 16.14 (110)?.It is not neccessary to use all the tables.
SELECT "Week" FROM table_74122 WHERE "Type" = 'Cardio Workout'
CREATE TABLE INST, Here is a database schema( table schema);
What is the week when type is cardio workout?It is not neccessary to use all the tables.
SELECT state FROM table_name_43 WHERE home_venue = "suwon sports complex"
CREATE TABLE INST, Here is a database schema( table schema);
What is the State with a home venue of suwon sports complex?It is not neccessary to use all the tables.
SELECT AVG Grid FROM table WHERE Time/Retired = +2 laps AND Laps < 51
CREATE TABLE INST, Here is a database schema( table schema);
What is the average Grid that has a Time/Retired of +2 laps, and under 51 laps?.It is not neccessary to use all the tables.
SELECT Date FROM table WHERE Location Attendance = Continental Airlines Arena 13,755
CREATE TABLE INST, Here is a database schema( table schema);
On what date was the attendance at Continental Airlines Arena 13,755?.It is not neccessary to use all the tables.
SELECT date FROM table_name_67 WHERE opponent = "portland trail blazers"
CREATE TABLE INST, Here is a database schema( table schema);
What date was the opponent the Portland Trail Blazers?It is not neccessary to use all the tables.
SELECT Document_Type_Code, COUNT(*) FROM Documents GROUP BY Document_Type_Code
CREATE TABLE INST, Here is a database schema( table schema);
How many documents are there of each type. Plot them as pie chart.It is not neccessary to use all the tables.
SELECT "Score" FROM table_59168 WHERE "Player" = 'tom kite'
CREATE TABLE INST, Here is a database schema( table schema);
What is the score of Player Tom Kite?It is not neccessary to use all the tables.
SELECT constructor FROM table_name_4 WHERE time_retired = "+1 lap" AND driver = "olivier panis"
CREATE TABLE INST, Here is a database schema( table schema);
Who constructed olivier panis' car that retired after +1 lap?It is not neccessary to use all the tables.
SELECT venue FROM table_name_57 WHERE date = "3 september 1972"
CREATE TABLE INST, Here is a database schema( table schema);
What is the venue on 3 September 1972?It is not neccessary to use all the tables.
SELECT DISTINCT instructor.name FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instructor_id WHERE program_course.category LIKE '%PreMajor%' AND semester.semester = 'Winter' AND semester.year = 2017
CREATE TABLE INST, Here is a database schema( table schema);
What professor next Winter is teaching the PreMajor classes ?It is not neccessary to use all the tables.
SELECT Mechanical FROM table WHERE Regulating = LPM
CREATE TABLE INST, Here is a database schema( table schema);
What mechanical has lpm regulation?.It is not neccessary to use all the tables.
SELECT AVG(year_built) FROM table_name_20 WHERE sub_parish__sogn_ = "kyrkjebø"
CREATE TABLE INST, Here is a database schema( table schema);
what is the year built of kyrkjebø?It is not neccessary to use all the tables.
SELECT Series Ep. FROM table WHERE Segment C = luxury cars (part 1)
CREATE TABLE INST, Here is a database schema( table schema);
Name the series ep for segment c of luxury cars (part 1).It is not neccessary to use all the tables.
SELECT COUNT Population FROM table WHERE Land area (hectares) = 30.94
CREATE TABLE INST, Here is a database schema( table schema);
How many people live in an area of 30.94 hectares?.It is not neccessary to use all the tables.
SELECT AVG Round FROM table WHERE Club team = garmisch-partenkirchen riessersee sc (germany 2)
CREATE TABLE INST, Here is a database schema( table schema);
What is the average round for Club team of garmisch-partenkirchen riessersee sc (germany 2)?.It is not neccessary to use all the tables.
SELECT result FROM table_name_68 WHERE date = "september 10, 2000"
CREATE TABLE INST, Here is a database schema( table schema);
What was the result of the game from September 10, 2000?It is not neccessary to use all the tables.
SELECT lost FROM table_name_67 WHERE points = "86"
CREATE TABLE INST, Here is a database schema( table schema);
What lost has 86 points?It is not neccessary to use all the tables.
SELECT MAX Game FROM table WHERE Record = 6-3
CREATE TABLE INST, Here is a database schema( table schema);
What was the last game where the record was 6-3?.It is not neccessary to use all the tables.
SELECT noaa FROM table_name_49 WHERE darwin = "mn 4"
CREATE TABLE INST, Here is a database schema( table schema);
What is the NOAA of the higher harmonics that have a Darwin of mn 4?It is not neccessary to use all the tables.
SELECT MIN Wins FROM table WHERE Ballarat FL = daylesford AND Byes < 1
CREATE TABLE INST, Here is a database schema( table schema);
Can you tell me the lowest Wins that has the Ballarat FL of daylesford, and the Byes smaller than 1?.It is not neccessary to use all the tables.
SELECT COUNT(viewers__m_) FROM table_name_12 WHERE rating = 6.4 AND share > 11
CREATE TABLE INST, Here is a database schema( table schema);
what is the total viewers (m) when the rating is 6.4 and the share is more than 11?It is not neccessary to use all the tables.
SELECT Loss FROM table WHERE Score = postponed (rain) rescheduled for june 27
CREATE TABLE INST, Here is a database schema( table schema);
Score of postponed (rain) rescheduled for June 27 had what loss?.It is not neccessary to use all the tables.
SELECT genre FROM table_name_87 WHERE type = "3d" AND release_date = "2008-2011"
CREATE TABLE INST, Here is a database schema( table schema);
What type of 3D game was released between 2008-2011?It is not neccessary to use all the tables.
SELECT COUNT Location FROM table WHERE Fastest time (s) = 11.13
CREATE TABLE INST, Here is a database schema( table schema);
What is the number of locations with the fastest times of 11.13?.It is not neccessary to use all the tables.
SELECT partner FROM table_2259502_2 WHERE score = "1-6, 2-6"
CREATE TABLE INST, Here is a database schema( table schema);
Who were the partners in games where the score was 1-6 2-6?It is not neccessary to use all the tables.
SELECT Elimination Move FROM table WHERE Team = team orton AND Eliminated by = batista AND Elimination = 7
CREATE TABLE INST, Here is a database schema( table schema);
Which Elimination move is listed against Team Orton, Eliminated by Batista against Elimination number 7?.It is not neccessary to use all the tables.
SELECT Team FROM table WHERE Coach = manzoor elahi AND Captain = taufeeq umar
CREATE TABLE INST, Here is a database schema( table schema);
Which Team has Manzoor Elahi as Coach and Taufeeq Umar as Captain?.It is not neccessary to use all the tables.
SELECT home FROM table_name_8 WHERE date = "april 14"
CREATE TABLE INST, Here is a database schema( table schema);
Who was at home on april 14?It is not neccessary to use all the tables.
SELECT Result FROM table WHERE Date = 2009 AND Opponent = gerardi rinaldi
CREATE TABLE INST, Here is a database schema( table schema);
What was the result for the opponent being gerardi rinaldi in 2009?.It is not neccessary to use all the tables.
SELECT MAX Wins (Total) FROM table WHERE Wins (Indoor) = 0 AND Wins (Outdoor) = 1 AND Rank < 7
CREATE TABLE INST, Here is a database schema( table schema);
Name the most wins total with wins indoor of 0 and wins outdoor of 1 with rank less than 7.It is not neccessary to use all the tables.
SELECT MIN Extra points FROM table
CREATE TABLE INST, Here is a database schema( table schema);
What is the least number of extra points? .It is not neccessary to use all the tables.
SELECT original_west_end_cast FROM table_name_55 WHERE first_us_tour_cast = "lael van keuren"
CREATE TABLE INST, Here is a database schema( table schema);
Who was the Original West End Cast when the irst US Tour Cast was lael van keuren?It is not neccessary to use all the tables.
SELECT catalog_publisher FROM catalogs GROUP BY catalog_publisher ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE INST, Here is a database schema( table schema);
Which catalog publisher has published the most catalogs?It is not neccessary to use all the tables.
SELECT Winners from previous round FROM table WHERE Round = Semi finals
CREATE TABLE INST, Here is a database schema( table schema);
How many winners from previous round were there in the semi finals?.It is not neccessary to use all the tables.
SELECT Target FROM table WHERE Approved treatment(s) = non-Hodgkin lymphoma
CREATE TABLE INST, Here is a database schema( table schema);
What is the target when the approved treatment is non-hodgkin lymphoma?.It is not neccessary to use all the tables.
SELECT SUM(attendance) FROM table_name_17 WHERE opponent = "royals" AND score = "17 - 6"
CREATE TABLE INST, Here is a database schema( table schema);
How many people attended the Royals game with a score of 17 - 6?It is not neccessary to use all the tables.
SELECT PA FROM table WHERE W = 6
CREATE TABLE INST, Here is a database schema( table schema);
When 6 is the w what is the pa?.It is not neccessary to use all the tables.
SELECT Best score FROM table WHERE Worst dancer(s) = gethin jones/kenny logan
CREATE TABLE INST, Here is a database schema( table schema);
What's the best score, with the worst dancer(s) gethin jones/kenny logan?.It is not neccessary to use all the tables.
SELECT MIN(game) FROM table_27756474_6 WHERE location_attendance = "US Airways Center 16,470"
CREATE TABLE INST, Here is a database schema( table schema);
Name the most game for us airways center 16470It is not neccessary to use all the tables.
SELECT lowest_point FROM table_1416612_1 WHERE highest_point = "Mount Greylock"
CREATE TABLE INST, Here is a database schema( table schema);
what's the lowest point with highest point being mount greylockIt is not neccessary to use all the tables.
SELECT COUNT("Represents") FROM table_73934 WHERE "Contestant" = 'Clary Sermina Delgado Cid'
CREATE TABLE INST, Here is a database schema( table schema);
Name the total number of represents for clary sermina delgado cidIt is not neccessary to use all the tables.
SELECT Country, COUNT(*) FROM member GROUP BY Country
CREATE TABLE INST, Here is a database schema( table schema);
Show the different countries and the number of members from each with a bar chart.It is not neccessary to use all the tables.
SELECT COUNT(total) FROM table_name_73 WHERE nation = "chile" AND silver > 0
CREATE TABLE INST, Here is a database schema( table schema);
How many totals does Chile have when the number of silvers is more than 0?It is not neccessary to use all the tables.
SELECT SUM(overall) FROM table_name_99 WHERE college = "duke" AND round > 7
CREATE TABLE INST, Here is a database schema( table schema);
What is the total number of overall figures when duke was the college and the round was higher than 7?It is not neccessary to use all the tables.
SELECT date FROM table_name_12 WHERE opponenent = "poland" AND match_type = "ec -qualifier"
CREATE TABLE INST, Here is a database schema( table schema);
When was the opponent Poland and the match type EC -qualifier?It is not neccessary to use all the tables.
SELECT Location FROM table WHERE Round = 3 AND Time = 4:40
CREATE TABLE INST, Here is a database schema( table schema);
I want the location for round of 3 and time of 4:40.It is not neccessary to use all the tables.
SELECT AVG(rank) FROM table_name_9 WHERE total > 5 AND gold > 6
CREATE TABLE INST, Here is a database schema( table schema);
What was the average rank for the team that had more than 5 medals and more than 6 gold medals?It is not neccessary to use all the tables.
SELECT pre__season FROM table_name_21 WHERE may_5 = "21"
CREATE TABLE INST, Here is a database schema( table schema);
Which pre-season has May 5 of 21?It is not neccessary to use all the tables.
SELECT written_by FROM table_25084227_1 WHERE us_viewers__in_millions_ = "2.09"
CREATE TABLE INST, Here is a database schema( table schema);
if the 2.09 million US viewers watched this episode who was it written byIt is not neccessary to use all the tables.
SELECT Birth AS name FROM table_name_61 WHERE start_of_reign = 1986
CREATE TABLE INST, Here is a database schema( table schema);
What is the date of birth of the person who started their reign in 1986?It is not neccessary to use all the tables.
SELECT Country FROM table WHERE Airport = brisbane airport
CREATE TABLE INST, Here is a database schema( table schema);
The Brisbane airport is located in which country?.It is not neccessary to use all the tables.
SELECT "Score" FROM table_48693 WHERE "Country" = 'scotland'
CREATE TABLE INST, Here is a database schema( table schema);
What was the score for the player from Scotland?It is not neccessary to use all the tables.
SELECT height__m_ FROM table_23670057_1 WHERE no = 7
CREATE TABLE INST, Here is a database schema( table schema);
Name the height for number 7It is not neccessary to use all the tables.
SELECT Week FROM table WHERE Opponent = tennessee titans
CREATE TABLE INST, Here is a database schema( table schema);
Which Week has a Opponent of tennessee titans?.It is not neccessary to use all the tables.
SELECT SUM("votes") FROM table_203_354 WHERE id <= 4
CREATE TABLE INST, Here is a database schema( table schema);
how many people voted for the top 4 parties ?It is not neccessary to use all the tables.
SELECT german FROM table_name_85 WHERE macedonian = "беше слушнал/-а/-о"
CREATE TABLE INST, Here is a database schema( table schema);
What's the German Pluperfect when the Macedonian is беше слушнал/-а/-о?It is not neccessary to use all the tables.
SELECT SUM(ngc_number) FROM table_name_16 WHERE constellation = "vela"
CREATE TABLE INST, Here is a database schema( table schema);
What is the sum of NGC numbers for Constellation vela?It is not neccessary to use all the tables.
SELECT country FROM table_name_51 WHERE class = "club"
CREATE TABLE INST, Here is a database schema( table schema);
What is Country when Class is "club"?It is not neccessary to use all the tables.
SELECT COUNT(position) FROM table_1473672_10 WHERE player = "Rene Lambert"
CREATE TABLE INST, Here is a database schema( table schema);
How many positions did 1972 NHL Draft pick Rene Lambert play?It is not neccessary to use all the tables.
SELECT SUM Domestic Passengers FROM table WHERE % Change 2005/2006 = 10.9% AND Freight (Metric Tonnes) < 4,022
CREATE TABLE INST, Here is a database schema( table schema);
What is the sum of all domestic passengers with 10.9% change and less than 4,022 tonnes in freight?.It is not neccessary to use all the tables.
SELECT District FROM table WHERE Party = Democratic AND First elected = 1974 AND Incumbent = Stephen J. Solarz
CREATE TABLE INST, Here is a database schema( table schema);
What district did the Democratic party incumbent Stephen J. Solarz get first elected to in 1974?.It is not neccessary to use all the tables.
SELECT MIN(first_elected) FROM table_1342256_11 WHERE incumbent = "Stephen Pace"
CREATE TABLE INST, Here is a database schema( table schema);
What year was Stephen Pace elected?It is not neccessary to use all the tables.
SELECT Type, COUNT(*) FROM ship GROUP BY Type ORDER BY COUNT(*)
CREATE TABLE INST, Here is a database schema( table schema);
For each type, how many ships are there Plot them as bar chart, list y-axis in asc order.It is not neccessary to use all the tables.
SELECT location_attendance FROM table_17325580_6 WHERE date = "December 12"
CREATE TABLE INST, Here is a database schema( table schema);
What is every location attendance on the date December 12?It is not neccessary to use all the tables.
SELECT Class FROM table WHERE Year < 2005 AND Class Pos. = 2nd
CREATE TABLE INST, Here is a database schema( table schema);
What is the class of car that is earlier than 2005 and has a class position of 2nd?.It is not neccessary to use all the tables.
SELECT Style FROM table WHERE Name = giuseppe bausilio
CREATE TABLE INST, Here is a database schema( table schema);
What is the style for Giuseppe Bausilio?.It is not neccessary to use all the tables.
SELECT demographic.diagnosis, procedures.icd9_code FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Brian Brock"
CREATE TABLE INST, Here is a database schema( table schema);
what is primary disease and procedure icd9 code of subject name brian brock?It is not neccessary to use all the tables.
SELECT Seat of administration FROM table WHERE Largest city = Roskilde
CREATE TABLE INST, Here is a database schema( table schema);
In the region where Roskilde is the largest city, what is the seat of administration?.It is not neccessary to use all the tables.
SELECT name FROM table_name_40 WHERE home_venue = "comunale" AND city = "darfo boario terme"
CREATE TABLE INST, Here is a database schema( table schema);
What squad plays at comunale in darfo boario terme?It is not neccessary to use all the tables.
SELECT "Date" FROM table_69264 WHERE "Surface" = 'hard' AND "Tournament" = 'fort walton beach'
CREATE TABLE INST, Here is a database schema( table schema);
Name the date for hard surface and tournament of fort walton beachIt is not neccessary to use all the tables.
SELECT Losing bonus FROM table WHERE Points for = 190
CREATE TABLE INST, Here is a database schema( table schema);
WHAT IS THE LOSING BONUS WITH 190 POINTS?.It is not neccessary to use all the tables.
SELECT Rank FROM table WHERE Floors > 47
CREATE TABLE INST, Here is a database schema( table schema);
Which rank is above floor 47?.It is not neccessary to use all the tables.
SELECT MIN Pick # FROM table WHERE Player = michael grabner AND Reg GP < 20
CREATE TABLE INST, Here is a database schema( table schema);
What is the lowest Pick # with michael grabner and less than 20 Reg GP?.It is not neccessary to use all the tables.
SELECT tv_season FROM table_2170969_2 WHERE viewers_in_millions = "2.52"
CREATE TABLE INST, Here is a database schema( table schema);
What season had 2.52 million viewers?It is not neccessary to use all the tables.
SELECT Nationality FROM table WHERE Player = jani hakanpaa
CREATE TABLE INST, Here is a database schema( table schema);
What is the nationality of player Jani Hakanpaa?.It is not neccessary to use all the tables.
SELECT COUNT(*) FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM = T2.PROF_NUM WHERE T1.EMP_LNAME = 'Graztevski'
CREATE TABLE INST, Here is a database schema( table schema);
How many classes are professor whose last name is Graztevski has?It is not neccessary to use all the tables.
SELECT Opponent FROM table WHERE Week > 16
CREATE TABLE INST, Here is a database schema( table schema);
What's the Opponent with a Week that's larger than 16?.It is not neccessary to use all the tables.
SELECT MIN Height FROM table WHERE Player = rans brempong
CREATE TABLE INST, Here is a database schema( table schema);
What is the lowest height for Rans Brempong?.It is not neccessary to use all the tables.
SELECT away_captain FROM table_name_68 WHERE result = "[[|]] by 7 wickets"
CREATE TABLE INST, Here is a database schema( table schema);
Who is the away captain when the game resulted in [[|]] by 7 wickets?It is not neccessary to use all the tables.
SELECT SUM("Caps") FROM table_54752 WHERE "Player" = 'stephen hoiles'
CREATE TABLE INST, Here is a database schema( table schema);
How many caps does stephen hoiles have?It is not neccessary to use all the tables.
SELECT multiplier_1 FROM table_name_25 WHERE frequency = "1800mhz"
CREATE TABLE INST, Here is a database schema( table schema);
What is the multiplier 1 for chips with a frequency of 1800MHz?It is not neccessary to use all the tables.
SELECT AVG(rank) FROM table_name_18 WHERE total > 2 AND gold = 21 AND bronze > 12
CREATE TABLE INST, Here is a database schema( table schema);
What is the rank with a higher than 2 total 21 gold and more than 12 bronze?It is not neccessary to use all the tables.
SELECT Date FROM table WHERE Winning driver = gaspare bona AND Name = pozzo circuit
CREATE TABLE INST, Here is a database schema( table schema);
When did Gaspare Bona win the Pozzo Circuit?.It is not neccessary to use all the tables.
SELECT num.TagName AS Tag, ROW_NUMBER() OVER (ORDER BY rate.Rate DESC) AS MayRank, ROW_NUMBER() OVER (ORDER BY num.Num DESC) AS TotalRank, rate.Rate AS QuestionsInMay, num.Num AS QuestionsTotal FROM (SELECT COUNT(PostId) AS Rate, TagName FROM Tags, PostTags, Posts WHERE Tags.Id = PostTags.TagId AND Posts.Id = PostId AND Posts.CreationDate < '2016-10-13' AND Posts.CreationDate > '2016-10-01' GROUP BY TagName) AS rate INNER JOIN (SELECT COUNT(PostId) AS Num, TagName FROM Tags, PostTags, Posts WHERE Tags.Id = PostTags.TagId AND Posts.Id = PostId GROUP BY TagName HAVING COUNT(PostId) > 800) AS num ON rate.TagName = num.TagName ORDER BY rate.rate DESC
CREATE TABLE INST, Here is a database schema( table schema);
Most popular StackOverflow tags July2016.It is not neccessary to use all the tables.
SELECT MAX Points FROM table WHERE Assists < 5 AND Goals < 2
CREATE TABLE INST, Here is a database schema( table schema);
What is the highest amount of points with less than 5 assists and less than 2 goals?.It is not neccessary to use all the tables.
SELECT MAX(_number_of_total_votes) FROM table_19769687_3 WHERE election = "1878"
CREATE TABLE INST, Here is a database schema( table schema);
Name the most number of total votes for election for 1878It 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 prescriptions.drug = "Sulfameth/Trimethoprim Suspension"
CREATE TABLE INST, Here is a database schema( table schema);
what is the number of patients whose drug name is sulfameth/trimethoprim suspension?It is not neccessary to use all the tables.
SELECT SUM("Points") FROM table_5375 WHERE "Record" = '21–20–6'
CREATE TABLE INST, Here is a database schema( table schema);
Which Points have a Record of 21 20 6?It is not neccessary to use all the tables.
SELECT Socket FROM table WHERE Order Part Number = tmdtl68hax5dm
CREATE TABLE INST, Here is a database schema( table schema);
What is the socket for Order Part Number TMDTL68HAX5DM?.It is not neccessary to use all the tables.
SELECT power_kw FROM table_23394920_1 WHERE callsign = "DXRT-TV"
CREATE TABLE INST, Here is a database schema( table schema);
When dxrt-tv is the callsign what is the power kw?It is not neccessary to use all the tables.