sentence
stringlengths
3
347
sql
stringlengths
18
804
What is the sname of every sing that does not have any song?
SELECT Name FROM singer WHERE Singer_ID NOT IN (SELECT Singer_ID FROM song)
What is the quantity of the closed or not running Yelp Businesses in 'AZ'?
SELECT COUNT(business_id) FROM Business WHERE state LIKE 'AZ' AND active LIKE 'False'
Which Floors is the highest one that has a Name of one indiana square?
SELECT MAX(floors) FROM table_name_84 WHERE name = "one indiana square"
List by ID all sales teams that have sold products at a 10% discount in store.
SELECT DISTINCT T FROM ( SELECT CASE WHEN `Discount Applied` = '0.1' AND `Sales Channel` = 'In-Store' THEN _SalesTeamID ELSE NULL END AS T FROM `Sales Orders` ) WHERE T IS NOT NULL
Indicate category name of soft drinks, coffees, teas, beers, and ales in description list.
SELECT CategoryName FROM Categories WHERE Description = 'Soft drinks, coffees, teas, beers, and ales'
What tournament location has 1 stroke as the margin of victory, with 1,200,000 as the purse ($)?
SELECT tournament_location FROM table_name_81 WHERE margin_of_victory = "1 stroke" AND purse___$__ = "1,200,000"
Name the county that has the bad alias of Druid Hills.
SELECT T2.county FROM avoid AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code WHERE T1.bad_alias = 'Druid Hills'
Which coach was the first one to teach the Montreal Canadiens, please give his first name.
SELECT T3.firstName FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T2.name = 'Montreal Canadiens' ORDER BY T1.year LIMIT 1
What is the least amount of people that attended a game when Essendon was the away team?
SELECT MIN(crowd) FROM table_name_83 WHERE away_team = "essendon"
Who is in November in the year 1979?
SELECT november FROM table_name_36 WHERE year = 1979
Show the status shared by cities with population bigger than 1500 and smaller than 500.
SELECT Status FROM city WHERE Population > 1500 INTERSECT SELECT Status FROM city WHERE Population < 500
What is the name of the youngest player?
SELECT Player_Name FROM Player ORDER BY DOB DESC LIMIT 1
Ok, show me the username of an unpopular user.
SELECT user_name FROM users where user_name not in ( SELECT user_name FROM users GROUP BY role_code ORDER BY count ( * ) DESC LIMIT 1 )
Can you list the document type code associated with that document description?
SELECT document_type_code FROM Document_Types WHERE document_description LIKE 'Initial%'
What is the format for July 27, 1994?
SELECT format FROM table_name_94 WHERE date = "july 27, 1994"
What is City, when State is Florida, when AAM Member is No, and when AAM Accredited is No?
SELECT city FROM table_name_61 WHERE state = "florida" AND aam_member = "no" AND aam_accredited = "no"
How many poles were there in season 2000?
SELECT poles FROM table_20396_1 WHERE season = 2000
What does DeShawn Stevenson weigh?
SELECT SUM(weight) FROM table_name_52 WHERE player = "deshawn stevenson"
When did the person born 24 September 1851 pass away?
SELECT date_of_death FROM table_name_66 WHERE date_of_birth = "24 september 1851"
Who is the heaviest athlete?
SELECT full_name FROM person ORDER BY weight DESC LIMIT 1
What is the date listed for the item that has undergoing overhaul, restoration or repairs listed under description?
SELECT date FROM table_name_62 WHERE description = "undergoing overhaul, restoration or repairs"
How many problems are there for product voluptatem?
SELECT count(*) FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id WHERE T1.product_name = "voluptatem"
what is the invoice date of customer id 2
select invoice_date from invoices where customer_id = 2
Which tournament ended with a winning score of –27 (65-68-64-64=261)?
SELECT tournament FROM table_name_16 WHERE winning_score = –27(65 - 68 - 64 - 64 = 261)
What are the lot details associated with these lot ids?
SELECT T1.lot_id, T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id = T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id = T3.transaction_id WHERE T3.share_count < 50
What is the status of vessel number K-223?
SELECT status FROM table_1634376_1 WHERE _number = "K-223"
How many members does each club have?
SELECT clubId, count ( StuId ) from Member_of_club group by clubId
In which country is the city of Grozny? Give the full name of the country.
SELECT T1.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 = 'Grozny'
What is the # when u.s. viewers (million) is 17.44?
SELECT COUNT(_number) FROM table_22904752_1 WHERE us_viewers__million_ = "17.44"
Show different type codes of products and the number of products with each type code.
SELECT Product_Type_Code , COUNT(*) FROM Products GROUP BY Product_Type_Code
How many lanes have a Nationality of france, and a Rank larger than 8?
SELECT SUM(lane) FROM table_name_92 WHERE nationality = "france" AND rank > 8
Show all allergy types.
SELECT DISTINCT allergytype FROM Allergy_type
Which team had the most players in the all star games?
SELECT * FROM all_star GROUP BY team_id ORDER BY count ( * ) DESC LIMIT 1
What is the constructor where the circuit is Silverstone?
SELECT constructor FROM table_name_8 WHERE circuit = "silverstone"
What was the score in the episode with john barrowman and vic reeves on sean's team?
SELECT scores FROM table_23292220_4 WHERE seans_team = "John Barrowman and Vic Reeves"
Which building does the instructor who teaches the most number of courses live in?
SELECT T2.Building FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor = T2.FacID GROUP BY T1.Instructor ORDER BY COUNT(*) DESC LIMIT 1
How much attendance has a Loss of roloson (11–5)?
SELECT SUM(attendance) FROM table_name_70 WHERE loss = "roloson (11–5)"
What was the train destination when it has a calling at Boston, Sleaford, Nottingham Victoria?
SELECT going_to FROM table_18365784_3 WHERE calling_at = "Boston, Sleaford, Nottingham Victoria"
Week of 7 had what average attendance?
SELECT AVG(attendance) FROM table_name_57 WHERE week = 7
What December is 8.77 in January
SELECT december FROM table_15945862_1 WHERE january = "8.77"
How many number of site have May 1, 2004 as the date?
SELECT COUNT(site) FROM table_22098274_1 WHERE date = "May 1, 2004"
how many countries are participated?
SELECT count ( distinct country ) from match_season
Find the first name of student who is taking classes from accounting and Computer Info. Systems departments
SELECT T1.stu_fname 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 JOIN department AS T5 ON T5.dept_code = T4.dept_code WHERE T5.dept_name = 'Accounting' INTERSECT SELECT T1.stu_fname 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 JOIN department AS T5 ON T5.dept_code = T4.dept_code WHERE T5.dept_name = 'Computer Info. Systems'
Tell me the title for japan august 23, 2012
SELECT title FROM table_name_30 WHERE japan = "august 23, 2012"
What was the venue after 2012?
SELECT venue FROM table_name_4 WHERE year > 2012
How many products were supplied by Pavlova, Ltd.?
SELECT COUNT(T1.ProductName) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Pavlova, Ltd.'
Please list the titles of all the books that Lucas Wyldbore has ordered.
SELECT T1.title FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id INNER JOIN cust_order AS T3 ON T3.order_id = T2.order_id INNER JOIN customer AS T4 ON T4.customer_id = T3.customer_id WHERE T4.first_name = 'Lucas' AND T4.last_name = 'Wyldbore'
What neon has a krypton of 213?
SELECT neon FROM table_name_61 WHERE krypton = "213"
What is the most points when the goals against are 354 and games less than 82?
SELECT MAX(points) FROM table_name_49 WHERE goals_against = 354 AND games < 82
Which Mission has a Launch Date of december 30, 1970; 14:50 gmt?
SELECT mission FROM table_name_47 WHERE launch_date = "december 30, 1970; 14:50 gmt"
What is the average fee on a CSU campus in 2005?
SELECT avg(campusfee) FROM csu_fees WHERE YEAR = 2005
Provide case numbers, aldermen's full names, and district names of the crimes that happened in 0000X N FRANCISCO AVE.
SELECT T2.case_number, T3.alderman_first_name, T3.alderman_last_name, T1.district_name FROM District AS T1 INNER JOIN Crime AS T2 ON T1.district_no = T2.district_no INNER JOIN Ward AS T3 ON T2.ward_no = T3.ward_no WHERE T2.block = '0000X N FRANCISCO AVE' GROUP BY T2.case_number, T3.alderman_first_name, T3.alderman_last_name, T1.district_name
Which states have both owners and professionals living there?
SELECT state FROM Owners INTERSECT SELECT state FROM Professionals
Could you narrow it down to just the names of instructors who are advisors to students from the Math department?
SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'Math'
Can you please get me the types of those schools?
SELECT TYPE FROM school WHERE school_id NOT IN ( SELECT school_id FROM school_bus )
Can you tell me the average number of rooms for each apartment type code?
SELECT apt_type_code, avg ( room_count ) FROM Apartments GROUP BY apt_type_code
Could you list the project details of the projects launched by the most popular organization?
SELECT project_details FROM Projects WHERE organisation_id IN ( SELECT organisation_id FROM Projects GROUP BY organisation_id ORDER BY count ( * ) DESC LIMIT 1 )
Find the year that has the most number of matches.
SELECT YEAR FROM matches GROUP BY YEAR ORDER BY COUNT(*) DESC LIMIT 1
What is the name of the team with round less than 2, and the nationality is the United States?
SELECT college_junior_club_team__league_ FROM table_name_25 WHERE round < 2 AND nationality = "united states"
Which position is player bernie doan?
SELECT position FROM table_22402438_7 WHERE player = "Bernie Doan"
What was the date of the Paco Rabanne Open de France?
SELECT date FROM table_name_95 WHERE tournament = "paco rabanne open de france"
How many floors does the building on 800 Boylston Street have?
SELECT MAX(floors) FROM table_name_52 WHERE street_address = "800 boylston street"
What is the power output for class 5?
SELECT power_output__kw_ FROM table_name_29 WHERE number_in_class = 5
How many entries feature a year built of 2010?
SELECT COUNT(total) FROM table_name_24 WHERE year_built = 2010
What is the label that has the most albums?
SELECT label FROM albums GROUP BY label ORDER BY count(*) DESC LIMIT 1
Can you tell me the location code with the most documents?
SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY count ( * ) DESC LIMIT 1
What is the median household income where the per capita is $28,789?
SELECT median_household_income FROM table_name_27 WHERE per_capita_income = "$28,789"
Provide the number of students enrolled in the "Statistical Learning" course.
SELECT COUNT(T2.student_id) FROM course AS T1 INNER JOIN registration AS T2 ON T1.course_id = T2.course_id WHERE T1.name = 'Statistical learning'
What was the type that had an award for song of the year and the position of 3rd place?
SELECT type FROM table_name_1 WHERE award = "song of the year" AND position = "3rd place"
WHat was the result of the friendly match that was played on october 8, 2012?
SELECT result FROM table_name_6 WHERE competition = "friendly match" AND date = "october 8, 2012"
What is the 1989 value with F in 1990?
SELECT 1989 FROM table_name_95 WHERE 1990 = "f"
What is the Week of the game against Green Bay Packers?
SELECT AVG(week) FROM table_name_71 WHERE opponent = "green bay packers"
Count the number of voting records for each election cycle.
SELECT Election_Cycle , count(*) FROM VOTING_RECORD GROUP BY Election_Cycle
what is their id?
SELECT T1.id FROM employees AS T1 JOIN customers AS T2 ON T1.id = T2.support_rep_id GROUP BY T1.id ORDER BY count ( * ) DESC LIMIT 1
How many papers are published under the conference "Mathematics of Program Construction "?
SELECT COUNT(T1.Id) FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T2.FullName = 'Mathematics of Program Construction'
What is employee named Nancy Andrews phone number?
SELECT phone FROM employees WHERE first_name = "Nancy" AND last_name = "Andrews"
What is Total, when FA Cup is 1 0 (3)?
SELECT total FROM table_name_77 WHERE fa_cup = "1 0 (3)"
Which country did Johanna Klum presented the show?
SELECT country FROM table_24598274_20 WHERE presenter_s_ = "Johanna Klum"
I want the constructor for winning driver of jim clark, pole position of graham hill and dutch grand prix
SELECT constructor FROM table_name_34 WHERE winning_driver = "jim clark" AND pole_position = "graham hill" AND race = "dutch grand prix"
Among the cases dismissed by the grand jury disposition, what percentage of cases is where the subject is injured?
SELECT CAST(SUM(subject_statuses = 'Injured') AS REAL) * 100 / COUNT(case_number) FROM incidents WHERE grand_jury_disposition = 'No Bill'
What date is aston villa away?
SELECT date FROM table_name_67 WHERE away_team = "aston villa"
What is the format for Digital 94.9?
SELECT format FROM table_name_73 WHERE brand = "digital 94.9"
What was Jenson Button's constructor?
SELECT constructor FROM table_name_13 WHERE driver = "jenson button"
Okay, which members are there? | Do you mean which members are in United States? | Yes. Which members are in the United States?
SELECT name FROM member WHERE Country = "United States"
What is the pick number for the player from higher than round 3 and a PI GP bigger than 0?
SELECT pick__number FROM table_name_70 WHERE rd__number > 3 AND pl_gp > 0
What is the fewest gold medals for the nation with 4 silvers and more than 4 bronze?
SELECT MIN(gold) FROM table_name_4 WHERE silver = 4 AND bronze > 4
What year was remark #104 us?
SELECT year FROM table_name_58 WHERE remark = "#104 us"
What is the number of races that took place with points of 257?
SELECT SUM(races) FROM table_name_28 WHERE points = 257
What is the average year they finished 5th in santiago, chile?
SELECT AVG(year) FROM table_name_57 WHERE position = "5th" AND venue = "santiago, chile"
How many international students attended Harvard University in 2012?
SELECT CAST(T2.num_students * T2.pct_international_students AS REAL) / 100 FROM university AS T1 INNER JOIN university_year AS T2 ON T1.id = T2.university_id WHERE T1.university_name = 'Harvard University' AND T2.year = 2012
What units of measurement are used? | can you give more information about you question? | What unit of measurement is used for seeds category?
select unit_of_measure from Ref_Product_Categories where product_category_code = 'Seeds'
What was the score for the game that attendance was 70,721?
SELECT result FROM table_name_24 WHERE attendance = "70,721"
What are asashio's years?
SELECT years FROM table_name_31 WHERE name = "asashio"
Tell me the lowest closed for capacity of 62,439
SELECT MIN(closed) FROM table_name_34 WHERE capacity = 62 OFFSET 439
Thank you! Can you update that list with the professors' names?
SELECT id, name FROM instructor WHERE id NOT IN ( SELECT id FROM teaches )
Calculate the image area of the page menu for the dish named "Baked Stuffed Mullet & Sauce Pomard". Please include the page number and image ID.
SELECT T1.full_height * T1.full_width, T1.page_number, T1.image_id FROM MenuPage AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.menu_page_id INNER JOIN Dish AS T3 ON T2.dish_id = T3.id WHERE T3.name = 'Baked Stuffed Mullet & Sauce Pomard'
What is Championship, when Outcome is "runner-up", and when Opponents In Final is "Gigi Fernández Natalia Zvereva"?
SELECT championship FROM table_name_55 WHERE outcome = "runner-up" AND opponents_in_final = "gigi fernández natalia zvereva"
What is the average number of laps that were made when the race took a time of +48.325?
SELECT AVG(laps) FROM table_name_89 WHERE time_retired = "+48.325"
What date has ny islanders as the visitor?
SELECT date FROM table_name_66 WHERE visitor = "ny islanders"
What are the most wins in 1971 in 250cc class?
SELECT MAX(wins) FROM table_name_11 WHERE class = "250cc" AND year = 1971