sentence
stringlengths 3
347
| sql
stringlengths 18
804
|
---|---|
How many stars did "Eagle Capital" received from Little Rock on 2013/4/4? | SELECT COUNT(T1.Stars) FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.Product = 'Eagle Capital' AND T2.city = 'Little Rock' AND T1.Date = '2013-04-04' |
How many of the cars from Japan weighed less than 3000? | SELECT COUNT(*) FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country INNER JOIN data AS T4 ON T4.ID = T1.ID WHERE T3.country = 'Japan' AND T4.weight < 3000 |
What kind of preparation is needed for apple juice to make a raspberry-pear couscous cake? | SELECT T2.preparation FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id INNER JOIN Ingredient AS T3 ON T3.ingredient_id = T2.ingredient_id WHERE T1.title = 'Raspberry-Pear Couscous Cake' AND T3.name = 'apple juice' |
What about cmi cross reference ids that not related? | SELECT cmi_cross_ref_id FROM cmi_cross_references where cmi_cross_ref_id not in ( Select T1.cmi_cross_ref_id from cmi_cross_references as T1 join Parking_Fines as T2 on T1.cmi_cross_ref_id = T2.cmi_cross_ref_id ) |
What are total salaries and department id for each department that has more than 2 employees? | SELECT department_id , SUM(salary) FROM employees GROUP BY department_id HAVING count(*) >= 2 |
What is the series score of the game on April 16? | SELECT series FROM table_name_55 WHERE date = "april 16" |
Please list the full names of all the students who took the course Machine Learning Theory. | SELECT T1.f_name, T1.l_name FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.name = 'Machine Learning Theory' |
Show the most common country across members. | SELECT Country FROM member GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1 |
What is the gender of the character 'USAF Master Sgt. Epps?' | SELECT T2.gender FROM movie_cast AS T1 INNER JOIN gender AS T2 ON T1.gender_id = T2.gender_id WHERE T1.character_name = 'USAF Master Sgt. Epps' |
Name the service for 7th marines rank of sergeant | SELECT service FROM table_name_20 WHERE unit = "7th marines" AND rank = "sergeant" |
List the weight for 56 kilograms. | SELECT distance FROM table_2581397_3 WHERE weight__kg_ = "56" |
Which Wrestler has an Entered of 5, and a Pinned of mvp? | SELECT wrestler FROM table_name_23 WHERE entered = 5 AND pinned = "mvp" |
What is the name and building of the departments whose budget is more than the average budget? | SELECT dept_name , building FROM department WHERE budget > (SELECT avg(budget) FROM department) |
What are the full names of the non-google female entity legislators that have not been registered in Federal Election Commission data? | SELECT first_name, last_name FROM historical WHERE gender_bio = 'F' AND google_entity_id_id IS NULL AND fec_id IS NULL |
When was ron-robert zieler loaned out until ? | SELECT date_to FROM table_name_90 WHERE name = "ron-robert zieler" |
What is the party of the district incumbent Jim Saxton? | SELECT party FROM table_1341453_32 WHERE incumbent = "Jim Saxton" |
Which home team played against the away team Carlton? | SELECT home_team FROM table_name_74 WHERE away_team = "carlton" |
What is the language of the pair of words numbered 1 and 616? | SELECT T2.lang FROM biwords AS T1 INNER JOIN langs AS T2 ON T1.lid = T2.lid WHERE T1.w1st = 1 AND T1.w2nd = 616 |
Which type of book had the most pre-paid amount? | SELECT type FROM titles ORDER BY advance DESC LIMIT 1 |
What are the load shapes of all the short ellipse cars? | SELECT load_shape FROM cars WHERE shape = 'ellipse' AND len = 'short' |
How many lanes have a Nationality of iceland? | SELECT SUM(lane) FROM table_name_58 WHERE nationality = "iceland" |
What is the total number of Rank, when Date of Official Foundation of Municipality is after 1926, when Province is "Sistan and Baluchestan", and when 2006 is greater than 567449? | SELECT COUNT(rank) FROM table_name_87 WHERE date_of_official_foundation_of_municipality > 1926 AND province = "sistan and baluchestan" AND 2006 > 567449 |
who had the high rebounds when the game number was 6? | SELECT high_rebounds FROM table_name_70 WHERE game = 6 |
In what place did hubert green score below 70 in the united states? | SELECT place FROM table_name_91 WHERE score < 70 AND country = "united states" AND player = "hubert green" |
How many users from the group "F29-32" who were active in the events on 2016/5/7? | SELECT COUNT(T1.app_id) FROM app_events AS T1 INNER JOIN events AS T2 ON T1.event_id = T2.event_id INNER JOIN gender_age AS T3 ON T2.event_id = T3.device_id WHERE SUBSTR(T2.`timestamp`, 1, 10) = '2016-05-07' AND T1.is_active = '1' AND T3.`group` = 'F29-32' |
How many parties are there? | SELECT count ( * ) FROM Party |
How many friends does Zach have? | SELECT count ( friend ) from PersonFriend where name = 'Zach' |
What are the first names and country codes for players who won both the WTA Championships and the Australian Open? | SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'WTA Championships' INTERSECT SELECT T1.country_code , T1.first_name FROM players AS T1 JOIN matches AS T2 ON T1.player_id = T2.winner_id WHERE T2.tourney_name = 'Australian Open' |
What is the average rating of podcasts in comedy category? | SELECT AVG(T2.rating) FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'comedy' |
Count the number of classrooms in Lamberton. | SELECT count(*) FROM classroom WHERE building = 'Lamberton' |
Please list the full names of the customers who have purchased at least one root beer produced by AJ Stephans Beverages. | SELECT T1.First, T1.Last FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN rootbeer AS T3 ON T2.RootBeerID = T3.RootBeerID INNER JOIN rootbeerbrand AS T4 ON T3.BrandID = T4.BrandID WHERE T4.BreweryName = 'AJ Stephans Beverages' |
What was the attendance at the Billericay Town home game? | SELECT attendance FROM table_name_34 WHERE home_team = "billericay town" |
Give me a list of cities whose temperature in March is lower than that in July or higher than that in Oct? | SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Mar < T2.Jul OR T2.Mar > T2.Oct |
What is the average of Fiji with t10 Finish? | SELECT AVG(total) FROM table_name_96 WHERE finish = "t10" AND country = "fiji" |
Which stage number did son bou arrive at? | SELECT COUNT(stage) FROM table_name_22 WHERE arrival = "son bou" |
What are the names of parties that have no members? | SELECT party_name FROM party WHERE party_id NOT IN (SELECT party_id FROM Member) |
Among all the suppliers in debt, how many of them are in Europe? | SELECT COUNT(T1.n_nationkey) FROM nation AS T1 INNER JOIN region AS T2 ON T1.n_regionkey = T2.r_regionkey INNER JOIN supplier AS T3 ON T1.n_nationkey = T3.s_nationkey WHERE T2.r_name = 'EUROPE' AND T3.s_acctbal < 0 |
who is the away team when the home team is hartlepool united? | SELECT away_team FROM table_name_10 WHERE home_team = "hartlepool united" |
Please list any two parts that come with the wrap bag container and have a supply cost of under 10. | SELECT T1.p_name FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey WHERE T2.ps_supplycost < 10 AND T1.p_container = 'WRAP BAG' LIMIT 2 |
What is the product, chromosome and porphyria related to the enzymes which take effect at the location 'Cytosol'? | SELECT product, chromosome, porphyria FROM enzyme WHERE LOCATION = 'Cytosol' |
List the industry shared by the most companies. | SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC LIMIT 1 |
Find and list the full name and email of the customers who used American Express cards in Sac State Union. | SELECT DISTINCT T1.First, T1.Last, T1.Email FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN location AS T3 ON T2.LocationID = T3.LocationID WHERE T3.LocationName = 'Sac State Union' AND T2.CreditCardType = 'American Express' |
What does the ERP W sum equal for 105.1 fm frequency? | SELECT SUM(erp_w) FROM table_name_66 WHERE frequency_mhz = "105.1 fm" |
Can you show the hours they each worked too, please? | SELECT T1.Name , T3.Name , T3.Hours FROM Scientists AS T1 JOIN AssignedTo AS T2 ON T1.SSN = T2.Scientist JOIN Projects AS T3 ON T2.Project = T3.Code ORDER BY T3.Name , T1.Name |
How many owners have 5 or more establishments? | SELECT COUNT(T1.owner_name) FROM ( SELECT owner_name FROM businesses GROUP BY owner_name HAVING COUNT(owner_name) > 5 ) T1 |
What is the year and semester with the most courses? | SELECT semester , YEAR FROM SECTION GROUP BY semester , YEAR ORDER BY count(*) DESC LIMIT 1 |
Who is the minister with a term end on 10 March 1974? | SELECT minister FROM table_name_71 WHERE term_end = "10 march 1974" |
Find the contact channel code that was used by the customer named "Tillman Ernser". | SELECT DISTINCT channel_code FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = "Tillman Ernser" |
Where did carlton play while away? | SELECT venue FROM table_name_98 WHERE away_team = "carlton" |
can you show me a list of date in location to? | Do you mean list of "date in location to" from the document locations table? | yes | SELECT Date_in_Locaton_To FROM Document_Locations |
Name the coin under the token category that gives the highest max profit. | SELECT T1.name FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T1.category = 'token' ORDER BY T2.high - T2.low DESC LIMIT 1 |
What is the average height of all mountains in Nepal? | SELECT AVG(T1.Height) FROM mountain AS T1 INNER JOIN geo_mountain AS T2 ON T1.Name = T2.Mountain WHERE T2.Province = 'Nepal' |
What is the average number of injuries caused each time? | SELECT avg(injured) FROM death |
What is the lowest Total containing a Bronze of 0 and Rank smaller than 2? | SELECT MIN(total) FROM table_name_92 WHERE bronze = 0 AND rank < 2 |
Operation of find-min has what binary? | SELECT binary FROM table_name_98 WHERE operation = "find-min" |
List all the deceased goalies and the teams he had played whose birth country was in Canada. | SELECT DISTINCT firstName, lastName, T3.name FROM Goalies AS T1 INNER JOIN Master AS T2 ON T2.playerID = T1.playerID INNER JOIN Teams AS T3 ON T1.lgID = T3.lgID WHERE T2.birthCountry = 'Canada' AND T2.deathYear IS NOT NULL AND T2.pos = 'G' |
What is Competition, when Date is 30 December 2005? | SELECT competition FROM table_name_96 WHERE date = "30 december 2005" |
What is the afl team of the offensive guard? | SELECT afl_team FROM table_12165135_1 WHERE position = "Offensive Guard" |
What is the name, city, and country of the airport with the highest elevation? | SELECT name , city , country FROM airports ORDER BY elevation DESC LIMIT 1 |
What was the result of the election in the Arkansas 4 district? | SELECT result FROM table_1342359_4 WHERE district = "Arkansas 4" |
Which of the airport names contains the word 'international'? | SELECT name FROM airport WHERE name LIKE '%international%' |
How many years have a theme of Toronto Maple Leafs and an Issue Price of 24.95? | SELECT COUNT(year) FROM table_name_39 WHERE theme = "toronto maple leafs" AND issue_price = 24.95 |
List the paragraph number and paragraphs said by the character named "Sir Andrew Aguecheek". | SELECT T2.ParagraphNum, T2.id FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T1.CharName = 'Sir Andrew Aguecheek' |
What is the percentage of restaurants that paid a fine of 250 among all establishments? | SELECT CAST(COUNT(CASE WHEN T3.fine = 250 THEN T1.license_no END) AS REAL) * 100 / COUNT(T1.license_no) FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no INNER JOIN violation AS T3 ON T2.inspection_id = T3.inspection_id WHERE T1.facility_type = 'Restaurant' |
get the details of employees who manage a department. | SELECT DISTINCT * FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id WHERE T1.employee_id = T2.manager_id |
What is the average rating score of the 'Pavee Lackeen: The Traveller Girl' movie and what year was it released? | SELECT AVG(T1.rating_score), T2.movie_release_year FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'Pavee Lackeen: The Traveller Girl' |
Name the episode summary for travis brown | SELECT episode AS Summary FROM table_2140071_12 WHERE coach = "Travis Brown" |
Find the driver id and number of races of all drivers who have at most participated in 30 races? | SELECT T1.driverid, COUNT(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING COUNT(*) <= 30 |
What country did Gil play against on 21–23 september 2007? | SELECT against FROM table_18042031_16 WHERE date = "21–23 September 2007" |
what being the maximum total passengers 2008 with change 2008/09 being 6.5% | SELECT MAX(total_passengers_2008) FROM table_13836704_4 WHERE change_2008_09 = "6.5%" |
What is the company name of the customer who made the biggest amount of purchase in a single order before discount? | SELECT T1.CompanyName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN `Order Details` AS T3 ON T2.OrderID = T3.OrderID WHERE T3.Discount = 0 GROUP BY T1.CompanyName ORDER BY SUM(T3.UnitPrice * T3.Quantity) DESC LIMIT 1 |
What are the IDs of customers who have "Diana" in part of their names? | SELECT customer_id FROM customers WHERE customer_name LIKE "%Diana%" |
Which state has a royal house of Jiang? | SELECT state FROM table_name_5 WHERE royal_house = "jiang" |
What is the longest duration? | SELECT duration from files order by duration desc limit 1 |
What is the salary and name of the employee who has the most number of certificates on aircrafts with distance more than 5000? | SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid = T2.eid JOIN Aircraft AS T3 ON T3.aid = T2.aid WHERE T3.distance > 5000 GROUP BY T1.eid ORDER BY count(*) DESC LIMIT 1 |
Give the score and number of international students in university ID 100 in 2015. | SELECT CAST(T1.num_students * T1.pct_international_students AS REAL) / 100, T2.score FROM university_year AS T1 INNER JOIN university_ranking_year AS T2 ON T1.university_id = T2.university_id WHERE T2.year = 2015 AND T1.university_id = 100 |
For the latest passing player who could play all the positions in the court, how many points did he have in his career? | SELECT SUM(T2.points) FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE T1.pos = 'C-F-G' GROUP BY T2.playerID, T2.year ORDER BY T2.year DESC LIMIT 1 |
What is the total average movie directed by the directors who's quality and revenue is 4? | SELECT CAST(SUM(CASE WHEN T1.d_quality = 4 AND T1.avg_revenue = 4 THEN 1 ELSE 0 END) AS REAL) / COUNT(T2.movieid) FROM directors AS T1 INNER JOIN movies2directors AS T2 ON T1.directorid = T2.directorid |
In 1912 when the U.S used sapphire, what was the Hindu birthstone? | SELECT hindu FROM table_name_77 WHERE us__1912_ = "sapphire" |
Which FSB Speed has a Model Number of c7-m 765? | SELECT fsb_speed FROM table_name_46 WHERE model_number = "c7-m 765" |
Which shop has the most employees? Give me the shop name. | SELECT t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t1.shop_id ORDER BY count(*) DESC LIMIT 1 |
Who are the nominees who have been nominated for both a Tony Award and a Drama Desk Award? | SELECT Nominee FROM musical WHERE Award = "Tony Award" INTERSECT SELECT Nominee FROM musical WHERE Award = "Drama Desk Award" |
what was the primary conference when joining the csfl for the institution that joined in 2004-05? | SELECT primary_conference_when_joining_the_csfl FROM table_262501_1 WHERE joined = "2004-05" |
What weight has a distance of 8F, and RRC Hill Stakes (wfa) as the race? | SELECT weight FROM table_name_7 WHERE distance = "8f" AND race = "rrc hill stakes (wfa)" |
What is the date of the smallest amount paid? | SELECT date_of_claim from claim_headers order by amount_claimed limit 1 |
Find the total number of catalog contents. | SELECT count(*) FROM catalog_contents |
what is the age of the oldest captain? | Select age from captain order by age desc limit 1 |
Which Points have a Lost smaller than 1, and Games larger than 7? | SELECT MAX(points) FROM table_name_81 WHERE lost < 1 AND games > 7 |
Show me the average height of the student players from the college named 'Yale University' | SELECT avg ( T1.height ) FROM player AS T1 JOIN player_college AS T2 ON T1.player_id = T2.player_id JOIN college AS T3 ON T3.college_id = T2.college_id WHERE T3.name_full = 'Yale University' |
How many trips are there? | SELECT count ( * ) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id = T2.id |
How many lakes are there in the 4th most populous African country with a republican form of government? | SELECT COUNT(*) FROM geo_lake WHERE Country = ( SELECT T4.Code FROM ( SELECT T2.Code, T2.Population FROM encompasses AS T1 INNER JOIN country AS T2 ON T1.Country = T2.Code INNER JOIN politics AS T3 ON T1.Country = T3.Country WHERE T1.Continent = 'Africa' AND T1.Percentage = 100 AND T3.Government = 'republic' ORDER BY Population DESC LIMIT 4 ) AS T4 ORDER BY population ASC LIMIT 1 ) |
What about MasterCard? | SELECT Payment_Method_Code, count ( * ) FROM Payments where Payment_Method_Code = "MasterCard" |
How many flights are arriving in Washington DC today? | Sorry, what is the date you meant by today? | I am sorry I meant on April/12/2005 | SELECT count ( * ) FROM Flight where destination = "Washington D.C." and arrival_date Like "%04/12/2005%" |
Who played mens doubles for the 1999 kobe tour? | SELECT mens_doubles FROM table_28138035_20 WHERE year_location = "1999 Kobe" |
When was the release date of the latest movie in which Dariusz Wolski worked as a crew member? | SELECT T1.release_date FROM movie AS T1 INNER JOIN movie_crew AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T3.person_name = 'Dariusz Wolski' ORDER BY T1.release_date DESC LIMIT 1 |
How many residences are there? | SELECT count ( distinct Residence ) FROM player |
State the word ID for "periodograma". | SELECT wid FROM words WHERE word = 'periodograma' |
What is the Attendance of the game in Week 12? | SELECT MAX(attendance) FROM table_name_99 WHERE week = 12 |
Thank you! Now I realize that I should probably be asking for the date assigned from values... Therefore, can you provide me with a list of all staff IDs and their corresponding "date assigned from" values? | SELECT staff_id, date_assigned_from from Staff_Department_Assignments |
Excellent! For each nomination can you show me the name of the artwork associated with it, and the name of the festival where it was nominated? | SELECT T2.Name , T3.Festival_Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.