sql
stringlengths
9
2.37k
table
stringclasses
9 values
query
stringlengths
51
503
SELECT T2.student_id FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "statistics" ORDER BY T2.registration_date
CREATE TABLE INST, Here is a database schema( table schema);
List the id of students who registered course statistics in the order of registration date.It is not neccessary to use all the tables.
SELECT MIN(land___sqmi__) FROM table_name_27 WHERE longitude = -99.172785 AND water__sqmi_ < 0.973
CREATE TABLE INST, Here is a database schema( table schema);
What is the lowest land in sq mi with a longitude of -99.172785 and less than 0.973 sq mi of water?It is not neccessary to use all the tables.
SELECT time FROM table_name_77 WHERE year = 1984
CREATE TABLE INST, Here is a database schema( table schema);
What Time has a Year of 1984?It is not neccessary to use all the tables.
SELECT city FROM airports GROUP BY city HAVING COUNT(*) > 2 ORDER BY COUNT(*)
CREATE TABLE INST, Here is a database schema( table schema);
List the cities which have more than 2 airports sorted by the number of airports.It is not neccessary to use all the tables.
SELECT AVG Rank: FROM table WHERE State: = nsw AND Party: = liberalism AND Assumed office: = 22 march 1877
CREATE TABLE INST, Here is a database schema( table schema);
What average rank of the premier has NSW as the state, Liberalism as the party, and 22 March 1877 was the assumed office?.It is not neccessary to use all the tables.
SELECT record FROM table_name_23 WHERE home = "detroit red wings" AND score = "1–2" AND date = "december 29"
CREATE TABLE INST, Here is a database schema( table schema);
What is the Record that has a Home of detroit red wings and a Score of 1–2 on december 29?It is not neccessary to use all the tables.
SELECT Proceed to Quarter-final FROM table WHERE Eliminated from competition = London Irish
CREATE TABLE INST, Here is a database schema( table schema);
Who proceeded to the quarter final when the london irish were eliminated from competition?.It is not neccessary to use all the tables.
SELECT MIN(year) FROM table_name_51 WHERE tournament = "beijing"
CREATE TABLE INST, Here is a database schema( table schema);
What is the lowest Year when Tournament is "Beijing"?It is not neccessary to use all the tables.
SELECT COUNT(longitude) FROM table_name_1 WHERE ansi_code = 1036573 AND water__sqmi_ < 0.404
CREATE TABLE INST, Here is a database schema( table schema);
What;s the total of Longitude with an ANSI code of 1036573 and has Water (sqmi) that is smaller than 0.404?It is not neccessary to use all the tables.
SELECT AVG Assists FROM table WHERE Rank > 3 AND Games < 25
CREATE TABLE INST, Here is a database schema( table schema);
How many Assists for the Player with a Rank greater than 3 in less than 25 Games?.It is not neccessary to use all the tables.
SELECT COUNT Matches FROM table WHERE Player = Arthur Morris
CREATE TABLE INST, Here is a database schema( table schema);
How many numbers were recorded under matches with Arthur Morris?.It is not neccessary to use all the tables.
SELECT Score FROM table WHERE Date = 26 may 1997
CREATE TABLE INST, Here is a database schema( table schema);
Name the score for 26 may 1997.It is not neccessary to use all the tables.
SELECT Home team FROM table WHERE Away team = essendon
CREATE TABLE INST, Here is a database schema( table schema);
What team played Essendon?.It is not neccessary to use all the tables.
SELECT gender FROM table_name_95 WHERE decile = 5 AND area = "dalefield"
CREATE TABLE INST, Here is a database schema( table schema);
What gender is the team that has a decile of 5 and in the Dalefield area?It is not neccessary to use all the tables.
SELECT appearance FROM table_name_80 WHERE polyphenyl_ether = "3- and 4-ring oxythio"
CREATE TABLE INST, Here is a database schema( table schema);
What does Polyphenyl Ether of 3- and 4-ring oxythio look like?It is not neccessary to use all the tables.
SELECT Country FROM table WHERE Time = 8:03.61
CREATE TABLE INST, Here is a database schema( table schema);
What country has a time of 8:03.61?.It is not neccessary to use all the tables.
SELECT mens_singles FROM table_12194021_1 WHERE mixed_doubles = "Markose Bristow Madhumita Bisht"
CREATE TABLE INST, Here is a database schema( table schema);
What years did Markose Bristow Madhumita Bisht win the mens singles and/or the mixed doubles?It is not neccessary to use all the tables.
SELECT elimination AS Move FROM table_name_88 WHERE wrestler = "maria"
CREATE TABLE INST, Here is a database schema( table schema);
What is Maria's Elimination Move?It is not neccessary to use all the tables.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.expire_flag = "1" AND demographic.diagnosis = "ACUTE SUBDURAL HEMATOMA"
CREATE TABLE INST, Here is a database schema( table schema);
how many patients died of acute subdural hamatoma?It is not neccessary to use all the tables.
SELECT Name FROM table WHERE Launch = 1996 AND Hanzi = 凤凰卫视中文台
CREATE TABLE INST, Here is a database schema( table schema);
Which company launched in 1996 and has a Hanzi of 凤凰卫视中文台?.It is not neccessary to use all the tables.
SELECT Result FROM table WHERE Competition = friendly AND Score = 5-0 AND Date = october 27, 2005
CREATE TABLE INST, Here is a database schema( table schema);
What is the Result of the Friendly Competition on October 27, 2005 with a Score of 5-0?.It is not neccessary to use all the tables.
SELECT SUM Car. FROM table WHERE Player = jeremiah pope
CREATE TABLE INST, Here is a database schema( table schema);
What are the carries of the player Jeremiah Pope?.It is not neccessary to use all the tables.
SELECT Away team FROM table WHERE Home team = everton
CREATE TABLE INST, Here is a database schema( table schema);
What is the away team playing at Everton?.It is not neccessary to use all the tables.
SELECT Date FROM table WHERE Event = 1500m freestyle
CREATE TABLE INST, Here is a database schema( table schema);
What is the date of the 1500m freestyle event?.It is not neccessary to use all the tables.
SELECT Tournament FROM table WHERE Surface = hard AND Opponent = jacob adaktusson
CREATE TABLE INST, Here is a database schema( table schema);
what tournament was on a hard surface and saw jacob adaktusson as the opponent?.It is not neccessary to use all the tables.
SELECT SUM(intake) FROM table_name_54 WHERE faith = "rc" AND dcsf_number > 2428
CREATE TABLE INST, Here is a database schema( table schema);
Can you tell me the sum of Intake that has the Faith of rc and the DCSF number larger than 2428?It is not neccessary to use all the tables.
SELECT studio FROM table_name_74 WHERE role = "john scott"
CREATE TABLE INST, Here is a database schema( table schema);
Name the studio for john scottIt is not neccessary to use all the tables.
SELECT Registrations FROM table WHERE Location = Yaxley
CREATE TABLE INST, Here is a database schema( table schema);
what are all the registrations where location is yaxley.It is not neccessary to use all the tables.
SELECT Winning score FROM table WHERE Runner(s)-up = jack nicklaus
CREATE TABLE INST, Here is a database schema( table schema);
What is the Winning Score of the Tournament with Jack Nicklaus as Runner(s)-up?.It is not neccessary to use all the tables.
SELECT Date FROM table WHERE Record = 4–2–0
CREATE TABLE INST, Here is a database schema( table schema);
Which Date has a Record of 4–2–0?.It is not neccessary to use all the tables.
SELECT description FROM table_name_8 WHERE year_of_issue = 1983 AND thickness = "1.7mm" AND weight = "3.50grams"
CREATE TABLE INST, Here is a database schema( table schema);
Which Description has a Year of Issue of 1983 and a Thickness of 1.7mm and a Weight of 3.50grams?It is not neccessary to use all the tables.
SELECT Worldwide Gross FROM table WHERE Movie = jab tak hai jaan
CREATE TABLE INST, Here is a database schema( table schema);
How did the jab tak hai jaan movie gross worldwide?.It is not neccessary to use all the tables.
SELECT Class FROM table WHERE Number at Lincoln > 0 AND Number at Doncaster = 8
CREATE TABLE INST, Here is a database schema( table schema);
Which Class has a Number at Lincoln larger than 0 and a Number at Doncaster of 8?.It is not neccessary to use all the tables.
SELECT SUM(earnings__) AS $__ FROM table_name_82 WHERE country = "united states" AND wins = 22 AND rank > 2
CREATE TABLE INST, Here is a database schema( table schema);
When the united states has 22 wins and a rank greater than 2 what is the total earnings?It is not neccessary to use all the tables.
SELECT date FROM table_22648285_1 WHERE year = 1968
CREATE TABLE INST, Here is a database schema( table schema);
What date was the race in 1968 run on?It is not neccessary to use all the tables.
SELECT country FROM stadium WHERE capacity > 60000 INTERSECT SELECT country FROM stadium WHERE capacity < 50000
CREATE TABLE INST, Here is a database schema( table schema);
Which country has both stadiums with capacity greater than 60000 and stadiums with capacity less than 50000?It is not neccessary to use all the tables.
SELECT record FROM table_name_60 WHERE opponent = "john salter"
CREATE TABLE INST, Here is a database schema( table schema);
What was roberto travern's record when he fought against john salter?It is not neccessary to use all the tables.
SELECT leading_scorer FROM table_name_31 WHERE date = "9 february 2008"
CREATE TABLE INST, Here is a database schema( table schema);
Who is the leading scorer of the game on 9 February 2008?It is not neccessary to use all the tables.
SELECT Player FROM table WHERE Nationality = sweden AND Round > 3
CREATE TABLE INST, Here is a database schema( table schema);
Who is the player from Sweden from a round after 3?.It is not neccessary to use all the tables.
SELECT COUNT Year FROM table WHERE Competition = olympic games AND Event = 400 m
CREATE TABLE INST, Here is a database schema( table schema);
How many years was the 400 m event in the olympic games?.It is not neccessary to use all the tables.
SELECT dvd_release_date FROM table_name_74 WHERE season < 8 AND episodes < 13
CREATE TABLE INST, Here is a database schema( table schema);
On what date was the DVD released for the season with fewer than 13 episodes that aired before season 8?It is not neccessary to use all the tables.
SELECT COUNT(week) FROM table_14984103_1 WHERE opponent = "San Francisco 49ers"
CREATE TABLE INST, Here is a database schema( table schema);
Name the number of weeks for san francisco 49ersIt is not neccessary to use all the tables.
SELECT Result FROM table WHERE Moves > 41 AND Year = 2007 AND Opening = c42 petrov's defence
CREATE TABLE INST, Here is a database schema( table schema);
What's the result when there's more than 41 moves with an opening of c42 petrov's defence in 2007?.It is not neccessary to use all the tables.
SELECT Week 3 FROM table WHERE Week 1 = amanda batt
CREATE TABLE INST, Here is a database schema( table schema);
Who is week 3 if week 1 is Amanda Batt?.It is not neccessary to use all the tables.
SELECT latitude FROM table_16768245_5 WHERE name = "Philae Sulcus"
CREATE TABLE INST, Here is a database schema( table schema);
Philae Sulcus has a latitude of what?It is not neccessary to use all the tables.
SELECT category FROM table_name_4 WHERE nominee = "michael stewart"
CREATE TABLE INST, Here is a database schema( table schema);
Which category was Michael Stewart a nominee in?It is not neccessary to use all the tables.
SELECT 2013 AS _bafa_adult_flag_division FROM table_name_95 WHERE location = "aylesbury"
CREATE TABLE INST, Here is a database schema( table schema);
What is the 2013 BAFA adult flag division in Aylesbury?It is not neccessary to use all the tables.
SELECT AVG Games FROM table WHERE Years at club = 1977 AND Goals = 17 AND Debut year < 1977
CREATE TABLE INST, Here is a database schema( table schema);
Which Games have Years at club of 1977, and Goals of 17, and a Debut year smaller than 1977?.It is not neccessary to use all the tables.
SELECT Giant AS slalom FROM table_name_29 WHERE season = 1997
CREATE TABLE INST, Here is a database schema( table schema);
Which Giant Slalom was obtained in the 1997 season?It is not neccessary to use all the tables.
SELECT scorers FROM table_name_4 WHERE score = "9-2"
CREATE TABLE INST, Here is a database schema( table schema);
Who are the scorers when the score is 9-2?It is not neccessary to use all the tables.
SELECT settlement FROM table_2562572_37 WHERE cyrillic_name_other_names = "Александрово"
CREATE TABLE INST, Here is a database schema( table schema);
Name the settlement for александровоIt is not neccessary to use all the tables.
SELECT partner FROM table_name_2 WHERE construction_start = "2008 january"
CREATE TABLE INST, Here is a database schema( table schema);
What Partner has a Construction Start of 2008 january?It is not neccessary to use all the tables.
SELECT record FROM table_17311759_5 WHERE team = "Denver"
CREATE TABLE INST, Here is a database schema( table schema);
What is the record of wins and losses for Denver's ball club?It is not neccessary to use all the tables.
SELECT Chart peak FROM table WHERE Time = 3:11
CREATE TABLE INST, Here is a database schema( table schema);
Which Chart peak has a Time of 3:11?.It is not neccessary to use all the tables.
SELECT MIN(year) FROM table_name_46 WHERE category = "best supporting actress" AND award = "asian film awards"
CREATE TABLE INST, Here is a database schema( table schema);
What's the earliest year that had a category of best supporting actress at the asian film awards?It is not neccessary to use all the tables.
SELECT Finish FROM table WHERE Country = united states AND Player = julius boros
CREATE TABLE INST, Here is a database schema( table schema);
What is Finish, when Country is "United States", and when Player is "Julius Boros"?.It is not neccessary to use all the tables.
SELECT rank FROM table_name_99 WHERE laps < 137 AND qual = "116.470"
CREATE TABLE INST, Here is a database schema( table schema);
What's the rank when the laps are fewer than 137 and the qual is 116.470?It is not neccessary to use all the tables.
SELECT Day announced FROM table WHERE Viewers' selection = robi AND Options = alex, ejay, nan, robi
CREATE TABLE INST, Here is a database schema( table schema);
when was it announced that the viewers selected robi out of alex, ejay, nan, robi?.It is not neccessary to use all the tables.
SELECT COUNT Winning constructor FROM table WHERE Fastest lap = Mark Webber
CREATE TABLE INST, Here is a database schema( table schema);
How many winning constructor catagories are there when Mark Webber had the fastest lap? .It is not neccessary to use all the tables.
SELECT mens_doubles FROM table_14903627_1 WHERE womens_doubles = "Helen Reino Kai-Riin Saluste"
CREATE TABLE INST, Here is a database schema( table schema);
WHAT IS THE NAME OF THE MENS DOUBLES PLAYER WHEN THE WOMENS DOUBLES PLAYER IS HELEN REINO KAI-RIIN SALUSTE?It is not neccessary to use all the tables.
SELECT MIN("January") FROM table_36725 WHERE "Opponent" = 'florida panthers' AND "Points" < '59'
CREATE TABLE INST, Here is a database schema( table schema);
Which January is the lowest one that has an Opponent of florida panthers, and Points smaller than 59?It is not neccessary to use all the tables.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND lab.label = "Albumin/Creatinine, Urine"
CREATE TABLE INST, Here is a database schema( table schema);
how many patients whose admission location is phys referral/normal deli and lab test name is albumin/creatinine, urine?It is not neccessary to use all the tables.
SELECT COUNT Incumbent FROM table WHERE First elected = 1924
CREATE TABLE INST, Here is a database schema( table schema);
how many incumbent with first elected being 1924.It is not neccessary to use all the tables.
SELECT product_name FROM products WHERE product_type_code = 'Hardware' ORDER BY product_price DESC LIMIT 1
CREATE TABLE INST, Here is a database schema( table schema);
Find the name of the most expensive hardware product.It is not neccessary to use all the tables.
SELECT partner FROM table_name_12 WHERE year > 2012 AND outcome = "winner"
CREATE TABLE INST, Here is a database schema( table schema);
Who was the partner of the winner after 2012?It is not neccessary to use all the tables.
SELECT Chassis FROM table WHERE Year = 1971
CREATE TABLE INST, Here is a database schema( table schema);
Which Chassis was featured in the year 1971?.It is not neccessary to use all the tables.
SELECT AVG(attendance) FROM table_name_70 WHERE save = "–" AND record = "94–36"
CREATE TABLE INST, Here is a database schema( table schema);
WHAT IS THE NUMBER OF Attendance WITH A RECORD 94–36It is not neccessary to use all the tables.
SELECT MIN Diameter (km) FROM table WHERE Latitude = 52.0s
CREATE TABLE INST, Here is a database schema( table schema);
WHAT IS THE LOWEST DIAMETER FOR A LATITIDE OF 52.0S?.It is not neccessary to use all the tables.
SELECT Garfield Episode 2 FROM table WHERE Garfield Episode 1 = The Pie-Eyed Piper
CREATE TABLE INST, Here is a database schema( table schema);
Which Garfield episode 2 is the pie-eyed piper?.It is not neccessary to use all the tables.
SELECT january FROM table_name_17 WHERE record = "28–14–8"
CREATE TABLE INST, Here is a database schema( table schema);
Which January has a Record of 28–14–8?It is not neccessary to use all the tables.
SELECT Ordinary value FROM table WHERE Metric value = 29.861 g
CREATE TABLE INST, Here is a database schema( table schema);
What ordinary value has a metric value of 29.861 g?.It is not neccessary to use all the tables.
SELECT COUNT(sample_size) FROM table_name_59 WHERE poll_source = "rasmussen reports" AND margin_of_error > 4.5
CREATE TABLE INST, Here is a database schema( table schema);
What si the total sample size at rasmussen reports when the margin of error was bigger than 4.5?It is not neccessary to use all the tables.
SELECT operator FROM table_18365784_3 WHERE departure = "11.02"
CREATE TABLE INST, Here is a database schema( table schema);
Who was the train operator when the train departed at 11.02 in 1922?It is not neccessary to use all the tables.
SELECT province FROM table_160510_1 WHERE hanja = "朔州"
CREATE TABLE INST, Here is a database schema( table schema);
The hanja 朔州 is for what province?It is not neccessary to use all the tables.
SELECT region FROM table_name_69 WHERE name = "tv vtv"
CREATE TABLE INST, Here is a database schema( table schema);
What is the region for tv vtv?It is not neccessary to use all the tables.
SELECT years_for_rockets FROM table_11734041_20 WHERE position = "Guard / Forward"
CREATE TABLE INST, Here is a database schema( table schema);
what's the years for rockets where position is guard / forwardIt is not neccessary to use all the tables.
SELECT "Entrant" FROM table_58245 WHERE "Engine" = 'ferrari 038 3.5 v12'
CREATE TABLE INST, Here is a database schema( table schema);
Which entrant has Ferrari 038 3.5 v12 engine?It is not neccessary to use all the tables.
SELECT Event FROM table WHERE Opponent = son hai suk
CREATE TABLE INST, Here is a database schema( table schema);
What event did Soa Palelei fight against son hai suk?.It is not neccessary to use all the tables.
SELECT MIN(division) FROM table_name_11 WHERE reg_season = "7th"
CREATE TABLE INST, Here is a database schema( table schema);
Who was the lowest division in the 7th season?It is not neccessary to use all the tables.
SELECT Position FROM table WHERE Country = canada AND Pick = 8
CREATE TABLE INST, Here is a database schema( table schema);
What position was picked for Canada on Pick 8?.It is not neccessary to use all the tables.
SELECT 1989 FROM table_name_88 WHERE 1992 = "a" AND tournament = "u.s. open"
CREATE TABLE INST, Here is a database schema( table schema);
With a 1992 result of A and at the U.S. Open Tournament what is the 1989 result?It is not neccessary to use all the tables.
SELECT a_league FROM table_name_7 WHERE saves = 39
CREATE TABLE INST, Here is a database schema( table schema);
What is the A-league with 39 saves?It is not neccessary to use all the tables.
SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t1.itemid FROM (SELECT labevents.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM labevents WHERE STRFTIME('%y', labevents.charttime) <= '2104' GROUP BY labevents.itemid) AS t1 WHERE t1.c1 <= 4)
CREATE TABLE INST, Here is a database schema( table schema);
get me the top four most frequent lab tests until 2104?It is not neccessary to use all the tables.
SELECT HDTV FROM table WHERE Television service = Sky Primafila 17
CREATE TABLE INST, Here is a database schema( table schema);
Name the hdtv for sky primafila 17.It is not neccessary to use all the tables.
SELECT partner FROM table_1547951_3 WHERE opponents = "Mark Woodforde Martina Navratilova"
CREATE TABLE INST, Here is a database schema( table schema);
Name the partner for mark woodforde martina navratilovaIt is not neccessary to use all the tables.
SELECT date FROM table_name_49 WHERE record = "21–14–3"
CREATE TABLE INST, Here is a database schema( table schema);
What was the date of the game when the Devils had a record of 21–14–3?It is not neccessary to use all the tables.
SELECT AVG(game) FROM table_name_32 WHERE date = "december 17"
CREATE TABLE INST, Here is a database schema( table schema);
What is the average game that has December 17 as the date?It is not neccessary to use all the tables.
SELECT "Event" FROM table_8717 WHERE "Competition" = 'chicago marathon' AND "Year" > '2004'
CREATE TABLE INST, Here is a database schema( table schema);
Which Event has a Competition of chicago marathon, and a Year larger than 2004?It is not neccessary to use all the tables.
SELECT College FROM table WHERE Pos. = lb AND Conf. = big ten
CREATE TABLE INST, Here is a database schema( table schema);
What is the College of the LB Player with Big Ten Conf.?.It is not neccessary to use all the tables.
SELECT jockey FROM table_30098144_2 WHERE race = "Doncaster Handicap"
CREATE TABLE INST, Here is a database schema( table schema);
List the rider for the doncaster handicap compeition.It is not neccessary to use all the tables.
SELECT Engine FROM table WHERE Chassis = march 85c
CREATE TABLE INST, Here is a database schema( table schema);
What Engine had a chassis of March 85c?.It is not neccessary to use all the tables.
SELECT home FROM table_name_55 WHERE record = "32-29-8"
CREATE TABLE INST, Here is a database schema( table schema);
Who had a 32-29-8 record at home?It is not neccessary to use all the tables.
SELECT MIN Runs FROM table WHERE Average = 97.00
CREATE TABLE INST, Here is a database schema( table schema);
How few runs does the 97.00 average have?.It is not neccessary to use all the tables.
SELECT Music FROM table WHERE Dance = jive
CREATE TABLE INST, Here is a database schema( table schema);
What is the Music if the Dance is Jive?.It is not neccessary to use all the tables.
SELECT tot_officers FROM table_23508196_2 WHERE tot_enlisted = 329640
CREATE TABLE INST, Here is a database schema( table schema);
How many tot officers were there on the date when the number of tot enlisted was 329640?It is not neccessary to use all the tables.
SELECT High points FROM table WHERE Team = New York
CREATE TABLE INST, Here is a database schema( table schema);
Who had the highest points against new york?.It is not neccessary to use all the tables.
SELECT winning_team FROM table_23315271_2 WHERE winning_driver = "Max Busnelli"
CREATE TABLE INST, Here is a database schema( table schema);
Who is the winning team when max busnelli is the winning driver?It is not neccessary to use all the tables.
SELECT 2012 FROM table WHERE 2011 = qf
CREATE TABLE INST, Here is a database schema( table schema);
Name the 2012 for 2011 being qf.It is not neccessary to use all the tables.
SELECT Save FROM table WHERE Loss = santiago (2–2)
CREATE TABLE INST, Here is a database schema( table schema);
What's the save when the loss was santiago (2–2)?.It is not neccessary to use all the tables.
SELECT location FROM table_name_46 WHERE unit = "two medicine formation"
CREATE TABLE INST, Here is a database schema( table schema);
Where is two medicine formation?It is not neccessary to use all the tables.