sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
How old was the goaltender who scored the fewest goals while on the ice when he retired from the NHL? | SELECT T2.lastNHL - T2.birthYear FROM GoaliesSC AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID WHERE T2.lastNHL IS NOT NULL GROUP BY T2.lastNHL, T2.birthYear ORDER BY SUM(GA) LIMIT 1 |
What is the average total when the silver is larger than 2, and a gold larger than 1, and a nation of total? | SELECT AVG(total) FROM table_name_23 WHERE silver > 2 AND gold > 1 AND nation = "total" |
Who got 59.486 for Qual 2? | SELECT name FROM table_name_15 WHERE qual_2 = "59.486" |
Which two countries does the Detroit River flow through? Give the full name of the country. | SELECT T3.Name FROM located AS T1 INNER JOIN river AS T2 ON T1.River = T2.Name INNER JOIN country AS T3 ON T3.Code = T1.Country WHERE T2.Name = 'Detroit River' |
Name the driver for june 23 and team of penske racing | SELECT driver FROM table_16493961_1 WHERE date = "June 23" AND team = "Penske Racing" |
Which team had a manager replaced by Ebrahim Talebi? | SELECT team FROM table_22297140_3 WHERE replaced_by = "Ebrahim Talebi" |
What is the 2004 value in the 2011 Grand Slam Tournaments? | SELECT 2004 FROM table_name_46 WHERE 2011 = "grand slam tournaments" |
Name the equipment for bike number being 3 | SELECT equipment FROM table_16941304_4 WHERE bike_no = 3 |
Name the number of nationalities for ryan mckie | SELECT COUNT(nationality) FROM table_2840500_8 WHERE player = "Ryan Mckie" |
What is the biggest number of basses suggested in either one of the references? | SELECT MAX(basses) FROM table_2414_1 |
How many unique users have seen tweet with text `Happy New Year to all those AWS instances of ours!`? | SELECT Reach FROM twitter WHERE text = 'Happy New Year to all those AWS instances of ours!' |
Can you find the name of the most expensive hardware product please? | SELECT product_name FROM products WHERE product_type_code = 'Hardware' ORDER BY product_price DESC LIMIT 1 |
What are airlines that have flights arriving at airport 'AHD'? | SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline WHERE T2.DestAirport = "AHD" |
How many female users use ZenFone 5 devices? | SELECT COUNT(T1.gender) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T2.device_id = T1.device_id WHERE T1.gender = 'F' AND T2.device_model = 'ZenFone 5' |
Count the number of documents. | SELECT count(*) FROM Documents |
What was the lowest win% with an away score of 3-2 in 2011 season? | SELECT MIN(win__percentage) FROM table_name_53 WHERE away = "3-2" AND season = "2011" |
Which chapter was founded later than 2012? | SELECT chapter FROM table_name_14 WHERE founding_date > 2012 |
What is the race title of Dick Johnson Racing? | SELECT race_title FROM table_name_73 WHERE team = "dick johnson racing" |
What Country does Larry Mize play for? | SELECT country FROM table_name_67 WHERE player = "larry mize" |
What is the away team at victoria park? | SELECT away_team FROM table_name_69 WHERE venue = "victoria park" |
Which Competition has a Year larger than 1990 in seville , spain? | SELECT competition FROM table_name_5 WHERE year > 1990 AND venue = "seville , spain" |
show me the programmes | Do you mean all the program ids? | yes | SELECT Program_id from program |
What are the countries that have never participated in any friendly-type competitions? | SELECT country FROM competition EXCEPT SELECT country FROM competition WHERE competition_type = 'Friendly' |
How many respondents who participated in the survey in 2014 work remotely at least 50% of the time? | SELECT COUNT(T1.AnswerText) FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T1.QuestionID = 93 AND T1.SurveyID = 2014 AND T1.AnswerText = 'Yes' |
Name the professor who got graduation from the University of Boston. | SELECT first_name, last_name FROM prof WHERE graduate_from = 'University of Boston' |
Which city and country is the Alton airport at? | SELECT City , Country FROM AIRPORTS WHERE AirportName = "Alton" |
In the country where Bush won 4333 votes, what percentage did other receive? | SELECT other__percentage FROM table_13625792_1 WHERE bush__number = 4333 |
What year had an issue price of $2,995.95, and a theme of grizzly bear? | SELECT MAX(year) FROM table_name_10 WHERE issue_price = "$2,995.95" AND theme = "grizzly bear" |
What is the title and author ID of paper with conference ID less than 100 in year 2006? | SELECT DISTINCT T1.Title, T2.AuthorId FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Year = 2006 AND T1.ConferenceId < 100 |
What school does John Crotty play for? | SELECT school_club_team FROM table_name_35 WHERE player = "john crotty" |
What is the highest amount of difference between the ordered quantity and actual quantity received in a single purchase order and to which vendor was the purchase order made? | SELECT T2.OrderQty - T2.ReceivedQty, VendorID FROM PurchaseOrderHeader AS T1 INNER JOIN PurchaseOrderDetail AS T2 ON T1.PurchaseOrderID = T2.PurchaseOrderID ORDER BY T2.OrderQty - T2.ReceivedQty DESC LIMIT 1 |
How many shipments were shipped to customers living in California in year 2016? | SELECT COUNT(*) AS per FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE STRFTIME('%Y', T2.ship_date) = '2016' AND T1.state = 'CA' |
What date has friendly as the competition, with pretoria, South Africa as the venue? | SELECT date FROM table_name_79 WHERE competition = "friendly" AND venue = "pretoria, south africa" |
Who had the highest points on January 2? | SELECT high_points FROM table_23274514_6 WHERE date = "January 2" |
What is the lowest Total that has a Gold larger than 0, Silver smaller than 4, Sport of football, and a Bronze larger than 1? | SELECT MIN(total) FROM table_name_97 WHERE gold > 0 AND silver < 4 AND sport = "football" AND bronze > 1 |
Which has the highest amount of transaction? | SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id = T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id = T3.transaction_id WHERE T3.share_count > 100 AND T3.transaction_type_code = "PUR" ORDER BY T3.amount_of_transaction DESC LIMIT 1 |
What's the total when the position was more than 6 and had an A Score of less than 7.6? | SELECT MAX(total) FROM table_name_83 WHERE position > 6 AND a_score < 7.6 |
For the students with an intelligence of 5, list the full name and courses taken by them who have less than a 3 GPA. | SELECT T1.f_name, T1.l_name, T3.name FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T1.intelligence = 5 AND T1.gpa < 3 |
What are the names of the storms that affected both the regions of Afghanistan and Albania? | SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Afghanistan' INTERSECT SELECT T3.Name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.Region_name = 'Albania' |
Which Label has a Date of 20 July? | SELECT label FROM table_name_48 WHERE date = "20 july" |
How many deserts are there in a country where over 90% of people speaks Armenian? | SELECT COUNT(T2.Desert) FROM country AS T1 INNER JOIN geo_desert AS T2 ON T1.Code = T2.Country INNER JOIN language AS T3 ON T1.Code = T2.Country WHERE T3.Name = 'Armenian' AND T3.Percentage > 90 |
What cities are located in Northern California? | SELECT city FROM geographic WHERE region = 'northern california' |
List the id of students who registered some courses and the number of their registered courses? | SELECT T1.student_id , count(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id |
What was the final in the game that boris diaw (34) scored the most points? | SELECT score FROM table_29181479_5 WHERE high_points = "Boris Diaw (34)" |
Please give me the url of the movie "La Antena". | SELECT movie_url FROM movies WHERE movie_title = 'La Antena' |
Please list the names of the characters in the movie Look Who's Talking. | SELECT T2.`Character Name` FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID WHERE T1.Title = 'Look Who''s Talking' |
Which station has programming of Me-TV? | SELECT station FROM table_name_33 WHERE programming = "me-tv" |
Which Record has a Date on december 18? | SELECT record FROM table_name_55 WHERE date = "december 18" |
What is the sum of t (µm), when Technology is MJ? | SELECT SUM(t__µm_) FROM table_name_26 WHERE technology = "mj" |
Which kinds of grapes are white? | SELECT Grape FROM GRAPES WHERE Color = "White" |
Show all team names. | SELECT Name FROM Team |
Who was the runner-up (a) if K. P. Ramalingam won the election? | SELECT runner_up_a FROM table_22752982_5 WHERE winner = "K. P. Ramalingam" |
please list by crime rate in ascending order | Would you like the crime rates for all counties in ascending order of crime rate? | no, just for the 2 counties from the previous query | SELECT Name, Crime_rate FROM county_public_safety WHERE Name = 'Campbell River' OR Name = 'Central Saanich' ORDER BY Crime_rate ASC |
What is the lowest drawn that has games less than 7? | SELECT MIN(drawn) FROM table_name_83 WHERE games < 7 |
Show the name and age for all male people who don't have a wedding. | SELECT name , age FROM people WHERE is_male = 'T' AND people_id NOT IN (SELECT male_id FROM wedding) |
What was the number of the game when the record was 11-12? | SELECT game FROM table_name_82 WHERE record = "11-12" |
Where is competitor Estelle Nze Minko from? | SELECT T1.region_name FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.full_name = 'Estelle Nze Minko' |
Find the number of manufactures that are based in Tokyo or Beijing. | SELECT count(*) FROM manufacturers WHERE headquarter = 'Tokyo' OR headquarter = 'Beijing' |
Which date is associated with a venue of Luxembourg? | SELECT date FROM table_name_29 WHERE venue = "luxembourg" |
What was the innings when caught was 20? | SELECT innings FROM table_24039597_26 WHERE caught = 20 |
What is the average number of hours spent practicing for students who got rejected? | SELECT avg(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID WHERE T2.decision = 'no' |
Find the faculty rank that has the least members. | SELECT rank FROM Faculty GROUP BY rank ORDER BY count(*) ASC LIMIT 1 |
List the 1st air date for the show where the writers are russel friend & garrett lerner. | SELECT original_air_date FROM table_22904780_1 WHERE written_by = "Russel Friend & Garrett Lerner" |
What directors won an award on 14/6/6? | SELECT director_s_ FROM table_name_98 WHERE date = "14/6/6" |
What day(s) did the team play indiana? | SELECT date FROM table_17340355_7 WHERE team = "Indiana" |
Great! Which publishers have the most published catalogues? | SELECT catalog_publisher FROM catalogs GROUP BY catalog_publisher ORDER BY count ( * ) DESC LIMIT 1 |
What is the To par and holds the t8 place of the United States player Tiger Woods? | SELECT to_par FROM table_name_62 WHERE country = "united states" AND place = "t8" AND player = "tiger woods" |
Which tournament has a 2007 of 2r, and a 2011 of 2r? | SELECT tournament FROM table_name_93 WHERE 2007 = "2r" AND 2011 = "2r" |
how many got injured in japan? | SELECT sum ( Injured ) FROM perpetrator where country = 'Japan' |
Show writers who have published a book with price more than 4000000. | SELECT T1.Writer FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID WHERE T2.Price > 4000000 |
How much did Petit Auto pay on 2004-08-09? | SELECT t1.amount FROM payments AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2.customerNumber WHERE t2.customerName = 'Petit Auto' AND t1.paymentDate = '2004-08-09' |
Which series number had 1.98 million viewers? | SELECT MIN(no_in_series) FROM table_22347090_4 WHERE us_viewers__million_ = "1.98" |
How many different Leagues are associated with Billy Meredith Category:Articles with hCards? | SELECT COUNT(league) FROM table_14962287_2 WHERE name = "Billy Meredith Category:Articles with hCards" |
Which head's name has the substring 'Ha'? List the id and name | SELECT head_id , name FROM head WHERE name LIKE '%Ha%' |
Which NFL Club has a Player of sam tidmore, and a Pick of 81? | SELECT nfl_club FROM table_name_43 WHERE player = "sam tidmore" AND pick = 81 |
Find and list the part key of the parts which has an above-average retail price. | SELECT p_partkey FROM part WHERE p_retailprice > ( SELECT AVG(p_retailprice) FROM part ) |
What was the most laps with a finish of 10 and qualification of 106.185? | SELECT MAX(laps) FROM table_name_84 WHERE finish = "10" AND qual = "106.185" |
How many customers in Chicago ordered at least 10 Cardinal EasyOpen D-Ring Binders in a single order? | SELECT COUNT(DISTINCT T1.`Customer ID`) FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T3.`Product Name` = 'Cardinal EasyOpen D-Ring Binders' AND T2.City = 'Chicago' AND T1.Quantity > 10 |
Which surface had Yew-Ming Si as a partner? | SELECT surface FROM table_name_83 WHERE partner = "yew-ming si" |
Between Centromeric protein E, putative and conserved hypothetical protein, which has the highest divergence from human lineage? | SELECT divergence_from_human_lineage FROM protein where protein_name = "Centromeric protein E, putative" or protein_name = "conserved hypothetical protein" |
Show the country name and capital of all countries. | SELECT Country_name, Capital FROM country |
What is that city's area? | SELECT City_Area FROM district ORDER BY city_population DESC LIMIT 1 |
How many businesses in Glendale are reviewed by user with the ID of 20241? | SELECT COUNT(T1.business_id) FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.city = 'Glendale' AND T2.user_id = 20241 |
What are the flight numbers for the aircraft Airbus A340-300? | SELECT T1.flno FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid = T2.aid WHERE T2.name = "Airbus A340-300" |
What is the description of document type 'Paper'? | SELECT document_type_description FROM Ref_Document_Types WHERE document_type_code = "Paper" |
Find the average unit price of tracks from the Rock genre. | SELECT AVG(T2.UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId = T2.GenreId WHERE T1.Name = "Rock" |
What is the grid number for troy corser with under 22 laps? | SELECT SUM(grid) FROM table_name_48 WHERE rider = "troy corser" AND laps < 22 |
Sate the author name and published year for paper id 2? | SELECT T1.Name, T3.Year FROM Author AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.AuthorId INNER JOIN Paper AS T3 ON T2.PaperId = T3.Id WHERE T2.PaperId = 2 |
What word would a Castilian speaker use for the Italian word auto(mobile)? | SELECT castilian FROM table_name_17 WHERE italian = "auto(mobile)" |
What game was developed by Ubisoft Montreal? | SELECT game FROM table_name_53 WHERE developer_s_ = "ubisoft montreal" |
What is the number of monarchs that had Yan Maw la Mon as the heir? | SELECT COUNT(monarch) FROM table_26460435_5 WHERE heir = "Yan Maw La Mon" |
What is the loss when the average/gain is less than 16.7, gain is 104 and long is larger than 4? | SELECT AVG(loss) FROM table_name_12 WHERE avg_g < 16.7 AND long > 4 AND gain = 104 |
Name the sum of gross tonnage for wood on date more tahn 1846 for comissioned and ship of esk | SELECT SUM(gross_tonnage) FROM table_name_75 WHERE material = "wood" AND date_commissioned > 1846 AND ship = "esk" |
Tell me the booking status code for the apartment with number "Suite 634". | SELECT T1.booking_status_code FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_number = "Suite 634" |
list out the product names | SELECT product_name FROM Products |
How many gold(s) for teams with a total of 14, and over 6 bronze medals? | SELECT SUM(gold) FROM table_name_26 WHERE total = 14 AND bronze > 6 |
Can you list each test result and it's count in descending order based on count? | SELECT test_result , COUNT ( * ) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT ( * ) DESC |
What is the rank of the arch with a length in meters of 75/55? | SELECT rank FROM table_name_29 WHERE length___m__ = "75/55" |
Average frequency with ERP W of 62? | SELECT AVG(frequency_mhz) FROM table_name_88 WHERE erp_w = "62" |
Find the name and id of the top 3 expensive rooms. | SELECT RoomId , roomName FROM Rooms ORDER BY basePrice DESC LIMIT 3; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.