sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
Which states are they from? | SELECT distinct state from WINE WHERE Score > 93 |
What are the names of the vendor with the second lowest minimum order quantity? | SELECT T2.Name FROM ProductVendor AS T1 INNER JOIN Vendor AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID ORDER BY T1.MaxOrderQty ASC LIMIT 1, 1 |
Who was the opponent at the game when the record was 4-5? | SELECT opponent FROM table_name_69 WHERE record = "4-5" |
How many titles does the episode written by Joe Toplyn have? | SELECT COUNT(title) FROM table_25716397_1 WHERE written_by = "Joe Toplyn" |
What's the name of the male candidate that has an oppose rate of 0.32? | SELECT name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id = t2.people_id where t1.sex = "M" and oppose_rate = 0.32 |
Give the FBI code description of case No.JB134191. | SELECT description FROM Crime AS T1 INNER JOIN FBI_Code AS T2 ON T1.fbi_code_no = T2.fbi_code_no WHERE T1.case_number = 'JB134191' |
How many accounts are there in total? | SELECT count(*) FROM accounts |
Which label has UK for its region, is on a CD, and is dated from 1986? | SELECT label FROM table_name_61 WHERE region = "uk" AND date = "1986" AND format = "cd" |
What town has 15 stops and a NB kind? | SELECT town FROM table_name_82 WHERE stops = "15" AND kind = "nb" |
What race did Meo Constantini win at the circuit of monza ? | SELECT name FROM table_name_36 WHERE winning_driver = "meo constantini" AND circuit = "monza" |
How many dishes are there on the menu "Zentral Theater Terrace"? | SELECT COUNT(*) FROM Menu WHERE name = 'Zentral Theater Terrace' |
Show the station name and number of trains in each station. | SELECT T2.name, COUNT(*) FROM train_station AS T1 JOIN station AS T2 ON T1.station_id = T2.station_id GROUP BY T1.station_id |
List the year, team and coach that with winning rate of above 75%. | SELECT DISTINCT T1.year, T2.name, T1.coachID FROM coaches AS T1 INNER JOIN teams AS T2 ON T1.tmID = T2.tmID WHERE CAST(T1.won AS REAL) / CAST((T1.won + T1.lost) AS REAL) > 0.75 |
What was the partnership in the season of 1928 | SELECT wicket_partnership FROM table_name_91 WHERE season = "1928" |
What date has aus by 382 runs as the result? | SELECT date FROM table_name_25 WHERE result = "aus by 382 runs" |
What draft pick number was Andy Brereton? | SELECT MIN(pick__number) FROM table_28059992_5 WHERE player = "Andy Brereton" |
What is Score, when Competition is "Euro 2004 Qualifier"? | SELECT score FROM table_name_73 WHERE competition = "euro 2004 qualifier" |
Name the common name for chironius multiventris septentrionalis | SELECT common_name FROM table_1850282_7 WHERE species = "Chironius multiventris septentrionalis" |
What is the popularity of the professor who advises the highest number of students with the highest research ability? | SELECT T2.popularity FROM RA AS T1 INNER JOIN prof AS T2 ON T1.prof_id = T2.prof_id GROUP BY T1.prof_id, T1.capability ORDER BY COUNT(T1.student_id) DESC, T1.capability DESC LIMIT 1 |
what is the name of Rob Dinning's marketing region? | SELECT T1.marketing_region_name from marketing_regions as T1 join stores as T2 on T1.marketing_region_code = T2.marketing_region_code where T2.store_name = "Rob Dinning" |
When was the win/lose lose and the round a play-off? | SELECT date FROM table_24099476_8 WHERE win_lose = "Lose" AND round = "Play-off" |
What are the titles of courses that are in the Statistics department but not the Psychology department? | SELECT title FROM course WHERE dept_name = 'Statistics' EXCEPT SELECT title FROM course WHERE dept_name = 'Psychology' |
Find the first name and age of the students who are playing both Football and Lacrosse. | SELECT fname , age FROM Student WHERE StuID IN (SELECT StuID FROM Sportsinfo WHERE SportName = "Football" INTERSECT SELECT StuID FROM Sportsinfo WHERE SportName = "Lacrosse") |
How many methods does solution 1 have? And please tell me if solution 1 needs to be compiled. | SELECT COUNT(T2.SolutionId) , CASE WHEN T1.WasCompiled = 0 THEN 'Needs' ELSE 'NoNeeds' END needToCompile FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.SolutionId = 1 |
What is the visitor team of the game with Chicago as the home team? | SELECT visitor FROM table_name_74 WHERE home = "chicago" |
What is the largest payment amount? | SELECT amount FROM payment ORDER BY amount DESC LIMIT 1 |
What was the position of the player who played for New York Islanders NHL Team? | SELECT position FROM table_2679061_9 WHERE nhl_team = "New York Islanders" |
Tell me the city of license for 0 106.9 fm | SELECT city_of_license FROM table_name_1 WHERE frequency = "0 106.9 fm" |
How many train stations are there? | SELECT count(*) FROM station |
Can you please list all those events with their participants' names? | SELECT T2.event_id, T1.Participant_Details FROM participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID |
If the visiting team is Clemson, when was the time? | SELECT time FROM table_26842217_8 WHERE visiting_team = "Clemson" |
Where was the event Kage Kombat 16? | SELECT location FROM table_name_76 WHERE event = "kage kombat 16" |
What are the types of every competition and in which countries are they located? | SELECT Competition_type , Country FROM competition |
I want to know the average crowd for away team of melbourne | SELECT AVG(crowd) FROM table_name_43 WHERE away_team = "melbourne" |
What is the second qualifying time for the dale coyne racing team with a first qualifying time of 1:00.081? | SELECT qual_2 FROM table_name_31 WHERE team = "dale coyne racing" AND qual_1 = "1:00.081" |
What is the status of the building with less than 18 floors and later than 2013? | SELECT status FROM table_name_18 WHERE floors < 18 AND year > 2013 |
Which cities have regional population above 10000000? | SELECT city FROM city WHERE regional_population > 10000000 |
How many entries are in barony when the townland is derrigra? | SELECT COUNT(barony) FROM table_30121075_1 WHERE townland = "Derrigra" |
What is the number of installments of the app with the highest total Sentiment polarity score? | SELECT T1.Installs FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App GROUP BY T1.App ORDER BY SUM(T2.Sentiment_Polarity) DESC LIMIT 1 |
What are the codes of the airport found in Ankara, Turkey? | SELECT Code FROM Airports WHERE Description LIKE '%Ankara, Turkey%' |
Which city is in Georgia? | SELECT city FROM table_name_55 WHERE state = "georgia" |
Find the last and first name of students who are playing Football or Lacrosse. | SELECT T2.lname , T2.fname FROM SportsInfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.SportName = "Football" OR T1.SportName = "Lacrosse" |
What year featured lola motorsport as an entrant with over 0 points? | SELECT AVG(year) FROM table_name_44 WHERE entrant = "lola motorsport" AND points > 0 |
Which Team has a Lost larger than 2, and a Position smaller than 7, and a Drawn smaller than 2, and a Points of 22? | SELECT team FROM table_name_26 WHERE lost > 2 AND position < 7 AND drawn < 2 AND points = 22 |
Name the venue for collingwood home team | SELECT venue FROM table_name_40 WHERE home_team = "collingwood" |
What is the total with a rank less than 5, gold larger than 5 and bronze larger than 8? | SELECT SUM(total) FROM table_name_89 WHERE rank < 5 AND gold > 5 AND bronze > 8 |
what are all the overall with viewers (m) being 2.61 | SELECT overall FROM table_13110459_2 WHERE viewers__m_ = "2.61" |
What is the lowest wickets? | SELECT MIN(wickets) FROM table_27268238_5 |
Which Date has a Runner(s)-up of fred funk? | SELECT date FROM table_name_55 WHERE runner_s__up = "fred funk" |
Give the alias of the cities with an Asian population of 7. | SELECT T1.alias FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.asian_population = 7 |
What was the nationality of the ship named Toward? | SELECT nationality FROM table_name_91 WHERE ship = "toward" |
What was the distance for the 11th position? | SELECT distance FROM table_22265261_1 WHERE position = "11th" |
What was the result on October 20, 2002? | SELECT result FROM table_name_87 WHERE date = "october 20, 2002" |
State the title and royalty percentage for title ID BU2075 between 10000 to 50000 range. | SELECT T1.title, T2.royalty FROM titles AS T1 INNER JOIN roysched AS T2 ON T1.title_id = T2.title_id WHERE T2.lorange > 10000 AND T2.hirange < 50000 AND T1.title_ID = 'BU2075' |
What is the highest value for Other that has CONCACAF value of 0 a U.S. Open Cup larger than 0? | SELECT MAX(other) FROM table_name_28 WHERE us_open_cup > 0 AND concacaf = 0 |
What Per capita income has a Median family income of $50,755? | SELECT per_capita_income FROM table_name_38 WHERE median_family_income = "$50,755" |
How many sets of presenters are there for the version of the show named Celebrity Masterchef? | SELECT COUNT(presenter_s_) FROM table_28190363_1 WHERE name = "Celebrity MasterChef" |
What are their ids? | SELECT wrestler_id FROM wrestler |
What country placed 3? | SELECT country FROM table_name_16 WHERE place = "3" |
In how many locations was the episode with the Bailey family filmed? | SELECT COUNT(location_s_) FROM table_19897294_10 WHERE family_families = "The Bailey Family" |
What is the match id of the competition called "1994 FIFA World Cup qualification"? | SELECT match_id FROM MATCH WHERE competition = "1994 FIFA World Cup qualification" |
What date was an episode with a run time of 24:30 broadcasted? | SELECT broadcast_date FROM table_1579922_1 WHERE run_time = "24:30" |
list together, the crime rate for Central Saanich and Campbell River counties | Would you like me to list the crime rates for counties with the name Central Saanich or Campbell River? | yes | SELECT Name, Crime_rate FROM county_public_safety WHERE Name = 'Campbell River' OR Name = 'Central Saanich' |
What profit will the company gain if they sell 10 items of the product that has the lightest weight? | SELECT 10 * (ListPrice - StandardCost) FROM Product WHERE Weight IS NOT NULL ORDER BY Weight LIMIT 1 |
List all document ids and receipt dates of documents. | SELECT document_id , receipt_date FROM Documents; |
What dates are these apartments booked for? | SELECT T2.apt_number, T1.booking_start_date, T1.booking_end_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = "Confirmed" |
Please list the names of customers who have total orders of over 3 in 2018. | SELECT DISTINCT IIF(COUNT(T2.CustomerID) > 3, T2.`Customer Names`, NULL) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID WHERE T1.OrderDate LIKE '%/%/18' GROUP BY T1._CustomerID HAVING COUNT(T2.CustomerID) |
Find the balance of the checking account belonging to an owner whose name contains 'ee'. | SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name LIKE '%ee%' |
Show the residences that have at least two players. | SELECT Residence FROM player GROUP BY Residence HAVING COUNT(*) >= 2 |
What is the number of the apartment with the least number of bedrooms? | SELECT apt_number FROM Apartments ORDER BY bedroom_count LIMIT 1 |
What are the names and location of the shops in ascending alphabetical order of name. | SELECT Shop_Name, LOCATION FROM shop ORDER BY Shop_Name |
Which director has made the most movies? | SELECT director, COUNT(name) FROM director GROUP BY director ORDER BY COUNT(name) DESC LIMIT 1 |
What is the zip code of the hosue of the employee named Janessa Sawayn? | 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"; |
What is the frequency of the train named Garib nwaz exp? | SELECT frequency__inbound_outbound_ FROM table_name_10 WHERE train_name = "garib nwaz exp" |
Indicate the name of the customers who have placed an order of 3 units in February 2018. | SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Order Quantity` = 3 AND T2.OrderDate LIKE '2/%/18' THEN T1.`Customer Names` END AS T FROM Customers T1 INNER JOIN `Sales Orders` T2 ON T2._CustomerID = T1.CustomerID ) WHERE T IS NOT NULL |
Find the start date of behavior incidents of students with the last name "Fahey"? | SELECT T1.date_incident_start FROM Behavior_Incident AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.last_name = "Fahey" |
How many times was episode 20 of the Law and Order series nominated for the Primetime Emmy Awards in 1999? | SELECT COUNT(T2.award_id) FROM Episode AS T1 INNER JOIN Award AS T2 ON T1.episode_id = T2.episode_id WHERE T2.year = 1999 AND T2.result = 'Nominee' AND T1.episode = 20 AND T2.organization = 'Primetime Emmy Awards' AND T1.series = 'Law and Order' |
How many labels of the restaurant have an unknown country? | SELECT COUNT(T1.label) FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.county = 'unknown' |
What are all the episodes with an episode run time of 24:01? | SELECT episode FROM table_1429629_1 WHERE run_time = "24:01" |
What is the alderman's full name of the most crowded ward? | SELECT alderman_name_suffix, alderman_first_name, alderman_last_name FROM Ward ORDER BY population DESC LIMIT 1 |
what is last name of the members in club? | SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid |
How many short cars are in the shape of hexagon? | SELECT COUNT(id) FROM cars WHERE shape = 'hexagon' AND len = 'short' |
Who is the Second when Michel Gribi is the lead? | SELECT second FROM table_name_90 WHERE lead = "michel gribi" |
Which state has the highest number of clients who gave a 5-star review? | SELECT T2.state_abbrev FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.Stars = 5 GROUP BY T2.state_abbrev ORDER BY COUNT(T2.state_abbrev) DESC LIMIT 1 |
How many customers are from California? | SELECT count(*) FROM customers WHERE state = "CA"; |
What is Directed By, when Episode # is 7? | SELECT directed_by FROM table_name_18 WHERE episode__number = 7 |
Which campus has the most faculties in year 2003? | SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id = T2.campus WHERE T2.year = 2003 ORDER BY T2.faculty DESC LIMIT 1 |
What is the date when the opponent is the New England Patriots? | SELECT date FROM table_18847736_2 WHERE opponent = "New England Patriots" |
Name the max game for attendance being 54774 | SELECT MAX(game) FROM table_16710829_2 WHERE attendance = 54774 |
List the names of the disabled students who were absent from school for more than 5 months. | SELECT T1.name FROM longest_absense_from_school AS T1 INNER JOIN disabled AS T2 ON T1.name = T2.name WHERE T1.month > 5 |
What are the names of tourist attraction that Alison visited but Rosalind did not visit? | SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = "Alison" EXCEPT SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = "Rosalind" |
Which City or town has a Top division titles of 17 | SELECT city_or_town FROM table_name_92 WHERE top_division_titles = "17" |
List the songs with size more than 4MB ? | SELECT * FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id where file_size > 4 |
What is the average number of laps for grid 8? | SELECT AVG(laps) FROM table_name_69 WHERE grid = 8 |
What is the time/retired of the one with grid of 16? | SELECT time_retired FROM table_name_60 WHERE grid = 16 |
Give all information regarding instructors, in order of salary from least to greatest. | SELECT * FROM instructor ORDER BY salary |
Which product received a review from Indianapolis on 2016/10/7? | SELECT T1.Product FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.city = 'Indianapolis' AND T1.Date = '2016-10-07' |
Can you please provide the names of all courses? | SELECT course_name from Courses |
Describe the birth country, height and person name who were not included in credit list with category of casting. | SELECT T1.birth_country, T1.height_meters, T1.name FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE T2.category = 'Cast' AND T2.credited = 'false'; |
How many games were played in March 2010? | SELECT SUM(CASE WHEN Match_Date LIKE '2010-03%' THEN 1 ELSE 0 END) FROM `Match` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.