sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
what is the date order placed of order id 2 | SELECT date_order_placed FROM orders where order_id = 2 |
What driver won the VII Rand Grand Prix? | SELECT winning_driver FROM table_name_26 WHERE race_name = "vii rand grand prix" |
Name the number at march when class is j66 | SELECT number_at_march FROM table_15608800_2 WHERE class = "J66" |
Name the 2008 for 2012 of sf | SELECT 2008 FROM table_name_41 WHERE 2012 = "sf" |
What is the average round at which is the position of Tight End and Randy Bethel? | SELECT AVG(round) FROM table_name_56 WHERE position = "tight end" AND player = "randy bethel" |
How about the price of Cola in dollars? | do you still want to know the average and minimum? | Yes please! | SELECT avg ( price_in_dollars ) , min ( price_in_dollars ) FROM catalog_contents where catalog_entry_name = 'Cola' |
what's the salmonella with shigella being ipgc | SELECT salmonella FROM table_10321124_1 WHERE shigella = "IpgC" |
Which Home team score has an Away team of st kilda? | SELECT home_team AS score FROM table_name_2 WHERE away_team = "st kilda" |
How many ingredients must be rationed in the recipe "Raspberry Chiffon Pie"? | SELECT COUNT(*) FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.title = 'Raspberry Chiffon Pie' AND T2.max_qty = T2.min_qty |
how many customers are presented on the table | SELECT count ( * ) FROM Customers |
Nation of bulgaria, and a Place larger than 1 had what highest 3 Balls, 2 Ribbons? | SELECT MAX(3 AS _balls), _2_ribbons FROM table_name_16 WHERE nation = "bulgaria" AND place > 1 |
Which detriment has a domicile of mercury and Virgo as a sign? | SELECT detriment FROM table_name_89 WHERE domicile = "mercury" AND sign = "virgo" |
Who directed the episode that was written by Bill Lawrence? | SELECT directed_by FROM table_25547943_1 WHERE written_by = "Bill Lawrence" |
What is the average number of injuries caused each time? | SELECT AVG(injured) FROM death |
What was the date of the game that had a loss of Reed (0–2)? | SELECT date FROM table_name_29 WHERE loss = "reed (0–2)" |
What is her email? | SELECT email_address FROM Students WHERE first_name = "Emma" |
What is fleet number for the year of 19xx? | SELECT fleet_number FROM table_name_62 WHERE year = "19xx" |
display those departments where more than ten employees work who got a commission percentage. | SELECT department_id FROM employees GROUP BY department_id HAVING COUNT(commission_pct) > 10 |
Please calculate the average unit price for products of Formaggi Fortini s.r.l. | SELECT SUM(T1.UnitPrice) / COUNT(T1.SupplierID) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Formaggi Fortini s.r.l.' |
Which products has been complained by the customer who has filed least amount of complaints? | SELECT DISTINCT t1.product_name FROM products AS t1 JOIN complaints AS t2 ON t1.product_id = t2.product_id JOIN customers AS t3 GROUP BY t3.customer_id ORDER BY COUNT(*) LIMIT 1 |
What is the lowest year that has all-ireland hurling final as the competition, and 6-08 (24) as the waterford score? | SELECT MIN(year) FROM table_name_95 WHERE competition = "all-ireland hurling final" AND waterford_score = "6-08 (24)" |
What is the name of the institution that "Matthias Blume" belongs to? | SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t1.fname = "Matthias" AND t1.lname = "Blume" |
what is the address of history department? | SELECT dept_address FROM department WHERE dept_name = 'History' |
What is the earliest Date on a Surface of clay in a Championship in Linz, Austria? | SELECT MIN(date) FROM table_name_15 WHERE surface = "clay" AND championship = "linz, austria" |
Hi.Can you show the categories of the music festivals? | SELECT Category FROM music_festival |
What was the grid when the driver was Mark Webber? | SELECT grid FROM table_name_96 WHERE driver = "mark webber" |
How many tracks are there? | SELECT count ( * ) FROM Track |
Please list the titles of all the books in British English. | SELECT T1.title FROM book AS T1 INNER JOIN book_language AS T2 ON T1.language_id = T2.language_id WHERE T2.language_name = 'British English' |
Which event led to a 4-0 record? | SELECT event FROM table_name_98 WHERE record = "4-0" |
Please list all the categories of the Yelp_Business in Arizona. | SELECT T1.category_name FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id WHERE T3.state LIKE 'AZ' GROUP BY T1.category_name |
What was the pick number in round 228 for Mike Ford? | SELECT MAX(pick) FROM table_name_44 WHERE player = "mike ford" AND round > 228 |
How many different bike ids are there? | SELECT count(DISTINCT bike_id) FROM trip |
How many businesses in Arizona having an average review less than 3 stars? | SELECT COUNT(business_id) FROM Business WHERE business_id IN ( SELECT DISTINCT T1.business_id FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.state = 'AZ' GROUP BY T1.business_id HAVING SUM(T2.review_stars) / COUNT(T2.user_id) < 3 ) |
What is the average alcohol content per 12-ounce beer bottle produced by Boston Beer Company? | SELECT AVG(T1.abv) FROM beers AS T1 INNER JOIN breweries AS T2 ON T1.brewery_id = T2.id WHERE T2.name = 'Boston Beer Company' AND T1.ounces = 12 |
What is the issue price of a Year 2000 coin by artist John Mardon of the Included in Steam Buggy mintage. | SELECT issue_price FROM table_name_46 WHERE artist = "john mardon" AND year = 2000 AND mintage = "included in steam buggy" |
What is the Valvetrain of the Diesel Engines Model? | SELECT valvetrain FROM table_name_12 WHERE model = "diesel engines" |
What is the rating for "Garden Coloring Book"? List all of its reviews. | SELECT T1.Rating, T2.Translated_Review FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Garden Coloring Book' |
Which Copa del Rey has a Name of guti, and a FIFA Club World Championship smaller than 0? | SELECT SUM(copa_del_rey) FROM table_name_63 WHERE name = "guti" AND fifa_club_world_championship < 0 |
List every individual's first name, middle name and last name in alphabetical order by last name. | SELECT individual_first_name , individual_middle_name , individual_last_name FROM individuals ORDER BY individual_last_name |
What loss was against the angels with a 50-31 record? | SELECT loss FROM table_name_84 WHERE opponent = "angels" AND record = "50-31" |
which team performed in Ave Maria university ? | SELECT Team FROM institution WHERE Institution = 'Ave Maria University' |
How many different people did different scores of high assists during the December 11 game? | SELECT COUNT(high_assists) FROM table_23248869_6 WHERE date = "December 11" |
What was the total number who attended during week 11? | SELECT COUNT(attendance) FROM table_name_98 WHERE week = 11 |
Who is the last/current driver(s) 3 november 2013 when first driver(s) is marlon stöckinger , kotaro sakurai ( 2011 )? | SELECT last_current_driver_s__3_november_2013 FROM table_27279050_3 WHERE first_driver_s_ = "Marlon Stöckinger , Kotaro Sakurai ( 2011 )" |
what is the number of passengers when the capacity is 81.2%? | SELECT SUM(total_passengers) FROM table_name_88 WHERE capacity_in_use = "81.2%" |
Name the total number of population 2000 census for mesquita | SELECT COUNT(population_2000_census) FROM table_14986292_1 WHERE administrative_division = "Mesquita" |
What is the score of the match with anders järryd as the runner-up? | SELECT score FROM table_name_93 WHERE runner_up = "anders järryd" |
Which Time/Retired has less than 77 laps, and a Grid of 16? | SELECT time_retired FROM table_name_68 WHERE laps < 77 AND grid = 16 |
What is the name style of the employee with the lowest pay rate? | SELECT T2.NameStyle FROM EmployeePayHistory AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.Rate IS NOT NULL ORDER BY T1.Rate ASC LIMIT 1 |
Can you give me a list of all products? | select * from products |
What is the home team of the game on May 22 with the Edmonton Oilers as the visiting team? | SELECT home FROM table_name_29 WHERE visitor = "edmonton oilers" AND date = "may 22" |
Which of these appear more than once? | SELECT date_of_latest_revision FROM Catalogs GROUP BY date_of_latest_revision HAVING count ( * ) > 1 |
How many schools are there? | SELECT count ( DISTINCT SCHOOL_CODE ) FROM DEPARTMENT |
how many customers are there | SELECT count ( * ) FROM customers |
What Nationality is the Pick that is 116? | SELECT nationality FROM table_name_92 WHERE pick = 116 |
What is the Netflix number having a segment D, of NED can corn? | SELECT netflix FROM table_name_2 WHERE segment_d = "ned can corn" |
what about the name of the dorms that are both male and female? | SELECT * FROM dorm where gender = "M" or gender = "F" |
How much Rank has a Tally of 0-10, and an Opposition of cork? | SELECT COUNT(rank) FROM table_name_37 WHERE tally = "0-10" AND opposition = "cork" |
Please list the IDs of all the shipments made by a retailer customer. | SELECT T2.ship_id FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE T1.cust_type = 'retailer' |
What are all the title directed by reginald hudlin | SELECT COUNT(title) FROM table_21994729_3 WHERE directed_by = "Reginald Hudlin" |
List the language used least number of TV Channel. List language and number of TV Channel. | SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE ORDER BY count(*) ASC LIMIT 1; |
Tell me the listed when cerclis id is msd004006995 | SELECT listed FROM table_name_17 WHERE cerclis_id = "msd004006995" |
List all the paper that the journal "Theoretical Computer Science
" published in 2003. | SELECT DISTINCT T1.Title FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T2.FullName = 'Theoretical Computer Science' AND T1.Year = 2003 AND T1.Title <> '' |
In the parts supply by Supplier#000000654, list the top five parts with the most supply cost in descending order of supply cost. | SELECT T2.ps_partkey FROM supplier AS T1 INNER JOIN partsupp AS T2 ON T1.s_suppkey = T2.ps_suppkey WHERE T1.s_name = 'Supplier#000000654' ORDER BY T2.ps_supplycost DESC LIMIT 5 |
What is the year Airds High School was founded? | SELECT founded FROM table_name_65 WHERE school = "airds high school" |
What is the fault status of that? | SELECT T2.fault_status FROM Fault_Log AS T1 JOIN Engineer_Visits AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id where T2.fault_log_entry_id = ( SELECT T1.fault_log_entry_id FROM Fault_Log AS T1 JOIN Engineer_Visits AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id GROUP BY T1.fault_log_entry_id ORDER BY count ( * ) DESC LIMIT 1 ) |
What school or team is in a round below 5 with a pick of 2? | SELECT school_club_team FROM table_name_57 WHERE round < 5 AND pick = 2 |
What is the school of the player from the College of Michigan? | SELECT school FROM table_name_35 WHERE college = "michigan" |
For races with an average speed of 113.835 mph, what are the winning race times? | SELECT race_time FROM table_17801022_1 WHERE average_speed__mph_ = "113.835" |
how many are under age 21 | select count ( * ) from people where Age < 21 |
What is listed for the Bronze, with the Location of Bangkok, and the Year of 1978? | SELECT bronze FROM table_name_6 WHERE location = "bangkok" AND year = 1978 |
In what location was a stadium built for the St Kilda Football Club? | SELECT location FROM table_28885977_1 WHERE built_for = "St Kilda Football Club" |
What is the highest Car with more than 155 yards? | SELECT MAX(car) FROM table_name_56 WHERE yards > 155 |
How many counties are there? | SELECT COUNT(*) FROM county_public_safety |
What is the percentage of documentary films? | SELECT CAST(SUM(IIF(T2.name = 'Documentary', 1, 0)) AS REAL) * 100 / COUNT(T1.film_id) FROM film_category AS T1 INNER JOIN category AS T2 ON T1.category_id = T2.category_id |
What is the average 2007 value with a 2009 value greater than 2.8, a 4.9 in 2010, and a 2006 less than 2.5? | SELECT AVG(2007) FROM table_name_19 WHERE 2009 > 2.8 AND 2010 = 4.9 AND 2006 < 2.5 |
For each tourist attraction, return its name and the date when the tourists named Vincent or Vivian visited there. | SELECT T1.Name , T3.Visit_Date 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 = "Vincent" OR T2.Tourist_Details = "Vivian" |
Among all the claims, what is the amount claimed in the claim with the least amount settled? List both the settlement amount and claim amount. | SELECT Amount_Settled , Amount_Claimed FROM Claims ORDER BY Amount_Settled ASC LIMIT 1 |
Which vocal type did the musician with last name "Heilo" played in the song with title "Der Kapitan"? | SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid JOIN band AS T3 ON T1.bandmate = T3.id WHERE T3.lastname = "Heilo" AND T2.title = "Der Kapitan" |
Which builder completed before 1890 and launched on 9 june 1888? | SELECT builder FROM table_name_84 WHERE completed < 1890 AND launched = "9 june 1888" |
Tell me the ages of the oldest and youngest students studying major 600. | SELECT max(Age) , min(Age) FROM STUDENT WHERE Major = 600 |
List the driver's name of the shipment with a weight greater than 95% of the average weight of all shipments. | SELECT T2.first_name, T2.last_name FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T1.weight * 100 > ( SELECT 95 * AVG(weight) FROM shipment ) |
Who is the constructor of the 196 chassis? | SELECT constructor FROM table_name_50 WHERE chassis = "196" |
Great! how many apartments does each of them have? | SELECT count ( * ) , apt_type_code FROM Apartments GROUP BY apt_type_code |
And how many volumes spent 1.0 weeks on top? | SELECT count ( * ) FROM volume where weeks_on_top = 1.0 |
What is the average goals for Jimmy Greaves, and matches more than 516? | SELECT AVG(goals) FROM table_name_91 WHERE name = "jimmy greaves" AND matches > 516 |
When was the kickoff time of the SB XXXVI? | SELECT kickoff FROM table_name_93 WHERE week = "sb xxxvi" |
what is the game when batting 2nd is new zealand 6/133 (18)? | SELECT MIN(game) FROM table_name_17 WHERE batting_2nd = "new zealand 6/133 (18)" |
What is the total profit all transactions with product ID 827? | SELECT SUM((T1.ListPrice - T1.StandardCost) * T2.Quantity) FROM Product AS T1 INNER JOIN TransactionHistory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductID = 827 |
Find all the forenames of distinct drivers who was in position 1 as standing and won? | SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1 |
The nll participate in what sport? | SELECT sport FROM table_name_64 WHERE league = "nll" |
Show the enrollment and primary_conference of the oldest college. | SELECT enrollment , primary_conference FROM university ORDER BY founded LIMIT 1 |
What's the lowest Position with a Conceded that's larger than 16, Draws of 3, and Losses that's larger than 3? | SELECT MIN(position) FROM table_name_6 WHERE conceded > 16 AND draws = 3 AND losses > 3 |
Find courses that ran in Fall 2009 and in Spring 2010. | SELECT course_id FROM SECTION WHERE semester = 'Fall' AND YEAR = 2009 INTERSECT SELECT course_id FROM SECTION WHERE semester = 'Spring' AND YEAR = 2010 |
What is the station type for the branding ABS-CBN TV-32 Tagaytay? | SELECT station_type FROM table_2610582_2 WHERE branding = "ABS-CBN TV-32 Tagaytay" |
What is the grid total for cars with over 69 laps? | SELECT COUNT(grid) FROM table_name_34 WHERE laps > 69 |
Show me the details of the schools | SELECT School FROM University |
How many precincts are in the county where G. Hager received 19 (20%) votes? | SELECT precincts FROM table_17820556_4 WHERE g_hager = "19 (20%)" |
what's the maximum peru vs. world (percent) with 9672 species in the world | SELECT MAX(peru_vs_world__percent_) FROM table_11727969_1 WHERE species_in_the_world = 9672 |
Which Foreign population has a Population (2004) larger than 234733? | SELECT AVG(foreign_population) FROM table_name_26 WHERE population__2004_ > 234733 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.