sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
How many years have a time of 1:42.086? | SELECT COUNT(year) FROM table_16308030_1 WHERE time = "1:42.086" |
What was the surface later than 1979, for the Melbourne Indoor, Australia, and the score was 2–6, 6–2, 6–2? | SELECT surface FROM table_name_75 WHERE date > 1979 AND championship = "melbourne indoor, australia" AND score = "2–6, 6–2, 6–2" |
What are the manager's first name, last name and id who won the most manager award? | SELECT T1.name_first , T1.name_last , T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id = T2.player_id GROUP BY T2.player_id ORDER BY count(*) DESC LIMIT 1; |
What is the song in the volume with the maximum weeks on top? | SELECT Song FROM volume ORDER BY Weeks_on_Top DESC LIMIT 1 |
Name the coin that have higher than average percentage price changed from the previous 24 hours for transaction on 2013/6/22. | SELECT T1.name FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T2.date = '2020-06-22' GROUP BY T1.name HAVING AVG(T2.percent_change_24h) > T2.PRICE |
I want to know the course names and the prerequisite ids. | SELECT T1.title,T2.prereq_id FROM course as T1 join prereq as T2 where T1.course_id = T2.course_id |
Which distinct car models are the produced after 1980? | SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.model = T2.model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.id WHERE T3.year > 1980 |
Find the name of dorms that do not have amenity TV Lounge. | SELECT dorm_name FROM dorm EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' |
How many positions did the car with a final time of +10.8098 finish in? | SELECT COUNT(fin_pos) FROM table_17244483_1 WHERE time_retired = "+10.8098" |
When stacy schneider is the candidate what are the results? | SELECT result FROM table_1859855_2 WHERE candidate = "Stacy Schneider" |
In italy, when the stolen ends were 10 and blank ends were under 14, what's the lowest ends won? | SELECT MIN(ends_won) FROM table_name_45 WHERE stolen_ends = 10 AND locale = "italy" AND blank_ends < 14 |
Who played against team 1 Vitória? | SELECT team__number2 FROM table_17282875_2 WHERE team__number1 = "Vitória" |
What is the email address of login id zops? | SELECT T3.email_address FROM candidates AS T1 JOIN candidate_assessments AS T2 ON T1.candidate_id = T2.candidate_id JOIN people AS T3 ON T1.candidate_id = T3.person_id WHERE T3.login_name = "zops" |
Great! Can you tell me the name of the player who is the tallest left-footed player? | SELECT player_name FROM Player AS T1 JOIN Player_Attributes
AS T2 ON t1.player_api_id = T2.player_api_id WHERE T2.preferred_foot = "left" order by height desc limit 1 |
What was the latest number in series that was directed by Skip Sudduth? | SELECT MAX(no_in_series) FROM table_27491610_2 WHERE directed_by = "Skip Sudduth" |
what scores were Clemson's home games? | SELECT t2.All_Home FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE team_name = 'Clemson' |
Find the name of the source user with the highest average trust score. | SELECT T1.name FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.source_u_id GROUP BY T2.source_u_id ORDER BY AVG(trust) DESC LIMIT 1 |
what are all the ranks on the table | SELECT DISTINCT rank FROM FACULTY |
What's the number of male Hispanic students who graduated from Central Alabama Community College in 2011 within 100 percent of normal/expected time? | SELECT SUM(T2.grad_100) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T1.unitid = T2.unitid WHERE T1.chronname = 'Central Alabama Community College' AND T2.year = 2011 AND T2.gender = 'M' AND T2.race = 'H' |
What is the location of id 3? | SELECT location FROM mill WHERE id = 3 |
Name the result for the bafta tv awards | SELECT result FROM table_name_83 WHERE award = "bafta tv awards" |
What was the issue that the client with the longest server time faced? | SELECT T2.Issue FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE T1.ser_time = ( SELECT MAX(ser_time) FROM callcenterlogs ) |
Tell me the away team score for 27 april 1974 and veue of mcg | SELECT away_team AS score FROM table_name_51 WHERE date = "27 april 1974" AND venue = "mcg" |
Find the root beer with the most and least amount of profit per unit and list the container types in which these root beers are sold. | SELECT * FROM ( SELECT T1.BrandName, T2.ContainerType FROM rootbeerbrand AS T1 INNER JOIN rootbeer AS T2 ON T1.BrandID = T2.BrandID ORDER BY T1.CurrentRetailPrice - T1.WholesaleCost DESC LIMIT 1 ) UNION ALL SELECT * FROM ( SELECT T3.BrandName, T4.ContainerType FROM rootbeerbrand AS T3 INNER JOIN rootbeer AS T4 ON T3.BrandID = T4.BrandID ORDER BY T3.CurrentRetailPrice - T3.WholesaleCost ASC LIMIT 1 ) |
What is the lowest score of all games for match 2? | SELECT MIN(match2) FROM table_24538140_2 |
What is the Capacity of Ernst-Abbe-Sportfeld? | SELECT capacity FROM table_name_25 WHERE stadium = "ernst-abbe-sportfeld" |
What are the names of companies whose headquarters are not "USA"? | SELECT name FROM Companies WHERE Headquarters != 'USA' |
Show the countries that have mountains with height more than 5600 stories and mountains with height less than 5200. | SELECT Country FROM mountain WHERE Height > 5600 INTERSECT SELECT Country FROM mountain WHERE Height < 5200 |
Among all the customers who have purchased ML Bottom Bracket, identify the percentage of sales by Albert I. Ringer? | SELECT CAST(SUM(IIF(T3.FirstName = 'Albert' AND T3.MiddleInitial = 'I' AND T3.LastName = 'Ringer', 1, 0)) AS REAL) * 100 / COUNT(T2.CustomerID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Employees AS T3 ON T2.SalesPersonID = T3.EmployeeID WHERE T1.Name = 'ML Bottom Bracket' |
What is Tournament, when Moves is "37", and when Result is "½–½"? | SELECT tournament FROM table_name_50 WHERE moves = 37 AND result = "½–½" |
what is the average year when the title is baka to test to shōkanjū? | SELECT AVG(year) FROM table_name_89 WHERE title = "baka to test to shōkanjū" |
Which EL places have a Rank 2013 of 15? | SELECT MAX(el_places) FROM table_name_4 WHERE rank_2013 = "15" |
Which episode number has the second highest positive viewer comments and has been awarded "Best Television Episode"? | SELECT T2.episode_id FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T1.award = 'Best Television Episode' AND T1.result = 'Winner' ORDER BY T2.rating DESC LIMIT 2 |
How many players enter hall of fame each year? | SELECT yearid , count(*) FROM hall_of_fame GROUP BY yearid; |
Which player is from Sweden? | SELECT player FROM table_name_47 WHERE nationality = "sweden" |
Hi there! Can you provide me with a list of all of the names of people on this list? | SELECT name FROM Person |
What is the average price for flights from LA to Honolulu? | SELECT avg(price) FROM Flight WHERE origin = "Los Angeles" AND destination = "Honolulu" |
What Date has a Home listed as Calgary? | SELECT date FROM table_name_48 WHERE home = "calgary" |
What is the name and age of the pilot younger than 30 who has won the most number of times? | SELECT t1.name , t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id = t2.winning_pilot WHERE t1.age < 30 GROUP BY t2.winning_pilot ORDER BY count(*) DESC LIMIT 1 |
Among the routine inspections of Tiramisu Kitchen, how many of them have a score of over 70? | SELECT COUNT(T2.business_id) FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.name = 'Tiramisu Kitchen' AND T1.type = 'Routine - Unscheduled' AND T1.score > 70 |
When did the fastest roller coaster in Austria open? | SELECT T2.opened FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID where T1.Name = "Austria" order by T2.speed desc limit 1 |
What are the all games score and location of the school called Clemson? | SELECT t2.All_Games , t1.location FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id = t2.school_id WHERE team_name = 'Clemson' |
Which Airport has the largest number of international passengers? | SELECT Airport_Name FROM airport ORDER BY International_Passengers DESC LIMIT 1 |
What is the SFC when the specific impulse is 453? | SELECT sfc_in_g__kn·s_ FROM table_15944_5 WHERE specific_impulse__s_ = 453 |
Great! Finally, can you update this list to also include The train ID and train number for each? | SELECT t3.name , t3.time,t3.train_number ,t2.train_id FROM station AS t1 JOIN route AS t2 ON t1.id = t2.station_id JOIN train AS t3 ON t2.train_id = t3.id WHERE t1.local_authority = "Chiltern" |
In which city's station is a bike borrowed on trip ID4069? | SELECT T2.city FROM trip AS T1 INNER JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T1.id = 4069 |
What is the league of the third baseman player before 1973? | SELECT league FROM table_name_79 WHERE year < 1973 AND position = "third baseman" |
How many instrument does the musician with last name "Heilo" use? | SELECT count(DISTINCT instrument) FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = "Heilo" |
What are the names of the cameras that have taken picture of the most mountains? | SELECT T2.name FROM photos AS T1 JOIN camera_lens AS T2 ON T1.camera_lens_id = T2.id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1 |
List all player names who have an overall rating higher than the average. | SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.overall_rating > ( SELECT avg ( overall_rating ) FROM Player_Attributes ) |
In what laguage was Contotv 5? | SELECT language FROM table_15887683_19 WHERE television_service = "ContoTV 5" |
How many total wins does Ballarat FL of East point have when the against is greater than 1000? | SELECT COUNT(wins) FROM table_name_61 WHERE ballarat_fl = "east point" AND against > 1000 |
What is the average bronze medal when gold is greater than 0, and there is less than 0 silver medals? | SELECT AVG(bronze) FROM table_name_86 WHERE gold > 0 AND silver < 0 |
How many years as tallest building was Independence Hall? | SELECT years_as_tallest FROM table_name_6 WHERE name = "independence hall" |
List all the names of the books written by Danielle Steel. | SELECT T1.title FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T3.author_name = 'Danielle Steel' |
How many female students have no payment due? | SELECT COUNT(name) FROM no_payment_due WHERE name NOT IN ( SELECT name FROM male ) |
What is the average earnings of poker players with height higher than 200? | SELECT avg(T2.Earnings) FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 200 |
Sum the total number of products rejected for having a trim length that is too long. | SELECT SUM(T2.ScrappedQty) FROM ScrapReason AS T1 INNER JOIN WorkOrder AS T2 ON T1.ScrapReasonID = T2.ScrapReasonID WHERE T1.Name = 'Trim length too long' |
What are the names of the cities along the Euphrat River's course? Indicate the capital city of the nation where the Euphrat River flows. | SELECT T2.City, T1.Capital FROM country AS T1 INNER JOIN located AS T2 ON T1.Code = T2.Country INNER JOIN river AS T3 ON T3.Name = T2.River WHERE T3.Name = 'Euphrat' |
In the year 2000, which team has played the most games against the Buffalo Sabres? | SELECT T3.name FROM TeamVsTeam AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.oppID = T2.tmID INNER JOIN Teams AS T3 ON T1.year = T3.year AND T1.tmID = T3.tmID WHERE T1.year = 2000 AND T2.name = 'Buffalo Sabres' GROUP BY T3.name ORDER BY SUM(T2.G) DESC LIMIT 1 |
what is the the playing time of the mid player ? | SELECT min ( T2.HS ) , T1.pPos FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID where ppos = 'mid' GROUP BY T1.pPos |
Is 3751 the location ID for tweet with ID tw-682714048199311366? | SELECT LocationID FROM twitter WHERE TweetID = 'tw-682714048199311366' |
Show me the greatest weight of the body builder | SELECT T2.Weight FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC LIMIT 1 |
What was the score for the away team when geelong was the home team? | SELECT away_team AS score FROM table_name_4 WHERE home_team = "geelong" |
Which product has the most problems? Give me the number of problems and the product name. | SELECT count(*) , T1.product_name FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_name ORDER BY count(*) DESC LIMIT 1 |
How many cities are located in South Africa? | SELECT SUM(CASE WHEN T2.Country_Name = 'South Africa' THEN 1 ELSE 0 END) FROM City AS T1 INNER JOIN Country AS T2 ON T2.Country_Id = T1.Country_id |
Name the customer who sent the shipment to Oak Park. | SELECT T2.cust_name FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id INNER JOIN city AS T3 ON T3.city_id = T1.city_id WHERE T3.city_name = 'Oak Park' |
What stadium was the game held at on December 23, 2001? | SELECT stadium FROM table_name_2 WHERE date = "december 23, 2001" |
how much grant amount in organisation id 10 | select count ( grant_id ) from Grants where organisation_id = 10 |
Who drives the abc supply sponsored cor? | SELECT driver_s_ FROM table_2503102_2 WHERE primary_sponsor = "ABC Supply" |
What is the type of turbine having fewer than 17 units and located in County Laois? | SELECT type FROM table_name_65 WHERE turbines < 17 AND location = "county laois" |
Who was the other team on march 27? | SELECT team FROM table_27712702_11 WHERE date = "March 27" |
What is the NHL team for Round 5 and an overall ranking of #154? | SELECT nhl_team FROM table_name_7 WHERE round = "5" AND overall = "#154" |
Great! Can you filter this list to show only the mission that involved ships from the United States? | SELECT T1.Fate FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T2.Nationality = "United States" |
How long were Ray Bradbury and his wife married? | SELECT length_of_marriage FROM table_24143253_4 WHERE name = "Ray Bradbury" |
What was the name of the Olympic game that John Aalberg took part in when he was 31? | SELECT T1.games_name FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.full_name = 'John Aalberg' AND T2.age = 31 |
Return the code of the document type that is most common. | SELECT document_type_code FROM Documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 1 |
Count the total number of available services. | SELECT count(*) FROM services |
List the names of non-US suppliers that have discontinued. | SELECT DISTINCT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.Discontinued = 1 AND T2.Country != 'USA' |
What are the names of the directors who made exactly one movie excluding director NULL? | SELECT director FROM Movie WHERE director != "null" GROUP BY director HAVING count(*) = 1 |
WHAT IS THE LOWEST ROUND FOR CB POSITION? | SELECT MIN(round) FROM table_name_56 WHERE position = "cb" |
What percentage of donations are given via a giving or campaign page? List the primary area of those donations. | SELECT CAST(SUM(CASE WHEN T1.via_giving_page = 't' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(donation_total), ( SELECT T2.primary_focus_area FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.via_giving_page = 't' GROUP BY T2.primary_focus_area ORDER BY SUM(T1.donation_total) DESC LIMIT 1 ) result FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid |
Which root beer got the most five stars in 2012? Give the brand name of this beer. | SELECT T3.BrandName FROM rootbeer AS T1 INNER JOIN rootbeerreview AS T2 ON T1.BrandID = T2.BrandID INNER JOIN rootbeerbrand AS T3 ON T1.BrandID = T3.BrandID WHERE T2.StarRating = 5 AND strftime('%Y', T2.ReviewDate) = '2012' GROUP BY T1.BrandID ORDER BY COUNT(T2.BrandID) DESC LIMIT 1 |
Which is the smallest pick number that had a Reg GP of less than 0? | SELECT MIN(pick__number) FROM table_name_44 WHERE reg_gp < 0 |
Who is the customer from the East region that purchased the order with the highest profit? | SELECT T2.`Customer Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.Region = 'East' ORDER BY T1.Profit DESC LIMIT 1 |
What is the BB pop of the song with a CB CW of 1, RIAA of P and was released more recently than 1976? | SELECT bb_pop FROM table_name_93 WHERE cb_cw = "1" AND year > 1976 AND riaa = "p" |
Provide the district of the city with a population of 201843. | SELECT District FROM City WHERE population = 201843 |
Who is the recipient of the Primetime Emmy Award with the most votes? | SELECT T1.person FROM Award AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T1.award_category = 'Primetime Emmy' ORDER BY T2.votes DESC LIMIT 1; |
Im the match where the home team is Melbourne Victory, what was the crowd attendance? | SELECT COUNT(crowd) FROM table_name_97 WHERE home_team = "melbourne victory" |
Who was the finalist of the hard surface tournament in Miami? | SELECT finalist FROM table_name_66 WHERE surface = "hard" AND tournament = "miami" |
What is the average of the white population in the cities with area code 920? | SELECT AVG(T2.white_population) FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.area_code = 920 |
How many clubs does "Linda Smith" have membership for? | 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.fname = "Linda" AND t3.lname = "Smith" |
Show the names for all females from Canada having a wedding in year 2016. | SELECT T2.name FROM wedding AS T1 JOIN people AS T2 ON T1.female_id = T2.people_id WHERE T1.year = 2016 AND T2.is_male = 'F' AND T2.country = 'Canada' |
How many totals had more than 4 bronze? | SELECT SUM(total) FROM table_name_93 WHERE bronze > 4 |
Name the report for per-viktor widengren and alfa romeo | SELECT report FROM table_name_48 WHERE winning_driver = "per-viktor widengren" AND winning_constructor = "alfa romeo" |
What date did Ben Gordon (8) have high assists? | SELECT date FROM table_name_20 WHERE high_assists = "ben gordon (8)" |
What's the least enrolled when the mascot was the Trojans? | SELECT MIN(enrollment) FROM table_name_8 WHERE mascot = "trojans" |
What is the twitter name of the legislator whose birthday was on 5/27/1946? | SELECT T2.twitter FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T1.birthday_bio = '1946-05-27' |
What was the result for james o'h. patterson when first elected in 1904? | SELECT result FROM table_name_40 WHERE first_elected = "1904" AND incumbent = "james o'h. patterson" |
Give me the times of all trains that go to Chennai | SELECT TIME FROM train WHERE destination = 'Chennai' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.