sentence
stringlengths
3
347
sql
stringlengths
18
804
What is moorabbin oval's away team?
SELECT away_team FROM table_name_11 WHERE venue = "moorabbin oval"
Who is the driver for the Entract of Enrico Platé?
SELECT driver FROM table_name_80 WHERE entrant = "enrico platé"
Name the torque of the engine is d5244 t5
SELECT torque__nm AS @rpm_ FROM table_1147701_5 WHERE engine_code = "D5244 T5"
Can you list all the departments with the school code BUS?
SELECT * FROM department where school_code = "BUS"
List album titles for albums containing Rock genre tracks
SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Reggae' INTERSECT SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Rock'
What was the loss of the game that had a score of 9-7?
SELECT loss FROM table_name_65 WHERE score = "9-7"
When aspect computing is the yacht what is the sail number?
SELECT sail_number FROM table_1858574_2 WHERE yacht = "Aspect Computing"
Which non capital city has the most people of all?
SELECT T3.Name FROM country AS T1 INNER JOIN province AS T2 ON T1.Code = T2.Country INNER JOIN city AS T3 ON T3.Province = T2.Name WHERE T3.Name <> T1.Capital ORDER BY T3.Population DESC LIMIT 1
What nationality has 2 as the rank?
SELECT nationality FROM table_name_32 WHERE rank = 2
find the state of the college which player Charles is attending
SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName JOIN player AS T3 ON T2.pID = T3.pID WHERE T3.pName = 'Charles'
What is the value for Tackles, when the value for Solo is greater than 67, when the value for Sacks is less than 2, and when the value for INT YDS is greater than 1?
SELECT tackles FROM table_name_75 WHERE solo > 67 AND sacks < 2 AND int_yds > 1
What is the name of Rapid City's Adult Contemporary station?
SELECT name FROM table_134987_3 WHERE city_of_license = "Rapid City" AND format = "Adult Contemporary"
Write down homepage URL of journal for paper "364: Induction of Mixed Chimerism and Transplantation Tolerance in a Non-Human Primate Lung Allograft Model: Early Results".
SELECT T2.HomePage FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T1.Title = '364: Induction of Mixed Chimerism and Transplantation Tolerance in a Non-Human Primate Lung Allograft Model: Early Results'
Name the catalog number for october 6, 1988
SELECT catalog_number FROM table_27303975_2 WHERE release_date = "October 6, 1988"
What date was the game at Williams-Brice stadium • Columbia, SC?
SELECT date FROM table_name_75 WHERE site = "williams-brice stadium • columbia, sc"
What counties mascot are the Red Ramblers?
SELECT county FROM table_name_85 WHERE mascot = "red ramblers"
Which song has a U.S. R&B 100 in 2010?
SELECT song FROM table_name_53 WHERE year = 2010 AND us_r & b = "100"
What is the id of the candidate who most recently accessed the course?
SELECT candidate_id FROM candidate_assessments ORDER BY assessment_date DESC LIMIT 1
Name the rank for thomas morgenstern
SELECT rank FROM table_24489942_10 WHERE name = "Thomas Morgenstern"
Which customer has the most reviews? State the full name.
SELECT T1.First, T1.Last FROM customers AS T1 INNER JOIN rootbeerreview AS T2 ON T1.CustomerID = T2.CustomerID GROUP BY T1.CustomerID ORDER BY COUNT(T2.CustomerID) DESC LIMIT 1
what is the captain's age?
SELECT t2.age FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id = t2.ship_id WHERE t2.rank = 'Lieutenant'
What is the least purchased product by stores in the city of Santa Clarita?
SELECT T1.`Product Name` FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID INNER JOIN `Store Locations` AS T3 ON T3.StoreID = T2._StoreID WHERE T3.`City Name` = 'Santa Clarita' GROUP BY T1.`Product Name` ORDER BY COUNT(T1.`Product Name`) ASC LIMIT 1
How many times did SC Ganguly be the man of the match?
SELECT COUNT(T2.Man_of_the_Match) FROM Player AS T1 INNER JOIN Match AS T2 ON T1.Player_Id = T2.Man_of_the_Match INNER JOIN Player_Match AS T3 ON T3.Player_Id = T1.Player_Id WHERE T1.Player_Name = 'SC Ganguly'
List all the post codes starting with 4.
SELECT zip_postcode FROM addresses WHERE zip_postcode LIKE "4%"
Indicate the number of installs and include the percentage of positive sentiments of FREEDOME VPN Unlimited anonymous Wifi Security.
SELECT T1.Installs , CAST(SUM(CASE WHEN T2.Sentiment = 'Positive' THEN 1 ELSE 0 END) * 100 / SUM(CASE WHEN T2.Sentiment IS NOT NULL THEN 1.0 ELSE 0 END) AS REAL) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'FREEDOME VPN Unlimited anonymous Wifi Security'
How many courses that do not have prerequisite?
SELECT count(*) FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq)
when did the transactions that were less that 3000 occur?
SELECT T2.date_of_transaction FROM SALES AS T1 JOIN TRANSACTIONS AS T2 ON T1.sales_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction < 3000
who is a doctor?
SELECT name FROM Person WHERE job = 'doctor'
Show me the prices of Trading Policy
SELECT Product_Price FROM Products WHERE Product_Name = "Trading Policy"
What is the prothrombin time in Von willebrand disease?
SELECT prothrombin_time FROM table_1557752_1 WHERE condition = "Von Willebrand disease"
What are the top 10 customers' first and last names with the highest gross sales, and also what are the sales?
SELECT T1.first_name , T1.last_name , SUM(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id GROUP BY T1.id ORDER BY SUM(T2.total) DESC LIMIT 10;
List the marital status and response of female customers with an level of education of 8 and above.
SELECT DISTINCT T1.MARITAL_STATUS, T2.RESPONSE FROM Customers AS T1 INNER JOIN Mailings1_2 AS T2 ON T1.ID = T2.REFID WHERE T1.EDUCATIONNUM > 8 AND T1.SEX = 'Female'
What is the preliminaries of the contestant with a swimsuit less than 8.948 and an interview of 8.997?
SELECT preliminaries FROM table_name_99 WHERE swimsuit < 8.948 AND interview = 8.997
WHAT IS THE TEAM WITH AN OF POSITION AND PICK OF 24?
SELECT team FROM table_name_93 WHERE position = "of" AND pick = 24
Who was replaced as manager on June 20?
SELECT outgoing_manager FROM table_29414946_3 WHERE date_of_appointment = "June 20"
Name the most played when points is 105
SELECT MAX(played) FROM table_17968282_1 WHERE points = 105
How many different clients have rented materials from Jon Stephens?
SELECT COUNT(T1.customer_id) FROM rental AS T1 INNER JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Jon' AND T2.last_name = 'Stephens'
What is Class, when Part 2 is "blétu"?
SELECT class FROM table_name_15 WHERE part_3 = "blétu"
What is the average age of first 60,000 customers who sent a true response to the incentive mailing sent by the marketing department?
SELECT AVG(T1.age) FROM Customers AS T1 INNER JOIN Mailings1_2 AS T2 ON T1.ID = T2.REFID WHERE T2.RESPONSE = 'true'
Can you tell me the Location Attendance that has the High assists of luke ridnour (10), and the Date of december 3?
SELECT location_attendance FROM table_name_10 WHERE high_assists = "luke ridnour (10)" AND date = "december 3"
What was the team features at Oran Park Raceway?
SELECT team FROM table_name_41 WHERE circuit = "oran park raceway"
What is the highest games from a game with points less than 4, drawn of 1 and a lost less than 6?
SELECT MAX(games) FROM table_name_58 WHERE points < 4 AND drawn = 1 AND lost < 6
What are the maximum and minimum sales of the companies whose industries are not "Banking".
SELECT max(Sales_billion) , min(Sales_billion) FROM Companies WHERE Industry != "Banking"
Which Bronze has a Gold larger than 1, and a Silver smaller than 3, and a Rank smaller than 5?
SELECT bronze FROM table_name_69 WHERE gold > 1 AND silver < 3 AND rank < 5
How many professional or master/graduate courses are there?
SELECT COUNT(*) FROM course WHERE courseLevel = 'Level_500'
Which films participated in the 30th Hawaii International Film Festival?
SELECT participants_recipients FROM table_29644931_1 WHERE film_festival = "30th Hawaii International film_festival"
Show the medicine names and trade names that cannot interact with the enzyme with product 'Heme'.
SELECT name , trade_name FROM medicine EXCEPT SELECT T1.name , T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id JOIN enzyme AS T3 ON T3.id = T2.enzyme_id WHERE T3.product = 'Protoporphyrinogen IX'
What is the fewest draws for percentages of 5.02%?
SELECT MIN(draw) FROM table_name_95 WHERE percentage = "5.02%"
who was the winner of uci rating cn?
SELECT winner FROM table_27887723_1 WHERE uci_rating = "CN"
What is the NHL team in the media market ranking number 7?
SELECT nhl_team_s_ FROM table_1205598_1 WHERE media_market_ranking = 7
What's the IHSAA Class when the school is Seymour?
SELECT ihsaa_class FROM table_name_39 WHERE school = "seymour"
What is the bird uniform for Eagle Rider Mickey Dugan?
SELECT bird_uniform FROM table_name_8 WHERE eagle_riders = "mickey dugan"
What is the upstream speed that you get for 89 tl?
SELECT upstream FROM table_17304621_14 WHERE price_tl = "89 TL"
What is the average number of followers of the lists created by the user who rated the movie "Pavee Lackeen: The Traveller Girl" on 3/27/2011 at 2:06:34 AM?
SELECT CAST(SUM(T4.list_followers) AS REAL) / COUNT(T2.list_id) FROM ratings AS T1 INNER JOIN lists_users AS T2 ON T1.user_id = T2.user_id INNER JOIN movies AS T3 ON T1.movie_id = T3.movie_id INNER JOIN lists AS T4 ON T2.list_id = T4.list_id WHERE T3.movie_title LIKE 'Pavee Lackeen: The Traveller Girl' AND T1.rating_timestamp_utc LIKE '2011-03-27 02:06:34'
How many shipments were delivered to a customer from New York?
SELECT COUNT(*) FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id WHERE T2.state = 'NY'
Which supplier can provide the most number of "hot spring dodger dim light"? Please give the supplier's phone number.
SELECT T3.s_phone FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN supplier AS T3 ON T2.ps_suppkey = T3.s_suppkey WHERE T1.p_name = 'hot spring dodger dim light' ORDER BY T2.ps_availqty DESC LIMIT 1
Find the name of all the cities and states.
SELECT town_city FROM addresses UNION SELECT state_province_county FROM addresses
What was the score when essendon was the home team?
SELECT home_team AS score FROM table_name_75 WHERE home_team = "essendon"
What are the room numbers and corresponding buildings for classrooms which can seat between 50 to 100 students?
SELECT building , room_number FROM classroom WHERE capacity BETWEEN 50 AND 100
What is his name?
SELECT Participant_Details FROM participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID = T2.Participant_ID WHERE T1.participant_details LIKE '%Dr.%'
What is the lowest game number on 20 July 2008?
SELECT MIN(game) FROM table_name_33 WHERE date = "20 july 2008"
What are the names of studios that have made two or more films?
SELECT Studio FROM film GROUP BY Studio HAVING COUNT(*) >= 2
how many laps were there when the grid was 24?
SELECT COUNT(laps) FROM table_name_25 WHERE grid = 24
Among the faculty affiliated professor, how many professors teaches professional or master/undergraduate courses?
SELECT COUNT(*) FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id INNER JOIN course AS T3 ON T3.course_id = T2.course_id WHERE T1.hasPosition = 'Faculty_aff' AND T1.professor = 1 AND T3.courseLevel = 'Level_500'
Which driver drove in grid 19?
SELECT driver FROM table_name_12 WHERE grid = 19
How many extra points did Paul Jones score?
SELECT COUNT(extra_points) FROM table_14342367_11 WHERE player = "Paul Jones"
List the category of the business with high review count but received 2 stars.
SELECT T3.category_name FROM Business AS T1 INNER JOIN Business_Categories ON T1.business_id = Business_Categories.business_id INNER JOIN Categories AS T3 ON Business_Categories.category_id = T3.category_id WHERE T1.stars = 2 AND T1.review_count LIKE 'High'
List the product code of the top five motorcycles, by descending order, the number of quantity in stock.
SELECT productCode, quantityInStock FROM products WHERE productLine = 'Motorcycles' ORDER BY quantityInStock DESC LIMIT 5
What is Competition, when Date is "January 11, 1996", when Venue is "San Diego , United States"?
SELECT competition FROM table_name_72 WHERE date = "january 11, 1996" AND venue = "san diego , united states"
What is the name of the Deputy when the Name was elizabeth black?
SELECT deputy FROM table_name_88 WHERE name = "elizabeth black"
What result in the table is from the year 2012?
SELECT result FROM table_name_38 WHERE year = 2012
Count the number of accounts corresponding to each customer id.
SELECT count(*) , customer_id FROM Accounts GROUP BY customer_id
What is the color code and description of the product named "chervil"?
SELECT t1.color_code , t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = "chervil"
What was the team that scored 56 points?Qh
SELECT team FROM table_25369796_1 WHERE points = "56"
State the principal activities of Air Hong Kong?
select distinct Principal_activities from operate_company where name = 'Air Hong Kong'
What was the label in the region of Canada?
SELECT label FROM table_name_57 WHERE region = "canada"
what is the capacity of Codling Cinema
SELECT capacity from cinema where name = "Codling"
Find the total market rate of the furnitures that have the top 2 market shares.
SELECT sum(market_rate) FROM furniture ORDER BY market_rate DESC LIMIT 2
What is the id, name and nationality of the architect who built most mills?
SELECT T1.id , T1.name , T1.nationality FROM architect AS T1 JOIN mill AS T2 ON T1.id = T2.architect_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1
How many furniture cushions orders which have date of order in 2018?
SELECT SUM(CASE WHEN T1.OrderDate LIKE '%/%/18' AND T2.`Product Name` = 'Furniture Cushions' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID
Wha argon has helium of 1.0000684?
SELECT argon FROM table_name_54 WHERE helium = "1.0000684"
Name the CDP name for FIPS code of 3659708
SELECT cdp_name FROM table_name_58 WHERE fips_code = 3659708
What is the name and country of origin of the artist who released a song that has "love" in its title?
SELECT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.song_name LIKE "%love%"
What is the population gap between the United Kingdom and Italy?
SELECT MAX(Population) - MIN(Population) FROM country WHERE Name = 'United Kingdom' OR Name = 'Italy'
Return the names of songs for which format is mp3 and resolution is below 1000.
SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = "mp3" INTERSECT SELECT song_name FROM song WHERE resolution < 1000
Which claims had exactly one settlement? For each, tell me the the date the claim was made, the date it was settled and the amount settled.
SELECT T1.claim_id , T1.date_claim_made , T1.Date_Claim_Settled FROM Claims AS T1 JOIN Settlements AS T2 ON T1.Claim_id = T2.Claim_id GROUP BY T1.claim_id HAVING count(*) = 1
Which business had the most number of high risk violations? Give the name of the business.
SELECT T2.name FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.risk_category = 'High Risk' GROUP BY T2.name ORDER BY COUNT(T2.name) DESC LIMIT 1
Where 19 seats were won, what was the minimum number of forfeited seats?
SELECT MIN(forfeited_in_seats) FROM table_22582663_1 WHERE seats_won = 19
Who has 6/1 odds?
SELECT trainer FROM table_name_50 WHERE odds = "6/1"
Who came as a replacement in Sheffield United?
SELECT replaced_by FROM table_19359427_6 WHERE team = "Sheffield United"
What was the Purse for Owner Harold A. Allen prior to 2009?
SELECT purse FROM table_name_41 WHERE year < 2009 AND owner = "harold a. allen"
What is the first and last name of all the German drivers?
SELECT forename , surname FROM drivers WHERE nationality = "German"
What is the closing and opening time of businesses located at Tempe with highest star rating?
SELECT T2.closing_time, T2.opening_time FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id WHERE T1.city LIKE 'Tempe' ORDER BY T1.stars DESC LIMIT 1
How many of the papers are preprinted or not published?
SELECT COUNT(Id) FROM Paper WHERE Year = 0
How many days is the Monaco Grand Prix?
SELECT COUNT(date) FROM table_1140083_2 WHERE race = "Monaco Grand Prix"
Can you provide me with the most common apartment type code among all of the apartments with at least 1 bathroom?
SELECT apt_type_code FROM Apartments WHERE bathroom_count > = 1 GROUP BY apt_type_code ORDER BY count ( * ) DESC LIMIT 1
Which Region has an Area of 9,451km²?
SELECT region FROM table_name_65 WHERE area__km²_ = "9,451"
How many episodes did J.K. Simmons' role appear on the show?
SELECT COUNT(T1.role) FROM Credit AS T1 INNER JOIN Person AS T2 ON T2.person_id = T1.person_id WHERE T2.name = 'J.K. Simmons'
Show names of parties that does not have any members.
SELECT party_name FROM party WHERE party_id NOT IN (SELECT party_id FROM Member)
On average, how many players from each country bat with their right hand?
SELECT CAST(SUM(CASE WHEN T1.Batting_hand = 'Right-hand bat' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.Country_Name) FROM Batting_Style AS T1 INNER JOIN Player AS T2 ON T1.Batting_id = T2.Batting_hand