sql
stringlengths
9
2.37k
table
stringclasses
9 values
query
stringlengths
51
503
SELECT SUM(rank) FROM table_name_59 WHERE gold > 0 AND total > 32 AND silver < 23
CREATE TABLE INST, Here is a database schema( table schema);
Tell me the sum of rank for when gold is more than 0 and silver less than 23 with total more than 32It is not neccessary to use all the tables.
SELECT away_team AS score FROM table_name_75 WHERE away_team = "melbourne"
CREATE TABLE INST, Here is a database schema( table schema);
When Melbourne was the Away team, what was their score?It is not neccessary to use all the tables.
SELECT AVG(played) FROM table_name_4 WHERE points > 14 AND against > 17
CREATE TABLE INST, Here is a database schema( table schema);
How many average plays have points greater than 14 with an against greater than 17?It is not neccessary to use all the tables.
SELECT COUNT("Germany") FROM table_30602 WHERE "Italy" = 'Naples LL Naples' AND "England" = 'London Area Youth London'
CREATE TABLE INST, Here is a database schema( table schema);
How many years did Germany participate, when the team from Italy was Naples LL Naples and the team from England was London Area Youth London?It is not neccessary to use all the tables.
SELECT tuner FROM table_name_32 WHERE type = "hybrid video recorder" AND digital = "dvb-t (zl10353)" AND model = "hvr-900"
CREATE TABLE INST, Here is a database schema( table schema);
I want the tuner for hybrid video recorder and Digital of dvb-t (zl10353) and a Model of hvr-900It is not neccessary to use all the tables.
SELECT Route Name FROM table WHERE Remarks = Replaced by US 81
CREATE TABLE INST, Here is a database schema( table schema);
Which routes have "replaced by US 81" listed in their remarks section?.It is not neccessary to use all the tables.
SELECT prescriptions.dose_val_rx FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 83709) AND prescriptions.drug = 'levetiracetam' AND DATETIME(prescriptions.startdate) >= DATETIME(CURRENT_TIME(), '-66 month') ORDER BY prescriptions.startdate DESC LIMIT 1
CREATE TABLE INST, Here is a database schema( table schema);
what was the levetiracetam dosage that patient 83709 was last prescribed since 66 months ago?It is not neccessary to use all the tables.
SELECT MAX("2007 Budget in billions of dollars") FROM table_8798 WHERE "Order of succession" = '3'
CREATE TABLE INST, Here is a database schema( table schema);
What was the highest 2007 budget when the order of succession was 3?It is not neccessary to use all the tables.
SELECT catalog FROM table_name_61 WHERE label = "frontiers records"
CREATE TABLE INST, Here is a database schema( table schema);
What was the catalog when the label was frontiers records?It is not neccessary to use all the tables.
SELECT Type FROM table WHERE Built = 1923
CREATE TABLE INST, Here is a database schema( table schema);
Which type of locomotive was built in 1923?.It is not neccessary to use all the tables.
SELECT clubs_remaining FROM table_18328569_1 WHERE winners_from_previous_round = "4"
CREATE TABLE INST, Here is a database schema( table schema);
How many clubs are remaining when the winners from the previous round totals 4?It is not neccessary to use all the tables.
SELECT MAX("Silver") FROM table_43802 WHERE "Event" = '2008 summer paralympics' AND "Bronze" < '1'
CREATE TABLE INST, Here is a database schema( table schema);
what is the most silver when the event is 2008 summer paralympics and bronze is less than 1?It is not neccessary to use all the tables.
SELECT years FROM table_179174_2 WHERE flights = "134 Orbital"
CREATE TABLE INST, Here is a database schema( table schema);
What years had 134 orbital flights?It is not neccessary to use all the tables.
SELECT whenbuilt FROM table_name_67 WHERE builder = "brighton" AND withdrawn = "september 1964" AND name = "blandford forum"
CREATE TABLE INST, Here is a database schema( table schema);
What is the whenbuilt of the Brighton built Blandford Forum with a withdrawn of september 1964?It is not neccessary to use all the tables.
SELECT Class Pos. FROM table WHERE Year > 1997 AND Team = corvette racing AND Class = gt1 AND Laps = 327
CREATE TABLE INST, Here is a database schema( table schema);
Which Class Pos has a Year larger than 1997, a Team of corvette racing, a Class of gt1, and 327 laps?.It is not neccessary to use all the tables.
SELECT MAX Prev FROM table WHERE Rank = 9 AND Rating < 2746
CREATE TABLE INST, Here is a database schema( table schema);
What is the highest prev that has 9 as the rank, with a rating less than 2746?.It is not neccessary to use all the tables.
SELECT "To par" FROM table_45785 WHERE "Player" = 'ernie els'
CREATE TABLE INST, Here is a database schema( table schema);
WHAT IS THE TO PAR FOR ERNIE ELS?It is not neccessary to use all the tables.
SELECT country FROM table_name_30 WHERE film_title_used_in_nomination = "the garden of the finzi-continis"
CREATE TABLE INST, Here is a database schema( table schema);
Where was the film about the garden of the finzi-continis made?It is not neccessary to use all the tables.
SELECT club FROM table_name_9 WHERE not_winning_editions = "1992, 2003"
CREATE TABLE INST, Here is a database schema( table schema);
Which Club has a Not winning editions of 1992 2003?It is not neccessary to use all the tables.
SELECT Opponent FROM table WHERE Week < 12 AND Attendance = 65,569
CREATE TABLE INST, Here is a database schema( table schema);
Who was the opponent on the game with a 65,569 attendance before week 12?.It is not neccessary to use all the tables.
SELECT Website FROM table WHERE Ages = 8-16 AND Locality = cheadle
CREATE TABLE INST, Here is a database schema( table schema);
What is the Website of the Cheadle School for Ages 8-16?.It is not neccessary to use all the tables.
SELECT Country FROM table WHERE Rank > 4
CREATE TABLE INST, Here is a database schema( table schema);
What country is ranked larger than 4?.It is not neccessary to use all the tables.
SELECT uk_chart FROM table_name_33 WHERE year > 1961 AND at_eurovision = "2nd" AND artist = "michael ball"
CREATE TABLE INST, Here is a database schema( table schema);
Where did the song by Michael Ball which placed 2nd in Eurovision prior to 1961 place on the UK charts?It is not neccessary to use all the tables.
SELECT water__sqmi_ FROM table_18600760_9 WHERE latitude = "48.064751"
CREATE TABLE INST, Here is a database schema( table schema);
How many square miles of water does the township at latitude 48.064751 have?It is not neccessary to use all the tables.
SELECT AVG Year FROM table WHERE Trim = ls/lt AND Power = hp (kw)
CREATE TABLE INST, Here is a database schema( table schema);
What's the Year average that's got Trim of LS/LT and Power of HP (KW)?.It is not neccessary to use all the tables.
SELECT Score FROM table WHERE Date = november 21
CREATE TABLE INST, Here is a database schema( table schema);
What was the score on november 21?.It is not neccessary to use all the tables.
SELECT MIN(round) FROM table_10361230_1 WHERE position = "Defensive Back"
CREATE TABLE INST, Here is a database schema( table schema);
Where does the defensive back position appear first?It is not neccessary to use all the tables.
SELECT COUNT(games) FROM table_name_62 WHERE goals = 23 AND rank > 9
CREATE TABLE INST, Here is a database schema( table schema);
How many games have 23 goals with a rank greater than 9?It is not neccessary to use all the tables.
SELECT GPU frequency FROM table WHERE Cores = ultra-low power
CREATE TABLE INST, Here is a database schema( table schema);
What's the GPU frequency that has ultra-low power in cores?.It is not neccessary to use all the tables.
SELECT MIN Capacity FROM table WHERE City = brisbane AND Rank < 1
CREATE TABLE INST, Here is a database schema( table schema);
Which Capacity is the lowest one that has a City of brisbane, and a Rank smaller than 1?.It is not neccessary to use all the tables.
SELECT COUNT Population (2011 census) FROM table WHERE Area (km²) = 132.79
CREATE TABLE INST, Here is a database schema( table schema);
How many places according to the 2011 census of whatever population have an area of 132.79 kilometers squared?.It is not neccessary to use all the tables.
SELECT Round FROM table WHERE Race = int. adac-preis der tourenwagen von sachsen-anhalt
CREATE TABLE INST, Here is a database schema( table schema);
What is the round for the Int. Adac-Preis Der Tourenwagen Von Sachsen-Anhalt?.It is not neccessary to use all the tables.
SELECT Result FROM table WHERE Attendance = 12,000
CREATE TABLE INST, Here is a database schema( table schema);
What was the result when the attendance was 12,000?.It is not neccessary to use all the tables.
SELECT Year FROM table WHERE Comp = 33
CREATE TABLE INST, Here is a database schema( table schema);
What year was the comp 33?.It is not neccessary to use all the tables.
SELECT Miles (km) FROM table WHERE Race Time = 3:07:53
CREATE TABLE INST, Here is a database schema( table schema);
How long in miles (km) was the race that lasted 3:07:53?.It is not neccessary to use all the tables.
SELECT Silver FROM table WHERE Gold = li ao
CREATE TABLE INST, Here is a database schema( table schema);
What Silver has a Golf of Li AO?.It is not neccessary to use all the tables.
SELECT COUNT Round FROM table WHERE Position = 2b
CREATE TABLE INST, Here is a database schema( table schema);
What is the total number of Round, when Position is 2B?.It is not neccessary to use all the tables.
SELECT Party FROM table WHERE Result = re-elected AND Incumbent = robert p. kennedy
CREATE TABLE INST, Here is a database schema( table schema);
What party was re-elected as an incumbent of robert p. Kennedy?.It is not neccessary to use all the tables.
SELECT "Broadcast date" FROM table_16042 WHERE "BBC One total viewing" > '11616996.338225884'
CREATE TABLE INST, Here is a database schema( table schema);
What date was BBC One total viewing greater then 11616996.338225884?It is not neccessary to use all the tables.
SELECT Away FROM table WHERE Home = toronto downtown dingos
CREATE TABLE INST, Here is a database schema( table schema);
What away has toronto downtown dingos as the home?.It is not neccessary to use all the tables.
SELECT Player FROM table WHERE Pick = 19
CREATE TABLE INST, Here is a database schema( table schema);
What was the player with pick 19?.It is not neccessary to use all the tables.
SELECT Away team FROM table WHERE Tie no = 4
CREATE TABLE INST, Here is a database schema( table schema);
What is the away team with a 4 tie no.?.It is not neccessary to use all the tables.
SELECT loser FROM table_name_18 WHERE winner = "los angeles lakers (10)"
CREATE TABLE INST, Here is a database schema( table schema);
What is the Loser when the winner was los angeles lakers (10)?It is not neccessary to use all the tables.
SELECT MIN Total to date FROM table WHERE 1980s > 2
CREATE TABLE INST, Here is a database schema( table schema);
What was the lowest total in the 1980s that was larger than 2?.It is not neccessary to use all the tables.
SELECT MAX Area (km²) FROM table WHERE Member countries = Austria
CREATE TABLE INST, Here is a database schema( table schema);
What is Austria's maximum area (km2)?.It is not neccessary to use all the tables.
SELECT Price FROM table WHERE Downstream = 60 mbps
CREATE TABLE INST, Here is a database schema( table schema);
What is the price of 60 mbps downstream?.It is not neccessary to use all the tables.
SELECT "Date" FROM table_7587 WHERE "Week" < '10' AND "Opponent" = 'denver broncos'
CREATE TABLE INST, Here is a database schema( table schema);
When did the Chargers play the Denver Broncos before Week 10?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.admityear < "2120" AND lab.label = "Albumin, Urine"
CREATE TABLE INST, Here is a database schema( table schema);
give me the number of patients admitted before 2120 who were ordered urine albumin lab test.It is not neccessary to use all the tables.
SELECT Prize FROM table WHERE Winner = benny spindler
CREATE TABLE INST, Here is a database schema( table schema);
What was the prize for winner benny spindler?.It is not neccessary to use all the tables.
SELECT record FROM table_name_91 WHERE date = "december 20"
CREATE TABLE INST, Here is a database schema( table schema);
What is the Record with a Date that is december 20?It is not neccessary to use all the tables.
SELECT "Manufacturer" FROM table_76656 WHERE "Time/Retired" = 'accident'
CREATE TABLE INST, Here is a database schema( table schema);
Which Manufacturer has a Time/Retired of accident?It is not neccessary to use all the tables.
SELECT Nomination FROM table WHERE Film Name = peresohla zemlia
CREATE TABLE INST, Here is a database schema( table schema);
Tell me the nomination for peresohla zemlia.It is not neccessary to use all the tables.
SELECT California (San Francisco) FROM table WHERE Alaska ( Juneau ) = 80 g/mi (50 g/km) AND Southeast (Atlanta) = 250 g/mi (155 g/km)
CREATE TABLE INST, Here is a database schema( table schema);
What was the emission rating in California for the vehicle that was rated 80 g/mi (50 g/km) in Alaska and 250 g/mi (155 g/km) in the Southeast ?.It is not neccessary to use all the tables.
SELECT away_team AS score FROM table_name_59 WHERE away_team = "st kilda"
CREATE TABLE INST, Here is a database schema( table schema);
What was St Kilda's score as the Away team?It is not neccessary to use all the tables.
SELECT COUNT(up_down) FROM table_2472711_32 WHERE total = 301470
CREATE TABLE INST, Here is a database schema( table schema);
How many values of up/down have a total value of exactly 301470?It is not neccessary to use all the tables.
SELECT "Lansing (LAN)" FROM table_20700 WHERE "Saginaw (MBS)" = '$470.47'
CREATE TABLE INST, Here is a database schema( table schema);
At a Saginaw fare of $470.47, what is the fare to Lansing?It is not neccessary to use all the tables.
SELECT MAX(league_cup) FROM table_name_99 WHERE championship < 3 AND total < 2 AND fa_cup > 0
CREATE TABLE INST, Here is a database schema( table schema);
What is the highest league up with less than 3 championships a total less than 2 and a FA cup larger than 0?It is not neccessary to use all the tables.
SELECT last_appearance FROM table_name_65 WHERE wins < 1 AND losses = 1 AND school = "oklahoma state"
CREATE TABLE INST, Here is a database schema( table schema);
What is Last Appearance when Wins is less than 1 when Losses is 1 and when School is Oklahoma State?It is not neccessary to use all the tables.
SELECT player FROM table_name_82 WHERE round > 6 AND position = "d"
CREATE TABLE INST, Here is a database schema( table schema);
What player has a round larger than 6 with a D position.It is not neccessary to use all the tables.
SELECT Away team FROM table WHERE Venue = glenferrie oval
CREATE TABLE INST, Here is a database schema( table schema);
Which away team plays at the venue glenferrie oval?.It is not neccessary to use all the tables.
SELECT name FROM instructor WHERE dept_name = 'Comp. Sci.'
CREATE TABLE INST, Here is a database schema( table schema);
Find the names of all instructors in computer science departmentIt is not neccessary to use all the tables.
SELECT COUNT Guest(s) FROM table WHERE Broadcast date = 11September2012
CREATE TABLE INST, Here is a database schema( table schema);
how many guest stars did the episode that was broadcasted 11september2012 have.It is not neccessary to use all the tables.
SELECT MIN(bronze) FROM table_name_61 WHERE nation = "united states" AND total > 25
CREATE TABLE INST, Here is a database schema( table schema);
When the united states won a total number of medals larger than 25 what was the lowest amount of Bronze medals won?It is not neccessary to use all the tables.
SELECT COUNT Year FROM table WHERE Womens doubles = Diana Koleva Emilia Dimitrova AND Mens singles = Jeliazko Valkov
CREATE TABLE INST, Here is a database schema( table schema);
Name the number of years for womens doubles being diana koleva emilia dimitrova and jeliazko valkov.It is not neccessary to use all the tables.
SELECT outcome FROM table_name_54 WHERE opponent = "wendy turnbull" AND surface = "grass"
CREATE TABLE INST, Here is a database schema( table schema);
Which Outcome has an Opponent of wendy turnbull and a Surface of grass?It is not neccessary to use all the tables.
SELECT nationality FROM table_name_53 WHERE club_team = "quebec remparts (qmjhl)"
CREATE TABLE INST, Here is a database schema( table schema);
What is the Nationality Club Team of Quebec remparts (qmjhl)?It is not neccessary to use all the tables.
SELECT MIN(no_in_series) FROM table_17758010_2
CREATE TABLE INST, Here is a database schema( table schema);
What is the lowest no. in series?It is not neccessary to use all the tables.
SELECT sydney FROM table_name_61 WHERE adelaide = "yes" AND gold_coast = "yes" AND melbourne = "yes" AND auckland = "yes"
CREATE TABLE INST, Here is a database schema( table schema);
what is the Sydney that has Adelaide Gold Coast Melbourne and Auckland are all yes?It is not neccessary to use all the tables.
SELECT Rider FROM table WHERE Laps < 16 AND Time = accident AND Bike = yamaha yzf-r6 AND Grid = 10
CREATE TABLE INST, Here is a database schema( table schema);
What is the driver with the laps under 16, grid of 10, a bike of Yamaha YZF-R6, and ended with an accident?.It is not neccessary to use all the tables.
SELECT artist FROM table_name_33 WHERE draw > 4
CREATE TABLE INST, Here is a database schema( table schema);
Who is the artist that drew higher than 4?It is not neccessary to use all the tables.
SELECT score FROM table_name_82 WHERE date = "6 june 2010"
CREATE TABLE INST, Here is a database schema( table schema);
what was the score on 6 june 2010?It is not neccessary to use all the tables.
SELECT Song FROM table WHERE Artist = filipa sousa
CREATE TABLE INST, Here is a database schema( table schema);
What song has filipa sousa as an artist?.It is not neccessary to use all the tables.
SELECT Venue FROM table WHERE Status = five nations AND Against = 0
CREATE TABLE INST, Here is a database schema( table schema);
What is the venue for the Status of Five Nations and 0 againts?.It is not neccessary to use all the tables.
SELECT AVG(goals_against) FROM table_name_55 WHERE played > 42
CREATE TABLE INST, Here is a database schema( table schema);
What is the average goals against when there are more than 42 played?It is not neccessary to use all the tables.
SELECT title FROM table_23114705_3 WHERE no_in_season = 13
CREATE TABLE INST, Here is a database schema( table schema);
What is the name of the episode where the season number is 13?It is not neccessary to use all the tables.
SELECT MAX(overall_pick__number) FROM table_12165135_1 WHERE afl_team = "New York Jets"
CREATE TABLE INST, Here is a database schema( table schema);
What is the largest pick number of the new york jets?It is not neccessary to use all the tables.
SELECT COUNT(location_attendance) FROM table_23286158_10 WHERE high_assists = "Brandon Roy (6)" AND game = 78
CREATE TABLE INST, Here is a database schema( table schema);
When 78 is the game and brandon roy (6) has the highest amount of assists how many locations/attendances are there?It is not neccessary to use all the tables.
SELECT Serial numbers FROM table WHERE Year made = 1930
CREATE TABLE INST, Here is a database schema( table schema);
What is the serial number of the model made in 1930?.It is not neccessary to use all the tables.
SELECT Mountains classification FROM table WHERE Points classification = not awarded
CREATE TABLE INST, Here is a database schema( table schema);
Which Mountains classification has Points classification of not awarded?.It is not neccessary to use all the tables.
SELECT COUNT(number_of_households) FROM table_1840495_2 WHERE per_capita_income = "$30,298"
CREATE TABLE INST, Here is a database schema( table schema);
With a per capita income of $30298 what was the total number of households?It is not neccessary to use all the tables.
SELECT Fname, COUNT(Fname) FROM Student WHERE NOT StuID IN (SELECT T1.StuID FROM Has_Allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy WHERE T2.AllergyType = "food") GROUP BY Fname ORDER BY Fname DESC
CREATE TABLE INST, Here is a database schema( table schema);
List the first name of the students who do not have any food type allergy and count them in a bar chart, I want to show X-axis in descending order.It is not neccessary to use all the tables.
SELECT pts FROM table_14139408_1 WHERE position = "NC"
CREATE TABLE INST, Here is a database schema( table schema);
what's the pts with position being ncIt is not neccessary to use all the tables.
SELECT NHL team FROM table WHERE Player = Stan Weir
CREATE TABLE INST, Here is a database schema( table schema);
What nhl team does stan weir play for?.It is not neccessary to use all the tables.
SELECT score FROM table_name_23 WHERE opponent = "vancouver canucks"
CREATE TABLE INST, Here is a database schema( table schema);
What is the score for the opponent Vancouver Canucks?It is not neccessary to use all the tables.
SELECT height__f_ FROM table_23670057_6 WHERE year_born = 1989 AND height__m_ = "2.11"
CREATE TABLE INST, Here is a database schema( table schema);
Name the height for the player born 1989 and height 2.11It is not neccessary to use all the tables.
SELECT COUNT(record) FROM table_11964154_7 WHERE score = "L 96–123 (OT)"
CREATE TABLE INST, Here is a database schema( table schema);
How many times was the final score l 96–123 (ot)?It is not neccessary to use all the tables.
SELECT Number FROM table WHERE Inning = 8th AND Length = 410'
CREATE TABLE INST, Here is a database schema( table schema);
What number home run was in the 8th inning and went 410'?.It is not neccessary to use all the tables.
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE program_course.category LIKE '%ULCS%' AND semester.semester = 'FA' AND semester.year = 2016
CREATE TABLE INST, Here is a database schema( table schema);
Which upper level CS courses are offered next semester ?It is not neccessary to use all the tables.
SELECT round FROM table_name_63 WHERE opponent = "dustin hazelett"
CREATE TABLE INST, Here is a database schema( table schema);
In which round was Dustin Hazelett the opponent?It is not neccessary to use all the tables.
SELECT Date FROM table WHERE Score = 102–113
CREATE TABLE INST, Here is a database schema( table schema);
Which Date has a Score of 102–113?.It is not neccessary to use all the tables.
SELECT Stage FROM table WHERE Winner = charly mottet
CREATE TABLE INST, Here is a database schema( table schema);
what is the stage when the winner is charly mottet?.It is not neccessary to use all the tables.
SELECT Circuit FROM table WHERE Date = October 4
CREATE TABLE INST, Here is a database schema( table schema);
Which circuits had a race on October 4?.It is not neccessary to use all the tables.
SELECT COUNT Bronze FROM table WHERE Silver > 0 AND Total > 20 AND Gold < 26
CREATE TABLE INST, Here is a database schema( table schema);
How many bronzes for the nation with over 20 total, under 26 golds, and over 0 silvers?.It is not neccessary to use all the tables.
SELECT Competition FROM table WHERE Club = costa rica u-20
CREATE TABLE INST, Here is a database schema( table schema);
What is the Competition when the Club was costa rica u-20?.It is not neccessary to use all the tables.
SELECT Player FROM table WHERE Country = united states AND Place = t6 AND Score = 67-69=136
CREATE TABLE INST, Here is a database schema( table schema);
What player placed t6 for the United States with a score of 67-69=136?.It is not neccessary to use all the tables.
SELECT MIN Malaysia Cup FROM table WHERE Player = zamri hassan AND FA Cup < 0
CREATE TABLE INST, Here is a database schema( table schema);
What is Zamri Hassan's lowest Malaysia Cup when there were an FA Cup of 0?.It is not neccessary to use all the tables.
SELECT MIN(Vote_Percent), MAX(Vote_Percent) FROM election
CREATE TABLE INST, Here is a database schema( table schema);
What are the minimum and maximum vote percents of elections?It is not neccessary to use all the tables.
SELECT hometown FROM table_name_33 WHERE college = "usc"
CREATE TABLE INST, Here is a database schema( table schema);
What is the hometown of the player who went to college at USC?It is not neccessary to use all the tables.
SELECT MIN(lane) FROM table_name_64 WHERE rank = 6
CREATE TABLE INST, Here is a database schema( table schema);
What is the smallest lane for rank 6?It is not neccessary to use all the tables.
SELECT COUNT(nationality) FROM table_14407512_23 WHERE name = "Tom Hilde"
CREATE TABLE INST, Here is a database schema( table schema);
Name the number of nationality is tom hildeIt is not neccessary to use all the tables.