sentence
stringlengths
3
347
sql
stringlengths
18
804
Can you give me a list of the problem descriptions he reported?
SELECT T1.problem_description FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "Christop"
find the total market rate of the furnitures that have the top 2 market shares.
SELECT SUM(market_rate) FROM furniture ORDER BY market_rate DESC LIMIT 2
How frequently did the words 1 and 25 appear together?
SELECT occurrences FROM biwords WHERE w1st = 1 AND w2nd = 25
How many employees are living in Hoffman Estates, IL?
SELECT COUNT(employee_id) FROM employee WHERE state = 'IL' AND city = 'Hoffman Estates'
When rudolph kleberg (d) is the successor what is the date of successors taking office?
SELECT date_of_successors_taking_office FROM table_2417445_4 WHERE successor = "Rudolph Kleberg (D)"
what is the lowest appearance when goals is more than 0?
SELECT MIN(appearance) FROM table_name_32 WHERE goals > 0
How many University founded in 1863?
SELECT COUNT(enrollment) FROM table_19210115_1 WHERE founded = 1863
Count the number of 'dress' object classes and include their X and Y coordinates in image ID 1764.
SELECT T1.X, T1.Y FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 1764 AND T2.OBJ_CLASS = 'dress'
What is the location and attendance of game 1?
SELECT location_attendance FROM table_name_95 WHERE game = 1
How many customers in the building segments have orders with a total price of no less than 50,000?
SELECT COUNT(T2.c_name) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_mktsegment = 'BUILDING' AND T1.o_totalprice > 50000
Which location has 103.534 million passengers in 2011-12?
SELECT location FROM table_18118221_1 WHERE total_passengers__millions__2011_12 = "103.534"
Can you tell me the billing addresses located in the billing city Boston?
SELECT distinct billing_address FROM invoices where billing_city = "Boston"
What are the price ranges of five star hotels?
SELECT price_range FROM HOTELS WHERE star_rating_code = "5"
What is the id of the most recent order?
SELECT order_id FROM orders ORDER BY date_order_placed DESC LIMIT 1
What was the 1st leg score for the match with Lesotho as team 1?
SELECT 1 AS st_leg FROM table_name_14 WHERE team_1 = "lesotho"
Provide the menu page ids of all the menu that includes mashed potatoes.
SELECT T2.menu_page_id FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T1.name = 'Mashed potatoes'
Name the most evening gown for average less than 8.793 with interview of 8.51 and swimsuit less than 8.12
SELECT MAX(evening_gown) FROM table_name_38 WHERE average < 8.793 AND swimsuit < 8.12 AND interview = 8.51
What is Party, when Incumbent is "Rodney Alexander"?
SELECT party FROM table_name_52 WHERE incumbent = "rodney alexander"
Count the number of characteristics the product 'sesame' has.
SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = "sesame"
Thank you very much! Can you filter this list to show only the item with the product id of 11, and show me the associated product category code?
SELECT t1.product_id,t1.product_name,t1.product_category_code FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code = t2.product_category_code where t1.product_id = 11
Please show the names of the buildings whose status is "on-hold", in ascending order of stories.
SELECT name FROM buildings WHERE Status = "on-hold" ORDER BY Stories ASC
tell me the total number of decile with a roll showing 251.
SELECT COUNT(decile) FROM table_name_90 WHERE roll = 251
What is the record if the location is Clarke Stadium?
SELECT record FROM table_23916539_3 WHERE location = "Clarke Stadium"
What is average enrollment of colleges in the state FL?
SELECT avg(enr) FROM College WHERE state = 'FL'
what is а а [a] when ҕь ҕь [ʁʲ/ɣʲ] is ш ш [ʂʃ]?
SELECT а_а_[a] FROM table_202365_2 WHERE ҕь_ҕь_[ʁʲ_ɣʲ] = "Ш ш [ʂʃ]"
How many customers have accounts?
SELECT count ( * ) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id
Which country has a finish of t4?
SELECT country FROM table_name_98 WHERE finish = "t4"
Which city and state has the bad alias of Lawrenceville?
SELECT T2.city, T2.state FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.bad_alias = 'Lawrenceville' GROUP BY T2.city, T2.state
What is the 1995 GDP when 1990 GDP is 441 and 1985 GDP is less than 359?
SELECT MIN(1995) FROM table_name_14 WHERE 1990 = 441 AND 1985 < 359
Find the ship type that are used by both ships with Panama and Malta flags.
SELECT TYPE FROM ship WHERE flag = 'Panama' INTERSECT SELECT TYPE FROM ship WHERE flag = 'Malta'
What is the name of the movie that has been reviewed the most?
SELECT T2.title , T1.mID FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.mID ORDER BY count(*) DESC LIMIT 1
Can you count the number of drivers who are from Hartford City or younger than 40?
SELECT count ( * ) FROM driver WHERE home_city = 'Hartford' OR age < 40
What are their student numbers?
SELECT t1.stu_num FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num WHERE T2.enroll_grade = 'C'
Name the position for nhl team being los angeles kings
SELECT position FROM table_1965650_3 WHERE nhl_team = "Los Angeles Kings"
What are the nationalities of the party hosts?
SELECT T2.Nationality FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID
What is the highest position Talk on Corners, which had an issue date greater than 1, had?
SELECT COUNT(highest_position) FROM table_name_29 WHERE album_title = "talk on corners" AND issue_date > 1
List all directors along with the number of films directed by each director.
SELECT directed_by , count(*) FROM film GROUP BY directed_by
show me the details of the events. | here are the details of all events | How many events did not have any participants?
SELECT count ( * ) FROM EVENTS WHERE event_id NOT IN ( SELECT event_id FROM Participants_in_Events )
What is the highest total points a team got in a year?
SELECT SUM(Pts), year FROM Teams GROUP BY year, tmID ORDER BY SUM(Pts) DESC LIMIT 1
What is the sum of the losses by the Montreal Hockey Club, who have more than 15 Goals Against?
SELECT SUM(losses) FROM table_name_56 WHERE team = "montreal hockey club" AND goals_against > 15
Who was the visitor when the score was 136–120?
SELECT visitor FROM table_name_78 WHERE score = "136–120"
Find the list of documents that are both in the most three popular type and have the most three popular structure.
SELECT document_name FROM documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 3 INTERSECT SELECT document_name FROM documents GROUP BY document_structure_code ORDER BY count(*) DESC LIMIT 3
How many golds does the nation having a rank of 8, fewer than 5 bronzes and more than 1 silver have?
SELECT COUNT(gold) FROM table_name_62 WHERE bronze < 5 AND silver > 1 AND rank > 8
Which product got the most five stars, and how many?
SELECT T.Product, MAX(T.num) FROM ( SELECT Product, COUNT(Stars) AS num FROM reviews WHERE Stars = 5 GROUP BY Product ) T
Which After 1 year has an After 3 years of 80%?
SELECT after_1_year FROM table_name_40 WHERE after_3_years = "80%"
What is the review of the restaurant at 8440 Murray Ave?
SELECT T2.review FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.street_name = 'murray ave' AND T1.street_num = 8440
What is the name of the department with the student that has the lowest GPA?
SELECT T2.dept_name FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code ORDER BY stu_gpa LIMIT 1
Show the names of players coached by the rank 1 coach.
SELECT T3.Player_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID WHERE T2.Rank = 1
How many people are under 40 for each gender?
SELECT count(*) , gender FROM Person WHERE age < 40 GROUP BY gender
what is the sum of attendance of week 11
SELECT SUM(attendance) FROM table_name_62 WHERE week = 11
what are the first name and last name of all candidates?
SELECT T2.first_name , T2.last_name FROM candidates AS T1 JOIN people AS T2 ON T1.candidate_id = T2.person_id
What's the lowest Year with a Venue of casablanca and has the Time of 20.63w?
SELECT MIN(year) FROM table_name_71 WHERE venue = "casablanca" AND time = "20.63w"
What is teh average amount of goals for club real avilés cf, which has more than 59 goals against and a -10 goal difference?
SELECT AVG(goals_for) FROM table_name_53 WHERE goals_against > 59 AND club = "real avilés cf" AND goal_difference > -10
Who was the partner of the winner?
SELECT partner FROM table_name_46 WHERE outcome = "winner"
Who is the Director of the Filmography with Production Number of 11-14?
SELECT director FROM table_name_76 WHERE production_number = "11-14"
And what about the course code that they are enrolled in?
SELECT T3.CRS_CODE FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN department AS T4 ON T3.dept_code = T4.dept_code WHERE T4.dept_name = 'Accounting'
Which country is the Nova TV network from?
SELECT country FROM table_name_53 WHERE tv_network_s_ = "nova tv"
For each grade, report the grade, the number of classrooms in which it is taught and the total number of students in the grade.
SELECT grade , count(DISTINCT classroom) , count(*) FROM list GROUP BY grade
What is the Result of the dance Choreographed by Kelly Aykers?
SELECT results FROM table_name_44 WHERE choreographer = "kelly aykers"
What is the lowest episode number where john bird was the 4th performer?
SELECT MIN(episode) FROM table_name_48 WHERE performer_4 = "john bird"
What law has a penalty of — in Iraq?
SELECT laws_against_homosexuality FROM table_name_90 WHERE penalty = "—" AND country = "iraq"
What was the score when the opponent was the Orioles and the loss shows morehead (5–4)?
SELECT score FROM table_name_18 WHERE opponent = "orioles" AND loss = "morehead (5–4)"
What is the percentage of people whose age greater than 24 and participate in winter season?
SELECT CAST(COUNT(CASE WHEN T2.age > 24 AND T1.season = 'Winter' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T2.games_id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id
What is the nickname of the school established in 2009?
SELECT nickname FROM table_name_8 WHERE established = 2009
Which Record has a Score of l 97–99 (ot)?
SELECT record FROM table_name_88 WHERE score = "l 97–99 (ot)"
How many more times does the first word in the biwords pair "àbac-xinès" occur than the biwords pair itself?
SELECT occurrences - ( SELECT occurrences FROM biwords WHERE w1st = ( SELECT wid FROM words WHERE word = 'àbac' ) AND w2nd = ( SELECT wid FROM words WHERE word = 'xinès' ) ) AS CALUS FROM words WHERE word = 'àbac'
What is the total number of runners-up for a club with winning years of 2010?
SELECT COUNT(runners_up) FROM table_name_92 WHERE winning_years = "2010"
What are the names of races held after 12:00:00 or before 09:00:00?
SELECT name FROM races WHERE TIME > "12:00:00" OR TIME < "09:00:00"
What is the name of all the teams that played in the EFL League One division?
SELECT T1.HomeTeam,T1.AwayTeam FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div=T2.division WHERE T2.name = 'EFL League One' and T1.Div = 'E2'
What are the functions of the pair of genes that have the lowest expression correlation score?a
SELECT T1.Function FROM Genes AS T1 INNER JOIN Interactions AS T2 ON T1.GeneID = T2.GeneID1 ORDER BY T2.Expression_Corr ASC LIMIT 1
Which driver had a grid of 18?
SELECT driver FROM table_name_58 WHERE grid = "18"
Who is the winner of the Best Television Episode award for the Edgar category in 2000? Include his or her name and role.
SELECT T1.name, T2.role FROM Person AS T1 INNER JOIN Award AS T2 ON T1.person_id = T2.person_id WHERE T2.year = 2000 AND T2.award_category = 'Edgar' AND T2.award = 'Best Television Episode'
How many millions of U.S viewers are there when the director is andy wolk?
SELECT us_viewers__million_ FROM table_29747178_2 WHERE directed_by = "Andy Wolk"
What is the average winning rate of the Buffalo Sabres in 2000?
SELECT SUM(CAST(T2.W AS REAL) / T2.G) / COUNT(T1.oppID) FROM TeamVsTeam AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID WHERE T2.name = 'Buffalo Sabres' AND T1.year = 2000
What is the Score of the game @ San Antonio on June 20?
SELECT score FROM table_name_81 WHERE opponent = "@ san antonio" AND date = "june 20"
Find the name of physicians who are affiliated with both Surgery and Psychiatry departments.
SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Surgery' INTERSECT SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID = T2.physician JOIN department AS T3 ON T2.department = T3.DepartmentID WHERE T3.name = 'Psychiatry'
How many people attended the game with a record of 86-56
SELECT COUNT(attendance) FROM table_name_39 WHERE record = "86-56"
What is the venue of the competition "1994 FIFA World Cup qualification" hosted by "Nanjing ( Jiangsu )"?
SELECT T3.venue FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city JOIN MATCH AS T3 ON T2.match_id = T3.match_id WHERE T1.city = "Nanjing ( Jiangsu )" AND T3.competition = "1994 FIFA World Cup qualification"
Which Lost has a Drawn larger than 1, and Games smaller than 7?
SELECT MIN(lost) FROM table_name_8 WHERE drawn > 1 AND games < 7
What is the weight when the race was the VRC Melbourne Cup?
SELECT COUNT(weight) FROM table_name_76 WHERE race = "vrc melbourne cup"
Show the dates of transactions if the share count is bigger than 100 or the amount is bigger than 1000.
SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count > 100 OR amount_of_transaction > 1000
What are the full names and ages for all female students whose sex is F?
SELECT Fname , Lname , Age FROM Student WHERE Sex = 'F'
What is the full name of the sales person who has the the highest commission percent received per sale?
SELECT T2.FirstName, T2.MiddleName, T2.LastName FROM SalesPerson AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID ORDER BY T1.CommissionPct DESC LIMIT 1
Which date has a Week smaller than 14, and an Opponent of san francisco 49ers?
SELECT date FROM table_name_92 WHERE week < 14 AND opponent = "san francisco 49ers"
What is the median age where the area is 1.7?
SELECT median_age__in_2006_ FROM table_1174162_1 WHERE area__km²_ = "1.7"
List all the purchase order ids of the vendor with a below average rating.
SELECT T2.PurchaseOrderID FROM Vendor AS T1 INNER JOIN PurchaseOrderHeader AS T2 ON T1.BusinessEntityID = T2.VendorID WHERE T1.CreditRating = 5
How many districts have Mac Sweeney as incumbent?
SELECT COUNT(candidates) FROM table_1341586_44 WHERE incumbent = "Mac Sweeney"
Name the commander of 167 off 2348 men
SELECT commander FROM table_11793221_4 WHERE complement = "167 off 2348 men"
Who were the guest team wehn the match score was 3:0 (0:2)?
SELECT guest FROM table_name_76 WHERE score__first_match_ = "3:0 (0:2)"
How many customers ordered Stephen King's first book?
SELECT COUNT(T1.publication_date) FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id INNER JOIN order_line AS T4 ON T4.book_id = T1.book_id WHERE T3.author_name = 'Stephen King' ORDER BY T1.publication_date ASC LIMIT 1
What films did Nicholas Meyer direct?
SELECT Title FROM film WHERE Director = "Nicholas Meyer"
Find the average grade of all students who have some friends.
SELECT avg(grade) FROM Highschooler WHERE id IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id)
And in which city is it located?
SELECT city FROM airports ORDER BY elevation LIMIT 1
Count the number of distinct channel owners.
SELECT count(DISTINCT OWNER) FROM channel
Which city of license has an independent network affiliation, a variety format and is station KKUP?
SELECT city_of_license FROM table_name_9 WHERE network_affiliation = "independent" AND format = "variety" AND station = "kkup"
What are the names of enzymes in the medicine named 'Amisulpride' that can serve as an 'inhibitor'?
SELECT T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id JOIN medicine AS T3 ON T2.medicine_id = T3.id WHERE T3.name = 'Amisulpride' AND T2.interaction_type = 'inhibitor'
What lane did the barbados swimmer compete in before heat 3?
SELECT lane FROM table_name_23 WHERE heat < 3 AND nationality = "barbados"
Which Match played in a Location of San Francisco has a Competition of Semifinal?
SELECT match FROM table_name_19 WHERE competition = "semifinal" AND location = "san francisco"
What are the names of enzymes in the medicine named 'Amisulpride' that can serve as an 'inhibitor'?
SELECT T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id = T2.enzyme_id JOIN medicine AS T3 ON T2.medicine_id = T3.id WHERE T3.name = 'Amisulpride' AND T2.interaction_type = 'inhibitor'
Indicate the title of all the films that are in the Classics category.
SELECT T2.title FROM film_category AS T1 INNER JOIN film AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T1.category_id = T3.category_id WHERE T3.name = 'Classics'