sentence
stringlengths
3
347
sql
stringlengths
18
804
What is the Away team when the match score was norths 19 manly 4?
SELECT away_team FROM table_name_54 WHERE match_score = "norths 19 manly 4"
What was the date when the away team was carlisle united?
SELECT date FROM table_name_50 WHERE away_team = "carlisle united"
What is each customer's move in date, and the corresponding customer id and details?
SELECT T2.date_moved_in , T1.customer_id , T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id
What are the names and years of the movies that has the top 3 highest rating star?
SELECT T2.title , T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID ORDER BY T1.stars DESC LIMIT 3
On what day did Dirk Nowitzki (14) have a high rebound?
SELECT date FROM table_17288869_7 WHERE high_rebounds = "Dirk Nowitzki (14)"
Count the image numbers that contain the "paint" object.
SELECT COUNT(DISTINCT T1.IMG_ID) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'paint'
What is United States total in the year(s) won of 2000 , 2005 , 2006?
SELECT MIN(total) FROM table_name_1 WHERE country = "united states" AND year_s__won = "2000 , 2005 , 2006"
For teams that played 5 games, what was the smallest number of wins?
SELECT MIN(win) FROM table_14288212_1 WHERE played = 5
Find the number of female students (with F sex) living in Smith Hall
SELECT count(*) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall' AND T1.sex = 'F'
Please provide the id of the respository that the most people like.
SELECT Id FROM Repo WHERE Stars = ( SELECT MAX(Stars) FROM Repo )
What is the name of the most recent movie?
SELECT title FROM Movie WHERE YEAR = (SELECT max(YEAR) FROM Movie)
What are the lot details of lots associated with transactions whose share count is bigger than 100 and whose type code is "PUR"?
SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id = T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id = T3.transaction_id WHERE T3.share_count > 100 AND T3.transaction_type_code = "PUR"
Who attended the school in 2006, that Whitney Powell attended in 2007?
SELECT 2006 FROM table_name_32 WHERE 2007 = "whitney powell"
Who is the h.h. principal with Jim Haught as h.s. principal, Charlie Taylor as maplemere principal, and Rich Auerbach as w.r. principal?
SELECT hh_principal FROM table_name_55 WHERE hs_principal = "jim haught" AND maplemere_principal = "charlie taylor" AND wr_principal = "rich auerbach"
How many in the year 2000?
SELECT count ( * ) FROM salary AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year = 2000
What was the name of the Competition in Rome, Italy?
SELECT competition FROM table_name_46 WHERE venue = "rome, italy"
Which legislator has the YouTube channel 'RoskamIL06?' Write the official full name.
SELECT T1.official_full_name FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T2.youtube = 'RoskamIL06'
what is the name of the player that played position 3b?
SELECT name FROM table_name_54 WHERE position = "3b"
What is the salary range for sales representative in Northwind?
SELECT ( SELECT MIN(Salary) FROM Employees WHERE Title = 'Sales Representative' ) AS MIN , ( SELECT MAX(Salary) FROM Employees WHERE Title = 'Sales Representative' ) AS MAX
Show all role codes with at least 3 employees.
SELECT role_code FROM Employees GROUP BY role_code HAVING count(*) >= 3
What is the street address of the building with 5 floors?
SELECT street_address FROM table_name_9 WHERE floors = "5"
What's the location when the opponent was Lyoto Machida?
SELECT location FROM table_name_15 WHERE opponent = "lyoto machida"
What is the total attendance for Detroit on hasek?
SELECT COUNT(attendance) FROM table_name_50 WHERE home = "detroit" AND decision = "hasek"
Name the most fa cup apps for league apps being 27
SELECT MAX(fa_cup_apps) FROM table_2979789_1 WHERE league_apps = 27
What is the name of the DVD where the number of discs is greater than 2.0
SELECT dvd_name FROM table_1180228_1 WHERE num_of_discs > 2.0
Calculate the percentage of businesses who located in Mesa. What is attribute value of these businesses.
SELECT CAST(COUNT(T1.city) AS REAL) * 100 / ( SELECT COUNT(business_id) FROM Business ), T2.attribute_value FROM Business AS T1 INNER JOIN Business_Attributes AS T2 ON T1.business_id = T2.business_id WHERE T1.city = 'Mesa'
How many shows were launched on CBS (2002)?
SELECT COUNT(launched) FROM table_28803803_1 WHERE original_channel = "CBS (2002)"
Show the names of people, and dates and venues of debates they are on the negative side, ordered in ascending alphabetical order of name.
SELECT T3.Name , T2.Date , T2.Venue FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Negative = T3.People_ID ORDER BY T3.Name ASC
List the name of playlist which has number of tracks greater than 100.
SELECT T2.name FROM playlist_tracks AS T1 JOIN playlists AS T2 ON T2.id = T1.playlist_id GROUP BY T1.playlist_id HAVING count(T1.track_id) > 100;
What stadium was the Fiesta Bowl played at?
SELECT stadium FROM table_name_74 WHERE bowl_game = "fiesta bowl"
Find the name and address of the department that has the highest number of students.
SELECT T2.dept_name, T2.dept_address FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY COUNT(*) DESC LIMIT 1
How many counties have people before profit as the party, and a borough greater than 0?
SELECT SUM(county) FROM table_name_16 WHERE party = "people before profit" AND borough > 0
What are the names of projects that have taken longer than the average number of hours for all projects?
SELECT name FROM projects WHERE hours > (SELECT avg(hours) FROM projects)
Name the 2012 when 2011 is qf
SELECT 2012 FROM table_name_97 WHERE 2011 = "qf"
How many music festivals have had each kind of result, ordered descending by count?
SELECT RESULT , COUNT(*) FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC
What year was Jerry Huckaby first elected?
SELECT first_elected FROM table_1341663_19 WHERE incumbent = "Jerry Huckaby"
Which institution type has the smallest number of institutions?
SELECT TYPE FROM institution GROUP BY TYPE ORDER BY count ( * ) ASC LIMIT 1
Find the total number of king beds available.
SELECT sum(beds) FROM Rooms WHERE bedtype = 'King';
Show all the locations with at least two cinemas with capacity above 300.
SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING count(*) >= 2
Thank you! Can you now tell me the all the headquarters of a company in Oil and gas?
SELECT headquarters FROM company WHERE main_industry = 'Oil and gas'
Who is/are the Composer(s), when the Arranger(s) is Banana Boat, and when the Length is 4:25?
SELECT composer_s_ FROM table_name_44 WHERE arranger_s_ = "banana boat" AND length = "4:25"
What is the gender for Otama?
SELECT gender FROM table_name_23 WHERE area = "otama"
What was the Zakspeed 1500/4 1.5 l4 t chassis?
SELECT chassis FROM table_name_42 WHERE engine = "zakspeed 1500/4 1.5 l4 t"
Which territory does Ms. Laura Callahan's direct supervisor work in? Give the name of the territory.
SELECT T3.TerritoryDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T1.EmployeeID = ( SELECT ReportsTo FROM Employees WHERE TitleOfCourtesy = 'Ms.' AND FirstName = 'Laura' AND LastName = 'Callahan' )
When did the city of Novi Sad participate?
SELECT date FROM table_name_14 WHERE city = "novi sad"
What are the names of the photographers who used those lenses?
SELECT T1.name FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id WHERE T1.country ! = 'Ethiopia'
What was the highest week with a w 21-17 result, and more than 45,254 in attendance?
SELECT MAX(week) FROM table_name_81 WHERE result = "w 21-17" AND attendance > 45 OFFSET 254
Name the title of the episode that received the highest star score and the highest number of votes.
SELECT T1.title FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id ORDER BY T2.stars DESC, T2.votes DESC LIMIT 1;
In which ceremony was Harnam Singh Rawail nominated for an award?
SELECT ceremony FROM table_name_80 WHERE nominee = "harnam singh rawail"
How many complaints were served in 5 minutes or less by DORIT and responded to the customer with an explanation, were made by phone?
SELECT COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE T1.ser_time < '00:05:00' AND T1.server = 'DORIT' AND T2.`Submitted via` = 'Phone' AND T2.`Company response to consumer` = 'Closed with explanation'
How many production codes are there for episode 10 in the season?
SELECT COUNT(production_code) FROM table_24425976_2 WHERE season = "10"
What venue featured essendon as home team?
SELECT venue FROM table_name_25 WHERE home_team = "essendon"
What is the nationality of the journalist with the largest number of years working?
SELECT Nationality FROM journalist ORDER BY Years_working DESC LIMIT 1
what is the bathroom count and bedroom count of the apartment number suite 645?
SELECT bathroom_count, bedroom_count FROM Apartments where apt_number = "Suite 645"
Which Score-Final has a Rank-Final of 2, and a Year smaller than 2008?
SELECT SUM(score_final) FROM table_name_42 WHERE rank_final = 2 AND year < 2008
In which venue did Kochi Tuskers Kerala play most of their matches?
SELECT T1.Venue_Name FROM Venue AS T1 INNER JOIN Match AS T2 ON T1.Venue_Id = T2.Venue_Id INNER JOIN Team AS T3 ON T2.Team_1 = T3.Team_Id WHERE T3.Team_Name = 'Kochi Tuskers Kerala' GROUP BY T1.Venue_Name
Find the name and college of students whose decisions are yes in the tryout.
SELECT T1.pName , T2.cName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'yes'
Which team was in 1951?
SELECT team FROM table_name_40 WHERE year = 1951
How many bookings are there?
SELECT count ( * ) FROM BOOKINGS
Show all school names in alphabetical order.
SELECT school_name FROM school ORDER BY school_name
What was the manner of departure for the team whose incoming manager was George Burley?
SELECT manner_of_departure FROM table_26593762_3 WHERE incoming_manager = "George Burley"
How many male (sex is M) students have class senator votes in the fall election cycle?
SELECT count(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = Class_Senator_Vote WHERE T1.Sex = "M" AND T2.Election_Cycle = "Fall"
What is the away team at glenferrie oval?
SELECT away_team FROM table_name_33 WHERE venue = "glenferrie oval"
Which Game is the highest one that has an Opponent of new york islanders, and a December larger than 10?
SELECT MAX(game) FROM table_name_35 WHERE opponent = "new york islanders" AND december > 10
What document types do have more than 10000 total access number.
SELECT document_type_code FROM documents GROUP BY document_type_code HAVING sum(access_count) > 10000
What percentage of votes are from the nominated episodes?
SELECT CAST(SUM(CASE WHEN T1.result = 'Nominee' THEN T2.votes ELSE 0 END) AS REAL) * 100 / SUM(T2.votes) FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id;
What date did Paul Goldstein play the final?
SELECT date FROM table_name_69 WHERE opponent_in_the_final = "paul goldstein"
What is the date of the circuit of nürburgring, which had Graham Hill as the winning driver?
SELECT date FROM table_name_47 WHERE winning_driver = "graham hill" AND circuit = "nürburgring"
What are their names?
SELECT Employee_Name FROM Employees EXCEPT SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed
Return the name and max speed of the storm that affected the most regions.
SELECT T1.name , T1.max_speed FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id ORDER BY count(*) DESC LIMIT 1
Give the songs included in volumes that have more than 1 week on top.
SELECT Song FROM volume WHERE Weeks_on_Top > 1
Where was something built earlier than 1858?
SELECT where_built FROM table_name_79 WHERE year_built < 1858
Which highest pick number had Akeem Dent as a name and where the overall was less than 91?
SELECT MAX(pick__number) FROM table_name_24 WHERE name = "akeem dent" AND overall < 91
Which detailed product did Mr Lennox Oliver Drake complain about?
SELECT DISTINCT T2.`Sub-product` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Lennox' AND T1.middle = 'Oliver' AND T1.last = 'Drake' AND T1.sex = 'Male'
What is the Format for the alca-487 catalog?
SELECT format FROM table_name_12 WHERE catalog = "alca-487"
Show the name of track with most number of races.
SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id ORDER BY count(*) DESC LIMIT 1
find the id of tv channels that do not play any cartoon directed by Ben Jones.
SELECT id FROM TV_Channel EXCEPT SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones'
Among the devices with event no.2 happening, how many of them are vivo devices?
SELECT COUNT(T1.device_id) FROM phone_brand_device_model2 AS T1 INNER JOIN events AS T2 ON T2.device_id = T1.device_id WHERE T1.phone_brand = 'vivo' AND T2.event_id = 2
Among the players whose total NHL games played in their first 7 years of NHL career is no less than 500, what is the name of the player who committed the most rule violations?
SELECT T1.PlayerName FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.sum_7yr_GP > 500 ORDER BY T2.PIM DESC LIMIT 1
When 70489 is without walls what is the inns of court and chancery?
SELECT inns_of_court_and_chancery FROM table_16677738_1 WHERE without_the_walls = 70489
What FCC info is listed for the ERP W of 2?
SELECT fcc_info FROM table_name_96 WHERE erp_w = 2
What draft pick is a goaltender?
SELECT pick__number FROM table_2897457_1 WHERE position = "Goaltender"
Which away team plays at the venue glenferrie oval?
SELECT away_team FROM table_name_63 WHERE venue = "glenferrie oval"
What is the hometown of the player that attends UCLA?
SELECT hometown FROM table_name_99 WHERE college = "ucla"
Which players were born in 1983 and play as forward position?
SELECT player FROM table_23670057_5 WHERE year_born = 1983 AND position = "Forward"
What is the highest vendor's selling price for Hex Nut 5?
SELECT T1.StandardPrice FROM ProductVendor AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Name = 'Hex Nut 5' ORDER BY T1.StandardPrice DESC LIMIT 1
What is the last name of the staff member with the first name "Janessa"?
SELECT last_name from staff where first_name = "Janessa"
Give me their salary and their manager's salary | do you mean the salary and manager's salary of all people? | Give me the name and salary of the highest paid employee and their manager
select first_name,last_name,salary,manager_id from employees order by salary desc limit 1
What year was the first store that had a hypermarket of 3?
SELECT first_store FROM table_name_2 WHERE hypermarkets = 3
How many tickets were sold/available when the gross revenue (2011) was $366,916?
SELECT tickets_sold___available FROM table_name_44 WHERE gross_revenue__2011_ = "$366,916"
What was the loss of the game with a record of 84-71?
SELECT loss FROM table_name_29 WHERE record = "84-71"
Give me the maximum low temperature and average precipitation at the Amersham station.
SELECT max(t1.low_temperature) , avg(t1.precipitation) FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id WHERE t2.network_name = "Amersham";
What are the total grosses for the movies with Jim Cummings as the voice actor?
SELECT T2.movie_title FROM `voice-actors` AS T1 INNER JOIN movies_total_gross AS T2 ON T2.movie_title = T1.movie WHERE T1.`voice-actor` = 'Jim Cummings' ORDER BY CAST(REPLACE(trim(T2.total_gross, '$'), ',', '') AS REAL) DESC LIMIT 1
Player from which team has the highest point per minute in NBA from 1991 to 2000?
SELECT tmID FROM players_teams WHERE year BETWEEN 1991 AND 2000 ORDER BY CAST(points AS REAL) / minutes DESC LIMIT 1
What are the slovenian names of the villages that had 65.9% of slovenes in 1951?
SELECT village__slovenian_ FROM table_10797463_1 WHERE percent_of_slovenes_1951 = "65.9%"
What is the highest rank a country with less than 3 gold, more than 2 silver, and less than 5 total medals has?
SELECT MAX(rank) FROM table_name_98 WHERE gold < 3 AND silver > 2 AND total < 5
What player has +7 as the to par, and 69-69-75-74=287 as the score?
SELECT player FROM table_name_55 WHERE to_par = "+7" AND score = 69 - 69 - 75 - 74 = 287
What final was Farhad Rezaei in?
SELECT final FROM table_name_46 WHERE athlete = "farhad rezaei"
Please show the songs that have result "nominated" at music festivals.
SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T1.Result = "Nominated"
What is id of the staff who had a Staff Department Assignment earlier than any Clerical Staff?
SELECT staff_id FROM Staff_Department_Assignments WHERE date_assigned_to < (SELECT max(date_assigned_to) FROM Staff_Department_Assignments WHERE job_title_code = 'Clerical Staff')