sentence
stringlengths
3
347
sql
stringlengths
18
804
Who were the candidates in the election where the incumbent is George M. Grant?
SELECT candidates FROM table_1341973_3 WHERE incumbent = "George M. Grant"
Which circuit did Michael Andretti win?
SELECT circuit FROM table_name_66 WHERE winning_driver = "michael andretti"
What are the platform IDs of records released in 2006?
SELECT DISTINCT T.platform_id FROM game_platform AS T WHERE T.release_year = 2006
What is Moving From, when Ends is before 2011?
SELECT moving_from FROM table_name_65 WHERE ends < 2011
How many students from SMC are unemployed?
SELECT T2.name FROM enrolled AS T1 INNER JOIN unemployed AS T2 ON T1.`name` = T2.`name` WHERE T1.school = 'smc'
List the full address of all the American restaurants with a review of 4 or more?
SELECT T1.street_num, T1.street_name, T1.city FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.review >= 4
What is the age of student Linda Smith?
SELECT Age FROM Student WHERE Fname = "Linda" AND Lname = "Smith";
Name the team for launceston
SELECT team FROM table_name_60 WHERE race_title = "launceston"
What is the nationality of the athlete with a time of 2:12.56?
SELECT nationality FROM table_name_80 WHERE time = "2:12.56"
How many silvers have more than 2 golds?
SELECT COUNT(silver) FROM table_name_67 WHERE gold > 2
What are the first names of these students?
SELECT Fname FROM STUDENT
How many wins does he have?
SELECT MAX(wins) FROM table_2169966_1
When was the queensland reds lock player born?
SELECT date_of_birth__age_ FROM table_name_7 WHERE position = "lock" AND club_province = "queensland reds"
Bldr of mcw&f, and a Year smaller than 1927, and a LT Nos of 9820-9821 has what type?
SELECT type FROM table_name_19 WHERE bldr = "mcw&f" AND year < 1927 AND lt_nos = "9820-9821"
What year is the player whose number is 31?
SELECT year FROM table_29418619_1 WHERE _number = 31
Can any one of them be accessed by bus?
SELECT T1.Shop_ID FROM SHOPS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Shop_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = "bus"
What is the highest enrollment for rochester community school?
SELECT MAX(enrollment) FROM table_name_66 WHERE school = "rochester community"
What is the country of player lee trevino, who has a to par of +2?
SELECT country FROM table_name_32 WHERE to_par = "+2" AND player = "lee trevino"
Show all book categories and the number of books in each category.
SELECT category, COUNT(*) FROM book_club GROUP BY category
Which Goals For has a Lost of 12, and a Played larger than 34?
SELECT MAX(goals_for) FROM table_name_28 WHERE lost = 12 AND played > 34
I want the result for week larger than 10 for opponent of new england patriots
SELECT result FROM table_name_90 WHERE week > 10 AND opponent = "new england patriots"
What is the lane number of the swimmer with a time of 55.69?
SELECT lane FROM table_name_21 WHERE time = 55.69
Show the names of players and names of their coaches.
SELECT T3.Player_name , T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID
What is the Speed at Lake Mead?
SELECT speed FROM table_name_80 WHERE location = "lake mead"
How old is SC Ganguly in 2008?
SELECT 2008 - strftime('%Y', DOB) FROM Player WHERE Player_Name = 'SC Ganguly'
Find the list of cities that no customer is living in.
SELECT city FROM addresses WHERE city NOT IN ( SELECT DISTINCT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id)
which team has a record of 13-18?
SELECT opponent FROM table_name_42 WHERE record = "13-18"
What is the total number of medals by the Czech republic?
SELECT total FROM table_name_70 WHERE nation = "czech republic"
What is the Date with a Score that is 46-77?
SELECT date FROM table_name_65 WHERE score = "46-77"
What are the names of enzymes who does not produce 'Heme'?
SELECT name FROM enzyme WHERE product != 'Heme'
As of 12/31/2011, how long has the employee assigned to all pending for approval papers been working in the company from the date he was hired?
SELECT 2011 - STRFTIME('%Y', T2.HireDate) FROM Document AS T1 INNER JOIN Employee AS T2 ON T1.Owner = T2.BusinessEntityID WHERE T1.Status = 1
display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara.
SELECT first_name , last_name , hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = "Clara")
In what Election year was Adalberto Mosaner the Mayor with less than 16,170 Inhabitants?
SELECT SUM(election) FROM table_name_64 WHERE mayor = "adalberto mosaner" AND inhabitants < 16 OFFSET 170
List the active business ID and its stars of the businesses fall under the category of Pets.
SELECT T1.business_id, T1.stars FROM Business AS T1 INNER JOIN Business_Categories ON T1.business_id = Business_Categories.business_id INNER JOIN Categories AS T3 ON Business_Categories.category_id = T3.category_id WHERE T1.active LIKE 'TRUE' AND T3.category_name LIKE 'Pets'
Find the number of rooms with king bed for each decor type.
SELECT decor , count(*) FROM Rooms WHERE bedType = "King" GROUP BY decor;
Show the name of cities in the county that has the largest number of police officers.
SELECT name FROM city WHERE county_ID = (SELECT county_ID FROM county_public_safety ORDER BY Police_officers DESC LIMIT 1)
What is the tallest height?
select max ( Height ) from people
What is number of silver for the country with more than 0 gold, rank of 14, and more than 4 bronze?
SELECT COUNT(silver) FROM table_name_81 WHERE gold > 0 AND rank = "14" AND bronze > 4
Name the total number of club worl cup for djibril cisse
SELECT COUNT(club_world_cup) FROM table_19764939_1 WHERE player = "Djibril Cisse"
What's the tail number of the airplane involved in the accident described as crashed?
SELECT tail_number FROM table_229917_2 WHERE brief_description = "Crashed"
How many to pars were won in 1993?
SELECT COUNT(to_par) FROM table_name_86 WHERE year_s__won = "1993"
In how many categories were podcast reviews created in the last six months of 2016? List them.
SELECT COUNT(DISTINCT T1.category) FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.created_at BETWEEN '2016-07-01T00:00:00-07:00' AND '2016-12-31T23:59:59-07:00'
What is the result of game played on 10-05-2012?
SELECT result FROM table_name_23 WHERE date = "10-05-2012"
What is the count of singers?
SELECT count(*) FROM singer
What is the total number of losses that has draws larger than 1 and a Portland DFL of westerns?
SELECT SUM(losses) FROM table_name_75 WHERE portland_dfl = "westerns" AND draws > 1
Which circuit was the atcc round 7 at?
SELECT circuit FROM table_name_71 WHERE series = "atcc round 7"
What is the name of the player from club Circolo Nautico Posillipo and a position of D?
SELECT name FROM table_name_95 WHERE pos = "d" AND club = "circolo nautico posillipo"
On image no. 99 identify the percentage of objects that are described as white.
SELECT CAST(SUM(CASE WHEN T2.ATT_CLASS = 'white' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(OBJ_SAMPLE_ID) FROM IMG_OBJ_ATT AS T1 INNER JOIN ATT_CLASSES AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T1.IMG_ID = 99
What team was promoted in the Serbian League East in the same season when Kolubara was promoted in the Serbian League Belgrade?
SELECT serbian_league_east FROM table_12283621_6 WHERE serbian_league_belgrade = "Kolubara"
How many courses have more than 2 credits?
SELECT count(*) FROM COURSE WHERE Credits > 2
What date did the away team Mansfield Town play?
SELECT date FROM table_name_56 WHERE away_team = "mansfield town"
What is the maximum accelerate for all the different cylinders?
SELECT max(Accelerate) , Cylinders FROM CARS_DATA GROUP BY Cylinders;
What is the name of the state that Racine belongs to?
SELECT T2.Name FROM Address AS T1 INNER JOIN StateProvince AS T2 ON T1.StateProvinceID = T2.StateProvinceID WHERE T1.City = 'Racine'
How many games have a February larger than 11, and a Record of 23-7-8?
SELECT COUNT(game) FROM table_name_92 WHERE february > 11 AND record = "23-7-8"
What is the total number of top-25s for tournaments that had 0 wins, 1 cut made, and more than 5 events?
SELECT COUNT(top_25) FROM table_name_23 WHERE wins = 0 AND cuts_made = 1 AND events > 5
Show the flight number of flights with three lowest distances.
SELECT flno FROM Flight ORDER BY distance ASC LIMIT 3
Who was the visitor for the April 17 game?
SELECT visitor FROM table_name_93 WHERE date = "april 17"
For the document Control Assistant who was born on 1975/12/25, how many private documents did he/she have?
SELECT COUNT(T2.BusinessEntityID) FROM Document AS T1 INNER JOIN Employee AS T2 ON T1.Owner = T2.BusinessEntityID WHERE T2.JobTitle = 'Document Control Assistant' AND T2.BirthDate = '1975-12-25' AND T1.DocumentSummary IS NULL
What is the Country of the Player with a Score of 70-72-70-73=285 and Money ( $ ) of 5,500?
SELECT country FROM table_name_10 WHERE money___$__ = "5,500" AND score = 70 - 72 - 70 - 73 = 285
Who were the runner(s)-up when the winning score was –10 (69-68-74-67=278)?
SELECT margin_of_victory FROM table_name_71 WHERE winning_score = –10(69 - 68 - 74 - 67 = 278)
Give the name of the customer who made an order with Clerk#000000803 on 1997/12/10.
SELECT T2.c_name FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T1.o_orderdate = '1997-12-10' AND T1.o_clerk = 'Clerk#000000803'
Show distinct first and last names for all customers with an account.
SELECT DISTINCT T1.customer_first_name, T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id = T2.customer_id
What was the first game played on February 28?
SELECT MIN(game) FROM table_name_95 WHERE date = "february 28"
Which To Par has a Score smaller than 70, and a Player of matt kowal?
SELECT to_par FROM table_name_33 WHERE score < 70 AND player = "matt kowal"
List down the sales, profit, and subcategories of the product ordered in the order ID US-2011-126571 in the East region.
SELECT T1.Sales, T1.Profit, T2.`Sub-Category` FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.`Order ID` = 'US-2011-126571' AND T2.Region = 'East'
What are all the policy types of the customer that has the most policies listed?
SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id JOIN available_policies AS t3 ON t2.policy_id = t3.policy_id WHERE t1.customer_name = ( SELECT t1.customer_name FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id GROUP BY t1.customer_name ORDER BY count ( * ) DESC LIMIT 1 )
What is the average price per car produced in Japan?
SELECT AVG(T1.price) FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country WHERE T3.country = 'Japan'
Find distinct cities of address of students?
SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id JOIN students AS T3 ON T2.person_id = T3.student_id
What is the maximum purse prize of the Northeast Delta Dental International Championship?
SELECT MAX(purse__) AS $_ FROM table_15315276_1
What is the frequency for the station with the branding of 94dot3 home radio Palawan?
SELECT frequency FROM table_name_74 WHERE branding = "94dot3 home radio palawan"
State the weight of shipments transported by Peterbilt.
SELECT T2.weight FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id WHERE make = 'Peterbilt'
What is the minimum dew point?
SELECT MIN(dewpoint) FROM weather
What is the number in the season of the episode with a production code of 2-05?
SELECT COUNT(no_in_season) FROM table_234886_3 WHERE prod_code = "2-05"
Which education App has the worst rating and state the translated review if available.
SELECT T1.App, T2.Translated_Review FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Category = 'EDUCATION' GROUP BY T1.App, T2.Translated_Review ORDER BY T1.Rating ASC LIMIT 1
who is playing for when the opponent is deportes savio and the date is 2010-03-11?
SELECT playing_for FROM table_name_95 WHERE opponent = "deportes savio" AND date = "2010-03-11"
Name the outcome for dunlop world challenge
SELECT outcome FROM table_name_58 WHERE tournament = "dunlop world challenge"
How many penalty minutes did the Montreal Canadiens have in the 1918's Stanley Cup Finals?
SELECT T2.PIM FROM Teams AS T1 INNER JOIN TeamsSC AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.name = 'Montreal Canadiens' AND T1.year = 1918
What is the sum of the runs when the wkts were bigger than 0 and ovrs were smaller than 2?
SELECT SUM(runs) FROM table_name_65 WHERE ovrs < 2 AND wkts > 0
what's the night rank with viewers (m) of 6.63
SELECT night_rank FROM table_11354111_3 WHERE viewers__m_ = "6.63"
what is the highest money ($) for bernhard langer?
SELECT MAX(money___) AS $__ FROM table_name_22 WHERE player = "bernhard langer"
Name the number of date for dallas
SELECT COUNT(date) FROM table_22893781_6 WHERE team = "Dallas"
HOW MANY COUNTRIES DO NOT HAVE AN ROLLER COASTER LONGER THAN 3000?
SELECT count ( * ) FROM country WHERE country_id NOT IN ( SELECT country_id FROM roller_coaster WHERE LENGTH > 3000 )
Who was the original artist when the theme was 1980s?
SELECT original_artist FROM table_15796072_1 WHERE theme = "1980s"
What is the maximum total wins he had for any year?
SELECT MAX(total_wins) FROM table_22839669_12
Find the number of students taught by TARRING LEIA.
SELECT COUNT(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "TARRING" AND T2.lastname = "LEIA"
Give the class of races that is most common.
SELECT CLASS FROM race GROUP BY CLASS ORDER BY count(*) DESC LIMIT 1
Who was the winner when the runner-up was Chemnitzer FC II?
SELECT winners FROM table_name_86 WHERE runners_up = "chemnitzer fc ii"
What are the names of students who have taken the prerequisite for the course International Finance?
SELECT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id = T2.id WHERE T2.course_id IN (SELECT T4.prereq_id FROM course AS T3 JOIN prereq AS T4 ON T3.course_id = T4.course_id WHERE T3.title = 'International Finance')
Return the primary conference of the school with the lowest acc percentage score.
SELECT t1.Primary_conference FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id ORDER BY t2.acc_percent LIMIT 1
What are the names of the tracks that are Rock or Jazz songs?
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock" OR T1.name = "Jazz"
What place did the Sake Tuyas come in when the Denim Demons were 4th?
SELECT sake_tuyas FROM table_29619494_2 WHERE denim_demons = "4th"
What is the highest birth/2013 when the death/2012 is 14,1?
SELECT MAX(birth_2013) FROM table_25703_1 WHERE death_2012 = "14,1"
Name the industry for revenue being 2.1
SELECT industry FROM table_19112_3 WHERE revenue__billion_$_ = "2.1"
What is the full name of the customer who gave a 5-star rating and commented "The quintessential dessert root beer. No ice cream required" on his review?
SELECT T1.First, T1.Last FROM customers AS T1 INNER JOIN rootbeerreview AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.StarRating = 5 AND T2.Review = 'The quintessential dessert root beer. No ice cream required.'
Awesome! Can you show me a list that contains both the colleges in LA and those located in AZ?
SELECT cName FROM College WHERE state = "LA" or state = "AZ"
How many orders have Margaret Peacock placed?
SELECT COUNT(T2.EmployeeID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.FirstName = 'Margaret' AND T1.LastName = 'Peacock'
What is the Player in T5 Place?
SELECT player FROM table_name_71 WHERE place = "t5"
How many members are there total?
SELECT count ( * ) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid
What was the third place of the performance in 2006 with the host Japan?
SELECT third_place FROM table_name_79 WHERE host = "japan" AND season < 2006
What are the daily hire costs for the products with substring 'Book' in its name?
SELECT daily_hire_cost FROM Products_for_hire WHERE product_name LIKE '%Book%'