sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
Show all the buildings that have at least 10 professors. | SELECT building FROM Faculty WHERE rank = "Professor" GROUP BY building HAVING COUNT(*) >= 10 |
What is the rank of the gatchaman of Jinpei? | SELECT rank FROM table_name_76 WHERE gatchaman = "jinpei" |
When did event number 7 happen for user number -8022267440849930000? | SELECT T1.timestamp FROM events_relevant AS T1 INNER JOIN app_events AS T2 ON T1.event_id = T2.event_id WHERE T2.app_id = -8022267440849930000 AND T1.event_id = 7 |
What is his visit details? | SELECT T2.Visit_Details FROM VISITORS AS T1 JOIN VISITS AS T2 ON T1.Tourist_ID = T2.Tourist_ID WHERE T1.Tourist_Details = "Vincent" |
What is the kosal with hatibandha as the sambalpuri cinema? | SELECT kosal FROM table_name_94 WHERE sambalpuri_cinema = "hatibandha" |
What was the record at the game with a result of W 13-12 after week 4? | SELECT record FROM table_name_10 WHERE week > 4 AND result = "w 13-12" |
How many students have never been absent from school? | SELECT COUNT(name) FROM longest_absense_from_school WHERE `month` = 0 |
What are all distinct country for artists? | SELECT DISTINCT country FROM artist |
What is the location and attendance after game 2, and the team New Orleans? | SELECT location_attendance FROM table_name_99 WHERE game > 2 AND team = "new orleans" |
oh wow that's a lot! and how many stations have those started from? | SELECT count ( distinct start_station_name ) FROM trip WHERE start_date LIKE "8/%" |
What was the score of the home team in the match at Western Oval? | SELECT home_team AS score FROM table_name_3 WHERE venue = "western oval" |
Name the title of the book with the most number of pages that was published from 1990 to 2000 by publisher Free Press. | SELECT T1.title FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T2.publisher_name = 'Free Press' AND STRFTIME('%Y', T1.publication_date) BETWEEN '1990' AND '2000' ORDER BY T1.num_pages DESC LIMIT 1 |
Tell me the count of total number of residents | SELECT count ( * ) FROM Residents |
What was the score on February 21 when the home team was the Pittsburgh Penguins? | SELECT score FROM table_name_6 WHERE home = "pittsburgh penguins" AND date = "february 21" |
Calculate the production volume of the dairy product 'Mascarpone Fabioli'. | SELECT SUM(UnitsInStock + UnitsOnOrder) FROM Products WHERE ProductName = 'Mascarpone Fabioli' |
What is the production code for the episode that originally aired on January 8, 1993? | SELECT MAX(production_code) FROM table_2409041_5 WHERE original_air_date = "January 8, 1993" |
On which date was the game played at Tiger Stadium? | SELECT date FROM table_14958620_1 WHERE game_site = "Tiger Stadium" |
Show all locations that have train stations with at least 15 platforms and train stations with more than 25 total passengers. | SELECT DISTINCT LOCATION FROM station WHERE number_of_platforms >= 15 AND total_passengers > 25 |
What is Set 5, when Date is Jun 26, and when Set 2 is 25-22? | SELECT set_5 FROM table_name_46 WHERE date = "jun 26" AND set_2 = "25-22" |
What is the season for no award given for rookie of the year? | SELECT season FROM table_13082900_1 WHERE rookie_of_the_year = "No award given" |
What country is charley hoffman from? | SELECT country FROM table_28498999_4 WHERE player = "Charley Hoffman" |
Which constructor was present at the Redex Trophy race? | SELECT constructor FROM table_1140114_5 WHERE race_name = "RedeX Trophy" |
What was actor Teresa Graves's series before the year 1993? | SELECT series FROM table_name_82 WHERE year < 1993 AND actor = "teresa graves" |
How much gold did South Korea get? | SELECT SUM(gold) FROM table_name_49 WHERE nation = "south korea" |
In 2014, what is the name of the university which was considered a leader in the publications rank? | SELECT T3.university_name FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id INNER JOIN university AS T3 ON T3.id = T2.university_id WHERE T1.criteria_name = 'Publications Rank' AND T2.year = 2014 AND T1.id = 17 ORDER BY T2.score DESC LIMIT 1 |
Return all reviewer names and movie names together in a single list. | SELECT name FROM Reviewer UNION SELECT title FROM Movie |
What is the height of the building named 555 17th street? | SELECT height_ft___m FROM table_name_77 WHERE name = "555 17th street" |
WHAT POSITION HAS A 23 PICK? | SELECT position FROM table_name_50 WHERE pick = 23 |
What years did the sdrive16d model have a Torque of n·m (lb·ft)@1750-3000? | SELECT years FROM table_name_74 WHERE torque = "n·m (lb·ft)@1750-3000" AND model = "sdrive16d" |
Return the name and gender of the staff who was assigned in 2016. | SELECT T1.staff_name, T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id = T2.staff_id WHERE T2.date_assigned_from LIKE "2016%" |
Find the names of states that have some college students playing in the mid position but not in the goalie position. | SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie' |
Who is the home team that tied no 2? | SELECT home_team FROM table_name_2 WHERE tie_no = "2" |
Among the movies directed by Wolfgang Reitherman, which one of them was the most popular? | SELECT T2.movie_title FROM director AS T1 INNER JOIN movies_total_gross AS T2 ON T1.name = T2.movie_title WHERE T1.director = 'Wolfgang Reitherman' ORDER BY T2.total_gross DESC LIMIT 1 |
On which day was the most verbose complaint received? | SELECT `Date received` FROM callcenterlogs WHERE ser_time = ( SELECT MAX(ser_time) FROM callcenterlogs ) |
can you list the elimination times of those with the largest days held? | Again, there can only be one with the largest days held, would you like that one? There are not multiple that can be "largest" | yes, please | SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID = T2.Wrestler_ID ORDER BY T2.Days_held DESC LIMIT 1 |
What are the home team scores when richmond is the home team? | SELECT home_team AS score FROM table_16388506_1 WHERE home_team = "Richmond" |
what album is 4:30 long | SELECT album FROM table_name_95 WHERE length = "4:30" |
what's the s mestizo with asians being 0.2% and whites being 74.8% | SELECT s_mestizo FROM table_1333612_1 WHERE asians = "0.2%" AND whites = "74.8%" |
Okay good to know. How many products have a daily hire cost lower than 20? | SELECT COUNT ( product_id ) FROM products_for_hire WHERE daily_hire_cost < 20 |
How many broadband subscribers are there where there are ~47,372 users? | SELECT number_of_broadband_subscribers FROM table_name_56 WHERE number_of_users = "~47,372" |
What are the name and description for role code "MG"? | SELECT role_name , role_description FROM ROLES WHERE role_code = "MG" |
What is the average number of international passengers of all airports? | SELECT avg(International_Passengers) FROM airport |
What was the score of the game that had a loss of Cerutti (0-1)? | SELECT score FROM table_name_91 WHERE loss = "cerutti (0-1)" |
What is the year of daylight service when the builder was Alco? | SELECT years_of_daylight_service FROM table_name_7 WHERE builder = "alco" |
What is the profit for the product "792"? | SELECT T1.ListPrice - T2.StandardCost FROM ProductListPriceHistory AS T1 INNER JOIN ProductCostHistory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductID = 792 |
What is the Overall Record when the Last 10 Meetings is ou, 7-3, and Norman is ou, 18-3? | SELECT overall_record FROM table_name_4 WHERE last_10_meetings = "ou, 7-3" AND at_norman = "ou, 18-3" |
state the projects with least hours? | Do you need the project code or name? | name | SELECT name FROM projects ORDER BY hours LIMIT 1 |
who had high rebounds when score is w 111–92 (ot) | SELECT high_rebounds FROM table_13762472_4 WHERE score = "W 111–92 (OT)" |
Who is the oldest player? | SELECT Player_Name FROM Player ORDER BY DOB ASC LIMIT 1 |
List the name of all the products with order quantities greater than or equal to 10 in the central superstore that has been shipped by the slowest delivery method. | SELECT DISTINCT T2.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.`Ship Mode` = 'Standard Class' AND T1.Quantity >= 10 |
Hello! Can you display a list of all of the Savings Account customer IDs and the associated balances? | select custid,balance from savings |
Among the countries with the African ethnic group, how many of them has a population of over 10000000? | SELECT COUNT(T1.Name) FROM country AS T1 INNER JOIN ethnicGroup AS T2 ON T1.Code = T2.Country WHERE T2.Name = 'African' AND T1.Area > 10000000 |
What is the least silver when the total is more than 2, bronze is 3, gold is more than 0, and rank is 1? | SELECT MIN(silver) FROM table_name_4 WHERE total > 2 AND bronze = 3 AND gold > 0 AND rank = "1" |
What was the data on January 15-16 if the data recorded June 10-11 is June 10, 1964? | SELECT january_15_16 FROM table_25216791_3 WHERE june_10_11 = "June 10, 1964" |
What is the Competition where the Score was 3–0, and the was Goal larger than 4? | SELECT competition FROM table_name_59 WHERE score = "3–0" AND goal > 4 |
What position did team scandia finish when their engine was cosworth? | SELECT finish FROM table_name_72 WHERE engine = "cosworth" AND team = "team scandia" |
can you show me a list of active to date? | select active_to_date from customer_contact_channels |
Name the least touchdowns for 11 points | SELECT MIN(touchdowns) FROM table_14342592_8 WHERE points = 11 |
Name the comptroller for office of prohibition | SELECT comptroller FROM table_22607062_1 WHERE ticket___office = "Prohibition" |
What is the highest series # directed by ken whittingham? | SELECT MAX(series__number) FROM table_27720737_1 WHERE directed_by = "Ken Whittingham" |
Find the number of customers who live in the city called Lake Geovannyton. | SELECT count(*) 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 WHERE t3.city = "Lake Geovannyton" |
Find and list the full name of employees who are from the territory, Wilton. | 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 = 'Wilton' |
What was the rank # for opponent AT Baylor? | SELECT rank_number FROM table_name_27 WHERE opponent_number = "at baylor" |
Return the name and id of the furniture with the highest market rate. | SELECT name , furniture_id FROM furniture ORDER BY market_rate DESC LIMIT 1 |
how many times was the player felipe lopez? | SELECT COUNT(nba_draft) FROM table_11677760_1 WHERE player = "Felipe Lopez" |
how many degrees were conferred between 1998 and 2002? | SELECT T1.campus , sum(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T2.year >= 1998 AND T2.year <= 2002 GROUP BY T1.campus |
What is the status when the against is 11? | SELECT status FROM table_name_68 WHERE against = 11 |
Which coach of the Chicago Bulls during the year 1981 won the NBA Coach of the Year award in the 1970s? | SELECT DISTINCT T2.coachID FROM coaches AS T1 INNER JOIN awards_coaches AS T2 ON T1.coachID = T2.coachID INNER JOIN teams AS T3 ON T3.tmID = T1.tmID WHERE T2.award = 'NBA Coach of the Year' AND T2.year BETWEEN 1970 AND 1979 AND T1.year = 1981 AND T3.name = 'Chicago Bulls' |
Name the seasons and winners that airs 28 january 2007 | SELECT seasons_and_winners FROM table_16884579_1 WHERE premiere = "28 January 2007" |
Who was the race winner with a pole position james hunt, and a Fastest Lap of james hunt, and a Date of 15 august? | SELECT race AS Winner FROM table_name_58 WHERE pole_position = "james hunt" AND fastest_lap = "james hunt" AND date = "15 august" |
What is the score of game 4? | SELECT score FROM table_27756014_1 WHERE game = 4 |
Final question is How many Address ids in the table? | SELECT count ( address_id ) FROM addresses |
What are the phone, room, and building of the faculty member called Jerry Prince? | SELECT phone , room , building FROM Faculty WHERE Fname = "Jerry" AND Lname = "Prince" |
What is the average and maximum number of total passengers for train stations in London or Glasgow? | SELECT avg(total_passengers) , max(total_passengers) FROM station WHERE LOCATION = 'London' OR LOCATION = 'Glasgow' |
How many deposits had a Non-Interest Income of 0.9500000000000001 and number of branch/offices less than 17? | SELECT COUNT(deposits) FROM table_name_63 WHERE non_interest_income = 0.9500000000000001 AND no_of_branches_offices < 17 |
What is the date assigned to clerical staff? | SELECT date_assigned_to FROM Staff_Department_Assignments WHERE
job_title_code = "Clerical Staff" |
What is the lowest Laps, when Rider is Sylvain Guintoli, and when Grid is less than 16? | SELECT MIN(laps) FROM table_name_68 WHERE rider = "sylvain guintoli" AND grid < 16 |
For the quantities, what percent more did the store in Fremont sell than the store in Portland in 1993? | SELECT CAST(SUM(CASE WHEN T2.city = 'Fremont' THEN qty END) - SUM(CASE WHEN T2.city = 'Portland' THEN qty END) AS REAL) * 100 / SUM(CASE WHEN T2.city = 'Fremont' THEN qty END) FROM sales AS T1 INNER JOIN stores AS T2 ON T1.stor_id = T2.stor_id WHERE STRFTIME('%Y', T1.ord_date) = '1993' |
How many of them are male? | SELECT count ( * ) FROM people WHERE weight > 85 AND Sex = "M" |
What was the record when the game was at the Rose Garden? | SELECT record FROM table_name_75 WHERE location = "rose garden" |
What date was the opponent the Portland Trail Blazers? | SELECT date FROM table_name_67 WHERE opponent = "portland trail blazers" |
Find all the instruments ever used by the musician with last name "Heilo"? | SELECT instrument FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = "Heilo" |
List the contestant numbers and names, ordered by contestant name descending. | SELECT contestant_number , contestant_name FROM contestants ORDER BY contestant_name DESC |
On what date was the rented material for the movie BLOOD ARGONAUTS returned? | SELECT T1.rental_date FROM rental AS T1 INNER JOIN inventory AS T2 ON T1.inventory_id = T2.inventory_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.title = 'BLOOD ARGONAUTS' |
Holy smokes that's a lot! Okay, let's narrow that down. How many left footed players have a height between 180cm and 190cm? | SELECT COUNT ( * ) FROM ( SELECT player_api_id FROM Player WHERE height > = 180 AND height < = 190 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE preferred_foot = "left" ) |
Who are Bob's friends? | SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T1.name = 'Bob' |
What is the second-least common method of shipping? | SELECT T2.method_name FROM cust_order AS T1 INNER JOIN shipping_method AS T2 ON T1.shipping_method_id = T2.method_id GROUP BY T2.method_name ORDER BY COUNT(T2.method_id) ASC LIMIT 1, 1 |
What is the full official name of the current legislator that has served for the most number of terms? | SELECT T1.official_full_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide GROUP BY T1.official_full_name, T2.bioguide ORDER BY COUNT(T2.bioguide) DESC LIMIT 1 |
Among the customers having at least one shipment in 2017, how many of them have an annual revenue of over 30000000? | SELECT COUNT(COUNTCUSID) FROM ( SELECT COUNT(T1.cust_id) AS COUNTCUSID FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE STRFTIME('%Y', T2.ship_date) = '2017' AND T1.annual_revenue > 30000000 GROUP BY T1.cust_id HAVING COUNT(T2.ship_id) >= 1 ) T3 |
What is the average number of bedrooms of all apartments? | SELECT AVG(bedroom_count) FROM Apartments |
Give me the minimum and maximum bathroom count among all the apartments. | SELECT min(bathroom_count) , max(bathroom_count) FROM Apartments |
Name the least total apaps for txema | SELECT MIN(total_apps) FROM table_22542179_3 WHERE player = "Txema" |
One 6 November 2007 what was the manner of departure for the coach release in football league one? | SELECT manner_of_departure FROM table_28181347_6 WHERE date_of_appointment = "6 November 2007" |
Which controller has an interface of pcie 2.0 × 8? | SELECT controller FROM table_name_37 WHERE interface = "pcie 2.0 × 8" |
How many number of floors are in Tampa City Hall ? | SELECT Floors FROM building WHERE Name = 'Tampa City Hall' |
What city joined the Independents conference after 1963? | SELECT city FROM table_name_26 WHERE year_joined > 1963 AND conference_joined = "independents" |
What is the fewest losses for teams with points of 53 and more than 73 goals for? | SELECT MIN(lost) FROM table_name_23 WHERE points_1 = "53" AND goals_for > 73 |
Count the number of players who enter hall of fame for each year. | SELECT yearid , count(*) FROM hall_of_fame GROUP BY yearid; |
For the USAC National Championship, what is the Discipline? | SELECT discipline FROM table_name_31 WHERE championship = "usac national championship" |
What was the Premiership Years that had in the Competition of 1983-1992? | SELECT premiership_years FROM table_name_65 WHERE years_in_competition = "1983-1992" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.