sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
What are the names of city of airport which is the source for the most number of flight routes | Do you mean the name of city which is the source for the most number of flight routes? | Yes | SELECT T1.city FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.src_apid GROUP BY T2.src_apid ORDER BY count ( * ) DESC LIMIT 1 |
What grade did jockey Robby Albarado get when racing with Ravens Pass? | SELECT grade FROM table_name_78 WHERE jockey = "robby albarado" AND runner_up_winner = "ravens pass" |
Which R.A. (J2000) has Apparent Magnitude of 11.7, and Dec. (J2000) of °07′06″? | SELECT ra___j2000__ FROM table_name_22 WHERE apparent_magnitude = 11.7 AND dec___j2000__ = "°07′06″" |
Please list the page numbers of all the menu pages on which the dish "Chicken gumbo" had appeared. | SELECT T1.page_number FROM MenuPage AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.menu_page_id INNER JOIN Dish AS T3 ON T2.dish_id = T3.id WHERE T3.name = 'Chicken gumbo' |
For the chinese name 盧奕基 how many in total is the govt salary? | SELECT COUNT(govt_salary) FROM table_17964087_2 WHERE chinese_name = "盧奕基" |
Which word has the time of occurrences as 340691? | SELECT word FROM words WHERE occurrences = 340691 |
How about church names for weddings of 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 |
what is the name of product id 1 | SELECT product_name from products where product_id = 1 |
Please list the top three most frequently occurring words and their ids. | SELECT word, wid FROM words ORDER BY occurrences DESC LIMIT 3 |
Name the most founded for sea gulls | SELECT MAX(founded) FROM table_1973648_1 WHERE nickname = "Sea Gulls" |
Who was the leading scorer on 9 January 2008? | SELECT leading_scorer FROM table_name_99 WHERE date = "9 january 2008" |
What is the name of the body builder with the greatest body weight? | SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Weight DESC LIMIT 1 |
List the forenames of all distinct drivers in alphabetical order? | SELECT DISTINCT forename FROM drivers ORDER BY forename ASC |
How many root beers did Tom Hanks purchase between 2015 to 2016? | SELECT COUNT(T2.RootBeerID) FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.First = 'Tom' AND T1.Last = 'Hanks' AND T2.TransactionDate BETWEEN '2015-01-01' AND '2016-12-31' |
What is the sum of To par when the Finish is t11? | SELECT SUM(to_par) FROM table_name_59 WHERE finish = "t11" |
Name the Finish which has a Total of 287? | SELECT finish FROM table_name_20 WHERE total = 287 |
what is the score when the venue is stade général seyni kountché, niamey, the competition is friendly and the date is 9 october 2012? | SELECT score FROM table_name_32 WHERE venue = "stade général seyni kountché, niamey" AND competition = "friendly" AND date = "9 october 2012" |
How many against have a difference of 6, with a played greater than 19? | SELECT SUM(against) FROM table_name_57 WHERE difference = "6" AND played > 19 |
What is the name of the leading scorer when the record was 9–6? | SELECT leading_scorer FROM table_name_18 WHERE record = "9–6" |
What is the set 2 the has 1 set of 21-25, and 4 sets of 25-20? | SELECT set_2 FROM table_name_17 WHERE set_1 = "21-25" AND set_4 = "25-20" |
What is Tournament, when Outcome is Winner, and when Date is 13 July 2013? | SELECT tournament FROM table_name_63 WHERE outcome = "winner" AND date = "13 july 2013" |
What is all the information of all the products that have a price between 60 and 120? | SELECT * FROM products WHERE price BETWEEN 60 AND 120 |
Who is the largest donor by amount? Give the donation id and the total amount of the donation. | SELECT donationid, donation_total FROM donations ORDER BY donation_total DESC LIMIT 1 |
what are the names of all drivers? | SELECT name FROM driver |
What is SS Player Rich McKinney's Team? | SELECT team FROM table_name_19 WHERE position = "ss" AND player = "rich mckinney" |
Can you find the entries with the highest room count and only keep those in the table? | And still return the apartment type code and the room count? | Yes, only for those entries with the highest room count. | SELECT apt_type_code,room_count FROM Apartments order by room_count desc limit 1 |
What is Score, when Tie No is Replay, and when Home Team is Sunderland? | SELECT score FROM table_name_75 WHERE tie_no = "replay" AND home_team = "sunderland" |
How many countries exist? | SELECT count(*) FROM COUNTRIES; |
Name the home team score for south melbourne home team | SELECT home_team AS score FROM table_name_35 WHERE home_team = "south melbourne" |
What is the ID of the project with the most number of documents? | SELECT project_id FROM Documents GROUP BY project_id ORDER BY count ( * ) DESC LIMIT 1 |
Which Builder has a Date of early 1871? | SELECT builder FROM table_name_39 WHERE date = "early 1871" |
List the purchase order whereby all received quantity were rejected? Name those product. | SELECT T1.Name FROM Product AS T1 INNER JOIN PurchaseOrderDetail AS T2 ON T1.ProductID = T2.ProductID WHERE T2.RejectedQty = T2.ReceivedQty AND T2.RejectedQty <> 0 |
What are the faculty ids of all the male faculty members? | SELECT FacID FROM Faculty WHERE Sex = 'M' |
Excellent! Could you filter that list to show only the students who were taught by the teacher with the last name Moyer? | SELECT T1.firstname , T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.lastname = "MOYER" |
How many video games have type Massively multiplayer online game? | SELECT count(*) FROM Video_games WHERE gtype = "Massively multiplayer online game" |
Show the faculty id of each faculty member, along with the number of students he or she advises. | SELECT T1.FacID , count ( * ) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID = T2.advisor GROUP BY T1.FacID |
Name the four for 6 march 1801 | SELECT four FROM table_name_23 WHERE date = "6 march 1801" |
What is the real name of the movie about love? | SELECT original_name FROM table_name_26 WHERE film_title_used_in_nomination = "love" |
Which Platforms have a Hazmat of –, and a Type of urban & rural, and a Brigade of lara? | SELECT platforms FROM table_name_38 WHERE hazmat = "–" AND type = "urban & rural" AND brigade = "lara" |
Name the college for andrej podkonicky | SELECT college_junior_club_team FROM table_2840500_8 WHERE player = "Andrej Podkonicky" |
How many episodes were written by Tom Scharpling and Daniel Dratch? | SELECT COUNT(no_in_season) FROM table_25716397_1 WHERE written_by = "Tom Scharpling and Daniel Dratch" |
How many films have a rental rate of 0.99? | SELECT COUNT(film_id) FROM film WHERE rental_rate = 0.99 |
What is the full name of the driver that has done the most shipments in 2017? | SELECT T2.first_name, T2.last_name FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE STRFTIME('%Y', T1.ship_date) = '2017' GROUP BY T2.first_name, T2.last_name ORDER BY COUNT(*) DESC LIMIT 1 |
What is the average weight of the goods being transported on a single shipment ordered by S K L Enterprises Inc? | SELECT AVG(T2.weight) FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE T1.cust_name = 'S K L Enterprises Inc' |
What is the highest Money ( £ ), when Player is "Peter Hedblom"? | SELECT MAX(money___) AS £__ FROM table_name_95 WHERE player = "peter hedblom" |
For the catalog title DP068-07, what formats are available? | SELECT format FROM table_name_52 WHERE catalog = "dp068-07" |
What are the first and last names of all customers with between 1000 and 3000 dollars outstanding? | SELECT first_name , last_name FROM Customers WHERE amount_outstanding BETWEEN 1000 AND 3000; |
For each customer status code, how many customers are classified that way? | SELECT customer_status_code , count(*) FROM Customers GROUP BY customer_status_code; |
What is the average round for Georgia Tech with a pick greater than 103? | SELECT AVG(round) FROM table_name_81 WHERE school = "georgia tech" AND pick > 103 |
Who was the director of Clean Pastures? | SELECT director FROM table_name_12 WHERE title = "clean pastures" |
Please list the name of the countries with over 5 ethnic groups. | SELECT T1.Name FROM country AS T1 INNER JOIN ethnicGroup AS T2 ON T1.Code = T2.Country GROUP BY T1.Name HAVING COUNT(T1.Name) > 5 |
can you show me a list of location name? | SELECT location_name FROM Ref_Locations |
What is the smallest roll with a Decile larger than 6, and a Name of broomfield school? | SELECT MIN(roll) FROM table_name_40 WHERE decile > 6 AND name = "broomfield school" |
How many segment b's when segment a is filigree glass | SELECT COUNT(segment_b) FROM table_15187735_16 WHERE segment_a = "Filigree Glass" |
What is the age of the friend of Zach with longest year relationship? | SELECT T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T2.name = 'Zach' AND T2.year = (SELECT max(YEAR) FROM PersonFriend WHERE name = 'Zach') |
Which competition did Târlea come in 4th place, in 2003 at Budapest, Hungary? | SELECT competition FROM table_name_55 WHERE position = "4th" AND year > 2003 AND venue = "budapest, hungary" |
What is the Pinyin for 依兰县? | SELECT hanyu_pinyin FROM table_name_53 WHERE hanzi = "依兰县" |
What is the name of the movie whose critic received the highest amount of likes? Indicate the URL to the rating on Mubi. | SELECT T2.movie_title, T1.rating_url FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id ORDER BY T1.critic_likes DESC LIMIT 1 |
What is Country, when Player is "Tom Watson"? | SELECT country FROM table_name_99 WHERE player = "tom watson" |
Among the motorcycles with product scale of 1:10, which of them is the most ordered by American customers? | SELECT T1.productName FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.productCode INNER JOIN orders AS T3 ON T2.orderNumber = T3.orderNumber INNER JOIN customers AS T4 ON T3.customerNumber = T4.customerNumber WHERE T1.productLine = 'Motorcycles' AND T1.productScale = '1:10' AND T4.country = 'USA' GROUP BY T1.productName ORDER BY SUM(T2.quantityOrdered) DESC LIMIT 1 |
Which Slalom has a Super G of 4? | SELECT slalom FROM table_name_98 WHERE super_g = "4" |
what's the extroverted, relationship-oriented where moderate is introverted sanguine | SELECT extroverted, _relationship_oriented FROM table_11256021_1 WHERE moderate = "Introverted Sanguine" |
who was the winner in 2003? | SELECT winner FROM table_name_53 WHERE year = "2003" |
When the Venue was Punt Road Oval, who was the Home Team? | SELECT home_team FROM table_name_47 WHERE venue = "punt road oval" |
Among the Production Technicians who are single, how many of them are vendor contact? | SELECT COUNT(T1.BusinessEntityID) FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.JobTitle LIKE 'Production Technician%' AND T1.MaritalStatus = 'S' AND T2.PersonType = 'VC' |
Show all student IDs with the number of sports and total number of games played | SELECT StuID, COUNT(*), SUM(gamesplayed) FROM Sportsinfo GROUP BY StuID |
What is Nationality, when Round is less than 2, and when College/Team is "CB L'Hospitalet"? | SELECT nationality FROM table_name_36 WHERE round < 2 AND college_team = "cb l'hospitalet" |
What is the highest rank for the airport with a code of HKG/VHHH? | SELECT MAX(rank) FROM table_name_56 WHERE code__iata_icao_ = "hkg/vhhh" |
Yes. Can you tell me the number of employees? | SELECT count ( * ) FROM employee |
What is the total number of Season(s), when Original Airdate is January 24, 1999, and when Year is less than 1999? | SELECT COUNT(season) FROM table_name_67 WHERE original_airdate = "january 24, 1999" AND year < 1999 |
How long is the total lesson time taught by staff with first name as Janessa and last name as Sawayn? | SELECT sum(lesson_time) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn"; |
Who sand He's Bigfoot? | SELECT singer_s_ FROM table_23667534_1 WHERE song_s__title = "He's Bigfoot" |
What were the highest laps when the grid was larger than 19 and the time/retired was fuel? | SELECT MAX(laps) FROM table_name_52 WHERE grid > 19 AND time_retired = "fuel" |
What were the scores of the games with a record of 47-34? | SELECT score FROM table_27902171_9 WHERE record = "47-34" |
What is the family of the constellation that has lyncis /ˈlɪnsɨs/ as genitive? | SELECT family FROM table_287159_1 WHERE genitive = "Lyncis /ˈlɪnsɨs/" |
Name the number of team for 35 runs margin and india winner | SELECT COUNT(team__b_) FROM table_1594772_2 WHERE margin = "35 runs" AND winner = "India" |
Find the name of tracks which are in Movies playlist but not in music playlist. | SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' EXCEPT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music' |
What is the country of the player with a t6 place? | SELECT country FROM table_name_33 WHERE place = "t6" |
display the department id and the total salary for those departments which contains at least two employees. | SELECT department_id , SUM ( salary ) FROM employees GROUP BY department_id HAVING count ( * ) > = 2 |
Which is the highest bronze with gold less than 0? | SELECT MAX(bronze) FROM table_name_17 WHERE gold < 0 |
Name the sum of points for 1984 | SELECT SUM(points) FROM table_name_95 WHERE year < 1984 |
Who won the III Coppa Acerbo title? | SELECT driver_s FROM table_name_67 WHERE race_title = "iii coppa acerbo" |
What was the least amount for Goals Olimpia? | SELECT MIN(goals_olimpia) FROM table_13688489_1 |
Who is Bob's friend? | SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Bob' |
Find out what proportion of total revenue Walt Disney Parks and Resorts received in 2010. | SELECT SUM(`Walt Disney Parks and Resorts`) / SUM(Total) * 100 FROM revenue WHERE year = 2010 |
What is the USD price for Tealeaf? | SELECT price_in_usd FROM table_name_79 WHERE company = "tealeaf" |
Which team did the all league rebound champion play in 1997? Give the full name of the team. | SELECT T1.name FROM teams AS T1 INNER JOIN players_teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T2.year = 1997 GROUP BY T1.name ORDER BY SUM(rebounds + dRebounds) DESC LIMIT 1 |
What were the remarks for Dutch Antilles Express? | SELECT remarks FROM table_name_74 WHERE airline = "dutch antilles express" |
How many debut years have Years at club of 1950–1951, and Games larger than 14? | SELECT SUM(debut_year) FROM table_name_39 WHERE years_at_club = "1950–1951" AND games > 14 |
What is the home team of the game on February 3? | SELECT home FROM table_name_72 WHERE date = "february 3" |
how many orders are there | SELECT count ( * ) FROM invoices |
list number of games played by students | select sum ( GamesPlayed ) from sportsinfo |
What is the address content of the customer named "Maudie Kertzmann"? | SELECT t3.address_content 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 t1.customer_name = "Maudie Kertzmann" |
How many teams have 21 tries for? | SELECT COUNT(points_difference) FROM table_15467476_3 WHERE tries_for = "21" |
What is the phone and email for customer with first name Aniyah and last name Feest? | SELECT customer_phone , customer_email FROM Customers WHERE customer_first_name = "Aniyah" AND customer_last_name = "Feest" |
Which driver is Indian? | SELECT driver___rider FROM table_name_58 WHERE car___motorcycle = "indian" |
List each birth place along with the number of people from there. | SELECT Birth_Place , COUNT(*) FROM people GROUP BY Birth_Place |
Who ihad the highest points and what was the number when the record was 11-40? | SELECT high_points FROM table_13619053_7 WHERE record = "11-40" |
WHat in 2005 has a Win % of 82.61? | SELECT 2005 FROM table_name_59 WHERE win__percentage = "82.61" |
Show all product colors. | SELECT DISTINCT product_color FROM Products |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.