sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
Wonderful! Can you tell me what is the total amount of money requested by the people who ARE entrepreneurs? | SELECT sum ( money_requested ) from entrepreneur |
Show the names and heights of buildings with at least two institutions founded after 1880. | SELECT T1.name , T1.height_feet FROM building AS T1 JOIN institution AS T2 ON T1.building_id = T2.building_id WHERE T2.founded > 1880 GROUP BY T1.building_id HAVING count(*) >= 2 |
what is the country when the score is 71-65-69=205? | SELECT country FROM table_name_47 WHERE score = 71 - 65 - 69 = 205 |
What visiting team played on October 18? | SELECT visiting_team FROM table_name_36 WHERE date = "october 18" |
How many candidates ran in the election where Mike Doyle was the incumbent? | SELECT COUNT(candidates) FROM table_1341453_40 WHERE incumbent = "Mike Doyle" |
What is the first and last name of the oldest employee? | SELECT emp_fname, emp_lname FROM employee ORDER BY emp_dob LIMIT 1 |
List the phone hardware model and company name for the phones whose screen usage in kb is between 10 and 15. | SELECT DISTINCT T2.Hardware_Model_name , T2.Company_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.used_kb BETWEEN 10 AND 15; |
What is the preliminaries score where the swimsuit is smaller than 9.297, the evening gown is 9.617, and the interview is larger than 9.143? | SELECT AVG(preliminaries) FROM table_name_65 WHERE swimsuit < 9.297 AND evening_gown = 9.617 AND interview > 9.143 |
Give the names of the courses with at least five enrollments. | SELECT T1.CName FROM COURSE AS T1 JOIN ENROLLED_IN AS T2 ON T1.CID = T2.CID GROUP BY T2.CID HAVING COUNT(*) >= 5 |
What is the lowest rank for Chris Brown with react greater than 0.244? | SELECT MIN(rank) FROM table_name_44 WHERE athlete = "chris brown" AND react > 0.244 |
Show the names of schools with only girls? | SELECT School FROM school WHERE Boys_or_Girls = 'Girls' |
Can you show me which bank branch provided the highest number of loans to customers with credit scores below 100? | SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id = T2.branch_id JOIN customer AS T3 ON T1.cust_id = T3.cust_id WHERE T3.credit_score < 100 GROUP BY T2.bname ORDER BY sum ( T1.amount ) DESC LIMIT 1 |
What are the titles of all movies that have rating star is between 3 and 5? | SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars BETWEEN 3 AND 5 |
What are the lowest points in 2004? | SELECT MIN(points) FROM table_name_96 WHERE year = 2004 |
How many employees are in the circulation history with the document id 1? | SELECT COUNT ( employee_id ) FROM circulation_history WHERE document_id = 1 |
If the equation is 0 × 9² + 3 × 9 + 3, what is the result? | SELECT MIN(result) FROM table_17265535_7 WHERE equation = "0 × 9² + 3 × 9 + 3" |
Hello, how many students are over 18? | SELECT count ( * ) from student where age > 18 |
Find the number of employees whose title is IT Staff from each city? | SELECT count(*) , city FROM employees WHERE title = 'IT Staff' GROUP BY city |
What type of Competition has a Goal of 3? | SELECT competition FROM table_name_84 WHERE goal = 3 |
Provide the Instagram username of the legislator named Benjamin Hawkins. | SELECT T1.instagram FROM `social-media` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.first_name = 'Benjamin' AND T2.last_name = 'Hawkins' |
Give the name of the 4-year public school in "ID" with the lowest graduation 100 value. | SELECT T1.chronname FROM institution_details AS T1 INNER JOIN state_sector_grads AS T2 ON T2.state = T1.state WHERE T2.state_abbr = 'ID' AND T1.level = '4-year' AND T1.control = 'Public' GROUP BY T1.chronname ORDER BY SUM(T1.grad_100_value) ASC LIMIT 1 |
Give the ids of documents that have expenses and contain the letter s in their names. | SELECT T1.document_id FROM Documents AS T1 JOIN Documents_with_expenses AS T2 ON T1.document_id = T2.document_id WHERE T1.document_name LIKE '%s%' |
What is the Home team with an Away team that is oxford united? | SELECT home_team FROM table_name_87 WHERE away_team = "oxford united" |
How many people have a vl type in a region greater than 3? | SELECT SUM(population) FROM table_name_49 WHERE type = "vl" AND region > 3 |
Calculate average price for all tracks | SELECT avg ( UnitPrice ) FROM track |
List the order numbers and product names which were ordered on 6th June, 2018. | SELECT DISTINCT OrderNumber, `Product Name` FROM ( SELECT IIF(T2.OrderDate = '6/6/18', T2.OrderNumber, NULL) AS "OrderNumber" , IIF(T2.OrderDate = '6/6/18', T1.`Product Name`, NULL) AS "Product Name" FROM Products T1 INNER JOIN `Sales Orders` T2 ON T2._ProductID = T1.ProductID ) WHERE OrderNumber IS NOT NULL AND `Product Name` IS NOT NULL |
How many counties correspond to each police force? | SELECT Police_force , COUNT(*) FROM county_public_safety GROUP BY Police_force |
Among all the active customers, how many of them live in Arlington? | SELECT COUNT(T2.customer_id) FROM address AS T1 INNER JOIN customer AS T2 ON T1.address_id = T2.address_id INNER JOIN city AS T3 ON T1.city_id = T3.city_id WHERE T2.active = 1 AND T3.city = 'Arlington' |
How many roles are in that club? | select count ( position ) from member_of_club where clubid = ( SELECT T2.clubid from club as T1 join member_of_club as T2 on T1.clubid = T2.clubid group by T2.clubid order by count ( * ) desc limit 1 ) |
Calculate the average number of disabled female students enrolled in UCI. | SELECT CAST(SUM(IIF(T1.school = 'uci' AND T4.name IS NULL, 1, 0)) AS REAL) / COUNT(T1.name) FROM enrolled AS T1 INNER JOIN disabled AS T2 ON T1.name = T2.name INNER JOIN person AS T3 ON T1.name = T3.name LEFT JOIN male AS T4 ON T3.name = T4.name |
Find the album id of accept? | The album ids of the artist named 'Accept' are 2 and 3. | How many artists in this table? | SELECT count ( distinct t1.ArtistId ) FROM ARTIST as t1 join ALBUM as t2 on t1.artistid = t2.artistid WHERE t1.name = 'Accept' |
Other than zero, what is the lowest price paid by a customer for an order? | SELECT MIN(price) FROM order_line WHERE price <> 0 |
What of their least expensive product? | SELECT T1.Name , min ( T1.Price ) , T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer = T2.code GROUP BY T2.name |
Tell me the named for latitude of 6.4 | SELECT named AS after FROM table_name_61 WHERE latitude = 6.4 |
Which Losses has a Wins of 6, and an Against smaller than 1741? | SELECT MIN(losses) FROM table_name_56 WHERE wins = 6 AND against < 1741 |
What is the lowest grid that Paul Tracy had when he had over 4 points? | SELECT MIN(grid) FROM table_name_67 WHERE name = "paul tracy" AND points > 4 |
What are the names, checking balances, and savings balances of customers, ordered by the total of checking and savings balances descending? | SELECT T2.balance , T3.balance , T1.name 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 + T3.balance DESC |
What years were actress Nadine Garner on the show? | SELECT tenure FROM table_name_75 WHERE actor_actress = "nadine garner" |
Who write episode number 48 in the series? | SELECT written_by FROM table_2453243_5 WHERE no_in_series = "48" |
How many donations from teachers were done in the state of Colorado? | SELECT COUNT(donationid) FROM donations WHERE is_teacher_acct = 't' AND donor_state = 'CO' |
What are all info of students who registered courses but not attended courses? | SELECT * FROM student_course_registrations WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance) |
What are the names of people in ascending order of weight? | SELECT Name FROM People ORDER BY Weight |
How many motorcycles have been ordered in 2004? | SELECT SUM(t2.quantityOrdered) FROM orders AS t1 INNER JOIN orderdetails AS t2 ON t1.orderNumber = t2.orderNumber INNER JOIN products AS t3 ON t2.productCode = t3.productCode WHERE t3.productLine = 'motorcycles' AND STRFTIME('%Y', t1.orderDate) = '2004' |
Find the id and name of customers whose address contains WY state and do not use credit card for payment. | SELECT customer_id , customer_name FROM customers WHERE customer_address LIKE "%WY%" AND payment_method_code != "Credit Card" |
Tell me the launched for august 31, 1964 | SELECT launched FROM table_name_23 WHERE commissioned = "august 31, 1964" |
What are the album titles for albums containing both 'Reggae' and 'Rock' genre tracks? | SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Reggae' INTERSECT SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId JOIN Genre AS T3 ON T2.GenreID = T3.GenreID WHERE T3.Name = 'Rock' |
On February 26, who was the leading scorer? | SELECT leading_scorer FROM table_name_30 WHERE date = "february 26" |
List the forename and surname of all distinct drivers who once had laptime less than 93000 milliseconds? | SELECT DISTINCT T1.forename , T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds < 93000 |
What is the Place of the Player with a To par of +3 and Score of 73-70-73=216? | SELECT place FROM table_name_45 WHERE to_par = "+3" AND score = 73 - 70 - 73 = 216 |
When was Mario Elie picked in a round before 7? | SELECT MAX(pick) FROM table_name_75 WHERE player = "mario elie" AND round < 7 |
What was the Tie no when the Home team was carshalton athletic? | SELECT tie_no FROM table_name_50 WHERE home_team = "carshalton athletic" |
Say the field with a result of w 12-11 | SELECT field FROM table_name_43 WHERE result = "w 12-11" |
what Area has the frequency of 100.3 and an On-air ID of yass fm? | SELECT area_served FROM table_name_94 WHERE frequency = "100.3" AND on_air_id = "yass fm" |
What was the year of previous participation for the school in the Kagoshima prefecture? | SELECT year_of_previous_participation FROM table_2518850_4 WHERE prefecture = "Kagoshima" |
What type has a population of 370? | SELECT type FROM table_name_77 WHERE population = 370 |
On what date is there a match lower than 14 with a ground of H and the opponent Aston Villa under 18s? | SELECT date FROM table_name_11 WHERE match < 14 AND ground = "h" AND opponent = "aston villa under 18s" |
What is the original air date for the episode written by Bob Goodman? | SELECT original_airdate FROM table_16581695_2 WHERE written_by = "Bob Goodman" |
Find the number of universities that have over a 20000 enrollment size for each affiliation type. | SELECT count(*) , affiliation FROM university WHERE enrollment > 20000 GROUP BY affiliation |
What is the rear sight type on the model with the acr muzzle brake device? | SELECT rear_sight_type FROM table_19901_1 WHERE muzzle_device = "ACR muzzle brake" |
who is the founder where date is c. 1900 | SELECT founder FROM table_11256021_1 WHERE date = "c. 1900" |
What event has unknown as the days held.? | SELECT event FROM table_name_98 WHERE days_held = "unknown" |
what is the employee (real name) when the pick # is higher than 10 and the brand (to) is raw? | SELECT employee__real_name_ FROM table_name_9 WHERE pick__number > 10 AND brand__to_ = "raw" |
What about employees who don't work with employees in those departments? | SELECT * FROM employees WHERE department_id NOT IN ( SELECT department_id FROM departments WHERE manager_id BETWEEN 100 AND 200 ) |
what is the date when the home is st. louis? | SELECT date FROM table_name_30 WHERE home = "st. louis" |
What is the homepage address for paper "Energy-efficiency bounds for noise-tolerant dynamic circuits"? | SELECT T2.HomePage FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.Title = 'Energy-efficiency bounds for noise-tolerant dynamic circuits' |
yes | Please clarify which one do you need | I need the Checking balance | SELECT balance FROM checking WHERE custid = 2 |
Find the last name of the staff whose email address contains "wrau". | SELECT last_name FROM staff WHERE email_address LIKE "%wrau%" |
How many Yelp_Business falls under the category of "Shopping"? | SELECT COUNT(T1.category_id) FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id WHERE T1.category_name LIKE 'Shopping' |
What is the religion of current legislator Sherrod Brown? | SELECT religion_bio FROM current WHERE official_full_name = 'Sherrod Brown' |
What were the round results when Hanne Skak Jensen faced Austria? | SELECT result FROM table_25505246_7 WHERE against = "Austria" |
Would you please show me the ids of all employees who do destroy any documents? | SELECT employee_id FROM Employees as t1 join Documents_to_be_destroyed as t2 on t1.Employee_ID = t2.Destroyed_by_Employee_ID |
What are the statement id and statement detail for the statement that has the most corresponding accounts? | SELECT T1.statement_id , T2.statement_details FROM Accounts AS T1 JOIN Statements AS T2 ON T1.statement_id = T2.statement_id GROUP BY T1.statement_id ORDER BY count(*) DESC LIMIT 1 |
Find the number of scientists who are not assigned to any project. | SELECT count(*) FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo) |
At what latitude is the Thomas Kemper brand beer consumed the most? | SELECT T3.Latitude FROM rootbeer AS T1 INNER JOIN rootbeerbrand AS T2 ON T1.BrandID = T2.BrandID INNER JOIN geolocation AS T3 ON T1.LocationID = T3.LocationID WHERE T2.BrandName = 'Thomas Kemper' GROUP BY T3.Latitude ORDER BY COUNT(T1.BrandID) DESC LIMIT 1 |
Of the faculty members in building Barton, how many are in each rank? | SELECT rank, count ( * ) FROM FACULTY WHERE Building = "Barton" group by rank |
What are the records when Elzbieta Urbanczik competed? | SELECT record FROM table_14884844_2 WHERE athletes = "Elzbieta Urbanczik" |
how manty editors are there? | SELECT COUNT ( Author_or_Editor ) from book_club |
What is the amount of marginal ordinary income tax rate for single in which the range is $8,351– $33,950? | SELECT COUNT(marginal_ordinary_income_tax_rate) FROM table_11647327_2 WHERE single = "$8,351– $33,950" |
What was the place for the celebrity whose aggregate was 35? | SELECT place FROM table_25931938_1 WHERE aggregate = 35 |
how many times is there more than 0 draws and more than 0 losses? | SELECT COUNT(played) FROM table_name_5 WHERE drawn > 0 AND lost > 0 |
What is the total number of legislators with "John" as their first name? | SELECT COUNT(*) FROM current WHERE first_name = 'John' |
List all document ids with at least two paragraphs. | SELECT document_id FROM Paragraphs GROUP BY document_id HAVING count(*) >= 2 |
When was the game that had 58,025 people in attendance? | SELECT date FROM table_name_26 WHERE attendance = "58,025" |
What is the ratio of having the best to worse elite user in 2013? | SELECT CAST(SUM(CASE WHEN T1.user_average_stars = 1 THEN 1 ELSE 0 END) AS REAL) / COUNT(T2.user_id) , SUM(CASE WHEN T1.user_average_stars = 5 THEN 1 ELSE 0 END) * 1.0 / COUNT(T2.user_id) FROM Users AS T1 INNER JOIN Elite AS T2 ON T1.user_id = T2.user_id WHERE T2.year_id = 2013 |
What are different nationalities of people and the corresponding number of people from each nation? | SELECT Nationality , COUNT(*) FROM people GROUP BY Nationality |
Name of ships not steered by by any captain with Midshipman rank? | SELECT name FROM ship WHERE ship_id NOT IN ( SELECT ship_id FROM captain WHERE rank = 'Midshipman' ) |
What is the lowest number of games drawn associated with over 39 games played? | SELECT MIN(drawn) FROM table_name_39 WHERE played > 39 |
Show name and salary for all employees sorted by salary. | SELECT name , salary FROM Employee ORDER BY salary |
What is the lowest attendance on November 18? | SELECT MIN(attendance) FROM table_name_94 WHERE date = "november 18" |
What team was the away team when the home team was Hereford United? | SELECT away_team FROM table_name_32 WHERE home_team = "hereford united" |
What is the language for film titled "CHILL LUCK"? | SELECT T2.`name` FROM film AS T1 INNER JOIN `language` AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'CHILL LUCK' |
what is the middle name of teacher id 1? | SELECT T1.middle_name FROM Teachers AS T1 WHERE T1.teacher_id = 1 |
Return the id of the department with the fewest staff assignments. | SELECT department_id FROM staff_department_assignments GROUP BY department_id ORDER BY count(*) LIMIT 1 |
What was the Rockies record at their game that had a loss of Hernandez (3–5)? | SELECT record FROM table_name_21 WHERE loss = "hernandez (3–5)" |
What is the lowest cuts made that had a Top-25 less than 6 and wins greater than 0? | SELECT MIN(cuts_made) FROM table_name_63 WHERE top_25 < 6 AND wins < 0 |
What shows for playing when the opponent was Real España, in the 2012–13 season? | SELECT playing_for FROM table_name_76 WHERE opponent = "real españa" AND season = "2012–13" |
Show me the details of the body builders | Which information would you like to know about the body builders? | Heights of the body builders | SELECT T2.Height FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID |
In which department Mr. Mird work for? | SELECT dept_name FROM instructor where name = 'Mird' |
which player has 11 tries? | SELECT player FROM table_name_68 WHERE tries = "11" |
How many times at most can a course enrollment result show in different transcripts? Also show the course enrollment id. | SELECT count(*) , student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY count(*) DESC LIMIT 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.