sentence
stringlengths
3
347
sql
stringlengths
18
804
Please list the zip_codes of all the residential areas in Huntingdon county with over 30 employees.
SELECT DISTINCT T1.zip_code FROM zip_data AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code WHERE T2.county = 'HUNTINGDON' AND T1.employees > 30
What is the average horsepower of the cars before 1980?
SELECT AVG(horsepower) FROM CARS_DATA WHERE YEAR < 1980
Can you show me a list of colleges that have an enrollment of 15,000 or higher? | Do you want the names of the schools that have an enrollment of 15000 or higher? | Can you provide the name and the location of the schools that have an enrollment of 15,000 or higher?
SELECT School, Location FROM university WHERE enrollment > 15000
What is the Record of the game on November 15 against Visitor Chicago Black Hawks with a Score of 1–3?
SELECT record FROM table_name_32 WHERE score = "1–3" AND visitor = "chicago black hawks" AND date = "november 15"
What identities do the genus/species arabidopsis thaliana have?
SELECT identity FROM table_15417439_1 WHERE genus_species = "Arabidopsis thaliana"
How frequently do the employee with the least number of sick leave hours get paid?
SELECT T2.PayFrequency FROM Employee AS T1 INNER JOIN EmployeePayHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID ORDER BY T1.SickLeaveHours ASC LIMIT 1
What is the number of the leading scorer for keyarena 16,640?
SELECT COUNT(leading_scorer) FROM table_11964047_8 WHERE attendance = "KeyArena 16,640"
What is Country, when Player is "Dutch Harrison"?
SELECT country FROM table_name_8 WHERE player = "dutch harrison"
What's the lowest goal difference when the position is higher than 16?
SELECT MIN(goal_difference) FROM table_name_85 WHERE position > 16
Which organisation type hires most research staff?
SELECT T1.organisation_type FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_type ORDER BY count(*) DESC LIMIT 1
What is the original price of the "Black Avery Flip-Chart Easel Binder"?
SELECT T1.Sales / (1 - T1.Discount) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'Blackstonian Pencils'
Show me professor office for professors with a MA degree
SELECT PROF_OFFICE FROM professor WHERE prof_high_degree = 'MA'
What Tournament has a Winning score of −16 (66-64-67=197)?
SELECT tournament FROM table_name_89 WHERE winning_score = −16(66 - 64 - 67 = 197)
How many credits is "Accounting" worth?
select credits from course where title = 'Accounting'
What is the total price of all the orders made by customers in Germany?
SELECT SUM(T3.o_totalprice) FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_nationkey = T2.c_nationkey INNER JOIN orders AS T3 ON T2.c_custkey = T3.o_custkey WHERE T1.n_name = 'GERMANY'
What is the average total 0 are nominated by the Taoiseach and the agricultural panel is greater than 5?
SELECT AVG(total) FROM table_name_38 WHERE nominated_by_the_taoiseach = 0 AND agricultural_panel > 5
What are the names of the players who played for Acadie-Bathurst Titan during the regular season in 1998-1999?
SELECT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '1998-1999' AND T1.GAMETYPE = 'Regular Season' AND T1.TEAM = 'Acadie-Bathurst Titan'
What's the abbreviation for libya?
SELECT abbreviation FROM table_name_88 WHERE country = "libya"
Which three countries does the Amazonas flow through? Give the full name of the countries.
SELECT DISTINCT T4.Name FROM city AS T1 INNER JOIN located AS T2 ON T1.Name = T2.City INNER JOIN river AS T3 ON T3.Name = T2.River INNER JOIN country AS T4 ON T4.Code = T2.Country WHERE T3.Name = 'Amazonas'
What is the average market value
select avg ( market_value ) from company
What is the latest result where a person from the Philippines won?
SELECT MAX(year) FROM table_name_72 WHERE nation_represented = "philippines"
What label is from the Region of Spain?
SELECT label FROM table_name_93 WHERE region = "spain"
List the names of the customers from India.
SELECT T4.first_name, T4.last_name FROM country AS T1 INNER JOIN city AS T2 ON T1.country_id = T2.country_id INNER JOIN address AS T3 ON T2.city_id = T3.city_id INNER JOIN customer AS T4 ON T3.address_id = T4.address_id WHERE T1.country = 'India'
of the players with an overall rating greater than 80 how many are right-footed?
SELECT count ( * ) FROM Player_Attributes WHERE overall_rating > 80 and preferred_foot = 'right'
What is the ICAO for the destination in Armenia?
SELECT icao FROM table_name_80 WHERE country = "armenia"
What is the Score when there was a hard surface and the Championship is new haven , usa?
SELECT score FROM table_name_93 WHERE surface = "hard" AND championship = "new haven , usa"
What was the original price of Xerox 1952 ordered by Aimee Bixby on 2014/9/10?
SELECT DISTINCT T2.Sales / (1 - T2.Discount) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID` WHERE T1.`Customer Name` = 'Aimee Bixby' AND T3.`Product Name` = 'Xerox 1952' AND T2.`Order Date` = '2014-09-10'
What is the name of the department with the fewest members?
SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MEMBER_OF AS T2 ON T1.DNO = T2.DNO GROUP BY T2.DNO ORDER BY count(*) ASC LIMIT 1
How many dishes appeared on a menu more than once?
SELECT COUNT(*) FROM Dish WHERE times_appeared > menus_appeared
Who is the CBSA officer of the post point in the area with the highest number of employees?
SELECT T1.CBSA_name FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T2.employees = ( SELECT MAX(employees) FROM zip_data )
What was the date of the week 9 game?
SELECT date FROM table_name_76 WHERE week = 9
What is Industrial Use (m 3 /p/yr)(in %), when Total Freshwater Withdrawal (km 3/yr) is less than 82.75, and when Agricultural Use (m 3 /p/yr)(in %) is 1363(92%)?
SELECT industrial_use__m_3__p_yr__in__percentage_ FROM table_name_32 WHERE total_freshwater_withdrawal__km_3__yr_ < 82.75 AND agricultural_use__m_3__p_yr__in__percentage_ = "1363(92%)"
List down the phone numbers of employees who did Canvass inspection.
SELECT DISTINCT T1.phone FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.inspection_type = 'Canvass'
What are the names of parties that have both delegates on "Appropriations" committee and
SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = "Appropriations" INTERSECT SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.Committee = "Economic Matters"
What is the name of that phone?
SELECT Name FROM phone WHERE Phone_id NOT IN ( SELECT Phone_ID FROM phone_market )
What is the Wade-Giles translation of the Pinyin xīn rú yuánhóu?
SELECT wade_giles FROM table_name_44 WHERE pinyin = "xīn rú yuánhóu"
Which year was the goalie who had the most postseaon shots Against in 2008 born?
SELECT T1.birthYear FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T2.year = 2008 ORDER BY T2.PostSA DESC LIMIT 1
Find the names of the courses that have just one student enrollment.
SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) = 1
Name the total number of rank timeslot for 18-49 being 3.1
SELECT COUNT(rank__timeslot_) FROM table_20971444_3 WHERE rating__18_49_ = "3.1"
What is the score of the home team tottenham hotspur?
SELECT score FROM table_name_94 WHERE home_team = "tottenham hotspur"
What date did they play in Cleveland Municipal Stadium?
SELECT date FROM table_14423274_3 WHERE game_site = "Cleveland Municipal Stadium"
What is the 2000 number when the 1969 is 54.3, and the 1979 is less than 48.4?
SELECT SUM(2000) FROM table_name_88 WHERE 1969 = 54.3 AND 1979 < 48.4
Which Game has a Team of at san antonio, and a Record of 3-3?
SELECT game FROM table_name_86 WHERE team = "at san antonio" AND record = "3-3"
Find the distinct last names of all the students who have president votes and whose advisor is not 2192.
SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = PRESIDENT_Vote EXCEPT SELECT DISTINCT LName FROM STUDENT WHERE Advisor = "2192"
Among the businesses which have short length of review, which one located in Phoenix?
SELECT DISTINCT T1.business_id FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.city = 'Phoenix' AND T2.review_length = 'Short'
Of the 3 staff members living in Connecticut, can you tell me which one joined the staff first?
SELECT T2.first_name FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id where T1.state_province_county = "Connecticut" order by date_joined_staff asc limit 1
Which player was the high points scorer during the game with an end score of W 93-85?
SELECT high_points FROM table_name_77 WHERE score = "w 93-85"
Where the exports is 13,608.65, what is the total trade?
SELECT total_trade FROM table_26160007_1 WHERE exports = "13,608.65"
What's the average milliseconds of the Rock Tracks?
SELECT AVG ( T2.Milliseconds ) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = "Rock"
Who is the customer who purchased the largest total cost of products in a single order?
SELECT T2.`Customer Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` GROUP BY T1.`Order ID`, T2.`Customer Name` ORDER BY SUM((T1.Sales / (1 - T1.Discount)) * T1.Quantity - T1.Profit) DESC LIMIT 1
Which project in Brooklyn that have the highest request of resources? State the the project ID including all of the name of item requested.
SELECT T1.projectid, T1.item_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.school_city LIKE 'Brooklyn' GROUP BY T1.item_name ORDER BY COUNT(T1.item_name) DESC LIMIT 1
How many events have a Top-25 of 1 and made less than 1 cut?
SELECT MAX(events) FROM table_name_38 WHERE top_25 = 1 AND cuts_made < 1
Which level has wale as artist 1?
SELECT level FROM table_23649244_1 WHERE artist_1 = "Wale"
What is the date of the game at Commerce Bank Ballpark?
SELECT date FROM table_name_67 WHERE field = "commerce bank ballpark"
What is the smallest rank for new zealand?
SELECT MIN(rank) FROM table_name_23 WHERE country = "new zealand"
what's the ungegn for the ១០០ khmer?
SELECT ungegn FROM table_name_23 WHERE khmer = "១០០"
Who is the studio host for the year 2010?
SELECT studio_host FROM table_22485543_1 WHERE year = "2010"
can you show me a list of allergy name?
SELECT Allergy FROM Allergy_Type
How many lesson does customer with first name Ray took?
SELECT COUNT(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = "Ray"
What is the name and capacity for the stadium with the highest average attendance?
SELECT name , capacity FROM stadium ORDER BY average DESC LIMIT 1
Which tonnage has a Date of 26 september 1940, and a Ship Name of ashantian?
SELECT MIN(tonnage___grt__) FROM table_name_84 WHERE date = "26 september 1940" AND ship_name = "ashantian"
What is the race class with most number of races.
SELECT CLASS FROM race GROUP BY CLASS ORDER BY count(*) DESC LIMIT 1
Which year has the most elite users?
SELECT year_id FROM Elite GROUP BY year_id ORDER BY COUNT(user_id) DESC LIMIT 1
What is the result/score that has 6-5 as the record?
SELECT result_score FROM table_name_45 WHERE record = "6-5"
How many different users wrote some reviews?
SELECT count(DISTINCT u_id) FROM review
Which location sold more bottles of beer?
SELECT T2.LocationName FROM rootbeer AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T1.ContainerType = 'Bottle' GROUP BY T2.LocationID ORDER BY COUNT(T1.LocationID) DESC LIMIT 1
Among the students with high salary, what is total number of students with a GPA higher than 3?
SELECT COUNT(T1.student_id) FROM RA AS T1 INNER JOIN student AS T2 ON T1.student_id = T2.student_id WHERE T1.salary = 'high' AND T2.gpa > 3
Which cfl team is manitoba college?
SELECT cfl_team FROM table_21321804_1 WHERE college = "Manitoba"
How many players were from high point, nc?
SELECT COUNT(mlb_draft) FROM table_11677100_15 WHERE hometown = "High Point, NC"
How many among them are with "success"?
SELECT count ( * ) FROM EVENTS AS T1 JOIN Services AS T2 ON T1.Service_ID = T2.Service_ID WHERE T2.Service_Type_Code = 'Marriage' and Event_Details = 'Success'
Which team has 10 losses?
SELECT team FROM table_name_33 WHERE lost = 10
What is the name and job title of the staff who was assigned the latest?
SELECT T1.staff_name , T2.job_title_code FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id ORDER BY T2.date_assigned_to DESC LIMIT 1
Which California State University is located in Kern County?
SELECT campus from campuses where campus like "%California State University%" and county = "Kern"
what is the average price of wine not produced in Sanoma county
SELECT avg ( t2.price ) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County ! = 'Sonoma'
How many episodes have won the award for Outstanding Animated Program (Programming Under One Hour) with less than 100 votes? Calculate the percentage of episodes with less than 100 votes out of total episodes.
SELECT SUM(CASE WHEN T2.votes < 100 THEN 1 ELSE 0 END) AS num , CAST(SUM(CASE WHEN T2.votes < 100 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Award AS T1 INNER JOIN Vote AS T2 ON T1.episode_id = T2.episode_id INNER JOIN Episode AS T3 ON T1.episode_id = T3.episode_id WHERE T1.award = 'Outstanding Animated Program (For Programming Less Than One Hour)';
What is the average Gold where the Nation is Russia (rus) and the number of silver is less than 2?
SELECT AVG(gold) FROM table_name_99 WHERE nation = "russia (rus)" AND silver < 2
Among the countries whose agriculture percentage of the GDP is under 50%, how many of them have an area of over 8000000?
SELECT COUNT(T1.Name) FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country WHERE T2.Agriculture < 50 AND T1.Area > 8000000
Who was the away team when Hawthorn was the home team?
SELECT away_team AS score FROM table_name_23 WHERE home_team = "hawthorn"
What is the Opponent of the game on September 26?
SELECT opponent FROM table_name_40 WHERE date = "september 26"
What was the school/club after round 12, and picked smaller than 342?
SELECT school_club_team FROM table_name_95 WHERE round > 12 AND pick < 342
Find the names of the swimmers who have no record.
SELECT name FROM swimmer WHERE id NOT IN (SELECT swimmer_id FROM record)
Who had the most the most rebounds and how many did they have on April 1?
SELECT high_rebounds FROM table_27700530_14 WHERE date = "April 1"
Which Grid that has a Rider of mike di meglio, and Laps larger than 23?
SELECT AVG(grid) FROM table_name_23 WHERE rider = "mike di meglio" AND laps > 23
Show the name, average attendance, total attendance for stadiums where no accidents happened.
SELECT name , average_attendance , total_attendance FROM stadium EXCEPT SELECT T2.name , T2.average_attendance , T2.total_attendance FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id
What are all the policy types of the customer named "Dayana Robel"?
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 = "Dayana Robel"
What Player with a Place of T10 had a Score of 80-70-72-72=294?
SELECT player FROM table_name_8 WHERE place = "t10" AND score = 80 - 70 - 72 - 72 = 294
List the camera lens names containing substring "Digital".
SELECT name FROM camera_lens WHERE name LIKE "%Digital%"
Give the date of birth of the 2014 Orange Cap winner.
SELECT T2.DOB FROM Season AS T1 INNER JOIN Player AS T2 ON T1.Man_of_the_Series = T2.Player_Id WHERE T1.Season_Year = 2014 AND T1.Orange_Cap IS NOT NULL
Name the party or first elected is 1920
SELECT party FROM table_1342393_16 WHERE first_elected = 1920
what's district with candidates being curt weldon (r) 61.3% bill spingler (d) 38.7%
SELECT district FROM table_1341586_39 WHERE candidates = "Curt Weldon (R) 61.3% Bill Spingler (D) 38.7%"
What is the pick # of cfl team bc lions (7)
SELECT pick__number FROM table_26996293_7 WHERE cfl_team = "BC Lions (7)"
What is the average salary of the employees who takes charge of the sales of over 4 territories?
SELECT AVG(T1.Salary) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID GROUP BY T1.EmployeeID HAVING COUNT(T2.TerritoryID) > 4
How many climbers are from each country?
SELECT Country , COUNT(*) FROM climber GROUP BY Country
Hi I was wondering if you could tell me what the fastest roller coaster is?
SELECT name FROM roller_coaster order BY speed desc limit 1
please show the description of the Aircraft Robinson R-22
SELECT Description from aircraft WHERE Aircraft = 'Robinson R-22'
What is the percentage difference of River City sale compare to Frostie?
SELECT CAST((SUM(CASE WHEN T3.BrandName = 'River City' THEN T2.PurchasePrice ELSE 0 END) - SUM(CASE WHEN T3.BrandName = 'Frostie' THEN T2.PurchasePrice ELSE 0 END)) AS REAL) * 100 / SUM(CASE WHEN T3.BrandName = 'Frostie' THEN T2.PurchasePrice ELSE 0 END) FROM rootbeer AS T1 INNER JOIN `transaction` AS T2 ON T1.RootBeerID = T2.RootBeerID INNER JOIN rootbeerbrand AS T3 ON T1.BrandID = T3.BrandID
Which Series 2 has a Series 3 of deborah meaden?
SELECT series_2 FROM table_name_35 WHERE series_3 = "deborah meaden"
Where was the incident of 2009-09-05?
SELECT location FROM table_name_28 WHERE date = "2009-09-05"
list all the names of programs, ordering by launch time.
SELECT name FROM program ORDER BY launch
What are the names of body builders?
SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID