sentence
stringlengths
3
347
sql
stringlengths
18
804
What is the round of Jimmy Drolet from Canada?
SELECT round FROM table_name_70 WHERE nationality = "canada" AND player = "jimmy drolet"
What is the surname suffix of the employee who works as a store contact and has the longest sick leave hours?
SELECT T2.Suffix FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.PersonType = 'SP' ORDER BY T1.SickLeaveHours DESC LIMIT 1
Please list the IDs of the events happened on all the vivo devices.
SELECT T2.event_id FROM phone_brand_device_model2 AS T1 INNER JOIN events AS T2 ON T2.device_id = T1.device_id WHERE T1.phone_brand = 'vivo'
How many laps did Eddie Irvine have?
SELECT laps FROM table_name_73 WHERE driver = "eddie irvine"
In which year has the greatest number of cases where Handgun was used as weapon?
SELECT STRFTIME('%Y', date) FROM incidents WHERE subject_weapon = 'Handgun' GROUP BY STRFTIME('%Y', date) ORDER BY COUNT(case_number) DESC LIMIT 1
What was the average speed where lap four's time was 22.9049?
SELECT avg_speed FROM table_23018775_3 WHERE lap_four = "22.9049"
When Fabrizio Baldassari is the runner-up what is the total prize money?
SELECT prize_money FROM table_12454156_1 WHERE runner_up = "Fabrizio Baldassari"
What was the total number of episodes that had a 3-1 vote?
SELECT COUNT(episode) FROM table_24122653_2 WHERE vote = "3-1"
What is the highest number won with a difference of 1?
SELECT MAX(won) FROM table_15331868_1 WHERE difference = "1"
Calculate the percentage of cars that belong to the USA.
SELECT CAST(SUM(CASE WHEN T2.country = 'USA' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin
WHich Evening Gown has a Swimsuit smaller than 7.99 and a Interview larger than 7.98?
SELECT AVG(evening_gown) FROM table_name_21 WHERE swimsuit < 7.99 AND interview > 7.98
Who was the music director in 1994?
SELECT music_director FROM table_name_3 WHERE year = 1994
Which themes have had corresponding exhibitions that have had attendance both below 100 and above 500?
SELECT T2.theme FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance < 100 INTERSECT SELECT T2.theme FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id = T2.exhibition_id WHERE T1.attendance > 500
List the full name of the professors who advised students with intelligence 1.
SELECT T1.first_name, T1.last_name FROM prof AS T1 INNER JOIN RA AS T2 ON T1.prof_id = T2.prof_id INNER JOIN student AS T3 ON T2.student_id = T3.student_id WHERE T3.intelligence = 1
How many unmarried women were checked for normal pregnancy?
SELECT COUNT(DISTINCT T2.patient) FROM conditions AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.DESCRIPTION = 'Normal pregnancy' AND T2.gender = 'F' AND T2.marital = 'S'
What is the team for season 1911-12?
SELECT team FROM table_10556257_1 WHERE season = "1911-12"
What is Score, when Country is United States, and when Player is "Arnold Palmer"?
SELECT score FROM table_name_93 WHERE country = "united states" AND player = "arnold palmer"
What was the 2011 population of pavliš?
SELECT population__2011_ FROM table_2562572_46 WHERE settlement = "Pavliš"
Name the total number of NGC number for sagittarius and diffuse nebula with declination of °02′
SELECT COUNT(ngc_number) FROM table_name_86 WHERE constellation = "sagittarius" AND object_type = "diffuse nebula" AND declination___j2000__ = "°02′"
What lowest games have a Goal Ratio of 0, and Goals smaller than 0?
SELECT MIN(games) FROM table_name_87 WHERE goal_ratio = 0 AND goals < 0
What state had less than 8.874 for swimsuit, less than 9.257 for evening gown, and less than 9.121 for interview?
SELECT state FROM table_name_26 WHERE swimsuit < 8.874 AND evening_gown < 9.257 AND interview < 9.121
What is the category for trains numbered 16609/16610?
SELECT category FROM table_21716139_1 WHERE train_no = "16609/16610"
What are the names of customers with checking balances lower than the average checking balance?
SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT avg(balance) FROM checking)
How many policies are listed for the customer named "Dayana Robel"?
SELECT count ( * ) FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = "Dayana Robel"
Which gold has 3 silver and a Total of 5?
SELECT gold FROM table_name_15 WHERE silver = "3" AND total = "5"
What is the status code with the least number of customers?
SELECT customer_status_code FROM Customers GROUP BY customer_status_code ORDER BY count(*) ASC LIMIT 1;
What is the 1995 value with A in 1986 and 2r in 1992?
SELECT 1995 FROM table_name_29 WHERE 1986 = "a" AND 1992 = "2r"
Which nominees have nominated musicals for "Drama Desk Award"?
SELECT distinct Nominee FROM musical WHERE Award = "Drama Desk Award"
Who is the player with the lowest training hours?
SELECT pName from player order by HS limit 1
The KTRH.com website includes which type of webcast?
SELECT webcast FROM table_name_54 WHERE website = "ktrh.com"
What is the rating of the restaurant Subway?
SELECT Rating FROM Restaurant WHERE ResName = "Subway";
What is the average pages per minute color?
SELECT AVG(pages_per_minute_color) FROM product
What countries have had eruptions of growth episodes in 1986?
SELECT country FROM table_1081235_1 WHERE last_eruption_or_growth_episode = "1986"
what team played on april 9
SELECT opponent FROM table_name_58 WHERE date = "april 9"
List the name of actors whose age is not 20.
SELECT Name FROM actor WHERE Age != 20
How many biword pairs contain the word "base" as the second word?
SELECT COUNT(w1st) FROM biwords WHERE w2nd = ( SELECT wid FROM words WHERE word = 'base' )
Which Title has a Dance Partner of adele astaire, and Lyrics of ira gershwin, and a Director of felix edwardes?
SELECT title FROM table_name_93 WHERE dance_partner = "adele astaire" AND lyrics = "ira gershwin" AND director = "felix edwardes"
What year did Omar Gonzalez graduate?
SELECT SUM(graduated) FROM table_name_94 WHERE player = "omar gonzalez"
List the ids of the problems from the product "voluptatem" that are reported after 1995?
SELECT T1.problem_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id WHERE T2.product_name = "voluptatem" AND T1.date_problem_reported > "1995"
How many students live in Smith Hall?
SELECT count ( * ) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid JOIN dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall'
Find the number of albums by the artist "Metallica".
SELECT COUNT(*) FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T2.Name = "Metallica"
Among the working days from Monday to Saturday, which businesses with the category names work the most days?
SELECT T2.category_name FROM Business_Categories AS T1 INNER JOIN Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business_Hours AS T3 ON T1.business_id = T3.business_id INNER JOIN Days AS T4 ON T3.day_id = T4.day_id GROUP BY T2.category_name ORDER BY COUNT(T3.day_id) DESC LIMIT 1
What are the ids of the candidates that have an outcome code of Pass?
SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = "Pass"
What is the Year of the Coin with an Issue Price of $1089.95 and Mintage less than 900?
SELECT SUM(year) FROM table_name_15 WHERE issue_price = "$1089.95" AND mintage < 900
Please provide the full name of the conference where one of the papers of Jean-luc Hainaut were published.
SELECT DISTINCT T3.FullName FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Conference AS T3 ON T1.ConferenceId = T3.Id WHERE T2.Name = 'Jean-luc Hainaut' LIMIT 1
Name the total number of elementary schools for 31851
SELECT COUNT(elementary_schools) FROM table_2367847_2 WHERE district_wide = 31851
Name the date for broadcast fsn
SELECT date FROM table_26842217_18 WHERE broadcast = "FSN"
What is the percentage of the European countries among the given countries?
SELECT CAST(SUM(IIF(T2.r_name = 'EUROPE', 1, 0)) AS REAL) * 100 / COUNT(T1.n_name) FROM nation AS T1 INNER JOIN region AS T2 ON T1.n_regionkey = T2.r_regionkey
If the points were 0, what were the tries for?
SELECT tries_for FROM table_name_65 WHERE points_for = "0"
What is the first name of Reservations Code 10105?
SELECT FirstName from Reservations where Code = 10105
How many studios have average gross higher than 4500000
SELECT Studio FROM film GROUP BY Studio HAVING avg ( Gross_in_dollar ) > = 4500000
What is Kerry J. Donley's Party?
SELECT party FROM table_name_48 WHERE name = "kerry j. donley"
What is the Population 1961 of West Sussex with a Population of 120,952 or less?
SELECT SUM(population_1961) FROM table_name_22 WHERE administrative_county = "west sussex" AND population_1891 < 120 OFFSET 952
How many years were recorded when world ranking was 21st?
SELECT COUNT(index__year_) FROM table_19948664_2 WHERE world_ranking__1_ = "21st"
If a team has a grid of over 8 with less than 4 points, what's the team name?
SELECT team FROM table_name_31 WHERE grid > 8 AND points < 4
How many stations in San Francico can hold more than 20 bikes?
SELECT SUM(CASE WHEN city = 'San Francisco' AND dock_count > 20 THEN 1 ELSE 0 END) FROM station
How many businesses are there in Scottsdale city under the category of "Beauty & Spas"?
SELECT COUNT(T2.business_id) 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.city LIKE 'Scottsdale' AND T1.category_name LIKE 'Beauty & Spas'
What is the system called that is named ELKJS?
SELECT system FROM table_name_56 WHERE name = "elkjs"
How many budgets are above 3000 in year 2001 or before?
SELECT count(*) FROM budget WHERE budgeted > 3000 AND YEAR <= 2001
What are the names of all clubs?
SELECT clubname FROM club
What Nominating festival was party of the adjustment film?
SELECT nominating_festival FROM table_name_69 WHERE film = "adjustment"
What was the week 7 opponent for the year that had a week 12 opponent of Oregon State (7-3)?
SELECT week_7_oct_12 FROM table_name_29 WHERE week_12_nov_16 = "oregon state (7-3)"
Provide the cast for the film "Jason trap".
SELECT T1.first_name, T1.last_name FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.title = 'JASON TRAP'
What is the score for set 2 when set 3 was 15–6?
SELECT set_2 FROM table_name_61 WHERE set_3 = "15–6"
What is the Home Ground with the Location n/a for the Club kcdrsc?
SELECT home_ground FROM table_name_39 WHERE location = "n/a" AND club = "kcdrsc"
WHAT IS ROOM NAME of rooms that have a king bed.?
SELECT roomName FROM Rooms WHERE bedtype = 'King'
What is the singular present that is associated with a singular preterite of ou and a subjunctive present of ie?
SELECT sing_pres FROM table_name_51 WHERE sing_pret = "ou" AND subj_pres = "ie"
What was the winning car's chassis for the 1982 season?
SELECT chassis FROM table_name_48 WHERE season = "1982"
Who was the entrant for Louis Chiron with a Chassis of T26C?
SELECT entrant FROM table_name_95 WHERE driver = "louis chiron" AND chassis = "t26c"
How many products are in the 'Spices' category and have a typical price of over 1000?
SELECT count(*) FROM products WHERE product_category_code = "Spices" AND typical_buying_price > 1000
What's the city of license having a D ERP of 100kw?
SELECT city_of_license FROM table_name_21 WHERE d_erp = "100kw"
What is the Date, when the City is Warsaw?
SELECT date FROM table_name_39 WHERE city = "warsaw"
How many disabled male students joined an organization?
SELECT COUNT(T1.name) FROM disabled AS T1 LEFT JOIN male AS T2 ON T2.name = T1.name INNER JOIN enlist AS T3 ON T3.name = T2.name
What country has at max 3 stadiums?
SELECT country FROM stadium GROUP BY country HAVING count ( * ) < = 3
What is the platelet count when partial thromboplastin time and bleeding time are unaffected?
SELECT platelet_count FROM table_221653_1 WHERE partial_thromboplastin_time = "Unaffected" AND bleeding_time = "Unaffected"
What sport was played on November 14, 2009?
SELECT sport FROM table_name_27 WHERE date = "november 14, 2009"
what is the mountain peak when the location is 37.5775°n 105.4856°w?
SELECT mountain_peak FROM table_name_73 WHERE location = "37.5775°n 105.4856°w"
How many objects can you spot in image no. 72? What objects may be identified on the same image and within the bounding box represented as (341, 27, 42, 51)?
SELECT SUM(IIF(T1.IMG_ID = 1, 1, 0)), SUM(IIF(T1.X = 341 AND T1.Y = 27 AND T1.W = 42 AND T1.H = 51, 1, 0)) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID
When was an average speed of 81.388 mph recorded?
SELECT date FROM table_2266976_1 WHERE average_speed__mph_ = "81.388"
what's the duration with mission being sts-87
SELECT duration FROM table_14118521_1 WHERE mission = "STS-87"
What was the Obama% when McCain% was 61.2%?
SELECT obama_percentage FROM table_20750731_1 WHERE mccain_percentage = "61.2%"
How many artists are above age 46 and joined after 1990?
SELECT count(*) FROM artist WHERE age > 46 AND year_join > 1990
What is the description of role code ED?
SELECT role_description FROM ROLES WHERE role_code = "ED";
What is the name of the player with an Overall larger than 227?
SELECT player FROM table_name_14 WHERE overall > 227
What is the Pashto word for the Somali word talaado?
SELECT pashto FROM table_name_24 WHERE somali = "talaado"
What is the number of tries for the player who is larger than 16?
SELECT SUM(tries) FROM table_name_81 WHERE played > 16
What is the date of the performance with the highest number of attendees?
SELECT Date FROM performance ORDER BY Attendance DESC LIMIT 1
Mention the supplier country of Ipoh Coffee and the order ID which had maximum in total payment.
SELECT T3.Country, T1.OrderID FROM `Order Details` AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Suppliers AS T3 ON T2.SupplierID = T3.SupplierID WHERE T2.ProductName = 'Ipoh Coffee' ORDER BY T1.UnitPrice * T1.Quantity * (1 - T1.Discount) DESC LIMIT 1
Which term in office has a qld state, a Party of labor, and an Electorate of fisher?
SELECT term_in_office FROM table_name_76 WHERE state = "qld" AND party = "labor" AND electorate = "fisher"
Among the root beer brands that do not advertise on Twitter, how many of them have root beers sold in August, 2014?
SELECT COUNT(T1.BrandID) FROM rootbeer AS T1 INNER JOIN `transaction` AS T2 ON T1.RootBeerID = T2.RootBeerID INNER JOIN rootbeerbrand AS T3 ON T1.BrandID = T3.BrandID WHERE T2.TransactionDate LIKE '2014-08%' AND T3.Twitter IS NULL
What is the lowest numbered game against Phoenix with a record of 29-17?
SELECT MIN(game) FROM table_name_61 WHERE opponent = "phoenix" AND record = "29-17"
What si the youngest employee's first and last name?
SELECT first_name , last_name FROM employees ORDER BY birth_date DESC LIMIT 1;
Name the original name for the one from bulgaria
SELECT original_name FROM table_name_4 WHERE country = "bulgaria"
How many games available on PSP were released in 2004?
SELECT COUNT(T3.game_id) FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN game_publisher AS T3 ON T2.game_publisher_id = T3.id WHERE T1.platform_name = 'PSP' AND T2.release_year = 2004
List the name of physicians who never took any appointment.
SELECT name FROM physician EXCEPT SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician = T2.EmployeeID
What is the template type descriptions for template type code "AD".
SELECT template_type_description FROM Ref_template_types WHERE template_type_code = "AD"
What is the name of the team whose class is Rotax Light?
SELECT team FROM table_name_95 WHERE class = "rotax light"
What is the least common media type in all tracks?
SELECT T1.Name FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId = T2.MediaTypeId GROUP BY T2.MediaTypeId ORDER BY COUNT(*) ASC LIMIT 1
When has a Result of 0–2 and a Opponent of aberdeen?
SELECT date FROM table_name_13 WHERE result = "0–2" AND opponent = "aberdeen"
What are the phone numbers of all customers and suppliers?
SELECT customer_phone FROM customers UNION SELECT supplier_phone FROM suppliers