sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What movies contain the words "deleted scenes" in the column Special Features? | SELECT * FROM film WHERE special_features LIKE '%Deleted Scenes%' |
What is the smallest crowd with fitzroy as the home team? | SELECT MIN(crowd) FROM table_name_8 WHERE away_team = "fitzroy" |
What is the Year commissioned of the power station with a Gross head of 60 metres and Average annual output of less than 59 million KWh? | SELECT MAX(year_commissioned) FROM table_name_75 WHERE gross_head__metres_ = 60 AND average_annual_output__million_kwh_ < 59 |
What country is phil mickelson from? | SELECT country FROM table_name_57 WHERE player = "phil mickelson" |
What is the customer id, first and last name with most number of accounts. | SELECT T1.customer_id , T2.customer_first_name , T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1 |
How about the most recent one? | SELECT year FROM Movie order by year DESC limit 1 |
What was the score when the partner is Rafael Osuna? | SELECT score FROM table_2215159_2 WHERE partner = "Rafael Osuna" |
Find the number of different states which banks are located at. | SELECT COUNT(DISTINCT state) FROM bank |
Find the names of all the product characteristics. | SELECT DISTINCT characteristic_name FROM CHARACTERISTICS |
Find the average ram mib size of the chip models that are never used by any phone. | SELECT avg(RAM_MiB) FROM chip_model WHERE model_name NOT IN (SELECT chip_model FROM phone) |
Which Total is the lowest one that has a Rank smaller than 1? | SELECT MIN(total) FROM table_name_47 WHERE rank < 1 |
What is the name of the game that has been played the most? | SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid ORDER BY sum(hours_played) DESC LIMIT 1 |
What was the highest number of WJC Jews that had a WJC rank of 6 and a ARDA rank of more than 8? | SELECT MAX(number_of_jews__wjc_) FROM table_name_1 WHERE rank___wjc__ = 6 AND rank__arda_ > 8 |
What is the s wicket value associated with Shaun Young? | SELECT s_wicket FROM table_name_51 WHERE player = "shaun young" |
How many losses for the team atl. colegiales? | SELECT MAX(losses) FROM table_18594107_2 WHERE team = "Atl. Colegiales" |
Give me the names of all the students | SELECT lname, fname FROM STUDENT |
List all of the ids for left-footed players with a height between 180cm and 190cm. | SELECT player_api_id FROM Player WHERE height >= 180 AND height <= 190 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE preferred_foot = "left" |
Provide the congress representatives' IDs of the postal points in East Springfield. | SELECT T2.district FROM zip_data AS T1 INNER JOIN zip_congress AS T2 ON T1.zip_code = T2.zip_code WHERE T1.city = 'East Springfield' |
Find the distinct driver id and the stop number of all drivers that have a shorter pit stop duration than some drivers in the race with id 841. | SELECT DISTINCT driverid, STOP FROM pitstops WHERE duration < (SELECT MAX(duration) FROM pitstops WHERE raceid = 841) |
What is the most populace city that speaks English? | SELECT T1.Name , T1.Population FROM city AS T1 JOIN countrylanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Language = "English" ORDER BY T1.Population DESC LIMIT 1 |
What is the year when sigourney weaver was nominated for best actress? | SELECT year__ceremony_ FROM table_name_26 WHERE category = "best actress" AND actor_actress = "sigourney weaver" |
Which Architecture and modelling has a Unit test of no, and a Projects templates of limited? | SELECT architecture_and_modelling FROM table_name_5 WHERE unit_test = "no" AND projects_templates = "limited" |
Which city is the headquarter of the store named "Blackville" in? | SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.store_name = "Blackville" |
Which song directed by datta naik had the ending stranza written by Johnny Walker? | SELECT additional_info FROM table_2528382_1 WHERE music_director = "Datta Naik" |
How many students does each advisor have? | SELECT advisor , count(*) FROM Student GROUP BY advisor |
What is the name of team 2 that has 1-2 as the score? | SELECT team_2 FROM table_name_91 WHERE score = "1-2" |
What is the total number of airlines? | SELECT count(*) FROM airlines |
How many keywords are there for season 9, episode 23 of law_and_order? | SELECT COUNT(T2.keyword) FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.season = 9 AND T1.episode = 23 |
Provide the name of the airport which landed the most number of flights on 2018/8/15. | SELECT T1.Description FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.DEST WHERE T2.FL_DATE = '2018/8/15' ORDER BY T2.DEST DESC LIMIT 1 |
How many of the students joined two organization? | SELECT COUNT(name) FROM enlist WHERE organ >= 2 |
What is the least w? | SELECT MIN(w) FROM table_29704430_1 |
How many gold medals were won by the nation that won over 4 silver medals, over 14 bronze, and 97 medals total? | SELECT COUNT(gold) FROM table_name_88 WHERE silver > 4 AND bronze > 14 AND total = 97 |
What was the attendance when the Southend United was the home team? | SELECT attendance FROM table_name_1 WHERE home_team = "southend united" |
Show the church names for the weddings of all people older than 30. | SELECT T4.name FROM wedding AS T1 JOIN people AS T2 ON T1.male_id = T2.people_id JOIN people AS T3 ON T1.female_id = T3.people_id JOIN church AS T4 ON T4.church_id = T1.church_id WHERE T2.age > 30 OR T3.age > 30 |
Which opponent has a loss of wells (1-3)? | SELECT opponent FROM table_name_95 WHERE loss = "wells (1-3)" |
Can you tell me the Record that has the Opponent of vs. hamilton tiger cats? | SELECT record FROM table_name_55 WHERE opponent = "vs. hamilton tiger cats" |
Thank you. What are their names? | SELECT employee_name FROM Employees WHERE employee_id IN ( SELECT employee_id FROM Employees EXCEPT SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed ) |
How many products are there under the category "Seeds"? | SELECT count(*) FROM products WHERE product_category_code = "Seeds" |
What is First Member, when Election is "1871 by-election"? | SELECT first_member FROM table_name_95 WHERE election = "1871 by-election" |
What was the episode name when share was 8? | SELECT episode FROM table_20522228_2 WHERE share = 8 |
What Field was Commissioned in 1958, 2005? | SELECT field FROM table_name_24 WHERE commissioned = "1958, 2005" |
What are the statuses and average populations of each city? | SELECT Status , avg(Population) FROM city GROUP BY Status |
Show the most common nationality for journalists. | SELECT Nationality FROM journalist GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1 |
Which county has the largest population? Give me the name of the county. | SELECT County_name FROM county ORDER BY Population DESC LIMIT 1 |
What is the average latitude and longitude of stations located in San Jose city? | SELECT avg(lat) , avg(long) FROM station WHERE city = "San Jose" |
What are the full names of the customer who gave River City a 5-star? | SELECT T1.First, T1.Last FROM customers AS T1 INNER JOIN rootbeerreview AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN rootbeerbrand AS T3 ON T2.BrandID = T3.BrandID WHERE T3.BrandName = 'River City' AND T2.StarRating = 5 |
What was the date when order id 5 was placed? | SELECT date_order_placed FROM Orders WHERE order_id = 5 |
Show the names of customers who use Credit Card payment method | SELECT customer_name from customers where payment_method_code = 'Credit Card' |
On what date did the Du monde entier company request that 9 units of Filo Mix be sent to it? | SELECT T2.OrderDate FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN `Order Details` AS T3 ON T2.OrderID = T3.OrderID INNER JOIN Products AS T4 ON T3.ProductID = T4.ProductID WHERE T4.ProductName = 'Filo Mix' AND T3.Quantity = 9 AND T1.CompanyName = 'Du monde entier' |
What is the average number of reviews of all the root beer brands from "CA" State? | SELECT CAST(COUNT(*) AS REAL) / COUNT(DISTINCT T1.BrandID) AS avgreview FROM rootbeerbrand AS T1 INNER JOIN rootbeerreview AS T2 ON T1.BrandID = T2.BrandID WHERE T1.State = 'CA' |
WHAT IS THE TOTAL WITH A TO PAR OF 10? | SELECT MAX(total) FROM table_name_30 WHERE to_par = 10 |
Who had the highest rebounds in game 2? | SELECT high_rebounds FROM table_23286112_12 WHERE game = 2 |
What was the number of attendance at Stadion with a score of 2-0 | SELECT attendance FROM table_name_90 WHERE venue = "stadion" AND score = "2-0" |
How many goals on average are there for rank 3? | SELECT AVG(goals_for) FROM table_name_52 WHERE rank = 3 |
What is the highest number of bronzes for countries ranking over 5 with 0 golds? | SELECT MAX(bronze) FROM table_name_74 WHERE rank > 5 AND gold < 0 |
What is the extra when the result is 4th at the NCAA Championships? | SELECT extra FROM table_name_28 WHERE result = "4th" AND tournament = "ncaa championships" |
What is the price and name of the product bought by Erica Xu? | SELECT T3.Price, T3.Name FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN Products AS T3 ON T1.ProductID = T3.ProductID WHERE T2.FirstName = 'Erica' AND T2.LastName = 'Xu' |
Which game type has least number of games? | SELECT gtype FROM Video_games GROUP BY gtype ORDER BY COUNT(*) LIMIT 1 |
How many female Professors do we have? | SELECT count(*) FROM Faculty WHERE Sex = 'F' AND Rank = "Professor" |
Among the complaints received in year 2015, what is total number of complaints timely response and closed with an explanation? | SELECT COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE strftime('%Y', T1.`Date received`) = '2015' AND T2.`Timely response?` = 'Yes' AND T2.`Company response to consumer` = 'Closed with explanation' |
what are the results of the opponent of spain? | SELECT results¹ FROM table_name_78 WHERE opponent = "spain" |
Find the total access count of all documents in the most popular document type. | SELECT sum(access_count) FROM documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 1 |
How many rooms have king beds? Report the number for each decor type. | SELECT decor , count(*) FROM Rooms WHERE bedType = "King" GROUP BY decor; |
What is the highest NGC number that has a Declination ( J2000 ) of °04′58″ and a Apparent magnitude larger than 7.3? | SELECT MAX(ngc_number) FROM table_name_5 WHERE declination___j2000__ = "°04′58″" AND apparent_magnitude > 7.3 |
The fighting knights has what type of nickname? | SELECT type FROM table_1183842_1 WHERE nickname = "Fighting Knights" |
What's the 2006 if there's less than 6.7 in 2007 and less than 3.4 in 2009? | SELECT SUM(2006) FROM table_name_46 WHERE 2007 < 6.7 AND 2009 < 3.4 |
What is the first name of each student entrolled in class ACCT-211? | SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN student AS T3 ON T2.stu_num = T3.stu_num WHERE T1.crs_code = 'ACCT-211' |
How many people live in Norton? | SELECT SUM(population) FROM table_name_1 WHERE town = "norton" |
i want to highest resolution in the song table | SELECT resolution FROM song ORDER BY resolution DESC LIMIT 1 |
who are all the players for st. thomas aquinas high school | SELECT player FROM table_11677691_12 WHERE school = "St. Thomas Aquinas High school" |
Among the most important courses, what is the name of the most difficult course? | SELECT name FROM course WHERE credit = ( SELECT MAX(credit) FROM course ) AND diff = ( SELECT MAX(diff) FROM course ) |
Give the student staff ratio of university ID 35. | SELECT student_staff_ratio FROM university_year WHERE university_id = 35 |
Tell me the price of Cream Soda in dollars, euros and pounds. | SELECT price_in_dollars, price_in_euros, price_in_pounds FROM catalog_contents WHERE catalog_entry_name = "Cream Soda" |
Provide the code summarization for the weather recorded by the weather station which contained the no.2 store on 2013/2/12. | SELECT T1.codesum FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T1.`date` = '2013-02-12' AND T2.store_nbr = 2 |
What are the names of customers who have not taken a Mortage loan? | SELECT cust_name FROM customer EXCEPT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE T2.loan_type = 'Mortgages' |
hi. what is the average capacity of the stadiums? | SELECT avg ( capacity ) FROM stadium |
Which trainer had a time of 1:10.09 with a year less than 2009? | SELECT trainer FROM table_name_34 WHERE year < 2009 AND time = "1:10.09" |
What are the airline names and abbreviations for airlines in the USA? | SELECT Airline , Abbreviation FROM AIRLINES WHERE Country = "USA" |
What is the date for a week before 9, and a opponent of dallas cowboys? | SELECT date FROM table_name_18 WHERE week < 9 AND opponent = "dallas cowboys" |
Which coach has the best performance for team DET in history? What was the winning percentage? Name the coach and the year he coached. | SELECT CAST(T2.W AS REAL) / T2.G, T1.firstName, T1.lastName, T2.year FROM Master AS T1 INNER JOIN Coaches AS T2 ON T1.coachID = T2.coachID INNER JOIN ( SELECT coachID FROM Coaches ORDER BY CAST(w AS REAL) / g DESC LIMIT 1 ) AS T3 ON T2.coachID = T3.coachID |
Which Drawn has a Points of 6, and a Against larger than 16? | SELECT SUM(drawn) FROM table_name_17 WHERE points = 6 AND against > 16 |
What is the Release Date for Model Number c7 1.8? | SELECT release_date FROM table_name_62 WHERE model_number = "c7 1.8" |
Name the swuinsuit for oregon | SELECT swimsuit FROM table_17516967_1 WHERE state = "Oregon" |
What is To Par, when Place is "T5", and when Country is "United States"? | SELECT to_par FROM table_name_18 WHERE place = "t5" AND country = "united states" |
Which customers have at least 2 accounts? List their first names please. | SELECT T2.customer_first_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id HAVING count ( * ) > = 2 |
Show names of companies and that of employees in descending order of number of years working for that employee. | SELECT T3.Name , T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID ORDER BY T1.Year_working |
What year did the man from Norway who won the Holmenkollen in 1958 win the FIS Nordic World Ski Championships? | SELECT fis_nordic_world_ski_championships FROM table_174491_1 WHERE country = "Norway" AND holmenkollen = "1958" |
Please list the Asian populations of all the residential areas with the bad alias "URB San Joaquin". | SELECT SUM(T1.asian_population) FROM zip_data AS T1 INNER JOIN avoid AS T2 ON T1.zip_code = T2.zip_code WHERE T2.bad_alias = 'URB San Joaquin' |
Which team has the oldest player? | SELECT Team FROM player ORDER BY Age DESC LIMIT 1 |
What is the Metric value of Russian че́тверть? | SELECT metric_value FROM table_name_19 WHERE russian = "че́тверть" |
What day did Chris Maddocks compete in the 35000 m? | SELECT date FROM table_name_83 WHERE athlete = "chris maddocks" AND event = "35000 m" |
From which college was the player who won the most award in 1970. | SELECT college FROM players WHERE playerID = ( SELECT playerID FROM awards_players WHERE year = 1970 GROUP BY playerID ORDER BY COUNT(award) DESC LIMIT 1 ) |
What are the names of managers in ascending order of level? | SELECT Name FROM manager ORDER BY LEVEL ASC |
Which Water (sqmi) has a Pop (2010) of 359, and a Longitude smaller than -97.176811? | SELECT MAX(water__sqmi_) FROM table_name_91 WHERE pop__2010_ = 359 AND longitude < -97.176811 |
What is the total number of roll for Te Hapua school? | SELECT COUNT(roll) FROM table_name_12 WHERE name = "te hapua school" |
For which Game 4, did David Boyle play in Game 3? | SELECT game_4 FROM table_name_41 WHERE game_3 = "david boyle" |
Which party's candidate is Grech Louis Grech? | SELECT party FROM table_name_36 WHERE candidate = "grech louis grech" |
Show me the names of all artist? | SELECT Name FROM ARTIST |
Please list the starting stations of the bike trips made on a day with a max humidity over 80 in 2013 in the area where the zip code is 94107. | SELECT DISTINCT T1.start_station_name FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE SUBSTR(CAST(T2.date AS TEXT), -4) = '2013' AND T2.zip_code = 94107 AND T2.max_temperature_f > 80 |
Can you list them for me with their names and majors? | First name? | Yes please. First name and major. | SELECT fname , major FROM Student WHERE StuID NOT IN ( SELECT StuID FROM Has_allergy WHERE Allergy = "Soy" ) |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.