sentence
stringlengths
3
347
sql
stringlengths
18
804
Who is the employee that receives 82700 as their salary?
SELECT first_name, last_name FROM employee WHERE salary = 82700
Who is the latest contact individual? | the last name of the latest contact individual of the organization "Labour Party" is Bradtke | And what is the date of contact?
SELECT t2.date_contact_from, t2.date_contact_to FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id = t2.organization_id JOIN individuals AS t3 ON t2.individual_id = t3.individual_id WHERE t1.organization_name = "Labour Party" ORDER BY t2.date_contact_to DESC LIMIT 1
which aiport is in the united kingdom and has iata of lcy?
SELECT airport FROM table_name_58 WHERE country = "united kingdom" AND iata = "lcy"
What is the party of Richard Simpson?
SELECT party FROM table_name_59 WHERE name = "richard simpson"
How much are the sales of the games in region ID 4?
SELECT SUM(T.num_sales) * 100000 FROM region_sales AS T WHERE T.region_id = 4
What is the id of the order which has the most items?
SELECT T1.order_id FROM orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id GROUP BY T1.order_id ORDER BY count(*) DESC LIMIT 1
Name the least world rank for south american rank 3
SELECT MIN(world_rank) FROM table_2249087_1 WHERE south_american_rank = 3
What is the round number for the venue of Stade de la Méditerranée?
SELECT round FROM table_21311525_1 WHERE venue = "Stade de la Méditerranée"
What is Run 3, when Team is United States (USA) USA I?
SELECT run_3 FROM table_name_73 WHERE team = "united states (usa) usa i"
Which organisation hired the most number of research staff? List the organisation id, type and detail.
SELECT T1.organisation_id , T1.organisation_type , T1.organisation_details FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1
what is the maximum completed for delta bessborough
SELECT MAX(completed) FROM table_13397394_1 WHERE building = "Delta Bessborough"
Which type entered service in 1976/1997 and is located in Brazil?
SELECT type FROM table_name_87 WHERE location = "brazil" AND entered_service = "1976/1997"
What are the names of customers who live in Colorado state?
SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id = t2.customer_id JOIN addresses AS t3 ON t2.address_id = t3.address_id WHERE t3.state_province_county = "Colorado"
What was the model for PRR class of gf28a freight?
SELECT builder’s_model FROM table_name_61 WHERE service = "freight" AND prr_class = "gf28a"
What is the s7 4.0 tfsi quattro engine torque?
SELECT torque FROM table_21154679_1 WHERE model = "S7 4.0 TFSI quattro"
What religion has a para of 56.5%?
SELECT religion FROM table_name_65 WHERE para = "56.5%"
Could you please tell me all the catalog publishers whose name contains "Murray"?
SELECT distinct ( catalog_publisher ) FROM catalogs WHERE catalog_publisher LIKE "%Murray%"
Name the least number
SELECT MIN(number) FROM table_22705586_1
List the business ID of shopping business that have 4 stars ratings.
SELECT T1.business_id FROM Business AS T1 INNER JOIN Business_Categories AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T2.category_id = T3.category_id WHERE T3.category_name = 'Shopping' AND T1.stars = 4
Thank you for that! Of all of the years, which year had the fewest players entering the hall of fame?
SELECT yearid FROM hall_of_fame GROUP BY yearid ORDER BY count ( * ) ASC LIMIT 1
What is the elevation for the peak wildspitze in Austria?
SELECT MIN(elevation__m_) FROM table_2731431_1 WHERE location = "Austria" AND peak = "Wildspitze"
State the employee who are born in or after 1970 and with the least sick leave hour.
SELECT T2.FirstName, T2.LastName FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE STRFTIME('%Y', T1.BirthDate) > '1970' ORDER BY T1.SickLeaveHours LIMIT 1
What is the lowest amount of wins a manager with more than 0.526 pct., ranked higher than 37, and 947 losses has?
SELECT MIN(wins) FROM table_name_8 WHERE pct > 0.526 AND rank < 37 AND losses = 947
tries against is 88, played is 22, what is the lost?
SELECT lost FROM table_name_57 WHERE played = "22" AND tries_against = "88"
Which word that has 71303 appearance in the Catalan language?
SELECT T1.word FROM words AS T1 INNER JOIN langs_words AS T2 ON T1.wid = T2.wid WHERE T2.occurrences = 71303
Which Lost has Games larger than 7?
SELECT AVG(lost) FROM table_name_54 WHERE games > 7
How many games has Prithipal Singh participated in?
SELECT COUNT(T2.games_id) FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id WHERE T1.full_name = 'Prithipal Singh'
Show the names of all films except those who cost more than 200 for replacement?
SELECT title FROM film EXCEPT SELECT title FROM film WHERE replacement_cost > 200
What is the release date of the CD by EG Records in the UK?
SELECT SUM(release_date) FROM table_name_32 WHERE media = "cd" AND country = "uk" AND music_label = "eg records"
Year(s) won of 1994 , 1997 has what average total?
SELECT AVG(total) FROM table_name_6 WHERE year_s__won = "1994 , 1997"
Name the surface for january 8, 2001
SELECT surface FROM table_name_93 WHERE date = "january 8, 2001"
Find the name and id of accounts whose checking balance is below the maximum checking balance.
SELECT T1.custid, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T2.balance < (SELECT max(balance) FROM checking)
How many countries have Socialistic Republic form of government?
SELECT COUNT(Code) FROM Country WHERE GovernmentForm = 'Socialistic Republic'
who is the athlete with the time 6:02.46?
SELECT athlete FROM table_name_83 WHERE time = "6:02.46"
How many matches played are associated with 20 losses?
SELECT played FROM table_name_38 WHERE lost = "20"
Rank larger than 5, and a Rider of paul shoesmith belongs to what team?
SELECT team FROM table_name_53 WHERE rank > 5 AND rider = "paul shoesmith"
Which position is most popular among players in the tryout?
SELECT pPos FROM tryout GROUP BY pPos ORDER BY count(*) DESC LIMIT 1
what is the outcome when the opponent in the final is william renshaw after year 1882?
SELECT outcome FROM table_name_24 WHERE year > 1882 AND opponent_in_the_final = "william renshaw"
What is the theme for Audition week?
SELECT theme FROM table_26250176_1 WHERE week__number = "Audition"
Among the "Mountain-500 Black" product types, which type was purchased the most?
SELECT T1.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name LIKE 'Mountain-500 Black%' GROUP BY T2.Quantity, T1.Name ORDER BY SUM(T2.Quantity) DESC LIMIT 1
Which player is ranked number 3?
SELECT player FROM table_name_83 WHERE rank = 3
Give the email address of the person who lives in "1411 Lillydale Drive".
SELECT T2.email FROM address AS T1 INNER JOIN staff AS T2 ON T1.address_id = T2.address_id WHERE T1.address = '1411 Lillydale Drive'
What's the sum of gold where silver is more than 2 and the total is 12?
SELECT SUM(gold) FROM table_name_17 WHERE silver > 2 AND total = 12
City code of Jones Shiela? | Do you mean the city code of the student whose first name is Shiela and last name is Jones? | Yes
SELECT city_code from student where Fname = 'Shiela' and Lname = 'Jones'
Show names of shops and the carriers of devices they have in stock.
SELECT T3.Shop_Name , T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID
If points against was 371, what is the drawn?
SELECT drawn FROM table_name_51 WHERE points_against = "371"
Which Opponent has a Attendance of 6,275?
SELECT opponent FROM table_name_82 WHERE attendance = "6,275"
Who is the player who won in 1994?
SELECT player FROM table_name_91 WHERE year_s__won = "1994"
Please show me the type of grape available at Old Kraft Vineyard | The type of grape in the wine with a name of Old Kraft Vineyard is Zinfandel. | What are other wineries that also have Zinfandel?
SELECT winery FROM wine WHERE Grape = "Zinfandel"
Who had evening gown score of 9.82?
SELECT country FROM table_11690135_1 WHERE evening_gown = "9.82"
Which ship mode has more "deliver in person" instructions, rail or mail?
SELECT IIF(SUM(IIF(l_shipmode = 'RAIL', 1, 0)) - SUM(IIF(l_shipmode = 'MAIL', 1, 0)), 'RAIL', 'MAIL') AS result FROM lineitem WHERE l_shipinstruct = 'DELIVER IN PERSON'
Which item was shipped on 3/4/2013 and scheduled for same day delivery in the South region?
SELECT T2.`Product Name` FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.`Ship Date` = '2013-03-04' AND T2.Region = 'South' AND T1.`Order Date` = '2013-03-04'
What California city has an active status and a greek designation of established colony?
SELECT city FROM table_name_57 WHERE status = "active" AND us_state_district = "california" AND greek_designation = "established colony"
Name the date for the venue of brunswick street oval
SELECT date FROM table_name_59 WHERE venue = "brunswick street oval"
What do the notes say for 1989 May 7?
SELECT notes FROM table_name_32 WHERE date = "1989 may 7"
What attributes are used to describe the wall on image no. 27.
SELECT T4.ATT_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID INNER JOIN IMG_OBJ_ATT AS T3 ON T1.IMG_ID = T3.IMG_ID INNER JOIN ATT_CLASSES AS T4 ON T3.ATT_CLASS_ID = T4.ATT_CLASS_ID WHERE T2.OBJ_CLASS = 'wall' AND T1.IMG_ID = 27 GROUP BY T4.ATT_CLASS
How many picks are there for defensive back for rounds larger than 11?
SELECT COUNT(pick) FROM table_name_23 WHERE position = "defensive back" AND round > 11
What is the highest Week, when Date is "November 8, 1970"?
SELECT MAX(week) FROM table_name_66 WHERE date = "november 8, 1970"
List the themes of parties in ascending order of number of hosts.
SELECT Party_Theme FROM party ORDER BY Number_of_hosts
Who directed the episode whose production code is 2m5901?
SELECT directed_by FROM table_27969432_4 WHERE production = "2M5901"
List the professor ID who taught the course ID from 121 to 130 of basic undergraduate courses.
SELECT T2.p_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T1.courseLevel = 'Level_300' AND T1.course_id > 121 AND T1.course_id < 130
What period was there a career average of 48.15?
SELECT period FROM table_21100348_10 WHERE average = "48.15"
What is the lowest number of bronze medals with less than 2 silver medals and more than 1 medal in total for Uzbekistan?
SELECT MIN(bronze) FROM table_name_95 WHERE silver < 2 AND total > 1 AND nation = "uzbekistan"
Describe the full title which had the character named Servant to Montague.
SELECT DISTINCT T1.LongTitle FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id INNER JOIN characters AS T4 ON T3.character_id = T4.id WHERE T4.Description = 'Servant to Montague'
Find the total number of hours have done for all students in each department.
SELECT SUM(stu_hrs), dept_code FROM student GROUP BY dept_code
Give the dates of creation for documents that have both budget type codes 'GV' and 'SF'.
SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id = T2.document_id WHERE T2.budget_type_code = 'GV' INTERSECT SELECT T1.document_date FROM Documents AS T1 JOIN Documents_with_Expenses AS T2 ON T1.document_id = T2.document_id WHERE T2.budget_type_code = 'SF'
List all customers’ names in the alphabetical order.
SELECT name FROM accounts ORDER BY name
Among the seafood products, which product have the highest total production of the production?
SELECT T1.ProductName FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID WHERE T2.CategoryName = 'Seafood' ORDER BY T1.UnitsInStock + T1.UnitsOnOrder DESC LIMIT 1
How frequently does the first-ever Scheduling Assistant get paid?
SELECT T2.PayFrequency FROM Employee AS T1 INNER JOIN EmployeePayHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.JobTitle = 'Scheduling Assistant' ORDER BY T1.HireDate LIMIT 1
Hello! Can you provide me with a list of all train names for trains that are associated with the local authority of Chiltern?
SELECT distinct t3.name FROM station AS t1 JOIN route AS t2 ON t1.id = t2.station_id JOIN train AS t3 ON t2.train_id = t3.id WHERE t1.local_authority = "Chiltern"
What is the last name of the musician that have produced the most number of songs?
SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY lastname ORDER BY count(*) DESC LIMIT 1
What are the titles of courses without prerequisites?
SELECT title FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq)
Who won the bronze medal in Hiroshima?
SELECT bronze FROM table_name_90 WHERE location = "hiroshima"
Find names of all students who took some course and the course description.
SELECT T1.stu_fname , T1.stu_lname , T4.crs_description FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code
Which Country has a Score of 79-68-74=212?
SELECT country FROM table_name_49 WHERE score = 79 - 68 - 74 = 212
What is the highest numbered episode with patient portrayer doug savant?
SELECT MAX(_number) FROM table_26561506_1 WHERE patient_portrayer = "Doug Savant"
What are the rooms for members of the faculty who are professors and who live in building NEB?
SELECT Room FROM FACULTY WHERE Rank = "Professor" AND Building = "NEB"
What was the score from the game where Dallas played Home and Edmonton was visiting?
SELECT score FROM table_name_41 WHERE home = "dallas" AND visitor = "edmonton"
What is the Circuit in the ATCC Round 1 Series with Winner Jim Richards?
SELECT circuit FROM table_name_34 WHERE winner = "jim richards" AND series = "atcc round 1"
What's the url of user 39115684's rating on the movie 'When Will I Be Loved'?
SELECT T1.rating_url FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'A Way of Life' AND T1.user_id = 39115684
Which Office has a Representative of scott pelath?
SELECT office FROM table_name_81 WHERE representative = "scott pelath"
Write the full names of junior ranked Republicans.
SELECT T1.official_full_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.party = 'Republican' AND T2.state_rank = 'junior' GROUP BY T1.official_full_name
Which tests have "Pass" results? Return the dates when the tests were taken.
SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result = "Pass"
Find names of all students who took some course and got A or C.
SELECT T1.stu_fname, T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'C' OR T2.enroll_grade = 'A'
Name the average events for miller barber
SELECT AVG(events) FROM table_name_27 WHERE player = "miller barber"
Show the apartment numbers in the buildings managed by Kyle.
SELECT T2.apt_number FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_manager = "Kyle"
How many ratings of 5 have been given to the podcast "Please Excuse My Dead Aunt Sally"?
SELECT COUNT(T2.rating) FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.title = 'Please Excuse My Dead Aunt Sally' AND T2.rating = 5
Please provide a disability breakdown for each school.
SELECT COUNT(T1.name) FROM enrolled AS T1 INNER JOIN disabled AS T2 ON T2.name = T1.name GROUP BY T1.school
What is the name of the employee who has the most number of aircraft certificates?
SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid GROUP BY T1.eid ORDER BY count ( * ) DESC LIMIT 1
Please show the names of aircrafts associated with airport with name "London Gatwick".
SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID = T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID = T3.Airport_ID WHERE T3.Airport_Name = "London Gatwick"
Please list the e-mail addresses of all the employees who wish to receive e-mail promotions from Adventureworks and selected partners.
SELECT T2.EmailAddress FROM Person AS T1 INNER JOIN EmailAddress AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.EmailPromotion = 2
What is the 2011 value with a 134 in 2008?
SELECT 2011 FROM table_name_31 WHERE 2008 = "134"
what items have higher rating than 7?
SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id WHERE T2.rating > 7
Where was held the ceremony for the 12th Pride of Britain Awards?
SELECT location FROM table_13943239_1 WHERE episode = "12th Pride of Britain Awards"
What was the score when Sheffield United was the home team?
SELECT score FROM table_name_37 WHERE home_team = "sheffield united"
Find number of products which Sony does not make.
SELECT count(DISTINCT name) FROM products WHERE name NOT IN (SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Sony')
when deland is the fcsl team and 2008 is the year played who is the mlb team?
SELECT mlb_team FROM table_18373863_2 WHERE years_played = "2008" AND fcsl_team = "DeLand"
how many people won in 1914
SELECT COUNT(district) FROM table_1342359_17 WHERE first_elected = 1914
Who had the highest assists during the game on February 22?
SELECT high_assists FROM table_name_28 WHERE date = "february 22"
What is the attandance figure on October 7, 1990?
SELECT attendance FROM table_name_23 WHERE date = "october 7, 1990"