sentence
stringlengths
3
347
sql
stringlengths
18
804
Which school(s) had a wide receiver drafted in round 4?
SELECT school_club_team FROM table_name_16 WHERE round > 4 AND position = "wide receiver"
Mention the most populated city and median income of the store in Florida state.
SELECT `City Name`, `Median Income` FROM `Store Locations` WHERE State = 'Florida' ORDER BY Population DESC LIMIT 1
In total, how many Hispanic male students graduated from Amridge University?
SELECT SUM(T2.grad_cohort) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T1.unitid = T2.unitid WHERE T1.chronname = 'Amridge University' AND T2.gender = 'M' AND T2.race = 'H'
What was the date of the game where Geelong was the home team?
SELECT date FROM table_name_18 WHERE home_team = "geelong"
what is the react when the country is sweden and the lane is higher than 6?
SELECT SUM(react) FROM table_name_65 WHERE country = "sweden" AND lane > 6
Find the department name of the instructor whose name contains 'Soisalon'.
SELECT dept_name FROM instructor WHERE name LIKE '%Soisalon%'
Name the number of countries that have the us dollar
SELECT COUNT(country) FROM table_2764267_2 WHERE currency = "US dollar"
What was the average attendance when the New York Mets were opponents with a record of 51-33?
SELECT AVG(attendance) FROM table_name_81 WHERE opponent = "new york mets" AND record = "51-33"
Which team did David McLay play for?
SELECT college_junior_club_team FROM table_2850912_3 WHERE player = "David McLay"
What is the sum of Altrincham's Points 2 when they had more than 52 Goals For?
SELECT SUM(points_2) FROM table_name_98 WHERE goals_for > 52 AND team = "altrincham"
Which Ofsted has a Capacity of 1677?
SELECT ofsted FROM table_name_83 WHERE capacity = 1677
What are the names of all campuses located at Chico?
SELECT campus FROM campuses WHERE LOCATION = "Chico"
What is the pali word for pride in poison/klesha?
SELECT pali FROM table_name_87 WHERE poison_klesha = "pride"
Can you show me the first names of customers who have a rental date on or before 2005-08-23?
SELECT first_name FROM customer WHERE customer_id IN ( SELECT customer_id FROM rental WHERE rental_date < = '2005-08-23 00:00:00' )
What is the name of the deparment with the highest enrollment?
SELECT dept_name FROM student GROUP BY dept_name ORDER BY count(*) DESC LIMIT 1
What is the name and category of the app with the highest amount of -1 sentiment polarity score?
SELECT DISTINCT T1.App, T1.Category FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T2.Sentiment_Polarity = '-1.0'
For driver Mark Skaife what is the result for race 1?
SELECT race_1 FROM table_11581984_2 WHERE driver = "Mark Skaife"
What number of voters did Queens have when Staten Island had 295 voters?
SELECT queens FROM table_1108394_34 WHERE richmond_[staten_is] = "295"
How many Points have a Position larger than 3, and a Played smaller than 14?
SELECT COUNT(points) FROM table_name_42 WHERE position > 3 AND played < 14
list the first and last names, and the addresses of all employees in the ascending order of their birth date.
SELECT fname , lname , address FROM employee ORDER BY Bdate
How many hours do the players train on average?
SELECT avg(HS) FROM Player
Show the most common nationality of pilots.
SELECT Nationality FROM pilot GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1
what is the city with the height (ft) more than 328.1, rank higher than 56, a height (m) of 103 and floors less than 28?
SELECT city FROM table_name_14 WHERE height__ft_ > 328.1 AND rank > 56 AND height__m_ = 103 AND floors < 28
What party is the winner K. Anbazhagan from?
SELECT party AS a FROM table_22756549_1 WHERE winner = "K. Anbazhagan"
Among the easiest courses, what is the name of the course where most students got an A?
SELECT T2.name FROM registration AS T1 INNER JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T1.grade = 'A' AND T2.diff = 1 GROUP BY T2.name ORDER BY COUNT(T1.student_id) DESC LIMIT 1
What was the least quantity of items purchased? | do you mean the id of product or the id of order? | ID of the order please.
select order_id from Order_items order by order_quantity limit 1
How many directors were in Season 2?
SELECT COUNT(directed_by) FROM table_20704243_3 WHERE season__number = 2
What is the date with a Japan region?
SELECT date FROM table_name_70 WHERE region = "japan"
How many departments have David Bradley been in?
SELECT COUNT(T3.DepartmentID) FROM Person AS T1 INNER JOIN EmployeeDepartmentHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN Department AS T3 ON T2.DepartmentID = T3.DepartmentID WHERE T1.FirstName = 'David' AND T1.LastName = 'Bradley'
Which institution has the most papers? Find the name of the institution.
SELECT t1.name FROM inst AS t1 JOIN authorship AS t2 ON t1.instid = t2.instid JOIN papers AS t3 ON t2.paperid = t3.paperid GROUP BY t1.name ORDER BY count(*) DESC LIMIT 1
Show names of musicals which have at least three actors.
SELECT T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID HAVING COUNT(*) >= 3
Which movie did the company 'Radiant Film GmbH' work on?
SELECT T3.title FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id INNER JOIN movie AS T3 ON T2.movie_id = T3.movie_id WHERE T1.company_name = 'Radiant Film GmbH'
List all the distinct cities
SELECT DISTINCT city FROM addresses
Please list the names of the restaurants that had a low risk violation in inspections in 2014.
SELECT DISTINCT T2.name FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE STRFTIME('%Y', T1.`date`) = '2014' AND T1.risk_category = 'Low Risk'
Who won when Jamie Green had the best lap?
SELECT winning_driver FROM table_21321935_2 WHERE fastest_lap = "Jamie Green"
What are the names of poker players in descending order of earnings?
SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings DESC
Which time has a Rider of anthony west?
SELECT time FROM table_name_66 WHERE rider = "anthony west"
What is the order ID of the security-Tint Envelopes product ordered on June 3, 2013, in the Central region?
SELECT DISTINCT T1.`Order ID` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'Security-Tint Envelopes' AND T1.`Order Date` = '2013-06-03'
What are the names of all tryout participants who are from the largest college?
SELECT T2.pName FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID WHERE T1.cName = (SELECT cName FROM college ORDER BY enr DESC LIMIT 1) S: What IS the largest college?
What is Score, when Set 3 is 17-25?
SELECT score FROM table_name_67 WHERE set_3 = "17-25"
Out of those 2 which has less than 2 fault logs?
SELECT T1.asset_id , T1.asset_details FROM Assets AS T1 JOIN Asset_Parts AS T2 ON T1.asset_id = T2.asset_id GROUP BY T1.asset_id HAVING count ( * ) = 2 INTERSECT SELECT T1.asset_id , T1.asset_details FROM Assets AS T1 JOIN Fault_Log AS T2 ON T1.asset_id = T2.asset_id GROUP BY T1.asset_id HAVING count ( * ) < 2
What year was the player with the height 2.04 born?
SELECT MIN(year_born) FROM table_12962773_12 WHERE height = "2.04"
Return the decor of the room named "Recluse and defiance".
SELECT decor FROM Rooms WHERE roomName = "Recluse and defiance";
Determine the email and Code of employee who are working at United State, state CA
SELECT T1.email, T1.employeeNumber FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2.officeCode WHERE T2.country = 'USA' AND T2.state = 'CA' GROUP BY T1.email, T1.officeCode
What is the lowest Bronze that has a Total larger than 18 and a Silver smaller than 143?
SELECT MIN(bronze) FROM table_name_29 WHERE "total" > 18 AND sport = "total" AND silver < 143
Name the club with date of appointment of 1 november 2007
SELECT club FROM table_name_67 WHERE date_of_appointment = "1 november 2007"
How many kids stay in the room DAMIEN TRACHSEL checked in on Sep 21, 2010?
SELECT Kids FROM Reservations WHERE CheckIn = "2010-09-21" AND FirstName = "DAMIEN" AND LastName = "TRACHSEL";
What was the number of goals did player Id "dyeba01" make in the 1921 Stanley Cup finals?
SELECT G FROM ScoringSC WHERE playerID = 'dyeba01' AND year = 1921
how many class is there
SELECT count ( * ) FROM CLASS
What was the result and score of the game on February 22?
SELECT result FROM table_name_5 WHERE date = "february 22"
What Secretary has an Internal CO of isabel voets?
SELECT secretary FROM table_name_90 WHERE internal_co = "isabel voets"
What about Cash?
SELECT count ( * ) FROM customers where payment_method = "Cash"
What city and state is the Lancers mascot located?
SELECT location FROM table_11044765_1 WHERE mascot = "Lancers"
What is the french word for the Russian word filtrovat (фильтровать)?
SELECT french FROM table_15040_8 WHERE russian = "filtrovat (фильтровать)"
How many lessons were in cancelled state?
SELECT count(*) FROM Lessons WHERE lesson_status_code = "Cancelled";
Name the number of episode summary for jesse csincsak
SELECT COUNT(episode) AS Summary FROM table_2140071_10 WHERE coach = "Jesse Csincsak"
What is the blank ends record when the win record is higher than 6.0?
SELECT blank_ends FROM table_29565673_2 WHERE w > 6.0
How many images have "picture" as their attribute class and "bear" as their object class?
SELECT COUNT(T2.IMG_ID) FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID INNER JOIN OBJ_CLASSES AS T4 ON T3.OBJ_CLASS_ID = T4.OBJ_CLASS_ID WHERE T1.ATT_CLASS = 'picture' AND T4.OBJ_CLASS = 'bear'
What is the savings balance of the account belonging to the customer with the highest checking balance?
SELECT T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance DESC LIMIT 1
Name the catalog for alfa records and cd format
SELECT catalog FROM table_name_84 WHERE label = "alfa records" AND format = "cd"
Show the names of customers who have both an order in completed status and an order in part status.
SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'Completed' INTERSECT SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status_code = 'Part'
What day did Footscray play as the home team?
SELECT date FROM table_name_20 WHERE home_team = "footscray"
What is the teaching language for Master of Quantitative Finance?
SELECT teaching_language FROM table_name_69 WHERE program = "master of quantitative finance"
Which venue did collingsworth play essendon in when they had the 3rd position on the ladder?
SELECT venue FROM table_29033869_3 WHERE opponent = "Essendon" AND position_on_ladder = "3rd"
What is the sum of the years where the attendance was 95,000 and the runner-up was dresdner sc?
SELECT SUM(year) FROM table_name_39 WHERE attendance = "95,000" AND runner_up = "dresdner sc"
Give me the names of customers who have placed orders between 2009-01-01 and 2010-01-01.
SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.date_order_placed >= "2009-01-01" AND T2.date_order_placed <= "2010-01-01"
How many centerfold models were there when the cover model was Torrie Wilson?
SELECT COUNT(centerfold_model) FROM table_1566852_4 WHERE cover_model = "Torrie Wilson"
On what Date had a Score of 5-2 and a Loss of Greinke (1-2)?
SELECT date FROM table_name_84 WHERE score = "5-2" AND loss = "greinke (1-2)"
What is the record of game 26 with beno udrih (4) as the highest assists?
SELECT record FROM table_name_41 WHERE high_assists = "beno udrih (4)" AND game = 26
Return the number of accounts that the customer with the first name Art and last name Turcotte has.
SELECT count(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Art" AND T2.customer_last_name = "Turcotte"
List the products ordered by Matt Abelman from the Western store in 2013.
SELECT DISTINCT T3.`Product Name` FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T2.`Customer Name` = 'Matt Abelman' AND STRFTIME('%Y', T1.`Order Date`) = '2013'
What is the high grid that has a Time/Retired of +6 laps, and under 69 laps?
SELECT MAX(grid) FROM table_name_4 WHERE time_retired = "+6 laps" AND laps < 69
Which employee has showed up in most circulation history documents. List the employee's name and the number of drafts and copies.
SELECT Employees.employee_name , count(*) FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id GROUP BY Circulation_History.document_id , Circulation_History.draft_number , Circulation_History.copy_number ORDER BY count(*) DESC LIMIT 1;
What are the register year of Jeremy Jarmon?
SELECT T1.register_year FROM membership_register_branch AS T1 JOIN member AS T2 ON T1.member_id = T2.member_id WHERE T2.name = "Jeremy Jarmon"
Who were all the candidates in elections in which Steve Chabot was a candidate?
SELECT candidates FROM table_1805191_36 WHERE incumbent = "Steve Chabot"
Which Partial thromboplastin time has a Prothrombin time of prolonged and a Condition of factor v deficiency?
SELECT partial_thromboplastin_time FROM table_name_76 WHERE prothrombin_time = "prolonged" AND condition = "factor v deficiency"
What rating did Jill give for HL Mountain Pedal?
SELECT T1.Rating FROM ProductReview AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ReviewerName = 'Jill' AND T2.Name = 'HL Mountain Pedal'
What are the ids of all students along with how many sports and games did they play?
SELECT StuID , count(*) , sum(gamesplayed) FROM Sportsinfo GROUP BY StuID
What is the installation date for each ending station on all the trips?
SELECT T1.id , T2.installation_date FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id
What is the score for the team that has a record of 80-64?
SELECT score FROM table_name_43 WHERE record = "80-64"
Which Attendance has a Date of december 22, 1985, and a Week smaller than 16?
SELECT SUM(attendance) FROM table_name_65 WHERE date = "december 22, 1985" AND week < 16
Name the college for nate binder
SELECT college FROM table_25017530_5 WHERE player = "Nate Binder"
What is niurbi encarnación ynoa's height?
SELECT height FROM table_name_95 WHERE contestant = "niurbi encarnación ynoa"
Please list the full name, date of birth, and email id of the elderly clients in descending order of age.
SELECT first, middle, last, year, month , day, email FROM client WHERE age > 65 ORDER BY age DESC
What is the code of the country with the most players?
SELECT country_code FROM players GROUP BY country_code ORDER BY count(*) DESC LIMIT 1
How films are produced by each studio?
SELECT Studio , COUNT(*) FROM film GROUP BY Studio
Give the nationality that is most common across all people.
SELECT Nationality FROM people GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1
What is the lowest Population (1 July 2005 est.), when Population density (per km²) is 0?
SELECT MIN(population__1_july_2005_est_) FROM table_name_5 WHERE population_density__per_km²_ = 0
Which final round had a first round of 20?
SELECT final_round FROM table_name_22 WHERE first_round = 20
Away result of 1–1, and a Round of 1r, and a Season of 1967-68 involves what club?
SELECT club FROM table_name_92 WHERE away_result = "1–1" AND round = "1r" AND season = "1967-68"
What was the name of the opponent that having a TV time of Bye?
SELECT opponent FROM table_name_19 WHERE tv_time = "bye"
Who did the Lyrics (l) / Music (m) for the song in 23 Place?
SELECT lyrics__l____music__m_ FROM table_name_76 WHERE place = "23"
Which away team played at Kardinia Park?
SELECT away_team FROM table_name_35 WHERE venue = "kardinia park"
Please list all sale team names which had orders on 5/31/2018.
SELECT T FROM ( SELECT DISTINCT CASE WHEN T1.OrderDate = '5/31/18' THEN T2.`Sales Team` ELSE NULL END AS T FROM `Sales Orders` T1 INNER JOIN `Sales Team` T2 ON T2.SalesTeamID = T1._SalesTeamID ) WHERE T IS NOT NULL
What is the Losing bonus, when the value for Points is 43?
SELECT losing_bonus FROM table_name_61 WHERE points = "43"
Find the names of nurses who are on call.
SELECT DISTINCT T1.name FROM nurse AS T1 JOIN on_call AS T2 ON T1.EmployeeID = T2.nurse
What are the different product names, and what is the sum of quantity ordered for each product?
SELECT T2.product_name , sum(T1.product_quantity) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name
What is the Diameter (mi) when the Longitude is 79.8° e?
SELECT diameter__mi_ FROM table_name_65 WHERE longitude = "79.8° e"
What are the codes and names of the cheapest products in each category?
SELECT code , name , min(price) FROM products GROUP BY name
What is the highest number of Seats 2006 held by the communities of Bürger Für Groß-Rohrheim Party/Voter Community, with a %2006 less than 21.3?
SELECT MAX(seats_2006) FROM table_name_5 WHERE parties_and_voter_communities = "bürger für groß-rohrheim" AND _percentage_2006 < 21.3