sentence
stringlengths
3
347
sql
stringlengths
18
804
What is the phonetic when the standard thai is ผ่า?
SELECT phonetic FROM table_name_88 WHERE standard_thai = "ผ่า"
Name the total number of pick number being henry ellard
SELECT COUNT(pick__number) FROM table_2508633_2 WHERE player = "Henry Ellard"
What is the language used most often in the songs?
SELECT languages FROM song GROUP BY languages ORDER BY count(*) DESC LIMIT 1
What tyres were used with the mp4/14 chassis?
SELECT tyres FROM table_name_40 WHERE chassis = "mp4/14"
what is the least draw when the place is higher than 4?
SELECT MIN(draw) FROM table_name_62 WHERE place > 4
When was the golden slipper race?
SELECT date FROM table_name_53 WHERE race = "golden slipper"
What chapter is located in Normal, Illinois?
SELECT chapter FROM table_name_65 WHERE location = "normal, illinois"
What is the velocity of the pilot named 'Thompson'?
SELECT avg(velocity) FROM flight WHERE pilot = 'Thompson'
Which region has the highest number of restaurants?
SELECT T1.region FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city GROUP BY T1.region ORDER BY COUNT(T2.id_restaurant) DESC LIMIT 1
Please list all the female students that have filed for bankruptcy.
SELECT name FROM filed_for_bankrupcy WHERE name NOT IN ( SELECT name FROM male )
What position is number 35 whose height is 6-6?
SELECT position FROM table_11734041_2 WHERE height_in_ft = "6-6" AND no_s_ = "35"
Show the id of employees with role Role_Code
SELECT Employee_ID,Role_Code FROM Employees
What is 1989, when 1982 is "SF"?
SELECT 1989 FROM table_name_37 WHERE 1982 = "sf"
What was current legislator Sherrod Brown's Washington, D.C. office phone number during his term starting on 2013/1/3?
SELECT T1.phone FROM `current-terms` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.official_full_name = 'Sherrod Brown' AND T1.start = '2013-01-03'
Who is the driver whose car was constructed by Renault and whose Q1 pos is greater than 2?
SELECT driver FROM table_name_4 WHERE constructor = "renault" AND q1_pos > 2
What are the names and descriptions of all the sections?
SELECT section_name, section_description FROM Sections
What is the Other transliteration for value 1 000?
SELECT other FROM table_name_9 WHERE value = "1 000"
What activities do we have?
SELECT activity_name FROM Activity
What are the names of customers who have a loan of more than 3000 in amount?
SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id WHERE amount > 3000
Show me a list of all shipping agent codes
SELECT shipping_agent_code FROM Ref_Shipping_Agents
Which 2006 tournament had a 4R performance in 2001?
SELECT 2006 FROM table_name_96 WHERE 2001 = "4r"
What country is the player ho had a To par of +1 and a score of 69-70-72=211 from?
SELECT country FROM table_name_92 WHERE to_par = "+1" AND score = 69 - 70 - 72 = 211
What nation is the cyclist hat has a UCI ProTour Points of 25?
SELECT nation FROM table_name_95 WHERE uci_protour_points = 25
Which School/Club Team has a Player of deandre liggins?
SELECT school_club_team FROM table_name_34 WHERE player = "deandre liggins"
Where can I find the Valley Bicycle Specialists store?
SELECT T2.AddressLine1, T2.AddressLine2 FROM BusinessEntityAddress AS T1 INNER JOIN Address AS T2 ON T1.AddressID = T2.AddressID INNER JOIN Store AS T3 ON T1.BusinessEntityID = T3.BusinessEntityID WHERE T3.Name = 'Valley Bicycle Specialists'
What is Top Division Debut, when Tournaments is "12", and when Name is "Yamamotoyama"?
SELECT top_division_debut FROM table_name_67 WHERE tournaments = 12 AND name = "yamamotoyama"
What are the details of the lots which are not used in any transactions?
SELECT lot_details FROM Lots EXCEPT SELECT T1.lot_details FROM Lots AS T1 JOIN transactions_lots AS T2 ON T1.lot_id = T2.lot_id
What is the dates where Hillcrest Reserve is the home grounds?
SELECT first_season FROM table_18752986_1 WHERE home_ground_s_ = "Hillcrest Reserve"
Show the names of editors of age either 24 or 25.
SELECT Name FROM editor WHERE Age = 24 OR Age = 25
Calculate ratio between the highest unit cost and the lowest unit cost?
SELECT ( SELECT REPLACE(`Unit Cost`, ',', '') FROM `Sales Orders` WHERE REPLACE(`Unit Cost`, ',', '') = ( SELECT REPLACE(`Unit Cost`, ',', '') FROM `Sales Orders` ORDER BY REPLACE(`Unit Cost`, ',', '') DESC LIMIT 1 ) ORDER BY REPLACE(`Unit Cost`, ',', '') DESC LIMIT 1 ) / ( SELECT REPLACE(`Unit Cost`, ',', '') FROM `Sales Orders` WHERE REPLACE(`Unit Cost`, ',', '') = ( SELECT REPLACE(`Unit Cost`, ',', '') FROM `Sales Orders` ORDER BY REPLACE(`Unit Cost`, ',', '') ASC LIMIT 1 ) ORDER BY REPLACE(`Unit Cost`, ',', '') ASC LIMIT 1 )
Calculate the average net profit for bakeware product.
SELECT AVG(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T2.`Product Name` = 'Bakeware'
How much Draw has a Televote larger than 18, and an Artist of elizabeth anastasiou, and a Jury larger than 4?
SELECT COUNT(draw) FROM table_name_44 WHERE televote > 18 AND artist = "elizabeth anastasiou" AND jury > 4
What was the original air date for episode number 96 in the series?
SELECT original_airdate FROM table_26866299_1 WHERE series__number = 96
Name the date for the australian grand prix.
SELECT date FROM table_name_12 WHERE grand_prix = "australian grand prix"
Name the 0-100 km/hs for name of 2.0 8v
SELECT 0 AS _100km_h, s FROM table_17941111_2 WHERE name = "2.0 8v"
What are the names of the states where at least 3 heads were born?
SELECT born_state FROM head GROUP BY born_state HAVING COUNT(*) >= 3
What RIAA Sales Certification was awarded to the song that had a Billboard 200 Peak of 21?
SELECT riaa_sales_certification FROM table_name_1 WHERE billboard_200_peak = 21
Which Location has a Time of 4:13.48?
SELECT location FROM table_name_83 WHERE time = "4:13.48"
Who are all the players from the united states?
SELECT name FROM table_24302700_6 WHERE nationality = "United States"
Write down the award ID, award name and winner for character named "Homer simpson 20".
SELECT T1.award_id, T1.award, T1.person FROM Award AS T1 INNER JOIN Character_Award AS T2 ON T1.award_id = T2.award_id WHERE T2.character = 'Homer Simpson' AND T1.result = 'Winner';
Who is the alternate for Magnus Swartling as Second?
SELECT alternate FROM table_name_38 WHERE second = "magnus swartling"
What is the lowest after when the player is adam scott?
SELECT MIN(after) FROM table_28498999_3 WHERE player = "Adam Scott"
What was the score of the tie that had Tottenham Hotspur as the home team?
SELECT score FROM table_name_35 WHERE home_team = "tottenham hotspur"
What was the lowest attendance figure at Football Park?
SELECT lowest FROM table_1161065_28 WHERE venue = "Football Park"
Tell me the time for martin kampmann
SELECT time FROM table_name_90 WHERE opponent = "martin kampmann"
Name the averae top 25 with events less than 0
SELECT AVG(top_25) FROM table_name_31 WHERE events < 0
Identify the number of movies rented by Maria Miller.
SELECT COUNT(T2.rental_id) FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = 'Maria' AND T1.last_name = 'Miller'
Name the candidate first elected in 1942
SELECT candidates FROM table_1341897_23 WHERE first_elected = 1942
How many person have a projected yearly sales of no more than 50,000?
SELECT COUNT(BusinessEntityID) FROM SalesPersonQuotaHistory WHERE SalesQuota < 500000
Find the names of customers who have used either the service "Close a policy" or the service "Upgrade a policy".
SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id = t2.customer_id JOIN services AS t3 ON t2.service_id = t3.service_id WHERE t3.service_name = "Close a policy" OR t3.service_name = "Upgrade a policy"
Among the restaurants on street number below 1000, how many of them are in Railroad St.?
SELECT COUNT(city) FROM location WHERE street_name = 'railroad' AND street_num < 1000
For the list with more than 200 followers, state the title and how long the list has been created?
SELECT list_title , 365 * (strftime('%Y', 'now') - strftime('%Y', list_creation_timestamp_utc)) + 30 * (strftime('%m', 'now') - strftime('%m', list_creation_timestamp_utc)) + strftime('%d', 'now') - strftime('%d', list_creation_timestamp_utc) FROM lists WHERE list_followers > 200
What is the date for the game with an opponent of the Houston Oilers from before week 3?
SELECT date FROM table_name_11 WHERE week < 3 AND opponent = "houston oilers"
what is the department id for surgery?
SELECT departmentID from department where name = "Surgery"
What is the most popular payment method?
SELECT Payment_Method_Code FROM Payments GROUP BY Payment_Method_Code ORDER BY count(*) DESC LIMIT 1
Which Avg/G has a Name of david allen, and a Gain larger than 371?
SELECT AVG(avg_g) FROM table_name_60 WHERE name = "david allen" AND gain > 371
How many are there?
SELECT count ( organisation_id ) FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type = T2.organisation_type WHERE T2.organisation_type_description = 'Sponsor' ORDER BY organisation_details
Which city does student Linda Smith live in?
SELECT city_code FROM Student WHERE Fname = "Linda" AND Lname = "Smith"
Find the total hours of the projects that scientists named Michael Rogers or Carol Smith are assigned to.
SELECT sum(T2.hours) FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T3.name = 'Michael Rogers' OR T3.name = 'Carol Smith'
what is the name of the episode whose writers were jeff astrof & matt goldman?
SELECT title FROM table_27914606_1 WHERE written_by = "Jeff Astrof & Matt Goldman"
How many flights on 2018/8/1 were operated by American Airlines Inc.?
SELECT COUNT(*) FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.ORIGIN INNER JOIN `Air Carriers` AS T3 ON T2.OP_CARRIER_AIRLINE_ID = T3.Code WHERE T2.FL_DATE = '2018/8/1' AND T3.Description = 'American Airlines Inc.: AA'
For the Yelp business which had the most number of "short" tips, which category does it belong to?
SELECT DISTINCT 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 INNER JOIN Tips AS T4 ON T3.business_id = T4.business_id WHERE T4.tip_length LIKE 'short'
What is the width feet in meeters for the truss with a source of nbi (2009)?
SELECT width_feet__m_ FROM table_name_63 WHERE source__year_ = "nbi (2009)"
Show the account id and name with at least 4 transactions.
SELECT T1.account_id , T2.account_name FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id = T2.account_id GROUP BY T1.account_id HAVING count(*) >= 4
What are the different locations of the school with the code BUS?
SELECT count(DISTINCT dept_address) FROM department WHERE school_code = 'BUS'
List the names of players who played as a keeper.
SELECT T1.Player_Name FROM Player AS T1 INNER JOIN Player_Match AS T2 ON T1.Player_Id = T2.Player_Id INNER JOIN Rolee AS T3 ON T2.Role_Id = T3.Role_Id WHERE T3.Role_Desc = 'Keeper' GROUP BY T1.Player_Name
Indicate the country name of the city Las Marias.
SELECT T1.county FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.city = 'Las Marias'
Find the list of attribute data types possessed by more than 3 attribute definitions.
SELECT attribute_data_type FROM Attribute_Definitions GROUP BY attribute_data_type HAVING count(*) > 3
How many different courses are there?
SELECT count ( distinct CRS_CODE ) from course
WHAT IS THE TO PAR FOR ERNIE ELS?
SELECT to_par FROM table_name_3 WHERE player = "ernie els"
Which mean number of losses had a played number that was bigger than 34?
SELECT AVG(losses) FROM table_name_58 WHERE played > 34
How many leage apperances for the player with one FA cup, and a FLT Apps of 0 (1)?
SELECT league_apps FROM table_name_61 WHERE fa_cup_apps = "1" AND flt_apps = "0 (1)"
Who are the top 3 players in terms of overall rating?
SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id ORDER BY overall_rating DESC LIMIT 3
Which student failed the course Intro to Database 2? Please give his or her full name.
SELECT T1.f_name, T1.l_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 T2.grade IS NULL AND T3.name = 'Intro to Database 2'
Hello! Can you show me a list of all director names who have directed more than one movie?
SELECT distinct T1.director FROM Movie AS T1 JOIN Movie AS T2 ON T1.director = T2.director WHERE T1.title ! = T2.title
What was the maximum total USD collected by Pebble Technology?
SELECT MAX(total_usd) FROM table_27155990_1 WHERE creator = "Pebble Technology"
How many of these women are under 25 years old?
SELECT count ( * ) FROM student WHERE sex = 'F' AND age < 25
How many disabled students have payment due?
SELECT COUNT(T1.name) FROM disabled AS T1 INNER JOIN no_payment_due AS T2 ON T2.name = T1.name WHERE T2.bool = 'pos'
How many students have each different allergy?
SELECT Allergy , count(*) FROM Has_allergy GROUP BY Allergy
where is the location of Codling?
SELECT location FROM cinema where name = "Codling"
What internet explorer has 1.67% as the opera, with 2012 q1 as the period?
SELECT internet_explorer FROM table_name_4 WHERE opera = "1.67%" AND period = "2012 q1"
Which Opposition has a City of taunton?
SELECT opposition FROM table_name_17 WHERE city = "taunton"
What is the stories of highest building?
SELECT Stories FROM buildings ORDER BY Height DESC LIMIT 1
What team finished in 4th place in 2007?
SELECT 4 AS th_place FROM table_2388763_1 WHERE year = 2007
What is the percentage difference between month 0 absence and month 9 absence?
SELECT CAST(((SUM(IIF(month = 0, 1, 0)) - SUM(IIF(month = 9, 1, 0)))) AS REAL) * 100 / SUM(IIF(month = 0, 1, 0)) FROM longest_absense_from_school
List out the name of the top 10 spenders and what credit card type are they using.
SELECT T1.First, T1.Last, T2.CreditCardType FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID GROUP BY T1.CustomerID ORDER BY SUM(T2.PurchasePrice) DESC LIMIT 10
I want the date for aníbal sánchez
SELECT date FROM table_name_58 WHERE pitcher = "aníbal sánchez"
State the full name of clients with server time of 20 minutes and above.
SELECT T1.first, T1.middle, T1.last FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE strftime('%M', T2.ser_time) > '20'
How many students has the longest absense from school for 5 months?
SELECT COUNT(name) FROM longest_absense_from_school WHERE month = 5
Find the names of customers who never ordered product Latte.
SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id JOIN products AS t4 ON t3.product_id = t4.product_id WHERE t4.product_details = 'Latte'
WHo is the Winner of andre agassi Finalist?
SELECT winner FROM table_name_97 WHERE finalist = "andre agassi"
Which classroom has the most students?
SELECT classroom FROM list GROUP BY classroom ORDER BY count ( * ) DESC LIMIT 1
Among the users who have posted more than 10 reviews, how many users are elite users?
SELECT COUNT(T4.user_id) FROM ( SELECT T1.user_id FROM Users AS T1 INNER JOIN Elite AS T2 ON T1.user_id = T2.user_id INNER JOIN Reviews AS T3 ON T1.user_id = T3.user_id WHERE T3.user_id IS NOT NULL GROUP BY T3.user_id HAVING COUNT(T3.user_id) > 10 ) T4
Name the store with ID 7066 and calculate the percentage of the the quantity ordered that were on 'Net 30' payment terms.
SELECT T2.stor_name , CAST(SUM(CASE WHEN payterms = 'Net 30' THEN qty ELSE 0 END) AS REAL) * 100 / SUM(qty) FROM sales AS T1 INNER JOIN stores AS T2 ON T1.stor_id = T2.stor_id WHERE T1.stor_id = '7066' GROUP BY T2.stor_name
When Giovanni Gaetano Orsini was the elector who was the elevator?
SELECT elevator FROM table_name_63 WHERE elector = "giovanni gaetano orsini"
What is the highest number of laps for Darren Manning?
SELECT MAX(laps) FROM table_17319931_1 WHERE driver = "Darren Manning"
What is the Athlete from Burbank High School?
SELECT athlete FROM table_name_25 WHERE school = "burbank high school"
When did the party elected in jun. 1959 enter office?
SELECT entered_office FROM table_name_43 WHERE election = "jun. 1959"
List all products with the color yellow.
SELECT ProductID FROM Product WHERE Color = 'Yellow'
What is the total number of journalists?
SELECT COUNT ( * ) FROM journalist