sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
what is the department code of 103 | Do you mean the department code of professor with emp number 103? | yes sir | SELECT dept_code from professor where emp_num = 103 |
What tournament had Greg Rusedski as a finalist? | SELECT tournament FROM table_name_68 WHERE finalist = "greg rusedski" |
How long was the 16 staged event in 1997? | SELECT distance FROM table_name_38 WHERE stages = "16" AND year = "1997" |
Name the publisher which has the most titles published in 1991. | SELECT T2.pub_name FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE STRFTIME('%Y', T1.pubdate) = '1991' GROUP BY T1.pub_id, T2.pub_name ORDER BY COUNT(T1.title_id) DESC LIMIT 1 |
How many teams playing in divisions in Greece have ever scored 4 or more goals? | SELECT COUNT(DISTINCT CASE WHEN T1.FTHG >= 4 THEN HomeTeam ELSE NULL end) + COUNT(DISTINCT CASE WHEN T1.FTAG >= 4 THEN AwayTeam ELSE NULL end) FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T2.country = 'Greece' |
How many silver medals for germany with a bronze count more than 0? | SELECT MAX(silver) FROM table_name_81 WHERE nation = "germany" AND bronze > 0 |
List the first and last name of students who are not living in the city with code HKG, and sorted the results by their ages. | SELECT fname, lname FROM student WHERE city_code != 'HKG' ORDER BY age |
What are the dates of publications in descending order of price? | SELECT Publication_Date FROM publication ORDER BY Price DESC |
What shows for 2006 when 2000 is 1r, 1996 is A, and Tournament is Cincinnati Masters? | SELECT 2006 FROM table_name_65 WHERE 2000 = "1r" AND 1996 = "a" AND tournament = "cincinnati masters" |
For each headquarter, what are the headquarter and how many companies are centered there? | SELECT headquarters , count(*) FROM company GROUP BY headquarters |
What is Model Number, when Voltage is 2.0V, and when Frequency is 350 mhz? | SELECT model_number FROM table_name_2 WHERE voltage = "2.0v" AND frequency = "350 mhz" |
Which supplier supplies the most amount of products? | SELECT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID GROUP BY T2.SupplierID, T2.CompanyName ORDER BY COUNT(T1.ProductName) DESC LIMIT 1 |
What was the date of the game attended by 25,022? | SELECT date FROM table_name_70 WHERE attendance = "25,022" |
What team was the opponent when the time was 2:57, and a Score of 7–5? | SELECT opponent FROM table_name_59 WHERE time = "2:57" AND score = "7–5" |
what country is Kaio from? | SELECT Country FROM perpetrator where location = 'Kaio' |
Name the jason for public vote being 19.20% | SELECT jason FROM table_21234111_6 WHERE public_vote__percentage = "19.20%" |
Name the most game | SELECT MAX(game) FROM table_21091157_1 |
What cc displacement has an i6 engine in 1936? | SELECT displacement_cc FROM table_name_13 WHERE engine = "i6" AND year = "1936" |
What credit card is the most used in the purchase of non-alcoholic beer? | SELECT T2.CreditCardType FROM rootbeer AS T1 INNER JOIN `transaction` AS T2 ON T1.RootBeerID = T2.RootBeerID INNER JOIN rootbeerbrand AS T3 ON T1.BrandID = T3.BrandID WHERE T3.Alcoholic = 'FALSE' GROUP BY T2.CreditCardType ORDER BY COUNT(T2.CreditCardType) DESC LIMIT 1 |
What is the profit from selling the "O'Sullivan Living Dimensions 2-Shelf Bookcases"? | SELECT DISTINCT T1.Profit FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'O''Sullivan Living Dimensions 2-Shelf Bookcases' |
What is the date of enrollment of the course named "Spanish"? | SELECT T2.date_of_enrolment FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "Spanish" |
Among the actors starred in Die Hard 2, list their net worth and birth date of actors with a height between 60 to 65. | SELECT T3.NetWorth, T3.`Date of Birth` FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID INNER JOIN actor AS T3 ON T3.ActorID = T2.ActorID WHERE T1.Title = 'Die Hard 2' AND T3.`Height (Inches)` BETWEEN 60 AND 65 |
List all counties where there is no Bakers Square Restaurant & Pie Shop. | SELECT DISTINCT T2.county FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.label != 'bakers square restaurant & pie shop' |
Return the name of the artist who has the latest join year. | SELECT name FROM artist ORDER BY year_join DESC LIMIT 1 |
During what Championship was the Opponent Jeff Borowiak? | SELECT championship FROM table_name_53 WHERE opponent = "jeff borowiak" |
Find the names of courses that have either 3 credits or 1 credit but 4 hours. | SELECT CName FROM COURSE WHERE Credits = 3 UNION SELECT CName FROM COURSE WHERE Credits = 1 AND Hours = 4 |
What are the name, population, and life expectancy of the largest Asian country by land? | SELECT Name , Population , LifeExpectancy FROM country WHERE Continent = "Asia" ORDER BY SurfaceArea DESC LIMIT 1 |
Which Tournament has a Surface of carpet, and a Date smaller than 1995, and an Opponent in the final of ken flach robert seguso? | SELECT tournament FROM table_name_56 WHERE surface = "carpet" AND date < 1995 AND opponent_in_the_final = "ken flach robert seguso" |
What is the Country of the Player with a To par of +1 and a Score of 74-70-70=214? | SELECT country FROM table_name_12 WHERE to_par = "+1" AND score = 74 - 70 - 70 = 214 |
What club has losses greater than 1, 4 for the wins, with points against less than 894? | SELECT club FROM table_name_83 WHERE loses > 1 AND wins = 4 AND points_against < 894 |
Which crytocurrency was not opened on 2013/5/3? | SELECT T1.name FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T2.date = '2013-05-03' AND T2.open IS NULL |
Count the number of students who have advisors. | SELECT count(DISTINCT s_id) FROM advisor |
Which Venue has a Kitmaker of lotto, and a Team of apoel? | SELECT venue FROM table_name_37 WHERE kitmaker = "lotto" AND team = "apoel" |
Find the total revenue of companies whose revenue is larger than the revenue of some companies based in Austin. | SELECT sum(revenue) FROM manufacturers WHERE revenue > (SELECT min(revenue) FROM manufacturers WHERE headquarter = 'Austin') |
What is the id of the aircraft with the maximum distance? | SELECT aid FROM Aircraft order by distance desc limit 1 |
What is the number of results for james shannon? | SELECT COUNT(result) FROM table_1341598_22 WHERE incumbent = "James Shannon" |
Please list the full names of all the students who are research assistants with the highest research capability. | SELECT T1.f_name, T1.l_name FROM student AS T1 INNER JOIN RA AS T2 ON T1.student_id = T2.student_id WHERE T2.capability = 5 |
What to par has 7 as the place? | SELECT to_par FROM table_name_20 WHERE place = "7" |
What are the names of tourist attraction that Alison visited but Rosalind did not visit? | SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = "Alison" EXCEPT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = "Rosalind" |
Subsets and Splits