sentence
stringlengths
3
347
sql
stringlengths
18
804
Return the poll source corresponding to the candidate who has the oppose rate.
SELECT poll_source FROM candidate ORDER BY oppose_rate DESC LIMIT 1
Construction start of 1 december 1984 is what unit?
SELECT unit FROM table_name_75 WHERE construction_start = "1 december 1984"
What is the amount of renewable electricity without hydrogen power when the percentage of renewable energy is 83.4?
SELECT renewable_electricity_w_o_hydro__gw•h_ FROM table_25244412_1 WHERE _percentage_renewable = "83.4"
What is the zip code of the district represented by Steven A King?
SELECT T2.zip_code FROM congress AS T1 INNER JOIN zip_congress AS T2 ON T1.cognress_rep_id = T2.district WHERE T1.first_name = 'King' AND T1.last_name = 'Steven A'
List the full names of customers who have paid more than 10$.
SELECT T2.first_name, T2.last_name FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T1.amount > 10
Which place is payne stewart, the player in?
SELECT place FROM table_name_40 WHERE player = "payne stewart"
Which different vendor has the most amount of orders? Calculate the total estimated earnings.
SELECT DISTINCT T1.productVendor, T1.MSRP - T1.buyPrice FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.productCode GROUP BY T1.productVendor, T1.MSRP, T1.buyPrice ORDER BY COUNT(T2.quantityOrdered) DESC LIMIT 1
Please list the names of all the characters played by Tom Cruise.
SELECT T1.`Character Name` FROM characters AS T1 INNER JOIN actor AS T2 ON T1.ActorID = T2.ActorID WHERE T2.Name = 'Tom Cruise'
Find the total population of the top 3 districts with the largest area.
SELECT sum(city_population) FROM district ORDER BY city_area DESC LIMIT 3
Name the total number of affiliation for enrollment being 14898
SELECT COUNT(affiliation) FROM table_16383772_1 WHERE enrollment = 14898
What counties are not in the Bay Area Region?
SELECT DISTINCT county FROM geographic WHERE region != 'bay area'
Which team played them when andray blatche , javale mcgee (20) had the high points?
SELECT team FROM table_27721131_6 WHERE high_points = "Andray Blatche , JaVale McGee (20)"
What is the percentage ratio between positive sentiments and negative sentiments that are in Fate/Grand Order? Also indicate the current version.
SELECT CAST(SUM(CASE WHEN T2.Sentiment = 'Positive' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN T2.Sentiment = 'Negative' THEN 1 ELSE 0 END), T1.`Current Ver` FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Fate/Grand Order (English)' AND T1.`Current Ver` = '1.18.0'
What was the date of the friendly match, ending in a result of 1-1?
SELECT date FROM table_name_30 WHERE competition = "friendly match" AND result = "1-1"
Which catalog content has the highest height? Give me the catalog entry name.
SELECT catalog_entry_name FROM catalog_contents ORDER BY height DESC LIMIT 1
Which bike traveled the most often in zip code 94002?
SELECT bike_id FROM trip WHERE zip_code = 94002 GROUP BY bike_id ORDER BY COUNT(*) DESC LIMIT 1
Hi what are the first and last name for those employees who works either in department 70 or 90?
SELECT first_name , last_name FROM employees WHERE department_id = 70 OR department_id = 90
Name the most recent movie directed by Chris Buck. Which of his movies was more successful in terms of grossing? Use the current gross for comparison.
SELECT T1.movie_title, MAX(T1.release_date), MAX(T1.inflation_adjusted_gross) FROM movies_total_gross AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE T2.director = 'Chris Buck'
Thank you for that! Can you update this list to include the associated customer names, customer address city and the date from and date to for each row?
SELECT T2.customer_name , T3.city , T1.date_from , T1.date_to FROM customer_address_history AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id JOIN addresses AS T3 ON T1.address_id = T3.address_id
Who has a larger than 70.99 km2?
SELECT comune FROM table_name_52 WHERE total__km²_ > 70.99
Which customer come from a place with more inhabitants, customer no.0 or customer no.1?
SELECT T1.ID FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.ID = 0 OR T1.ID = 1 ORDER BY INHABITANTS_K DESC LIMIT 1
Which home team had the score 1-3?
SELECT home_team FROM table_name_6 WHERE score = "1-3"
What are the first names of student who only took one course?
SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num GROUP BY T2.stu_num HAVING count(*) = 1
Who had the most assists and how many did they have on January 5?
SELECT high_assists FROM table_29556461_7 WHERE date = "January 5"
What's the value of the indicator whose long definition is "Adolescent fertility rate is the number of births per 1,000 women ages 15-19." for the Arab World in 1960?
SELECT T1.Value FROM Indicators AS T1 INNER JOIN Series AS T2 ON T1.IndicatorName = T2.IndicatorName INNER JOIN Country AS T3 ON T1.CountryCode = T3.CountryCode WHERE T2.LongDefinition = 'Adolescent fertility rate is the number of births per 1,000 women ages 15-19.' AND T3.ShortName = 'Arab World' AND T1.Year = 1960
What is the total donation amount made for projects whose main subject area are Literacy & Language?
SELECT SUM(T2.dollar_amount) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.primary_focus_area = 'Literacy & Language'
What are the names of the albums that have more than 10 tracks?
SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id GROUP BY T1.id HAVING count(T1.id) > 10;
What percentage of seats were filled in 2006?
SELECT seat_factor FROM table_105344_2 WHERE year = 2006
Among the area code 787, list the country of the cities with a postal point type of unique postal office.
SELECT DISTINCT T2.county FROM area_code AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code INNER JOIN zip_data AS T3 ON T1.zip_code = T3.zip_code WHERE T1.area_code = '787' AND T3.type = 'Unique Post Office'
Name the Company which has a Price in USD of free / negotiable?
SELECT company FROM table_name_69 WHERE price_in_usd = "free / negotiable"
How much does the youngest dog weigh?
SELECT weight FROM pets ORDER BY pet_age LIMIT 1
Who is the nominee who has been nominated for the most musicals?
SELECT Nominee FROM musical GROUP BY Nominee ORDER BY COUNT(*) DESC LIMIT 1
How many items appear in the written by column in episode 3?
SELECT COUNT(written_by) FROM table_27155243_4 WHERE episode__number = 3
How many accounts does each customer have? List the number and customer id.
SELECT count(*) , customer_id FROM Accounts GROUP BY customer_id
How many rankings are associated with giuseppe meazza holding over 3 titles?
SELECT COUNT(rank) FROM table_name_35 WHERE player = "giuseppe meazza" AND titles > 3
List all the image name and URLs in the order of their names.
SELECT image_name , image_url FROM images ORDER BY image_name
What year did they open?
SELECT name, open_year FROM branch ORDER BY membership_amount DESC LIMIT 3
Count the number of documents that use the PPT template type.
SELECT count(*) FROM Documents AS T1 JOIN Templates AS T2 ON T1.Template_ID = T2.Template_ID WHERE T2.Template_Type_Code = 'PPT'
Where was the ID 336005 match held? Please give me the venue and the city.
SELECT T2.Venue_Name, T3.City_Name FROM `Match` AS T1 INNER JOIN Venue AS T2 ON T1.Venue_Id = T2.Venue_Id INNER JOIN City AS T3 ON T2.City_Id = T3.City_Id WHERE T1.Match_Id = '336005'
Return the names and classes of ships that do not have a captain?
SELECT name , CLASS FROM ship WHERE ship_id NOT IN (SELECT ship_id FROM captain)
How many orders was handled by employees who reported to employee id 5?
SELECT COUNT(T2.OrderID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.ReportsTo = 5
Did the project 'I Can't See It...Can You Help Me???' get the tip for the donation?
SELECT T2.donation_included_optional_support FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.title LIKE 'I Can''t See It...Can You Help Me???'
What country does Bobby Nichols play for?
SELECT country FROM table_name_70 WHERE player = "bobby nichols"
What is the title written by David Mamet?
SELECT title FROM table_10908676_7 WHERE written_by = "David Mamet"
Calculate the average age of clients whose response is "Closed with relief".
SELECT AVG(T1.age) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Company response to consumer` = 'Closed with relief'
List the companies and the investors of entrepreneurs.
SELECT Company, Investor FROM entrepreneur
What are the details and id of the project with the most outcomes?
SELECT T1.project_details , T1.project_id FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY count(*) DESC LIMIT 1
what are the recommendations are given to student?
SELECT recommendations FROM Behavior_Incident
Which competition had a year of 2010 with Snatch weight of 185kg?
SELECT competition FROM table_name_23 WHERE year = 2010 AND snatch = "185kg"
List the description, code and the number of services for each service type.
SELECT T1.Service_Type_Description , T2.Service_Type_Code , COUNT(*) FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T2.Service_Type_Code
When was the first UK broadcast for the episode with an official TNS Gallup rating of 1575000?
SELECT first_broadcast_uk___bbc_four__ FROM table_26591309_2 WHERE official_tns_gallup_ratings = 1575000
Please list any three criminal sexual assault cases against persons where the criminals have been arrested.
SELECT T2.case_number FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T1.fbi_code_no = T2.fbi_code_no WHERE T1.title = 'Criminal Sexual Assault' AND T2.arrest = 'TRUE' AND T1.crime_against = 'Persons' LIMIT 3
What is the highest chart number for the song Yardbirds aka Roger the Engineer?
SELECT MAX(chart_no) FROM table_name_17 WHERE title = "yardbirds aka roger the engineer"
What is the away side's score when richmond is at home?
SELECT away_team AS score FROM table_name_3 WHERE home_team = "richmond"
Count the number of courses without prerequisites.
SELECT count(*) FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq)
What is the round of club bečej?
SELECT round FROM table_name_38 WHERE club = "bečej"
When has a Centerfold model of krista kelly?
SELECT date FROM table_name_20 WHERE centerfold_model = "krista kelly"
What are the label IDs and app IDs of the Chinese Classical Mythology category?
SELECT T1.label_id, T2.app_id FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T1.label_id = T2.label_id WHERE T1.category = 'Chinese Classical Mythology'
What race is 12 hours in length?
SELECT race FROM table_name_52 WHERE length = "12 hours"
Find the name, city, country, and altitude (or elevation) of the airports in the city of New York.
SELECT name , city , country , elevation FROM airports WHERE city = 'New York'
What is To Par, when Money ( $ ) is Playoff, and when Score is 68-73-77-65=283?
SELECT to_par FROM table_name_97 WHERE money___$__ = "playoff" AND score = 68 - 73 - 77 - 65 = 283
What was the score on 24 February 2013?
SELECT score FROM table_name_32 WHERE date = "24 february 2013"
In What Tournament did Boris Becker have a Score of 7–6, 6–4?
SELECT name_of_tournament FROM table_name_84 WHERE champions = "boris becker" AND score = "7–6, 6–4"
Please show the employee last names that serves no more than 20 customers.
SELECT T1.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId = T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*) <= 20
Which department has the most people?
SELECT T1.department_name FROM department AS T1 INNER JOIN movie_crew AS T2 ON T1.department_id = T2.department_id GROUP BY T1.department_id ORDER BY COUNT(T2.department_id) DESC LIMIT 1
What was the record following game 67?
SELECT record FROM table_name_37 WHERE game = 67
Show ids for all employees who don't have a certificate.
SELECT eid FROM Employee EXCEPT SELECT eid FROM Certificate
Which date has time (GMT) of 23:34?
SELECT date FROM table_name_45 WHERE time___gmt__ = "23:34"
show the minimum amount of memberships for all branches opened in 2011 or located at city location
SELECT min ( membership_amount ) FROM branch WHERE open_year = 2011 OR city = 'London'
What are the distinct creation years of the departments managed by a secretary born in state 'Alabama'?
SELECT DISTINCT T1.creation FROM department AS T1 JOIN management AS T2 ON T1.department_id = T2.department_id JOIN head AS T3 ON T2.head_id = T3.head_id WHERE T3.born_state = 'Alabama'
What is the name of the department with the most students minoring in it?
SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO = T2.DNO GROUP BY T2.DNO ORDER BY count(*) DESC LIMIT 1
What is John Cole's overall pick number?
SELECT COUNT(overall) FROM table_name_47 WHERE name = "john cole"
Who did Clinton appoint as a Chief Judge?
SELECT chief_judge FROM table_name_2 WHERE appointed_by = "clinton"
what is the savings balance of id 1? | Did you mean the saving balance of the customer with id 1? | yes
SELECT balance from savings where custid = 1
Which channel comes out of Israel?
SELECT channel FROM table_name_83 WHERE country = "israel"
WHAT IS THE TV TIME WOTH A WEEK BIGGER THAN 15, WITH THE OAKLAND RAIDERS AS OPPONENT?
SELECT tv_time FROM table_name_33 WHERE week > 15 AND opponent = "oakland raiders"
What are all values for U.S. viewers(millions) with Kevin Curran as a writer?
SELECT us_viewers__millions_ FROM table_20942925_1 WHERE written_by = "Kevin Curran"
what is the age of bob
SELECT age FROM Person WHERE name = "Bob"
Count the number of different teams involved in match season.
SELECT count(DISTINCT Team) FROM match_season
Betweeen 2016 to 2019, which year recorded the highest number of people with mental illness?
SELECT T1.SurveyID FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T1.SurveyID BETWEEN 2016 AND 2019 AND T2.questionid = 34 AND T1.AnswerText LIKE 'Yes' GROUP BY T1.SurveyID ORDER BY COUNT(T1.UserID) DESC LIMIT 1
What percentage of households are in "Coroyell" out of its state?
SELECT CAST(SUM(CASE WHEN T1.county = 'CORYELL' THEN T2.households ELSE 0 END) AS REAL) * 100 / SUM(T2.households) FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code
List the names of all the customers in alphabetical order.
SELECT customer_details FROM customers ORDER BY customer_details
How many wins when the points are 0 and podiums are less than 0?
SELECT SUM(wins) FROM table_name_51 WHERE points = "0" AND podiums < 0
What is the mecha with a condor bird uniform?
SELECT mecha FROM table_name_33 WHERE bird_uniform = "condor"
List the names of editors who are older than 25.
SELECT Name FROM editor WHERE Age > 25
Find the name of amenities Smith Hall dorm have.
SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T1.dorm_name = 'Smith Hall'
How many performances are there?
SELECT COUNT(*) FROM performance
What league is entering this round with 24 clubs remaining?
SELECT leagues_entering_at_this_round FROM table_name_39 WHERE clubs_remaining = 24
What is the percentage of Japanese cars in the database?
SELECT CAST(SUM(CASE WHEN T2.country = 'Japan' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin
What is the amount for donator name Distrito Nacional?
SELECT amount FROM endowment where donator_name = "Distrito Nacional"
How many different colleges were represented at tryouts?
SELECT count(DISTINCT cName) FROM tryout
What is the venue for the match ID 829768?
SELECT T1.Venue_Name FROM Venue AS T1 INNER JOIN Match AS T2 ON T1.venue_id = T2.venue_id WHERE T2.match_id = 829768
Tell me the highest time for spain and lane larger than 8
SELECT MAX(time) FROM table_name_35 WHERE country = "spain" AND lane > 8
What is Week 14 Nov 24, that has Week 11 Nov 3 of USC (6-2)?
SELECT week_14_nov_24 FROM table_name_44 WHERE week_11_nov_3 = "usc (6-2)"
What TV order is written by gail simone?
SELECT television_order FROM table_20360535_3 WHERE written_by = "Gail Simone"
Find the names of districts where have both city mall and village store type stores.
SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = "City Mall" INTERSECT SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = "Village Store"
Among the players who have won the award of Rookie of the year, what is the height of the tallest player?
SELECT T1.height FROM players AS T1 INNER JOIN awards_players AS T2 ON T1.playerID = T2.playerID WHERE T2.award = 'Rookie of the Year' ORDER BY T1.height DESC LIMIT 1
Where country does Baghdad belongs to?
SELECT Name FROM country WHERE Province = 'Baghdad'
What was the date for Colorado?
SELECT date FROM table_name_92 WHERE state = "colorado"
What is the state of the city of denver, which has a rank less than 10?
SELECT state FROM table_name_99 WHERE rank < 10 AND city = "denver"