sentence
stringlengths
3
347
sql
stringlengths
18
804
Name the date when the surface was clay and the score was 6–1, 6–2 and runner-up
SELECT date FROM table_name_6 WHERE surface = "clay" AND score = "6–1, 6–2" AND outcome = "runner-up"
What are the first name, last name and id of the player with the most all star game experiences? Also list the count.
SELECT T1.name_first , T1.name_last , T1.player_id , count(*) FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY count(*) DESC LIMIT 1;
What date shows a Loss of lilly (2–2)?
SELECT date FROM table_name_80 WHERE loss = "lilly (2–2)"
HOw many films did martin repka category:articles with hcards direct?
SELECT COUNT(film_title_used_in_nomination) FROM table_22032599_1 WHERE director = "Martin Repka Category:Articles with hCards"
How many people were not credited at the end of the "Admissions" episode?
SELECT COUNT(T2.person_id) FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Admissions' AND T2.credited = 'false'
What are the first name and last name of Linda Smith's advisor?
SELECT T1.fname, T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor WHERE T2.fname = "Linda" AND T2.lname = "Smith"
What are the names of all colleges that have an enrollment greater than at least one of the colleges in FL?
SELECT DISTINCT cName FROM college WHERE enr > ( SELECT min ( enr ) FROM college WHERE state = 'FL' )
What is the 2013 press freedom index of the country Egypt?
SELECT 2013 AS _press_freedom_index FROM table_name_20 WHERE country = "egypt"
What is the M1A1 when the M60A3 was T (Short Tons)?
SELECT m1a1_abrams FROM table_name_8 WHERE m60a3_patton = "t (short tons)"
Which Series has a Site of ames and a Sport of w gymnastics?
SELECT series FROM table_name_13 WHERE site = "ames" AND sport = "w gymnastics"
Who is the eldest player and where did he/she come from?
SELECT T1.Player_Name, T2.Country_Name FROM Player AS T1 INNER JOIN Country AS T2 ON T1.Country_Name = T2.Country_Id ORDER BY T1.DOB LIMIT 1
Who was the Class AAAA champion in 2006-07?
SELECT class_aAAA FROM table_14603057_2 WHERE school_year = "2006-07"
How did he pay?
SELECT t1.payment_method FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id GROUP BY t1.customer_name ORDER BY sum ( t3.order_quantity ) DESC LIMIT 1
What type of inspection was done on July 07, 2010, involving the employee named "Lisa Tillman"?
SELECT DISTINCT T2.inspection_type FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T1.first_name = 'Lisa' AND T1.last_name = 'Tillman' AND T2.inspection_date = '2010-07-07'
How many dates have silverstone circuit
SELECT COUNT(date) FROM table_1140103_6 WHERE circuit = "Silverstone"
Find the branch names of banks in the New York state.
SELECT bname FROM bank WHERE state = 'New York'
What is the lowest Total Region that has a Year after 2001, and a Broadsound greater than 6,843?
SELECT MIN(total_region) FROM table_name_75 WHERE year > 2001 AND broadsound > 6 OFFSET 843
Which HPFS has a no for ReFS?
SELECT hpfs FROM table_name_51 WHERE refs = "no"
What city is 103.3 FM licensed in?
SELECT city_of_license FROM table_name_61 WHERE frequency = "103.3 fm"
How many SMC's students that absent for 7 months?
SELECT COUNT(T1.name) FROM enrolled AS T1 INNER JOIN longest_absense_from_school AS T2 ON T1.name = T2.name WHERE T1.school = 'smc' AND T2.month = 7
Tell me the voting turnout for 1985 general elections
SELECT voting_turnout FROM table_name_91 WHERE general_elections = 1985
who is the writer where viewers is 5.16m
SELECT writer FROM table_12148018_2 WHERE viewers = "5.16m"
How many solutions whose repository's stars are a third more than forks?
SELECT COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Forks < T1.Stars * 1 / 3
Who was the manufacturer for the race on grid 12?
SELECT manufacturer FROM table_name_49 WHERE grid = 12
Who are the customers that had more than 1 policy? List the customer details and id.
SELECT T1.customer_details, T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id = T2.Customer_id GROUP BY T1.customer_id HAVING COUNT(*) > 1
What is the lowest match that has a lost greater than 3, and kolejarz rawicz as the team?
SELECT MIN(match) FROM table_name_99 WHERE lost > 3 AND team = "kolejarz rawicz"
Calculate the total price for products from id 400 to 500.
SELECT SUM(T1.Price * T2.quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductID BETWEEN 400 AND 500
Return the names of all counties sorted by county name in descending alphabetical order.
SELECT County_name FROM county ORDER BY County_name DESC
What was the result on 16 November 2003?
SELECT result FROM table_name_34 WHERE date = "16 november 2003"
Find the personal name, family name, and author ID of the course author that teaches the most courses.
SELECT T1.personal_name, T1.family_name, T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id ORDER BY COUNT(*) DESC LIMIT 1
Which Class has a Chassis of Mazda 787B?
SELECT class FROM table_name_16 WHERE chassis = "mazda 787b"
What position was played by the player who was 2.12 meters tall?
SELECT position FROM table_12962773_10 WHERE height = "2.12"
What is the Population of Tshepiso with a Code of 70409 or smaller and an Area (km 2) smaller than 5.97?
SELECT MIN(population) FROM table_name_66 WHERE code < 70409 AND area__km_2__ < 5.97 AND place = "tshepiso"
What is the lowest value for Events, when the value for Top-5 is greater than 1?
SELECT MIN(events) FROM table_name_56 WHERE top_5 > 1
What are the venues of debates on the affirmative side?
SELECT T2.Venue FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID = T2.Debate_ID JOIN people AS T3 ON T1.Affirmative = T3.People_ID
How many to par in England?
SELECT to_par FROM table_name_93 WHERE country = "england"
How much did Hacienda Los Torres from ward 36 fine for failing an inspection?
SELECT SUM(T3.fine) FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no INNER JOIN violation AS T3 ON T2.inspection_id = T3.inspection_id WHERE T1.dba_name = 'HACIENDA LOS TORRES' AND T1.ward = 36 AND T2.results = 'Fail'
Give the official full names of legislators representing Virginia.
SELECT T1.official_full_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.state = 'VA' GROUP BY T1.official_full_name
Return the official native languages of countries who have players from Maryland or Duke colleges.
SELECT T1.Official_native_language FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.College = "Maryland" OR T2.College = "Duke"
List the names of alcohol free recipes.
SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T2.alcohol = 0
Can you list the names of the locations that have two or more railways?
SELECT LOCATION FROM railway GROUP BY LOCATION HAVING COUNT ( * ) > = 2
WHAT TEAM HAS 12TH TABLE POSITION AND REPLACED BY OVE PEDERSEN?
SELECT team FROM table_name_98 WHERE position_in_table = "12th" AND replaced_by = "ove pedersen"
How many users who created a list in the February of 2016 were eligible for trial when they created the list? Indicate the user id of the user who has the most number of followers in his list in February of 2016.
SELECT T1.list_followers FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.user_id = T2.user_id AND T1.list_id = T2.list_id WHERE T2.list_creation_date_utc BETWEEN '2016-02-01' AND '2016-02-29' AND T2.user_eligible_for_trial = 1
What is the only type of university that was founded in 1873?
SELECT control FROM table_2076463_2 WHERE founded = 1873
How many points have 88 laps and a grid of 14?
SELECT points FROM table_name_99 WHERE laps = "88" AND grid = "14"
What are the times of trains that go to chennai?
SELECT TIME FROM train WHERE destination = 'Chennai'
What are the different transaction types, and how many transactions of each have taken place?
SELECT transaction_type , count(*) FROM Financial_transactions GROUP BY transaction_type
What State/Country is Sean Langman the skipper?
SELECT state_country FROM table_25594888_1 WHERE skipper = "Sean Langman"
Find all the zip codes in which the max dew point have never reached 70.
SELECT DISTINCT zip_code FROM weather EXCEPT SELECT DISTINCT zip_code FROM weather WHERE max_dew_point_f >= 70
What is the project id and detail for the project with at least two documents?
SELECT T1.project_id , T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id HAVING count(*) > 2
When did the vice president with a vice over 6 take office?
SELECT took_office FROM table_name_53 WHERE vice > 6
What is the kit maker for team foolad?
SELECT kit_maker FROM table_27383390_2 WHERE team = "Foolad"
What is the average rating for each movie that has never been reviewed by Brittany Harris?
SELECT mID , avg(stars) FROM Rating WHERE mID NOT IN (SELECT T1.mID FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID WHERE T2.name = "Brittany Harris") GROUP BY mID
At the venue of panama city, on 11 Febrero 2006, how many goals were scored?
SELECT COUNT(goal) FROM table_name_10 WHERE venue = "panama city" AND date = "11 febrero 2006"
What are the names of the schools with some players in the mid position but no goalies?
SELECT cName FROM tryout WHERE pPos = 'mid' EXCEPT SELECT cName FROM tryout WHERE pPos = 'goalie'
What is the main use for the structure listed in walker city, iowa?
SELECT main_use FROM table_name_25 WHERE town = "walker city, iowa"
Which teams had an aggregate score of 3-4?
SELECT team_1 FROM table_name_61 WHERE agg = "3-4"
What date did episode 258 in the series originally air?
SELECT original_air_date FROM table_2221484_2 WHERE series__number = 258
What is the cost and the product number of product with the id "888"?
SELECT T2.StandardCost, T2.ProductNumber FROM ProductCostHistory AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductID = 888
Identify the name of the most popular dairy product in terms of reorder quantity.
SELECT T2.ProductName FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID WHERE T1.CategoryName = 'Dairy Products' AND T2.ReorderLevel = ( SELECT MAX(ReorderLevel) FROM Products )
How many countries have no GNP?
SELECT COUNT(*) FROM Country WHERE GNP = 0
What is the average ties when the team is montreal victorias and the games played is more than 8?
SELECT AVG(ties) FROM table_name_73 WHERE team = "montreal victorias" AND games_played > 8
What are the apartment type codes?
SELECT apt_type_code FROM Apartments
Which party had the most hosts? Give me the party location.
SELECT LOCATION FROM party ORDER BY Number_of_hosts DESC LIMIT 1
How many users have rated the most popular movie?
SELECT COUNT(rating_id) FROM ratings WHERE movie_id = ( SELECT movie_id FROM movies ORDER BY movie_popularity DESC LIMIT 1 )
List each test result and its count in descending order of count.
SELECT test_result , COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC
How many clients who live in Kansas City provided a 1-star review?
SELECT COUNT(T1.Stars) FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.city = 'Kansas City' AND T1.Stars = 1
what is the lname of grade 2 | Do you mean what are the last names of the students in grade 2? | what is the lname of classroom 101
SELECT lastname from list where classroom = 101
What is Croatia's rank?
SELECT rank FROM table_name_85 WHERE country = "croatia"
What player plays for the Dakota Wizards?
SELECT player FROM table_name_73 WHERE team = "dakota wizards"
List member names and their party names.
SELECT T1.member_name , T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id
Find all the name of documents without any sections.
SELECT document_name FROM documents WHERE document_code NOT IN (SELECT document_code FROM document_sections)
List the first team's name in the match with the highest winning margin.
SELECT T2.Team_Name FROM Match AS T1 INNER JOIN Team AS T2 ON T2.Team_Id = T1.Team_1 ORDER BY T1.Win_Margin DESC LIMIT 1
What is the lowest number of wins for ben crenshaw?
SELECT MIN(wins) FROM table_name_87 WHERE player = "ben crenshaw"
Among the customers from Chicago, Illinois, what is the highest quantity of products bought in a single order?
SELECT T1.Quantity FROM west_superstore AS T1 INNER JOIN east_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN central_superstore AS T3 ON T3.`Customer ID` = T2.`Customer ID` INNER JOIN south_superstore AS T4 ON T4.`Customer ID` = T3.`Customer ID` INNER JOIN people AS T5 ON T5.`Customer ID` = T4.`Customer ID` WHERE T5.City = 'Chicago' AND T5.State = 'Illinois' ORDER BY T1.Quantity DESC LIMIT 1
Which circuit has a length of 45 minutes and is held on August 6?
SELECT circuit FROM table_name_78 WHERE length = "45 minutes" AND date = "august 6"
Which major has the most students?
SELECT Major FROM STUDENT GROUP BY major ORDER BY count ( * ) DESC LIMIT 1
Which Place has a To par of –8?
SELECT place FROM table_name_19 WHERE to_par = "–8"
Who were the writers when there were 27.11 million viewers?
SELECT written_by FROM table_18217753_1 WHERE us_viewers__millions_ = "27.11"
What are all the places where the number of perfect 40s is 0 and the average is 27.25?
SELECT place FROM table_15988037_24 WHERE perfect_40s = 0 AND average = "27.25"
What are the names of the customers who bought product "food" at least once?
SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 JOIN order_items AS T3 JOIN products AS T4 ON T1.customer_id = T2.customer_id AND T2.order_id = T3.order_id AND T3.product_id = T4.product_id WHERE T4.product_name = "food" GROUP BY T1.customer_id HAVING count(*) >= 1
What are the names of Art instructors who have taught a course, and the corresponding course id?
SELECT name , course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID = T2.ID WHERE T1.dept_name = 'Art'
What is the parameter when the best fit (WMAP only) is .9 ± .1, and symbol is a?
SELECT parameter FROM table_name_94 WHERE best_fit__wmap_only_ = ".9 ± .1" AND symbol = "a"
How many female representatives are there in Michigan?
SELECT COUNT(T.bioguide_id) FROM ( SELECT T1.bioguide_id FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.type = 'rep' AND T2.state = 'MI' AND T1.gender_bio = 'F' GROUP BY T1.bioguide_id ) T
What is the average pass def that has green bay packers as the team, 62 as the solo and sacks less than 2?
SELECT AVG(pass_def) FROM table_name_63 WHERE team = "green bay packers" AND solo = 62 AND sacks < 2
Which April has a Game of 84
SELECT MAX(april) FROM table_name_54 WHERE game = 84
Show me the product type code of products named "Dining"
SELECT distinct Product_Type_Code FROM Products WHERE Product_Name = 'Dinning'
What is the sum of the goals with less than 30 points, a position less than 10, and more than 57 goals against?
SELECT SUM(goals_for) FROM table_name_14 WHERE points < 30 AND position < 10 AND goals_against > 57
What was the 1989 result for the tournament with 1984 of a, 1985 of a, and 1990 of a?
SELECT 1989 FROM table_name_56 WHERE 1984 = "a" AND 1985 = "a" AND 1990 = "a"
What score was on 13 June 2004?
SELECT score FROM table_name_50 WHERE date = "13 june 2004"
what is the maximum first elected with incumbent being gus yatron
SELECT MAX(first_elected) FROM table_1341586_39 WHERE incumbent = "Gus Yatron"
How many episodes have Valerie?
SELECT COUNT(episode) AS Summary FROM table_2140071_7 WHERE coach = "Valerie"
Who directed episode 266 in the series?
SELECT directed_by FROM table_2221484_2 WHERE series__number = 266
What is the average rating of all the movies starring Tom Cruise?
SELECT AVG(T1.Rating) 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 T3.Name = 'Tom Cruise'
What event did Soares fight against josh spearman?
SELECT event FROM table_name_69 WHERE opponent = "josh spearman"
Who was the leading scorer against the visiting team Bulls?
SELECT leading_scorer FROM table_name_96 WHERE visitor = "bulls"
Which To par has a Score of 67-72-71-75=285?
SELECT to_par FROM table_name_40 WHERE score = 67 - 72 - 71 - 75 = 285
What was the score in the game that was won by Sligo Rovers F.C.?
SELECT score FROM table_name_32 WHERE winners = "sligo rovers f.c."
What is the highest grid for rider Fonsi Nieto?
SELECT MAX(grid) FROM table_name_7 WHERE rider = "fonsi nieto"
What is the smallest Silver value associated with teams having more than 0 gold, 0 bronze, and a rank of 14?
SELECT MIN(silver) FROM table_name_75 WHERE bronze = 0 AND rank = 14 AND gold > 0