sql
stringlengths
9
2.37k
table
stringclasses
9 values
query
stringlengths
51
503
SELECT cb_cw FROM table_name_89 WHERE year = 1982
CREATE TABLE INST, Here is a database schema( table schema);
What was the CB CW for the year of 1982?It is not neccessary to use all the tables.
SELECT Release format FROM table WHERE Release date > 1983
CREATE TABLE INST, Here is a database schema( table schema);
What is the release format for titles after 1983?.It is not neccessary to use all the tables.
SELECT Liberal FROM table WHERE New Democratic = 36% AND Dates = august 2008
CREATE TABLE INST, Here is a database schema( table schema);
What percentage of people polled aligned with the Liberal party according to the August 2008 poll that reported 36% aligning with New Democratic party?.It is not neccessary to use all the tables.
SELECT AVG Fatalities FROM table WHERE Epicenter = damghan
CREATE TABLE INST, Here is a database schema( table schema);
What is the average number of deaths for earthquakes centered in Damghan?.It is not neccessary to use all the tables.
SELECT title FROM table_11630008_8 WHERE production_code = 624
CREATE TABLE INST, Here is a database schema( table schema);
What is the title of the episode with the production code 624?It is not neccessary to use all the tables.
SELECT t1.drug FROM (SELECT prescriptions.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM prescriptions WHERE STRFTIME('%y', prescriptions.startdate) = '2101' GROUP BY prescriptions.drug) AS t1 WHERE t1.c1 <= 3
CREATE TABLE INST, Here is a database schema( table schema);
what are the top three drug most frequently prescribed in 2101?It is not neccessary to use all the tables.
SELECT Listed FROM table WHERE Construction completed = 08/10/2007
CREATE TABLE INST, Here is a database schema( table schema);
What construction completed on 08/10/2007?.It is not neccessary to use all the tables.
SELECT Partner FROM table WHERE Date = 1979 AND Opponents in the final = heinz günthardt bob hewitt
CREATE TABLE INST, Here is a database schema( table schema);
Name the Partner which is in 1979, and Opponents in the final of heinz günthardt bob hewitt?.It is not neccessary to use all the tables.
SELECT AVG(top_5) FROM table_name_3 WHERE top_10 = 5 AND cuts_made < 12
CREATE TABLE INST, Here is a database schema( table schema);
What is the average number of top-5s for the major with 5 top-10s and fewer than 12 cuts made?It is not neccessary to use all the tables.
SELECT date FROM table_name_56 WHERE away_team = "mansfield town"
CREATE TABLE INST, Here is a database schema( table schema);
What date did the away team Mansfield Town play?It is not neccessary to use all the tables.
SELECT COUNT No. in season FROM table WHERE U.S. viewers (millions) = 13.54
CREATE TABLE INST, Here is a database schema( table schema);
How many season numbers are there for the episode seen by 13.54 million people in the US?.It is not neccessary to use all the tables.
SELECT Score FROM table WHERE Date = October 29
CREATE TABLE INST, Here is a database schema( table schema);
What was the score on October 29?.It is not neccessary to use all the tables.
SELECT MAX(ratio) FROM table_name_85 WHERE ordinary_value = "84 zolotnik"
CREATE TABLE INST, Here is a database schema( table schema);
What is the largest ration with an ordinary value of 84 zolotnik?It is not neccessary to use all the tables.
SELECT COUNT(founded) FROM table_26218124_1 WHERE city = "Belo Horizonte"
CREATE TABLE INST, Here is a database schema( table schema);
How many clubs were founded in belo horizonte?It is not neccessary to use all the tables.
SELECT Avg. Start FROM table WHERE Avg. Finish = 18.3
CREATE TABLE INST, Here is a database schema( table schema);
Name the avg start for avg finish of 18.3.It is not neccessary to use all the tables.
SELECT opponent FROM table_17120964_5 WHERE date = "4th"
CREATE TABLE INST, Here is a database schema( table schema);
Name the opponent for 4thIt is not neccessary to use all the tables.
SELECT renewable_electricity_w_o_hydro__gw•h_ FROM table_25244412_1 WHERE _percentage_renewable = "83.4"
CREATE TABLE INST, Here is a database schema( table schema);
What is the amount of renewable electricity without hydrogen power when the percentage of renewable energy is 83.4?It is not neccessary to use all the tables.
SELECT venue FROM table_name_5 WHERE date = "13/02/1954"
CREATE TABLE INST, Here is a database schema( table schema);
What was the venue for the game played on 13/02/1954?It is not neccessary to use all the tables.
SELECT points FROM table_name_37 WHERE entrant = "bob gerard racing" AND year = 1965
CREATE TABLE INST, Here is a database schema( table schema);
How many points did Bob Gerard Racing have in 1965?It is not neccessary to use all the tables.
SELECT Meet FROM table WHERE Time = 1:04.84
CREATE TABLE INST, Here is a database schema( table schema);
What Meet has a Time of 1:04.84?.It is not neccessary to use all the tables.
SELECT MAX(points) FROM table_23391714_1 WHERE pos = 18
CREATE TABLE INST, Here is a database schema( table schema);
When the pos equals 18 what is the max amount of points?It is not neccessary to use all the tables.
SELECT Result FROM table WHERE Week = 1
CREATE TABLE INST, Here is a database schema( table schema);
What is the result of the week 1 game?.It is not neccessary to use all the tables.
SELECT director_s_ FROM table_name_53 WHERE rank = "nominated" AND film = "badmouth"
CREATE TABLE INST, Here is a database schema( table schema);
Who directed the nominated film Badmouth?It is not neccessary to use all the tables.
SELECT District FROM table WHERE Incumbent = Paul B. Dague
CREATE TABLE INST, Here is a database schema( table schema);
Which district had Paul B. Dague as the incumbent?.It is not neccessary to use all the tables.
SELECT MAX ERP W FROM table WHERE Call sign = w262ac
CREATE TABLE INST, Here is a database schema( table schema);
What is listed as the highest ERP W with a Call sign of W262AC?.It is not neccessary to use all the tables.
SELECT college FROM table_name_6 WHERE round < 7 AND overall < 186 AND pick = 13
CREATE TABLE INST, Here is a database schema( table schema);
Which college had a pick in a round under 7 with a pick number 13 and overall was under 186?It is not neccessary to use all the tables.
SELECT partnering FROM table_22825058_23 WHERE round = "SF"
CREATE TABLE INST, Here is a database schema( table schema);
Name the partnering for round sfIt is not neccessary to use all the tables.
SELECT custody_level_s_ FROM table_25346763_1 WHERE location = "Shelton"
CREATE TABLE INST, Here is a database schema( table schema);
What is the custody level of the facility in Shelton?It is not neccessary to use all the tables.
SELECT Super G FROM table WHERE Overall = 16
CREATE TABLE INST, Here is a database schema( table schema);
What is the Super G value for the season that has an Overall score of 16?.It is not neccessary to use all the tables.
SELECT wheel_arrangement FROM table_name_95 WHERE number = "6 or 4"
CREATE TABLE INST, Here is a database schema( table schema);
What is the wheel arrangement of the locomotive with number 6 or 4?It is not neccessary to use all the tables.
SELECT COUNT(*) FROM PostHistory AS po INNER JOIN PostHistory AS pe ON po.PostId = pe.PostId WHERE po.PostHistoryTypeId = 3 AND pe.PostHistoryTypeId = 6 AND po.Text LIKE '%<access>%' AND NOT pe.Text LIKE '%<access%>' AND pe.CreationDate > '2018-05-01' AND pe.CreationDate < '2018-06-01' AND pe.UserId = '##UserId##'
CREATE TABLE INST, Here is a database schema( table schema);
How many access tag removals have I done?.It is not neccessary to use all the tables.
SELECT directed_by FROM table_14637853_3 WHERE original_air_date = "November18,1995"
CREATE TABLE INST, Here is a database schema( table schema);
who directed with original air date being november181995It is not neccessary to use all the tables.
SELECT AVG(total) FROM table_name_14 WHERE year_s__won = "1982"
CREATE TABLE INST, Here is a database schema( table schema);
WHAT IS THE TOTAL THAT HAS A WIN IN 1982?It is not neccessary to use all the tables.
SELECT MIN Copa del Rey FROM table
CREATE TABLE INST, Here is a database schema( table schema);
Name the least copa del rey.It is not neccessary to use all the tables.
SELECT billing_country, COUNT(*) FROM invoices GROUP BY billing_country ORDER BY COUNT(*) DESC LIMIT 5
CREATE TABLE INST, Here is a database schema( table schema);
A list of the top 5 countries by number of invoices. List country name and number of invoices.It is not neccessary to use all the tables.
SELECT IHSAA Class FROM table WHERE School = international
CREATE TABLE INST, Here is a database schema( table schema);
What is the ISHAA class for the International School?.It is not neccessary to use all the tables.
SELECT Hanja FROM table WHERE RR Romaja = hamgyeong
CREATE TABLE INST, Here is a database schema( table schema);
What is the Hanja for the hamgyeong RR Romaja?.It is not neccessary to use all the tables.
SELECT Away team FROM table WHERE Home team = Carlton
CREATE TABLE INST, Here is a database schema( table schema);
Who was the away team playing at Carlton?.It is not neccessary to use all the tables.
SELECT MAX(draws) FROM table_name_56 WHERE wins < 20 AND points < 41 AND goals_for < 27
CREATE TABLE INST, Here is a database schema( table schema);
What is the highest number of draws a club with less than 20 wins less than 41 points and less than 27 goals have?It is not neccessary to use all the tables.
SELECT save FROM table_28001186_8 WHERE loss = "Duke (3-2)"
CREATE TABLE INST, Here is a database schema( table schema);
Who had the save in the game in which Duke (3-2) took the loss?It is not neccessary to use all the tables.
SELECT MAX("Elevation (m)") FROM table_14241 WHERE "Col (m)" > '0' AND "Peak" = 'bon irau' AND "Prominence (m)" < '1,900'
CREATE TABLE INST, Here is a database schema( table schema);
What is the highest elevation in m of the bon irau peak, which has a col greater than 0 m and a prominence less than 1,900 m?It is not neccessary to use all the tables.
SELECT Nominee(s) FROM table WHERE Year = 2005
CREATE TABLE INST, Here is a database schema( table schema);
Who was the nominee for 2005?.It is not neccessary to use all the tables.
SELECT Competition FROM table WHERE Lost = 1 AND Drew = 3 AND Played = 9
CREATE TABLE INST, Here is a database schema( table schema);
What competition did they have 1 lost, 3 draws, and played 9 games?.It is not neccessary to use all the tables.
SELECT "film" FROM table_204_723 WHERE id = (SELECT id FROM table_204_723 WHERE "film" = 'love 86') + 1
CREATE TABLE INST, Here is a database schema( table schema);
which other 1986 film came after love 86 ?It is not neccessary to use all the tables.
SELECT voges_proskauer FROM table_name_70 WHERE species = "proteus mirabilis"
CREATE TABLE INST, Here is a database schema( table schema);
What is the Voges-Proskauer reading for proteus mirabilis?It is not neccessary to use all the tables.
SELECT t2.visitor_id, t1.name, t1.Level_of_membership FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id GROUP BY t2.visitor_id ORDER BY SUM(t2.Total_spent) DESC LIMIT 1
CREATE TABLE INST, Here is a database schema( table schema);
What are the id name and membership level of visitors who have spent the largest amount of money in total in all museum tickets?It is not neccessary to use all the tables.
SELECT Tournament FROM table WHERE 2009 = w
CREATE TABLE INST, Here is a database schema( table schema);
Which tournament had the result of a W in 2009?.It is not neccessary to use all the tables.
SELECT Location FROM table WHERE Res. = win AND Event = superbrawl 16
CREATE TABLE INST, Here is a database schema( table schema);
In which location did he win the Superbrawl 16 event?.It is not neccessary to use all the tables.
SELECT constellation FROM table_1820752_1 WHERE spectral_type = "G1V"
CREATE TABLE INST, Here is a database schema( table schema);
If the spectral type is g1v what is the constellation?It is not neccessary to use all the tables.
SELECT first_name, middle_name, last_name FROM Staff
CREATE TABLE INST, Here is a database schema( table schema);
List the first name middle name and last name of all staff.It is not neccessary to use all the tables.
SELECT "Teams" FROM table_70483 WHERE "Third (points)" = 'season cancelled'
CREATE TABLE INST, Here is a database schema( table schema);
Name the teams for third points of season cancelledIt is not neccessary to use all the tables.
SELECT SUM Built FROM table WHERE Class = dnv AND Type = panamax AND Vessel Name = deva
CREATE TABLE INST, Here is a database schema( table schema);
Which year was the vessel Deva built as a Panamax DNV class ship?.It is not neccessary to use all the tables.
SELECT COUNT(season) FROM table_name_34 WHERE location = "aspen, usa"
CREATE TABLE INST, Here is a database schema( table schema);
How many seasons took place in aspen usa?It is not neccessary to use all the tables.
SELECT Television network FROM table WHERE Television channel = Astro Pelangi & Astro Bintang
CREATE TABLE INST, Here is a database schema( table schema);
What is the television network with the television channel of Astro Pelangi & Astro Bintang?.It is not neccessary to use all the tables.
SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY SUM(MANAGER_ID)
CREATE TABLE INST, Here is a database schema( table schema);
For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of hire_date and the sum of manager_id bin hire_date by time, show by the Y-axis from low to high.It is not neccessary to use all the tables.
SELECT MAX(grid) FROM table_name_94 WHERE laps = 38
CREATE TABLE INST, Here is a database schema( table schema);
I want the highest grid for Laps of 38It is not neccessary to use all the tables.
SELECT question.Id AS "post_link", answers.CreationDate, answers.Id AS "post_link", answers.OwnerUserId AS "user_link", cr.Name FROM Posts AS answers INNER JOIN Posts AS question ON question.Id = answers.ParentId INNER JOIN PostHistory AS ph ON ph.PostId = question.Id INNER JOIN CloseReasonTypes AS cr ON cr.Id = ph.Com...
CREATE TABLE INST, Here is a database schema( table schema);
Get answered to duplicate questions by UserID.It is not neccessary to use all the tables.
SELECT to_par FROM table_name_20 WHERE score = 72 - 67 - 68 - 71 = 278
CREATE TABLE INST, Here is a database schema( table schema);
What is the To par when the score was 72-67-68-71=278?It is not neccessary to use all the tables.
SELECT Recorded FROM table WHERE Track > 2 AND Translation = the last meal
CREATE TABLE INST, Here is a database schema( table schema);
Which recording has a Track larger than 2, and a Translation of the last meal?.It is not neccessary to use all the tables.
SELECT nationality FROM table_name_77 WHERE position = "g"
CREATE TABLE INST, Here is a database schema( table schema);
What was the nationality of the players with a position of g?It is not neccessary to use all the tables.
SELECT Player FROM table WHERE Position = middle blocker AND Nationality = turkey AND Shirt No = 8
CREATE TABLE INST, Here is a database schema( table schema);
What player that has a position of middle blocker, a Nationality of Turkey, and shirt no is 8?.It is not neccessary to use all the tables.
SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName JOIN player AS T3 ON T2.pID = T3.pID WHERE T3.pName = 'Charles'
CREATE TABLE INST, Here is a database schema( table schema);
Find the state of the college which player Charles is attending.It is not neccessary to use all the tables.
SELECT Season FROM table WHERE Result = 6–9
CREATE TABLE INST, Here is a database schema( table schema);
Which season has a Result of 6–9?.It is not neccessary to use all the tables.
SELECT title FROM table_14847258_1 WHERE us_viewers__millions_ = "15.03"
CREATE TABLE INST, Here is a database schema( table schema);
15.03 million u.s viewers seen what episode?It is not neccessary to use all the tables.
SELECT MIN(winning__percentage) FROM table_name_95 WHERE lost > 23 AND goals_for > 386
CREATE TABLE INST, Here is a database schema( table schema);
What is the lowest win percentage for teams with more than 23 losses and more than 386 goals for?It is not neccessary to use all the tables.
SELECT MAX First elected FROM table
CREATE TABLE INST, Here is a database schema( table schema);
What's the first elected year of the district who's been the last one to do so?.It is not neccessary to use all the tables.
SELECT year FROM table_name_63 WHERE nominee = "mary elizabeth mastrantonio"
CREATE TABLE INST, Here is a database schema( table schema);
What year was Mary Elizabeth Mastrantonio nominated?It is not neccessary to use all the tables.
SELECT Length FROM table WHERE Winning Driver = Roger McCluskey
CREATE TABLE INST, Here is a database schema( table schema);
What length was won by Roger McCluskey?.It is not neccessary to use all the tables.
SELECT COUNT Report FROM table WHERE Winning team = Forsythe Racing AND Pole Position = Teo Fabi
CREATE TABLE INST, Here is a database schema( table schema);
How many reports are there in the race that Forsythe Racing won and Teo Fabi had the pole position in?.It is not neccessary to use all the tables.
SELECT Week 2 FROM table WHERE Week 4 = terri lynn farrow
CREATE TABLE INST, Here is a database schema( table schema);
Who was the girl of the week 2 weeks before terri lynn farrow in the same month?.It is not neccessary to use all the tables.
SELECT player FROM table_11677691_12 WHERE school = "Mission Viejo High school"
CREATE TABLE INST, Here is a database schema( table schema);
who are all the players for mission viejo high schoolIt is not neccessary to use all the tables.
SELECT COUNT(rank) FROM table_name_12 WHERE nationality = "canada" AND time = "dns"
CREATE TABLE INST, Here is a database schema( table schema);
How many ranks have a ationality of canada and a Time of dns?It is not neccessary to use all the tables.
SELECT Score FROM table WHERE Place = t1
CREATE TABLE INST, Here is a database schema( table schema);
What is Score, when Place is "T1"?.It is not neccessary to use all the tables.
SELECT MIN Round FROM table WHERE Event = total combat 15
CREATE TABLE INST, Here is a database schema( table schema);
Tell me the lowest round for total combat 15.It is not neccessary to use all the tables.
SELECT title FROM table_12451376_2 WHERE season_2_ep__number = 1
CREATE TABLE INST, Here is a database schema( table schema);
Please give me the title of Season 2 episode 1.It is not neccessary to use all the tables.
SELECT Package_Option FROM TV_Channel WHERE series_name = "Sky Radio"
CREATE TABLE INST, Here is a database schema( table schema);
What is the Package Option of TV Channel with serial name "Sky Radio"?It is not neccessary to use all the tables.
SELECT MIN Races FROM table WHERE Position = 14th
CREATE TABLE INST, Here is a database schema( table schema);
What was the number of races in the season in which the team placed on the 14th position?.It is not neccessary to use all the tables.
SELECT time_retired FROM table_name_93 WHERE constructor = "toyota" AND grid = 5
CREATE TABLE INST, Here is a database schema( table schema);
What is the time/retired with a toyota constructor and a 5 grid?It is not neccessary to use all the tables.
SELECT "Premiere" FROM table_174 WHERE "Host" = 'Lieke van Lexmond Dennis Weening'
CREATE TABLE INST, Here is a database schema( table schema);
What is the premiere where the host is lieke van lexmond dennis weening?It is not neccessary to use all the tables.
SELECT date_of_issue FROM table_name_46 WHERE design = "katalin kovats"
CREATE TABLE INST, Here is a database schema( table schema);
What's the Date of Issue for Design of Katalin Kovats?It is not neccessary to use all the tables.
SELECT MIN Yards FROM table WHERE Carries < 23 AND Team = at chi AND Average < 8.5
CREATE TABLE INST, Here is a database schema( table schema);
Which Yards have Carries smaller than 23, and a Team of at chi, and an Average smaller than 8.5?.It 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 demographic.admission_type = "ELECTIVE" AND prescriptions.drug = "Fluconazole"
CREATE TABLE INST, Here is a database schema( table schema);
Tell me the number of elective hospital admission patients who have a prescription for fluconazole.It is not neccessary to use all the tables.
SELECT "Entrant" FROM table_66902 WHERE "Engine" = 'ferrari v8' AND "Points" < '4'
CREATE TABLE INST, Here is a database schema( table schema);
what is the entrant for the ferrari v8 with points less than 4?It is not neccessary to use all the tables.
SELECT February FROM table
CREATE TABLE INST, Here is a database schema( table schema);
Name all of the february.It is not neccessary to use all the tables.
SELECT School FROM table WHERE Position = Catcher
CREATE TABLE INST, Here is a database schema( table schema);
The catcher went to what school? .It is not neccessary to use all the tables.
SELECT Ensemble name FROM table WHERE Advertisement date = october 2007
CREATE TABLE INST, Here is a database schema( table schema);
Which Ensemble Name has the Advertisement date October 2007?.It is not neccessary to use all the tables.
SELECT losing_bp FROM table_name_14 WHERE drawn = "1" AND try_bp = "6"
CREATE TABLE INST, Here is a database schema( table schema);
Name the Losing BP with drawn of 1 and a Try BP of 6.It is not neccessary to use all the tables.
SELECT government FROM table_name_56 WHERE seats = 57
CREATE TABLE INST, Here is a database schema( table schema);
Which Government has 57 seats?It is not neccessary to use all the tables.
SELECT total_attendance FROM table_name_80 WHERE average_attendance < 4850 AND sport = "rink hockey"
CREATE TABLE INST, Here is a database schema( table schema);
What's the total attendance in rink hockey when the average attendance was smaller than 4850?It is not neccessary to use all the tables.
SELECT MAX B Score FROM table WHERE A Score < 6.5
CREATE TABLE INST, Here is a database schema( table schema);
What is the greatest B score when the A score was less than 6.5?.It is not neccessary to use all the tables.
SELECT Laps Led FROM table WHERE Grid = 15
CREATE TABLE INST, Here is a database schema( table schema);
How many laps led when the Grid was 15?.It is not neccessary to use all the tables.
SELECT Location FROM table WHERE Episode = 12th Pride of Britain Awards
CREATE TABLE INST, Here is a database schema( table schema);
Where was held the ceremony for the 12th Pride of Britain Awards?.It is not neccessary to use all the tables.
SELECT IHSAA Class Football FROM table WHERE Mascot = panthers
CREATE TABLE INST, Here is a database schema( table schema);
What's the IHSAA Class Football if the panthers are the mascot?.It is not neccessary to use all the tables.
SELECT race_1 FROM table_15530244_5 WHERE race_3 = "8"
CREATE TABLE INST, Here is a database schema( table schema);
Name the race 1 when race 3 is 8It is not neccessary to use all the tables.
SELECT MIN(lost) FROM table_name_46 WHERE team = "são paulo railway" AND points > 21
CREATE TABLE INST, Here is a database schema( table schema);
What is the lowest Lost for são paulo railway Points more than 21?It is not neccessary to use all the tables.
SELECT ordered FROM table_name_87 WHERE name = "helena"
CREATE TABLE INST, Here is a database schema( table schema);
What ordered has helena as the name?It is not neccessary to use all the tables.
SELECT "To par" FROM table_60213 WHERE "Place" = 't8' AND "Country" = 'argentina'
CREATE TABLE INST, Here is a database schema( table schema);
What is the to par of the player from Argentina with a t8 place?It is not neccessary to use all the tables.
SELECT Time FROM table WHERE Name = sara nordenstam
CREATE TABLE INST, Here is a database schema( table schema);
What time did Sara Nordenstam get?.It is not neccessary to use all the tables.
SELECT Record FROM table WHERE Date = april 9, 2008
CREATE TABLE INST, Here is a database schema( table schema);
What was the record for the game on April 9, 2008?.It is not neccessary to use all the tables.
SELECT time_retired FROM table_name_95 WHERE grid < 3 AND laps = 45
CREATE TABLE INST, Here is a database schema( table schema);
what is the time/retired when the grid is less than 3 and 45 laps?It is not neccessary to use all the tables.