sentence
stringlengths
3
347
sql
stringlengths
18
804
Which major has the most students?
SELECT Major FROM STUDENT GROUP BY major ORDER BY count(*) DESC LIMIT 1
What is the high bronze total for nations ranked 12?
SELECT MAX(bronze) FROM table_name_15 WHERE rank = "12"
Name the authority for coed gender and chanel college
SELECT authority FROM table_name_67 WHERE gender = "coed" AND name = "chanel college"
Who directed the eposide that was watched by 1.95 million US viewers?
SELECT directed_by FROM table_26736342_1 WHERE us_viewers__millions_ = "1.95"
Can you filter this list to show just the staff members who reported problems with the product named "rem"?
SELECT T3.staff_first_name , T3.staff_last_name FROM problems AS T1 JOIN product AS T2 JOIN staff AS T3 ON T1.product_id = T2.product_id AND T1.reported_by_staff_id = T3.staff_id WHERE T2.product_name = "rem"
If the rank is 17, what are the names?
SELECT name FROM table_24990183_7 WHERE rank = 17
What are the dates of the orders made by the customer named "Jeramie"?
SELECT T2.date_order_placed FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = "Jeramie"
what is the county of California State University-Chico
SELECT county FROM campuses where campus = "California State University-Chico"
What's the top year with the Chassis ats hs1?
SELECT MAX(year) FROM table_name_33 WHERE chassis = "ats hs1"
Hello. What are the IDs of guests with gender code Female?
SELECT guest_id FROM Guests WHERE gender_code = "Female"
Which player is in position center for round 2?
SELECT player FROM table_name_88 WHERE round = "2" AND position = "center"
How many points did Duncan Thompson score?
SELECT MAX(points) FROM table_14342480_15 WHERE player = "Duncan Thompson"
display the ID for those employees who did two or more jobs in the past.
SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*) >= 2
Which Facility ID has a City of license of springfield, ma, and a ERP / Power W smaller than 230?
SELECT MAX(facility_id) FROM table_name_15 WHERE city_of_license = "springfield, ma" AND erp___power_w < 230
How old is each student and how many students are each age?
SELECT age , count(*) FROM Student GROUP BY age
What is the description of the category that tofu belongs to?
SELECT T1.Description FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID WHERE T2.ProductName = 'tofu'
What is the full name of the employee who is in charge of the territory of Denver?
SELECT T1.FirstName, T1.LastName 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 T3.TerritoryDescription = 'Denver'
Which Constructor has the Winning Driver, Jo Siffert?
SELECT constructor FROM table_name_72 WHERE winning_driver = "jo siffert"
Which Category has a Year larger than 1996, and a Result of won, and a Title of brokeback mountain, and an Award of golden globe award?
SELECT category FROM table_name_45 WHERE year > 1996 AND result = "won" AND title = "brokeback mountain" AND award = "golden globe award"
what is the nominated work title when the result is won, the organisation is star awards and the award is top 10 most popular female artiste in the year 2007?
SELECT nominated_work_title FROM table_name_52 WHERE result = "won" AND organisation = "star awards" AND award = "top 10 most popular female artiste" AND year > 2007
Who is the rider that has a rank of less than 8 in the year 2000, and whose speed was 18.32 km/h?
SELECT rider FROM table_name_43 WHERE rank < 8 AND year = 2000 AND speed = "18.32 km/h"
How many times did Morgan win The Masters Tournament with fewer than 12 appearances?
SELECT AVG(wins) FROM table_name_12 WHERE tournament = "masters tournament" AND events < 12
Thank you! Can you update that list to include the instructor names and which departments they are in?
SELECT name, dept_name FROM instructor WHERE id NOT IN ( SELECT id FROM teaches )
What is the weight of the person born in 1980?
SELECT weight FROM table_name_63 WHERE born = "1980"
What is the last round with club team Guelph Storm (ohl)?
SELECT MAX(round) FROM table_11803648_22 WHERE club_team = "Guelph Storm (OHL)"
How many detentions are there?
SELECT distinct count ( * ) from detention
Which conference is in Jackson, Mississippi?
SELECT current_conference FROM table_10577579_3 WHERE location = "Jackson, Mississippi"
What is the Winner when anke huber chanda rubin was semi finalist?
SELECT winner FROM table_name_31 WHERE semi_finalists = "anke huber chanda rubin"
What are the neighborhoods that are located in the North Center community area?
SELECT T2.neighborhood_name FROM Community_Area AS T1 INNER JOIN Neighborhood AS T2 ON T1.community_area_no = T2.community_area_no WHERE T1.community_area_name = 'North Center'
Can you tell me the Team 2 that has the Venue of binh duong stadium, vietnam?
SELECT team_2 FROM table_name_27 WHERE venue = "binh duong stadium, vietnam"
What is the zip code of staff with first name as Janessa and last name as Sawayn lived?
SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn"
Name the chapter with chinese of 釋水
SELECT chapter FROM table_name_28 WHERE chinese = "釋水"
What is the most common amenity in the dorms?
SELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T1.amenid = T2.amenid GROUP BY T2.amenid ORDER BY count(*) DESC LIMIT 1
Which "music" podcast has the longest title?
SELECT T2.title FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'music' ORDER BY LENGTH(T2.title) DESC LIMIT 1
Name the most rank
SELECT MAX(rank) FROM table_22355_68
What is the customer id of the customer with the most accounts, and how many accounts does this person have?
SELECT customer_id , count(*) FROM Accounts GROUP BY customer_id ORDER BY count(*) DESC LIMIT 1
Find the abbreviation and country of the airline that has fewest number of flights?
SELECT T1.Abbreviation , T1.Country FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) LIMIT 1
What was the actors name that vadim ilyenko directed?
SELECT actors_name FROM table_10236830_1 WHERE director = "Vadim Ilyenko"
what is the highest lane number for johan wissman when the react is less than 0.242?
SELECT MAX(lane) FROM table_name_48 WHERE name = "johan wissman" AND react < 0.242
What is the college that Jeffrey Simmer plays for?
SELECT college FROM table_15817998_5 WHERE player = "Jeffrey Simmer"
Which city does the student whose last name is "Kim" live in?
SELECT city_code FROM Student WHERE LName = "Kim"
The boat named Agamemnon has what status?
SELECT status FROM table_name_94 WHERE name = "agamemnon"
what is fault status of engineer id 8?
SELECT fault_status from Engineer_Visits where engineer_id = 8
how many body builder id are there
select count ( * ) from body_builder
Who got more than 10,000 votes?
SELECT player_name from player WHERE votes > 10000
How many pages of Wikipedia are there in total on the Catalan language?
SELECT pages FROM langs WHERE lang = 'ca'
can i have the master customer id
SELECT master_customer_id FROM CMI_Cross_References
What is the date of the game where Dipietro earned a decision and Carolina was the visiting team?
SELECT date FROM table_name_28 WHERE decision = "dipietro" AND visitor = "carolina"
Most number of students affected by which allergy?
SELECT Allergy FROM Has_allergy GROUP BY Allergy ORDER BY count ( * ) DESC LIMIT 1
Which 2008 Tournament has a 2007 of a and a 2010 of qf?
SELECT 2008 FROM table_name_46 WHERE 2007 = "a" AND 2010 = "qf"
What was the date of the Mariners game that had a loss of Segui (0-5)?
SELECT date FROM table_name_77 WHERE loss = "segui (0-5)"
Sure, can you add to the table the unit of measure values for the product category codes of Spices and Herbs?
select unit_of_measure from Ref_Product_Categories where product_category_code = 'Herbs' or product_category_code = 'Spices'
Where did the match with opponent Laverne Clark occur?
SELECT location FROM table_name_14 WHERE opponent = "laverne clark"
What is the name of Anguilla's capital, and where is it located?
SELECT Capital, Province FROM country WHERE Name = 'Anguilla'
What is the score of the home team aginst Essendon?
SELECT home_team AS score FROM table_name_89 WHERE away_team = "essendon"
What Score in the final has a Surface of hard, a Championship of washington, d.c. , u.s., and an Opponent in the final of ivan lendl?
SELECT score_in_the_final FROM table_name_44 WHERE surface = "hard" AND championship = "washington, d.c. , u.s." AND opponent_in_the_final = "ivan lendl"
What is the date for game 4?
SELECT date FROM table_name_97 WHERE game = "game 4"
What is the highest Year, when the Venue is Beijing, PR China?
SELECT MAX(year) FROM table_name_54 WHERE venue = "beijing, pr china"
From August 10 to August 20, 2018, how many cancelled flights of air carrier named Spirit Air Lines: NK are there?
SELECT COUNT(*) FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description = 'Spirit Air Lines: NK' AND T2.CANCELLED = 0 AND T2.FL_DATE BETWEEN '2018/8/10' AND '2018/8/20'
What kind of government does Iran have?
SELECT T2.Government FROM country AS T1 INNER JOIN politics AS T2 ON T1.Code = T2.Country WHERE T1.Name = 'Iran'
What was the average elimination time of all teams?
SELECT avg ( TIME ) FROM elimination
What is the Name of the power station with a Capacity of 25 MW?
SELECT name FROM table_name_9 WHERE capacity__mw_ = 25
Mention the full name, hired date and performance status of the employee whose location is in Utah state.
SELECT T1.firstname, T1.lastname, T1.hiredate, T1.performance FROM employee AS T1 INNER JOIN location AS T2 ON T1.locationID = T2.locationID WHERE T2.state = 'UT'
How many shipments did Zachery Hicks transport goods to New York in the year 2016?
SELECT COUNT(*) FROM city AS T1 INNER JOIN shipment AS T2 ON T1.city_id = T2.city_id INNER JOIN driver AS T3 ON T3.driver_id = T2.driver_id WHERE T3.first_name = 'Zachery' AND T3.last_name = 'Hicks' AND T1.city_name = 'New York' AND STRFTIME('%Y', T2.ship_date) = '2016'
Who has a rank below 125 and time of 00: 56.30?
SELECT name FROM table_name_32 WHERE rank < 125 AND time = "00: 56.30"
What are the music festivals of Everybody Have Fun Tonight song?
SELECT T1.Music_Festival FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T2.Song = " Everybody Have Fun Tonight "
What position was picked for Canada on Pick 8?
SELECT position FROM table_name_61 WHERE country = "canada" AND pick = "8"
Which territory has the greatest difference in sales from previous year to this year? Indicate the difference, as well as the name and country of the region.
SELECT SalesLastYear - SalesYTD, Name, CountryRegionCode FROM SalesTerritory ORDER BY SalesLastYear - SalesYTD DESC LIMIT 1
How many members are female?
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 WHERE t3.sex = "F"
How old is the doctor named Zach?
SELECT age FROM Person WHERE job = 'doctor' AND name = 'Zach'
How much is the profit for smoke turquoise purple blue salmon that was delivered in person on 5/7/1996?
SELECT T1.l_extendedprice * (1 - T1.l_discount) - T2.ps_supplycost * T1.l_quantity AS num FROM lineitem AS T1 INNER JOIN partsupp AS T2 ON T1.l_suppkey = T2.ps_suppkey INNER JOIN part AS T3 ON T2.ps_partkey = T3.p_partkey WHERE T1.l_receiptdate = '1996-05-07' AND T1.l_shipinstruct = 'DELIVER IN PERSON' AND T3.p_name = 'smoke turquoise purple blue salmon'
What is the 1st leg of team 1 Lyon?
SELECT 1 AS st_leg FROM table_name_26 WHERE team_1 = "lyon"
How many different types of pet are there?
SELECT count(DISTINCT pettype) FROM pets
Where did they have the divisional playoffs?
SELECT game_site FROM table_name_59 WHERE week = "divisional playoffs"
Among the countries whose GDP is over 1000000, how many of them have a population groth rate of over 3%?
SELECT COUNT(T1.Country) FROM economy AS T1 INNER JOIN population AS T2 ON T1.Country = T2.Country WHERE T1.GDP > 1000000 AND T2.Population_Growth > 3
Find the name of the company that has the least number of phone models. List the company name and the number of phone model produced by that company.
SELECT Company_name , count(*) FROM phone GROUP BY Company_name ORDER BY count(*) ASC LIMIT 1;
How many touchdowns are there that has field goals less than 0 and 0 extra points?
SELECT SUM(touchdowns) FROM table_name_53 WHERE extra_points = 0 AND field_goals < 0
What percentage of the votes in Tippah did Obama get?
SELECT obama_percentage FROM table_20799587_1 WHERE county = "Tippah"
Name the height for the center position from kansas
SELECT height_in_ft FROM table_name_93 WHERE position = "center" AND school_club_team_country = "kansas"
What is the host year of city "Taizhou (Zhejiang)"?
SELECT T2.year FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T1.city = "Taizhou ( Zhejiang ) "
List the all the cities and its city population for provinces with population more than 1000000.
SELECT T1.Name, T1.Population FROM city AS T1 INNER JOIN province AS T2 ON T2.Name = T1.Province WHERE T2.Population > 1000000
Name the deceased players whose death country is different from his birth country order by birth year.
SELECT firstName, lastName FROM Master WHERE birthCountry != deathCountry ORDER BY birthYear
How many stadiums are there?
SELECT count(*) FROM stadium
How many casualties were in the earthquake with an unknown intensity and an epicenter in the bouïra province?
SELECT casualties FROM table_name_3 WHERE intensity = "unknown" AND epicenter = "bouïra province"
The match against Valentijn Overeem had what method?
SELECT method FROM table_name_11 WHERE opponent = "valentijn overeem"
Where was the game on March 11, 1999 played?
SELECT venue FROM table_name_30 WHERE date = "march 11, 1999"
Where is friendship collegiate charter school located
SELECT hometown FROM table_11677691_8 WHERE school = "Friendship Collegiate Charter school"
What is John Oxendine at in the poll where Karen Handel is at 38%?
SELECT john_oxendine FROM table_name_75 WHERE karen_handel = "38%"
For the Indian Wells Masters tournament, what was the country?
SELECT country FROM table_name_96 WHERE tournament = "indian wells masters"
What is the birthplace of Pete Sanderson?
SELECT birthplace FROM table_name_71 WHERE real_name = "pete sanderson"
Which Winning score has a Tournament of walt disney world/oldsmobile classic?
SELECT winning_score FROM table_name_67 WHERE tournament = "walt disney world/oldsmobile classic"
Tell me the average top 25 with events of 5 and cuts madde less than 3
SELECT AVG(top_25) FROM table_name_33 WHERE events = 5 AND cuts_made < 3
In customers with the first name of Erica, how many of them bought a quantity below 200?
SELECT COUNT(T1.ProductID) FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.FirstName = 'Erica' AND T1.Quantity < 200
State name of unemployed students who have the longest duration of absense from school.
SELECT T1.name FROM longest_absense_from_school AS T1 INNER JOIN unemployed AS T2 ON T1.name = T2.name ORDER BY T1.month DESC LIMIT 1
Who is the player that won in the year 1978?
SELECT player FROM table_name_81 WHERE year_s__won = "1978"
What's the type for the brand herceptin with an approval date of before 2006?
SELECT type FROM table_name_5 WHERE approval_date < 2006 AND brand_name = "herceptin"
What is Tie no, when Home Team is "Gillingham"?
SELECT tie_no FROM table_name_96 WHERE home_team = "gillingham"
Which OF-5 is in Ghana?
SELECT of_5 FROM table_name_48 WHERE country = "ghana"
What is the first year that the Favorite Male Replacement category had Ben Vereen as a nominee?
SELECT MIN(year) FROM table_name_48 WHERE category = "favorite male replacement" AND nominee = "ben vereen"
What was the game record during week 7?
SELECT team_record FROM table_24481478_1 WHERE week = 7