sql
stringlengths
9
2.37k
table
stringclasses
9 values
query
stringlengths
51
503
SELECT MAX(_number_of_discs) FROM table_17798548_4 WHERE season = "The Complete 4th Series"
CREATE TABLE INST, Here is a database schema( table schema);
How many discs for the complete 4th series?It is not neccessary to use all the tables.
SELECT championship FROM table_name_92 WHERE date_won = "july 7, 2010"
CREATE TABLE INST, Here is a database schema( table schema);
Which championship was won on July 7 2010?It is not neccessary to use all the tables.
SELECT SUM(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id = t2.order_id WHERE t1.order_date < "2018-03-17 07:13:53"
CREATE TABLE INST, Here is a database schema( table schema);
What is the total amount of products purchased before 2018-03-17 07:13:53?It is not neccessary to use all the tables.
SELECT Score FROM table WHERE Competition = fifa world cup 1986 play-off
CREATE TABLE INST, Here is a database schema( table schema);
What is the Score of the Fifa World Cup 1986 Play-off Competition?.It is not neccessary to use all the tables.
SELECT MIN Female FROM table WHERE District = hiroo 1-chōme AND Number of Households > 1,666
CREATE TABLE INST, Here is a database schema( table schema);
What is the lowest female number of the hiroo 1-chōme district, which has more than 1,666 households?.It is not neccessary to use all the tables.
SELECT "Venue" FROM table_77238 WHERE "Crowd" > '3,096' AND "Away team" = 'melbourne tigers'
CREATE TABLE INST, Here is a database schema( table schema);
Where was the venue with 3,096 in the crowd and against the Melbourne Tigers?It is not neccessary to use all the tables.
SELECT city FROM table_name_37 WHERE name = "universidad de santiago de compostela"
CREATE TABLE INST, Here is a database schema( table schema);
In which city is the Universidad de Santiago de Compostela located?It is not neccessary to use all the tables.
SELECT DISTINCT driverid, STOP FROM pitstops WHERE duration < (SELECT MAX(duration) FROM pitstops WHERE raceid = 841)
CREATE TABLE INST, Here is a database schema( table schema);
Find the distinct driver id and the stop number of all drivers that have a shorter pit stop duration than some drivers in the race with id 841.It is not neccessary to use all the tables.
SELECT MAX Silver FROM table WHERE Total = 4 AND Bronze < 1
CREATE TABLE INST, Here is a database schema( table schema);
what is the highest silver when the total is 4 and bronze is less than 1?.It is not neccessary to use all the tables.
SELECT Score FROM table WHERE Date = november 19, 2008
CREATE TABLE INST, Here is a database schema( table schema);
On November 19, 2008 what was the score?.It is not neccessary to use all the tables.
SELECT F/Laps FROM table WHERE Season = 2011 AND Races = 18
CREATE TABLE INST, Here is a database schema( table schema);
what is the f/laps when the season is 2011 and races is 18?.It is not neccessary to use all the tables.
SELECT Player FROM table WHERE School/Club Team = tampa
CREATE TABLE INST, Here is a database schema( table schema);
Who is the player who went to school at Tampa?.It is not neccessary to use all the tables.
SELECT season FROM table_27274566_2 WHERE result = "1–0 (aet)"
CREATE TABLE INST, Here is a database schema( table schema);
Which season had a result of 1–0 (aet)?It is not neccessary to use all the tables.
SELECT language FROM table_15887683_8 WHERE television_service = "Fox Business Network"
CREATE TABLE INST, Here is a database schema( table schema);
Name the language for fox business networkIt is not neccessary to use all the tables.
SELECT Tyre FROM table WHERE Engine † = asiatech at02 AND Driver = alex yoong
CREATE TABLE INST, Here is a database schema( table schema);
what is the tyre when the engine is asiatech at02 and the driver is alex yoong?.It is not neccessary to use all the tables.
SELECT Candidates FROM table WHERE District = Florida 7 AND First elected = 2010
CREATE TABLE INST, Here is a database schema( table schema);
When 2010 is the first elected and Florida 7 is the district who are the candidates?.It is not neccessary to use all the tables.
SELECT mens_doubles FROM table_13857700_1 WHERE year = 1978
CREATE TABLE INST, Here is a database schema( table schema);
who is the the mens doubles with year being 1978It is not neccessary to use all the tables.
SELECT MAX Series # FROM table WHERE Title = "The New Day"
CREATE TABLE INST, Here is a database schema( table schema);
What is the highest series number of the episode "The New Day"?.It is not neccessary to use all the tables.
SELECT Perpetrator FROM table WHERE Country = uganda AND Location = kampala AND Killed = 12
CREATE TABLE INST, Here is a database schema( table schema);
Who is the perpetrator in Uganda who killed 12 in Kampala?.It is not neccessary to use all the tables.
SELECT Time FROM table WHERE Round < 3 AND Opponent = amanda lavoy
CREATE TABLE INST, Here is a database schema( table schema);
What was the time for the bout against Amanda Lavoy, which went under 3 rounds?.It is not neccessary to use all the tables.
SELECT Points against FROM table WHERE Try bonus = 0 AND Points for = 150
CREATE TABLE INST, Here is a database schema( table schema);
List all points against with a 0 try bonus and points for of 150..It is not neccessary to use all the tables.
SELECT COUNT(episode) FROM table_15739098_1 WHERE story = "Alan Nourse"
CREATE TABLE INST, Here is a database schema( table schema);
Name the number of episodes for alan nourseIt is not neccessary to use all the tables.
SELECT Party FROM table WHERE Incumbent = Carl Elliott
CREATE TABLE INST, Here is a database schema( table schema);
Carl Elliott is a member of which party?.It is not neccessary to use all the tables.
SELECT clock_speed FROM table_12740151_8 WHERE price___usd__ = "$910"
CREATE TABLE INST, Here is a database schema( table schema);
What's the clock speed of the model that costs $910?It is not neccessary to use all the tables.
SELECT MAX(year) FROM table_name_85 WHERE result = "nominated" AND nominated_work_title = "n/a"
CREATE TABLE INST, Here is a database schema( table schema);
what is the latest year that has the result of nominated and the nominated work title is n/a?It is not neccessary to use all the tables.
SELECT Nationality FROM table WHERE Lane < 3 AND Time = 49.04
CREATE TABLE INST, Here is a database schema( table schema);
for the time of 49.04 and lane less than 3, what is the nationality?.It is not neccessary to use all the tables.
SELECT Hand guards FROM table WHERE Name = Gas Piston Commando
CREATE TABLE INST, Here is a database schema( table schema);
What hand guard system is used with a gas piston commando?.It is not neccessary to use all the tables.
SELECT international_tourist_arrivals__2011_ FROM table_14752049_1 WHERE country = "Italy"
CREATE TABLE INST, Here is a database schema( table schema);
How many tourist arrivals occurred in 2011 in the country of Italy?It is not neccessary to use all the tables.
SELECT lost FROM table_name_16 WHERE points_for = "205"
CREATE TABLE INST, Here is a database schema( table schema);
What is Lost, when Points For is '205'?It is not neccessary to use all the tables.
SELECT world_rank FROM table_19112_3 WHERE market_value__billion_$_ = "17.2"
CREATE TABLE INST, Here is a database schema( table schema);
Name the world rank for market value 17.2It is not neccessary to use all the tables.
SELECT COUNT(_number) FROM table_22871239_8 WHERE score = "L 110-112"
CREATE TABLE INST, Here is a database schema( table schema);
Name the total number for score l 110-112It is not neccessary to use all the tables.
SELECT loss FROM table_name_61 WHERE record = "27-17"
CREATE TABLE INST, Here is a database schema( table schema);
What was the loss of the game when the record was 27-17?It is not neccessary to use all the tables.
SELECT film FROM table_name_68 WHERE role = "taylor"
CREATE TABLE INST, Here is a database schema( table schema);
Which film has a role named Taylor?It is not neccessary to use all the tables.
SELECT "Themed area" FROM table_49274 WHERE "Type" = 'animal show' AND "Opened" = '2010'
CREATE TABLE INST, Here is a database schema( table schema);
What themed area opened in 2010 as an animal show?It is not neccessary to use all the tables.
SELECT AVG(top_25) FROM table_name_32 WHERE events < 35 AND tournament = "the open championship"
CREATE TABLE INST, Here is a database schema( table schema);
What is the average of the top-25 of those with less than 35 events in the Open Championship?It is not neccessary to use all the tables.
SELECT COUNT Scorecard FROM table WHERE Date = October 28
CREATE TABLE INST, Here is a database schema( table schema);
How many scorecards are there for the match on October 28? .It is not neccessary to use all the tables.
SELECT stage FROM table_name_68 WHERE team_classification = "tabriz petrochemical team"
CREATE TABLE INST, Here is a database schema( table schema);
Which stage had tabriz petrochemical team in the team classification?It is not neccessary to use all the tables.
SELECT CFL Team FROM table WHERE Pick # = 36
CREATE TABLE INST, Here is a database schema( table schema);
What are all the CFL teams where the pick number is 36?.It is not neccessary to use all the tables.
SELECT Venue FROM table WHERE Home team score = 10.15 (75)
CREATE TABLE INST, Here is a database schema( table schema);
What was the venue where the home team scored 10.15 (75)?.It is not neccessary to use all the tables.
SELECT product_type_code, MIN(product_price) FROM Products GROUP BY product_type_code ORDER BY product_type_code
CREATE TABLE INST, Here is a database schema( table schema);
Give the minimum product price for each product type in a bar chart, and could you rank x axis in ascending order please?It is not neccessary to use all the tables.
SELECT "Home team score" FROM table_53391 WHERE "Home team" = 'collingwood'
CREATE TABLE INST, Here is a database schema( table schema);
What is the score for Collingwood as the home team?It is not neccessary to use all the tables.
SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = "San Francisco State University" AND T2.year = 1996
CREATE TABLE INST, Here is a database schema( table schema);
What is the campus fee of "San Francisco State University" in year 1996?It is not neccessary to use all the tables.
SELECT MIN(gold) FROM table_name_54 WHERE nation = "tanzania" AND bronze < 0
CREATE TABLE INST, Here is a database schema( table schema);
Name the fewest gold for tanzania with bronze less than 0It is not neccessary to use all the tables.
SELECT Scorers FROM table WHERE Venue = a AND Opponent = arsenal
CREATE TABLE INST, Here is a database schema( table schema);
Which Scorers have a Venue of A, and an Opponent of arsenal?.It is not neccessary to use all the tables.
SELECT record FROM table_14520977_1 WHERE result = "L 24–22"
CREATE TABLE INST, Here is a database schema( table schema);
Name the record for l 24–22It is not neccessary to use all the tables.
SELECT race_title FROM table_name_24 WHERE drivers = "ron fellows" AND date = "aug 4"
CREATE TABLE INST, Here is a database schema( table schema);
What race is on aug 4 with ron fellows?It is not neccessary to use all the tables.
SELECT JOB_ID, AVG(SALARY) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY AVG(SALARY)
CREATE TABLE INST, Here is a database schema( table schema);
For those employees who was hired before 2002-06-21, draw a bar chart about the distribution of job_id and the average of salary , and group by attribute job_id, rank in ascending by the Y.It is not neccessary to use all the tables.
SELECT record FROM table_name_55 WHERE opponent = "vs. hamilton tiger cats"
CREATE TABLE INST, Here is a database schema( table schema);
Can you tell me the Record that has the Opponent of vs. hamilton tiger cats?It is not neccessary to use all the tables.
SELECT term_start FROM table_name_45 WHERE political_party = "progressive party"
CREATE TABLE INST, Here is a database schema( table schema);
What is the Term Start date of the Progressive Party Prime Minister?It is not neccessary to use all the tables.
SELECT MIN Gold FROM table WHERE Silver < 0
CREATE TABLE INST, Here is a database schema( table schema);
Which team has the lowest gold and 0 silver?.It is not neccessary to use all the tables.
SELECT COUNT Diameter (km) FROM table WHERE Latitude = 5.0N
CREATE TABLE INST, Here is a database schema( table schema);
How many numbers are listed under diameter with a lattitude of 5.0n?.It is not neccessary to use all the tables.
SELECT Name, Age FROM editor
CREATE TABLE INST, Here is a database schema( table schema);
What are the names and ages of editors?It is not neccessary to use all the tables.
SELECT race_winner FROM table_name_47 WHERE circuit = "sachsenring"
CREATE TABLE INST, Here is a database schema( table schema);
Who won the race circuit of sachsenring?It is not neccessary to use all the tables.
SELECT opposing_teams FROM table_name_63 WHERE date = "11/04/1999"
CREATE TABLE INST, Here is a database schema( table schema);
What opposing teams playing on 11/04/1999?It is not neccessary to use all the tables.
SELECT weekly_rank FROM table_11753080_2 WHERE _number = 4
CREATE TABLE INST, Here is a database schema( table schema);
What is the weekly rank where the number is 4?It is not neccessary to use all the tables.
SELECT date_of_vacancy FROM table_18795125_6 WHERE position_in_table = "23rd"
CREATE TABLE INST, Here is a database schema( table schema);
At what date did the 23rd manager vacate the position?It is not neccessary to use all the tables.
SELECT fifth_district FROM table_name_23 WHERE second_district = "paul leidig"
CREATE TABLE INST, Here is a database schema( table schema);
Who's the Fifth District with a Second District of paul leidig?It is not neccessary to use all the tables.
SELECT AVG(attendance) FROM table_name_49 WHERE arena = "joe louis arena"
CREATE TABLE INST, Here is a database schema( table schema);
What is the Attendance at Joe Louis Arena?It is not neccessary to use all the tables.
SELECT MAX(appearances¹) FROM table_24565004_2 WHERE name = "Bernard Allou"
CREATE TABLE INST, Here is a database schema( table schema);
Name the most appearances for bernard allouIt is not neccessary to use all the tables.
SELECT Provider FROM table WHERE Application = Exchange Server
CREATE TABLE INST, Here is a database schema( table schema);
Which providers use exchange server?.It is not neccessary to use all the tables.
SELECT AVG(cuts_made) FROM table_name_38 WHERE top_10 = 11
CREATE TABLE INST, Here is a database schema( table schema);
How many average cuts made when 11 is the Top-10?It is not neccessary to use all the tables.
SELECT dpi FROM table_16409745_1 WHERE dimensions__mm_ = "280 x 95 x 40"
CREATE TABLE INST, Here is a database schema( table schema);
What is the dpi of a scanner with the mm dimensions 280 x 95 x 40?It is not neccessary to use all the tables.
SELECT MAX Gold FROM table WHERE Rank = 7 AND Bronze < 0
CREATE TABLE INST, Here is a database schema( table schema);
What is the most gold when the rank is 7 and bronze is less than 0?.It is not neccessary to use all the tables.
SELECT country FROM table_name_95 WHERE television_service = "italia 1"
CREATE TABLE INST, Here is a database schema( table schema);
What is the name of the country when the television service is italia 1?It is not neccessary to use all the tables.
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'pulmonary medicine consultation' AND STRFTIME('%y', treatment.treatmenttime) = '2105') AS t1 JOIN (SELECT patient.uniquepid, medication.drugname, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE STRFTIME('%y', medication.drugstarttime) = '2105') AS t2 ON t1.uniquepid = t2.uniquepid WHERE t1.treatmenttime < t2.drugstarttime AND DATETIME(t1.treatmenttime, 'start of month') = DATETIME(t2.drugstarttime, 'start of month') GROUP BY t2.drugname) AS t3 WHERE t3.c1 <= 4
CREATE TABLE INST, Here is a database schema( table schema);
what are the four most common medicines that patients were prescribed within the same month after receiving a pulmonary medicine consultation procedure in 2105?It is not neccessary to use all the tables.
SELECT Score FROM table WHERE Venue = pro player stadium AND Winning Team = devil rays AND Date = june 14
CREATE TABLE INST, Here is a database schema( table schema);
on June 14, what was the winning score by the Devil rays in pro player stadium?.It is not neccessary to use all the tables.
SELECT Year, COUNT(Year) FROM wine ORDER BY COUNT(Year) DESC
CREATE TABLE INST, Here is a database schema( table schema);
Bin the year attribute into the Year interval and count them for a bar chart, and rank total number in desc order.It is not neccessary to use all the tables.
SELECT division_record FROM table_name_79 WHERE school = "milford"
CREATE TABLE INST, Here is a database schema( table schema);
The Milford School has what Division Record?It is not neccessary to use all the tables.
SELECT Trofeo Fast Team FROM table WHERE Points classification = silvio martinello AND Stage = 6
CREATE TABLE INST, Here is a database schema( table schema);
What is the Trofeo Fast Team with a point classification of Silvio Martinello and stage 6?.It is not neccessary to use all the tables.
SELECT junior_marquee_player FROM table_name_22 WHERE captain = "harry kewell"
CREATE TABLE INST, Here is a database schema( table schema);
What Junior Marquee team is Harry Kewell of?It is not neccessary to use all the tables.
SELECT MIN(long) FROM table_name_19 WHERE gain = 20 AND loss < 0
CREATE TABLE INST, Here is a database schema( table schema);
Can you tell me the lowest Long that has the Gain of 20 and the Loss smaller than 0?It is not neccessary to use all the tables.
SELECT serial_no FROM table_name_71 WHERE colour = "black" AND pilot_car_no > 2 AND engine_no = 1008
CREATE TABLE INST, Here is a database schema( table schema);
What is the serial number of the pilot car that is black has a pilot car number larger than 2 and an engine number of 1008?It is not neccessary to use all the tables.
SELECT COUNT(attendance) FROM table_name_94 WHERE opponent = "mariners" AND score = "9-6"
CREATE TABLE INST, Here is a database schema( table schema);
How many people attended the game against the Mariners with a score of 9-6?It is not neccessary to use all the tables.
SELECT channel FROM table_178242_1 WHERE host_s_ = "Art Rooijakkers"
CREATE TABLE INST, Here is a database schema( table schema);
Which channel has the host Art Rooijakkers?It is not neccessary to use all the tables.
SELECT Winning score FROM table WHERE Tournament = german masters
CREATE TABLE INST, Here is a database schema( table schema);
What was Olazabal's winning score in the German Masters?.It is not neccessary to use all the tables.
SELECT "Cover model" FROM table_40535 WHERE "20 Questions" = 'christina applegate'
CREATE TABLE INST, Here is a database schema( table schema);
Which Cover model has a 20 Questions of christina applegate?It is not neccessary to use all the tables.
SELECT Song title FROM table WHERE Points = 259
CREATE TABLE INST, Here is a database schema( table schema);
What is the title of the song that received 259 points?.It is not neccessary to use all the tables.
SELECT Loss FROM table WHERE Series = 2-2
CREATE TABLE INST, Here is a database schema( table schema);
Name the loss for series 2-2.It is not neccessary to use all the tables.
SELECT proceed_to_quarter_final FROM table_28068063_3 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 SUM Laps FROM table WHERE Grid < 11 AND Driver = jean-pierre jarier
CREATE TABLE INST, Here is a database schema( table schema);
I want the sum of Laps with Grid less than 11 for jean-pierre jarier.It is not neccessary to use all the tables.
SELECT Co-Stars FROM table WHERE Music Director = Kalyanji-Anandji AND Year = 1963
CREATE TABLE INST, Here is a database schema( table schema);
Which co-stars did Kalyanji-anandji direct in 1963?.It is not neccessary to use all the tables.
SELECT constructor FROM table_name_50 WHERE rounds = "all" AND driver = "bruno giacomelli"
CREATE TABLE INST, Here is a database schema( table schema);
Which Constructor has Rounds All and Driver Bruno Giacomelli?It is not neccessary to use all the tables.
SELECT current_map FROM table_name_25 WHERE namesake = "derain crater"
CREATE TABLE INST, Here is a database schema( table schema);
What is the current map designation of the feature for which derain crater was the namesake?It is not neccessary to use all the tables.
SELECT 01 AS _02 FROM table_name_61 WHERE "03_04" = "03_04"
CREATE TABLE INST, Here is a database schema( table schema);
What is 01-02 when 03-04 is 03-04?It is not neccessary to use all the tables.
SELECT MIN Goals Olimpia FROM table
CREATE TABLE INST, Here is a database schema( table schema);
What was the least amount for Goals Olimpia?.It is not neccessary to use all the tables.
SELECT position FROM table_name_48 WHERE school = "clemson"
CREATE TABLE INST, Here is a database schema( table schema);
What position did the person from Clemson school fill?It is not neccessary to use all the tables.
SELECT country FROM table_name_93 WHERE place = "t9" AND player = "jay hebert"
CREATE TABLE INST, Here is a database schema( table schema);
What is Country when Place is "T9" and when Player is "Jay Hebert"?It is not neccessary to use all the tables.
SELECT MIN(pick__number) FROM table_name_44 WHERE reg_gp < 0
CREATE TABLE INST, Here is a database schema( table schema);
Which is the smallest pick number that had a Reg GP of less than 0?It is not neccessary to use all the tables.
SELECT result FROM table_19810459_1 WHERE background = "Business major"
CREATE TABLE INST, Here is a database schema( table schema);
What was the result for the contestant whose background was as a business major?It is not neccessary to use all the tables.
SELECT AVG(area_km_2) FROM table_name_46 WHERE official_name = "notre-dame-de-lourdes"
CREATE TABLE INST, Here is a database schema( table schema);
Notre-Dame-De-Lourdes has what average area km 2?It is not neccessary to use all the tables.
SELECT title FROM table_name_8 WHERE original_airdate = "june 13, 1999"
CREATE TABLE INST, Here is a database schema( table schema);
What is the title of the program that was originally aired on June 13 1999?It is not neccessary to use all the tables.
SELECT Tenth FROM table WHERE Ninth = Kubb
CREATE TABLE INST, Here is a database schema( table schema);
When Kubb is in 9th, who is in 10th?.It is not neccessary to use all the tables.
SELECT Location Attendance FROM table WHERE Team = Golden State
CREATE TABLE INST, Here is a database schema( table schema);
What was the location and how many attended when Golden State played? .It is not neccessary to use all the tables.
SELECT MAX("Viewers (m)") FROM table_51415 WHERE "Rating" > '9.4'
CREATE TABLE INST, Here is a database schema( table schema);
What is the highest number of viewers for a rating greater than 9.4?It is not neccessary to use all the tables.
SELECT opponent_in_the_final FROM table_name_12 WHERE tournament = "rockford, illinois"
CREATE TABLE INST, Here is a database schema( table schema);
What opponent in the final has rockford Illinois as the tournament?It is not neccessary to use all the tables.
SELECT Second party FROM table WHERE Second member = charles robert colvile AND First party = conservative AND First member = william mundy
CREATE TABLE INST, Here is a database schema( table schema);
Which of the second parties has second member Charles Robert Colvile, a conservative first party, and first member William Mundy?.It is not neccessary to use all the tables.
SELECT Venue FROM table WHERE Competition = 2009 gulf cup of nations
CREATE TABLE INST, Here is a database schema( table schema);
What was the Venue of the 2009 Gulf Cup of Nations?.It is not neccessary to use all the tables.
SELECT SUM(votes__gib_) FROM table_name_99 WHERE _percentage__gib_ = 0.53 AND seats > 0
CREATE TABLE INST, Here is a database schema( table schema);
What is the sum of votes of the party with a % of 0.53 and more than 0 seats?It is not neccessary to use all the tables.
SELECT MAX(pick) FROM table_name_86 WHERE player = "todd van poppel"
CREATE TABLE INST, Here is a database schema( table schema);
What is the highest Pick when Player is "Todd Van Poppel"?It is not neccessary to use all the tables.
SELECT inactive FROM table_21821014_1 WHERE institution = "University of Texas, El Paso"
CREATE TABLE INST, Here is a database schema( table schema);
What does the inactive state for University of Texas El Paso?It is not neccessary to use all the tables.