sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
Find the name of the employee who got the highest one time bonus.
|
SELECT t1.name FROM employee AS t1 JOIN evaluation AS t2 ON t1.Employee_ID = t2.Employee_ID ORDER BY t2.bonus DESC LIMIT 1
|
What is the first name and age of every student who lives in a dorm with a TV Lounge?
|
SELECT T1.fname , T1.age FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid = T2.stuid WHERE T2.dormid NOT IN (SELECT T3.dormid FROM has_amenity AS T3 JOIN dorm_amenity AS T4 ON T3.amenid = T4.amenid WHERE T4.amenity_name = 'TV Lounge')
|
What is the qual 2 when the qual 1 is 1:16.841?
|
SELECT qual_2 FROM table_name_49 WHERE qual_1 = "1:16.841"
|
What are the ids of the problems which are reported after 1978-06-26?
|
SELECT problem_id FROM problems WHERE date_problem_reported > "1978-06-26"
|
Among the patients that died, what is the condition of the oldest patient?
|
SELECT T1.DESCRIPTION FROM conditions AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.deathdate IS NOT NULL ORDER BY strftime('%Y', T2.deathdate) - strftime('%Y', T2.birthdate) DESC LIMIT 1
|
What is the most common mill type, and how many are there?
|
SELECT TYPE , count(*) FROM mill GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1
|
What other Journalists have England as their nationality?
|
SELECT * FROM journalist WHERE Name ! = "Jackie Waring" AND Nationality = "England"
|
Hello! Can you provide me with a list of all Job Title Codes present on this list?
|
SELECT job_title_code from staff_department_assignments
|
If the episode was written by Tim Balme, what was the original air date?
|
SELECT original_air_date FROM table_23114705_3 WHERE written_by = "Tim Balme"
|
What are the first name, last name, and gender of all the good customers? Order by their last name.
|
SELECT first_name , last_name , gender_mf FROM customers WHERE good_or_bad_customer = 'good' ORDER BY last_name
|
Tell me the position for round less than 3
|
SELECT position FROM table_name_1 WHERE round < 3
|
For what award was there a nomination for Best Actress?
|
SELECT award FROM table_name_21 WHERE category = "best actress"
|
Who is the Visiting team on december 20?
|
SELECT visiting_team FROM table_name_99 WHERE date = "december 20"
|
How many campuses exist are in the county of LA?
|
SELECT count(*) FROM campuses WHERE county = "Los Angeles"
|
Calculate the average number of cast members that appeared in the credit from the 185th to the 193rd episode.
|
SELECT CAST(COUNT(T1.episode_id) AS REAL) / (193 - 185 + 1) FROM Credit AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T1.category = 'Cast' AND T1.credited = 'true' AND T2.number_in_series BETWEEN 185 AND 193
|
list both the id and number of shops for the company that produces the most expensive furniture in the same table
|
SELECT t1.manufacturer_id , t1.num_of_shops FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id = t2.manufacturer_id ORDER BY t2.Price_in_Dollar DESC LIMIT 1
|
What is the smallest year when Ubisoft Montreal was the developer (s)?
|
SELECT MIN(year) FROM table_name_38 WHERE developer_s_ = "ubisoft montreal"
|
What are the names of the patients who only had one appointment?
|
SELECT name FROM appointment AS T1 JOIN patient AS T2 ON T1.patient = T2.ssn GROUP BY T1.patient HAVING count ( * ) = 1
|
What is the title of Catalan language wikipedia page with revision page id '16203226'?
|
SELECT title FROM pages WHERE revision = 16203226
|
On what date was the record 8–6–3?
|
SELECT date FROM table_name_14 WHERE record = "8–6–3"
|
Please list the countries that got the footnote "Data are classified as official aid." on the series code DC.DAC.AUSL.CD in 2002.
|
SELECT T1.SHORTNAME FROM Country AS T1 INNER JOIN FootNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Description = 'Data are classified as official aid.' AND T2.Seriescode = 'DC.DAC.AUSL.CD' AND T2.Year LIKE '%2002%'
|
What is the height of the person born before 1975?
|
SELECT height FROM table_name_57 WHERE year_born < 1975
|
What's the least mpg-UK combined when the mpg-UK urban is 25.4, the L/100km extra urban is less than 6.9 and the L/100km urban is more than 11.1?
|
SELECT MIN(mpg_uk_combined) FROM table_name_42 WHERE mpg_uk_urban__cold_ = 25.4 AND l_100km_extra_urban < 6.9 AND l_100km_urban__cold_ > 11.1
|
Can you list all the cmi cross reference id on here
|
SELECT cmi_cross_ref_id FROM CMI_Cross_References
|
what's the id of the document that has the most draft copies?
|
SELECT document_id FROM Draft_Copies GROUP BY document_id ORDER BY count ( copy_number ) DESC LIMIT 1
|
How many teams scored against their opponent who had pulled their goalie in the year 2005?
|
SELECT COUNT(tmID) FROM Goalies WHERE year = 2005 AND ENG IS NULL
|
Give the hometowns from which two or more gymnasts are from.
|
SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown HAVING COUNT(*) >= 2
|
What is the number of players who have points less than 30 for each position?
|
SELECT count(*) , POSITION FROM player WHERE points < 30 GROUP BY POSITION
|
How many die sizes have a texture of exactly 34?
|
SELECT COUNT(die_size__mm_2__) FROM table_26040604_1 WHERE texture___gt__s_ = "34"
|
Great, can you show me the top 3 companies that have operated the most flights?
|
SELECT * FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id GROUP BY T1.id order by count ( * ) limit 3
|
What are the names of members and their corresponding parties?
|
SELECT T1.member_name , T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id
|
What episode was written by Bobby Bell and Bill Lee?
|
SELECT MAX(no_in_season) FROM table_12226390_4 WHERE written_by = "Bobby Bell and Bill Lee"
|
What is the Island Trading customer's complete address?
|
SELECT Address, City, Region, Country, PostalCode FROM Customers WHERE CompanyName = 'Island Trading'
|
Among businesses with "Wi-Fi" attribute, which businesses id are located at SC State?
|
SELECT T3.business_id FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id WHERE T1.attribute_name = 'Wi-Fi' AND T2.attribute_value = 'true' AND T3.state = 'SC'
|
What are the first names of the teachers who teach grade 1?
|
SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE grade = 1
|
What college has Jojo Manalo?
|
SELECT college FROM table_name_43 WHERE player = "jojo manalo"
|
What is the party when the incumbent is samuel smith?
|
SELECT party FROM table_2668416_7 WHERE incumbent = "Samuel Smith"
|
What was the 2010 population of frankfort which has a rank smaller than 14?
|
SELECT AVG(2010 AS _pop) FROM table_name_26 WHERE city = "frankfort" AND rank < 14
|
Hello! Can you please provide me with a list of all of customer IDs in the Customer Address History table?
|
SELECT customer_id FROM Customer_Address_History
|
Find the payment method and phone of the party with email "[email protected]".
|
SELECT payment_method_code , party_phone FROM parties WHERE party_email = "[email protected]"
|
Please show the software platforms of devices in descending order of the count.
|
SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC
|
Find all the distinct id and nationality of drivers who have had laptime more than 100000 milliseconds?
|
SELECT DISTINCT T1.driverid , T1.nationality FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds > 100000
|
Among the teams that were ranked 3 from 1937 to 1940, what is the team name whose players had the highest point?
|
SELECT DISTINCT T1.name FROM teams AS T1 INNER JOIN players_teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.rank = 3 AND T1.year BETWEEN 1937 AND 1940 ORDER BY T2.points DESC LIMIT 1
|
How many people were first elected with an incument of diane watson?
|
SELECT COUNT(first_elected) FROM table_1805191_6 WHERE incumbent = "Diane Watson"
|
What was the To Par [a] when Charles Coody Category:Articles with hCards was champion and the year was earlier than 1973?
|
SELECT to_par_[a_] FROM table_name_6 WHERE year < 1973 AND champion = "charles coody category:articles with hcards"
|
State the number of the "魅蓝Note 2" users who are in the "F29-32" group.
|
SELECT COUNT(T2.device_id) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T1.`group` = 'F29-32' AND T2.device_model = '魅蓝Note 2'
|
What year was 2,242 yards achieved?
|
SELECT year FROM table_name_68 WHERE yards = "2,242"
|
Which Prothrombin time that has a Partial thromboplastin time of unaffected, and a Condition of thrombocytopenia?
|
SELECT prothrombin_time FROM table_name_6 WHERE partial_thromboplastin_time = "unaffected" AND condition = "thrombocytopenia"
|
Which location belongs to the website, http://www.mudgeerabasoccer.com/?
|
SELECT location FROM table_11365528_2 WHERE website = "http://www.mudgeerabasoccer.com/"
|
how many female persons are in the table
|
SELECT COUNT ( * ) FROM Person WHERE gender = "female"
|
What are the names of all employees who have a salary higher than average?
|
SELECT name FROM Employee WHERE salary > (SELECT avg(salary) FROM Employee)
|
What are the arrival dates for all flights from Los Angeles to Honolulu?
|
SELECT arrival_date FROM Flight WHERE origin = "Los Angeles" AND destination = "Honolulu"
|
How many art products were ordered in 2013 in the east superstore?
|
SELECT COUNT(DISTINCT T1.`Product ID`) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Sub-Category` = 'Art' AND T1.Region = 'East' AND STRFTIME('%Y', T1.`Order Date`) = '2013'
|
WHAT IS THE SCORE WITH A WEEK LARGER THAN 13, AND VISITOR TEAM MONTREAL ALOUETTES?
|
SELECT score FROM table_name_39 WHERE week > 13 AND visitor = "montreal alouettes"
|
How many schools are in the basketball match?
|
SELECT count(DISTINCT school_id) FROM basketball_match
|
What is the area with decile of 8, and a 25 roll?
|
SELECT area FROM table_name_67 WHERE decile = 8 AND roll = 25
|
What was the chassis when the points were greater than 0 and the entrant was March Engineering?
|
SELECT chassis FROM table_name_74 WHERE points > 0 AND entrant = "march engineering"
|
Name the number of number in series for production code of 06-04-621
|
SELECT COUNT(no_in_series) FROM table_1876825_7 WHERE production_code = "06-04-621"
|
Where does the customer with the first name Linda live? And what is her email?
|
SELECT T2.address , T1.email FROM customer AS T1 JOIN address AS T2 ON T2.address_id = T1.address_id WHERE T1.first_name = 'LINDA'
|
list the number of votes for this category
|
SELECT sum ( votes ) FROM hall_of_fame where category = "Pioneer/Executive"
|
Count the number of farms.
|
SELECT count(*) FROM farm
|
Which IHSAA Class has a School of shakamak?
|
SELECT ihsaa_class FROM table_name_84 WHERE school = "shakamak"
|
What position was taken out of Louisiana-Lafayette?
|
SELECT position FROM table_16575609_1 WHERE college = "Louisiana-Lafayette"
|
who is the away team when played at junction oval?
|
SELECT away_team FROM table_name_41 WHERE venue = "junction oval"
|
Who lost with a time of 0:58?
|
SELECT loser FROM table_name_44 WHERE time = "0:58"
|
What is the first and last name of the employee who reports to Nancy Edwards?
|
SELECT T2.first_name , T2.last_name FROM employees AS T1 JOIN employees AS T2 ON T1.id = T2.reports_to WHERE T1.first_name = "Nancy" AND T1.last_name = "Edwards";
|
What are the names of departments either in division AS, or in division EN and in building NEB?
|
SELECT DName FROM DEPARTMENT WHERE Division = "AS" UNION SELECT DName FROM DEPARTMENT WHERE Division = "EN" AND Building = "NEB"
|
List the name of all different customers who have an loan sorted by their total loan amount.
|
SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_name ORDER BY sum(T2.amount)
|
Also give me the names of the colleges where enrollment is between 10000 and 20000.
|
SELECT cName FROM College WHERE enr<20000 and enr>10000
|
What is the Place of the Player with a Score of 70-71=141?
|
SELECT place FROM table_name_61 WHERE score = 70 - 71 = 141
|
How many season did sportfreunde siegen win best supported club?
|
SELECT COUNT(season) FROM table_12272590_2 WHERE best_supported_club = "Sportfreunde Siegen"
|
What is the Tournament when the 2013 is 1r?
|
SELECT tournament FROM table_name_54 WHERE 2013 = "1r"
|
Show the id and star rating of each hotel, ordered by its price from low to high.
|
SELECT hotel_id, star_rating_code FROM HOTELS ORDER BY price_range
|
What was the position of the event held in Valencia, Spain?
|
SELECT position FROM table_name_8 WHERE venue = "valencia, spain"
|
What are the wines that have prices higher than 50 and made of Red color grapes?
|
SELECT T2.Name FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "Red" AND T2.price > 50
|
In the "https://github.com/wallerdev/htmlsharp.git", give all the linearized sequenced of API calls.
|
SELECT T3.ApiCalls FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId INNER JOIN Method AS T3 ON T2.Id = T3.SolutionId WHERE T1.Url = 'https://github.com/wallerdev/htmlsharp.git'
|
What rank does Rodney Marsh have?
|
SELECT MAX(rank) FROM table_21100348_15 WHERE player = "Rodney Marsh"
|
Calculate the percentage of customers who paid more than the average rent amount in store 1.
|
SELECT CAST(( SELECT COUNT(T1.customer_id) FROM customer AS T1 INNER JOIN payment AS T2 ON T1.customer_id = T2.customer_id WHERE T2.amount > ( SELECT AVG(amount) FROM payment ) ) AS REAL) * 100 / ( SELECT COUNT(customer_id) FROM customer )
|
List the grapes and appelations of all wines.
|
SELECT Grape, Appelation FROM WINE
|
Name the sum of played for position less than 9 and draws more than 19 with goals against more than 27
|
SELECT SUM(played) FROM table_name_34 WHERE position < 9 AND draws > 19 AND goals_against > 27
|
How many recipes are non-dairy?
|
SELECT COUNT(T2.recipe_id) FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T2.ingredient_id = T1.ingredient_id INNER JOIN Nutrition AS T3 ON T3.recipe_id = T2.recipe_id WHERE T1.category NOT LIKE '%dairy%'
|
List the over IDs, ball IDs, and innings numbers of the match ID "336004" while the batsman got the maximum scores.
|
SELECT Over_Id, Ball_Id, Innings_No FROM Batsman_Scored WHERE Match_Id = 336004 ORDER BY Runs_Scored DESC LIMIT 1
|
Which position has a venue of Helsinki, Finland?
|
SELECT position FROM table_name_40 WHERE venue = "helsinki, finland"
|
Please list the IDs of the orders made by Aimee Bixby with more than 3 kinds of products ordered.
|
SELECT DISTINCT T2.`Order ID` FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Customer Name` = 'Aimee Bixby' GROUP BY T2.`Product ID` HAVING COUNT(T2.`Product ID`) > 3
|
For each product which has problems, what are the number of problems and the product id?
|
SELECT count(*) , T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_id
|
Please list the capital cities of the countries that have more than 4 mountains.
|
SELECT T1.Capital FROM country AS T1 INNER JOIN geo_mountain AS T2 ON T1.Code = T2.Country GROUP BY T1.Name, T1.Capital HAVING COUNT(T1.Name) > 4
|
I want the average lose for lost point more than 16 and goal difference less than 37 and point less than 43
|
SELECT AVG(lose) FROM table_name_96 WHERE lost_point > 16 AND goal_difference < 37 AND point < 43
|
What were the former schools of the player from East Brunswick, NJ?
|
SELECT former_school FROM table_25177625_1 WHERE hometown = "East Brunswick, NJ"
|
What is the party of re-elected, incumbent Charles H. Grosvenor, who was first elected before 1894?
|
SELECT party FROM table_name_3 WHERE result = "re-elected" AND first_elected < 1894 AND incumbent = "charles h. grosvenor"
|
Which studios have never worked with the director Walter Hill?
|
SELECT Studio FROM film EXCEPT SELECT Studio FROM film WHERE Director = "Walter Hill"
|
Name the university that had the most students in 2011.
|
SELECT T2.university_name FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.year = 2011 ORDER BY T1.num_students DESC LIMIT 1
|
Which driver has a grid value of 22?
|
SELECT driver FROM table_name_38 WHERE grid = "22"
|
What's the 1981 census of Livorno?
|
SELECT 1981 AS _census FROM table_10138926_1 WHERE city = "Livorno"
|
Can you show me which three products received the three highest total number of reported problems?
|
SELECT T1.product_name from product as T1 join problems as T2 on T1.product_id = T2.product_id group by T2.product_id order by count ( * ) desc limit 3
|
What is the latest year?
|
SELECT MAX(year) FROM table_2199290_1
|
What is the transfer fee for the country that has the name McCartney listed?
|
SELECT transfer_fee FROM table_name_46 WHERE name = "mccartney"
|
job title code for staff id? | Do you mean all the job title codes for all the staff ids? | yes
|
SELECT job_title_code from Staff_Department_Assignments
|
Which Grand Prix has the Circuit of Lille?
|
SELECT name FROM table_name_20 WHERE circuit = "lille"
|
Who is the competitor from France with 10 starts?
|
SELECT name FROM table_19487922_1 WHERE country = "France" AND race_entries__starts_ = "10"
|
Name the driver passenger for position 4
|
SELECT driver___passenger FROM table_16729457_17 WHERE position = 4
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.