sentence
stringlengths
3
347
sql
stringlengths
18
804
Name the sum against for byes less than 0
SELECT SUM(against) FROM table_name_92 WHERE byes < 0
Which Numbers (Quantity Ordered) have a Fuel Propulsion of cng, and a Year smaller than 2008, and a Make/ Model of nabi 40-lfw?
SELECT numbers__quantity_ordered_ FROM table_name_96 WHERE fuel_propulsion = "cng" AND year < 2008 AND make__model = "nabi 40-lfw"
What is the sum of Points for 250cc class, ranked 13th, later than 1955?
SELECT SUM(points) FROM table_name_89 WHERE class = "250cc" AND rank = "13th" AND year > 1955
Please indicate the review count of the "active life" businesses in Phoenix.
SELECT COUNT(*) FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id WHERE T1.category_name = 'Active Life' AND T3.city = 'Phoenix'
Hello! Can you provide me with a list of the first names of all customers who rented films before '2005-08-23 02:06:01'?
SELECT first_name FROM customer WHERE customer_id IN ( SELECT customer_id FROM rental WHERE rental_date < '2005-08-23 02:06:01' )
What is the date for the player who debuted later than 1972 against Limerick?
SELECT date FROM table_name_32 WHERE début > 1972 AND opposition = "limerick"
What is Score, when Team is "Indiana"?
SELECT score FROM table_name_7 WHERE team = "indiana"
Show the document type code with fewer than 3 documents.
SELECT document_type_code FROM Documents GROUP BY document_type_code HAVING COUNT(*) < 3
Which club, had a home ground of n/a?
SELECT club FROM table_name_95 WHERE home_ground = "n/a"
How many customers have email that contains "gmail.com"?
SELECT COUNT(*) FROM CUSTOMER WHERE Email LIKE "%gmail.com%"
What is the torque of 1.2 petrol?
SELECT torque FROM table_name_49 WHERE name = "1.2 petrol"
How many chip models are not being used in phones with full accreditation?
SELECT model_name FROM chip_model EXCEPT SELECT chip_model FROM phone WHERE Accreditation_type = 'Full'
Which Time/Retired has Laps smaller than 100, and Points larger than 0?
SELECT time_retired FROM table_name_99 WHERE laps < 100 AND points > 0
What airport name has the highest amount of international passengers?
SELECT Airport_Name FROM airport order by International_Passengers desc limit 1
who is the constructor when the grid is more than 23 and the driver is piercarlo ghinzani?
SELECT constructor FROM table_name_66 WHERE grid > 23 AND driver = "piercarlo ghinzani"
How many Matches have Balls smaller than 224, and an Average larger than 38.25, and an S/Rate larger than 139.09?
SELECT SUM(matches) FROM table_name_87 WHERE balls < 224 AND average > 38.25 AND s_rate > 139.09
What product has the fewest online orders from one customer? List the product's class, line of business, and list price.
SELECT T2.Class, T2.ProductLine, T2.ListPrice FROM ShoppingCartItem AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID GROUP BY T1.ProductID ORDER BY SUM(Quantity) LIMIT 1
What event did he compete in at Taipei?
SELECT format FROM table_name_42 WHERE location = "taipei"
Find the number of apartments that have no facility.
SELECT count(*) FROM Apartments WHERE apt_id NOT IN (SELECT apt_id FROM Apartment_Facilities)
How many times is player Stanislas Wawrinka on the list?
SELECT COUNT(points) AS defending FROM table_26218783_6 WHERE player = "Stanislas Wawrinka"
What is the number of State Province of France that doesn't have a State Province Code?
SELECT T1.CountryRegionCode FROM StateProvince AS T1 INNER JOIN CountryRegion AS T2 ON T1.CountryRegionCode = T2.CountryRegionCode WHERE T2.Name = 'France' AND T1.IsOnlyStateProvinceFlag = 1
What was the Nominated Work earlier than 2003?
SELECT nominated_work FROM table_name_62 WHERE year < 2003
How many Indians were admitted in 2001?
SELECT indians_admitted FROM table_1717824_3 WHERE year = 2001
What septembers are 17.1 in December?
SELECT december FROM table_15945862_1 WHERE september = "17.1"
What year was the role of Rachel active in TV?
SELECT year_active FROM table_name_83 WHERE role = "rachel"
State the name of research postgraduate student among Professor Zhihua Zhou's research assistants.
SELECT T3.f_name, T3.l_name FROM prof AS T1 INNER JOIN RA AS T2 ON T1.prof_id = T2.prof_id INNER JOIN student AS T3 ON T2.student_id = T3.student_id WHERE T1.first_name = 'Zhihua' AND T3.type = 'RPG' AND T1.last_name = 'Zhou'
What year did the team who played at the Scottrade Center leave the city?
SELECT MIN(left_st_louis) FROM table_21564794_3 WHERE venue = "Scottrade Center"
How many games played have 4.7 as points per game?
SELECT games_played FROM table_2387461_1 WHERE points_per_game = "4.7"
Show the order ids and the number of items in each order.
SELECT order_id , count(*) FROM Order_items GROUP BY order_id
What is the minimum enrollment of the cyclones?
SELECT MIN(enrollment) FROM table_20190834_1 WHERE team_name = "Cyclones"
Name the horror movies with positive ratings greater than 7.
SELECT T1.title FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T2.genre_id = T3.genre_id WHERE T3.genre_name = 'Horror' AND T1.vote_average > 7
What are the names of the venues in Abu Dhabi?
SELECT T1.Venue_Name FROM Venue AS T1 INNER JOIN City AS T2 ON T1.City_Id = T2.City_Id WHERE T2.City_Name = 'Abu Dhabi'
How many customers are there?
SELECT count(*) FROM Customers;
On what date were the most events logged on devices for 40-year-old male users?
SELECT T.timestamp FROM ( SELECT T2.timestamp, COUNT(T2.event_id) AS num FROM gender_age AS T1 INNER JOIN events_relevant AS T2 ON T1.device_id = T2.device_id WHERE T1.gender = 'M' AND T1.age = 40 GROUP BY T2.timestamp ) AS T ORDER BY T.num DESC LIMIT 1
how many areas were in the election in 1912
SELECT COUNT(district) FROM table_1342379_10 WHERE first_elected = 1912
What was the total number of the games that player Id "rutlewa01" played in 1967?
SELECT GP FROM Goalies WHERE playerID = 'rutlewa01' AND year = 1967
Advisor 1121 has how many students?
SELECT COUNT(*) FROM Student WHERE Advisor = 1121
What is the receipt date of the document with id 3?
SELECT receipt_date FROM Documents WHERE document_id = 3
Which staff members are assigned to the problem with id 1? Give me their first and last names.
SELECT DISTINCT staff_first_name , staff_last_name FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T2.problem_id = 1
What is Date From, when Moving To is "Birmingham City"?
SELECT date_from FROM table_name_46 WHERE moving_to = "birmingham city"
How many times was the result is hired by serepisos?
SELECT COUNT(hometown) FROM table_26263322_1 WHERE result = "Hired by Serepisos"
What Year had a Result of 34-25?
SELECT AVG(year) FROM table_name_44 WHERE result = "34-25"
Gives the home page of the conference where the paper "Increasing the Concurrency in Estelle" is presented.
SELECT DISTINCT T2.HomePage FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.Title = 'Increasing the Concurrency in Estelle'
What is the percentage of restaurants that serve American food in Dublin city?
SELECT CAST(SUM(IIF(food_type = 'american food', 1, 0)) AS REAL) * 100 / COUNT(id_restaurant) FROM generalinfo WHERE city = 'dublin'
How many people directed the episode that aired on February 5, 1968?
SELECT COUNT(director) FROM table_25800134_12 WHERE airdate = "February 5, 1968"
Who won the Men's Doubles when Karina de Wit won the Women's Singles?
SELECT mens_doubles FROM table_12164707_1 WHERE womens_singles = "Karina de Wit"
What is the age of the youngest female device user?
SELECT MIN(age) FROM gender_age WHERE gender = 'F'
Is MP4 the most popular format?
SELECT formats FROM files GROUP BY formats ORDER BY COUNT ( * ) DESC LIMIT 1
What was the date of the game that lasted 75:43?
SELECT date FROM table_name_93 WHERE length_of_game = "75:43"
On August 10, what was the record against the Expos?
SELECT record FROM table_name_21 WHERE opponent = "expos" AND date = "august 10"
show the problem status code on Middleware
SELECT problem_status_code FROM problem_log WHERE problem_category_code = 'Middleware'
What was 1948's pick?
SELECT pick FROM table_name_72 WHERE year = 1948
What is the total share (in percent) of all the channels owned by CCTV?
SELECT sum(Share_in_percent) FROM channel WHERE OWNER = 'CCTV'
What are the notes for the time at 3:19.167?
SELECT notes FROM table_name_85 WHERE time = "3:19.167"
Where did Geelong play as the away team?
SELECT venue FROM table_name_14 WHERE away_team = "geelong"
What is Series, when Date is "June 7"?
SELECT series FROM table_name_74 WHERE date = "june 7"
In what year did the episodes titled DWB get an award?
SELECT DISTINCT T1.year FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T2.title = 'DWB' AND T1.result = 'Winner'
What is the Lomavren associated with a Persian of se?
SELECT lomavren FROM table_name_32 WHERE persian = "se"
What are their countries?
SELECT country FROM artist WHERE artist_id NOT IN ( SELECT artist_id FROM exhibition )
What is the Name of the stage with a Length of 16.62km and Time of 15:10?
SELECT name FROM table_name_11 WHERE length = "16.62km" AND time = "15:10"
Can you tell me the College/Junior/Club Team that has the Position of defence, and the Nationality of czechoslovakia?
SELECT college_junior_club_team FROM table_name_58 WHERE position = "defence" AND nationality = "czechoslovakia"
Return the duration of the actor with the greatest age.
SELECT Duration FROM actor ORDER BY Age DESC LIMIT 1
What are the song titles on the album "A Kiss Before You Go: Live in Hamburg"?
SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE T1.title = "A Kiss Before You Go: Live in Hamburg"
Find the names of the visitors whose membership level is higher than 4, and order the results by the level from high to low.
SELECT name FROM visitor WHERE Level_of_membership > 4 ORDER BY Level_of_membership DESC
Which Senior status has a Chief Judge of —, a Reason for termination of death, and Active service of 1967–1983?
SELECT senior_status FROM table_name_18 WHERE chief_judge = "—" AND reason_for_termination = "death" AND active_service = "1967–1983"
What is the Tyre for the united states grand prix?
SELECT tyre FROM table_name_5 WHERE race = "united states grand prix"
Who are the drivers with 133 laps in OC class?
SELECT drivers FROM table_name_23 WHERE laps = 133 AND class = "oc"
Who was the home team when the VFL played Kardinia Park?
SELECT home_team AS score FROM table_name_27 WHERE venue = "kardinia park"
How many students are affected by food related allergies?
SELECT count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy = T2.allergy WHERE T2.allergytype = "food"
Which Home team has a Game of game 5?
SELECT home_team FROM table_name_85 WHERE game = "game 5"
How much Gold has a Silver smaller than 3, and a Total of 9, and a Bronze smaller than 1?
SELECT COUNT(gold) FROM table_name_26 WHERE silver < 3 AND total = 9 AND bronze < 1
The episode with production code 9abx02 was originally aired on what date?
SELECT original_air_date FROM table_10088101_1 WHERE production_code = "9ABX02"
Which MWEHL team has player Ben Johnson?
SELECT mwehl_team FROM table_name_29 WHERE player = "ben johnson"
What is the total number for July with less than 8.05 in October, more than 4.46 in December, and more than 6.79 in November?
SELECT COUNT(july) FROM table_name_12 WHERE october < 8.05 AND december > 4.46 AND november > 6.79
What is Run 1, when Team is "Italy (ITA) Italy I"?
SELECT run_1 FROM table_name_15 WHERE team = "italy (ita) italy i"
Who visited on April 29?
SELECT visitor FROM table_name_35 WHERE date = "april 29"
what's the preliminaries with average being 9.135
SELECT preliminaries FROM table_11970261_2 WHERE average = "9.135"
Which race has a Margin of 8?
SELECT race FROM table_name_5 WHERE margin = "8"
Complaint about Credit Card mostly came from clients of which age group?
SELECT SUM(CASE WHEN T1.age > 13 AND T1.age <= 19 THEN 1 ELSE 0 END), SUM(CASE WHEN T1.age > 19 AND T1.age <= 65 THEN 1 ELSE 0 END) AS adult , SUM(CASE WHEN T1.age > 65 THEN 1 ELSE 0 END) AS elder FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.Product = 'Credit card'
Name all the list titles created by user 4208563.
SELECT list_title FROM lists WHERE user_id LIKE 4208563
What is the name of the most recently founded organization in Saudi Arabia?
SELECT T1.Name FROM organization AS T1 INNER JOIN country AS T2 ON T1.Country = T2.Code WHERE T2.Name = 'Saudi Arabia' ORDER BY T1.Established DESC LIMIT 1
What is the total surface area of the countries in the Caribbean region?
SELECT SUM(SurfaceArea) FROM country WHERE Region = "Caribbean"
What is the class of the word who's second participle is laug?
SELECT class FROM table_1745843_5 WHERE part_2 = "laug"
List all the username and passwords of users with the most popular role.
SELECT user_name , password FROM users GROUP BY role_code ORDER BY count(*) DESC LIMIT 1
Compute the average time in minute for each age group
SELECT CAST(SUM(CASE WHEN T1.age > 13 AND T1.age <= 19 THEN 60 * strftime('%H', ser_time) + strftime('%M', ser_time) + strftime('%S', ser_time) / 60 ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.age > 13 AND T1.age <= 19 THEN 1 ELSE 0 END) AS teenagerAverageMins, CAST(SUM(CASE WHEN T1.age > 19 AND T1.age <= 65 THEN 60 * strftime('%H', ser_time) + strftime('%M', ser_time) + strftime('%S', ser_time) / 60 ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.age > 19 AND T1.age <= 65 THEN 1 ELSE 0 END) AS adultAverageMins , CAST(SUM(CASE WHEN T1.age > 65 THEN 60 * strftime('%H', ser_time) + strftime('%M', ser_time) + strftime('%S', ser_time) / 60 ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.age > 65 THEN 1 ELSE 0 END) AS elderAverageMins FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client`
List all the junior senators in 1997.
SELECT T1.first_name, T1.last_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.start LIKE '1997%' AND T2.state_rank = 'junior'
what is the minister name of the party with 2 events
SELECT T2.Minister FROM party_events AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id HAVING count ( * ) = 2
Name the game site with result of l 7-38
SELECT game_site FROM table_name_36 WHERE result = "l 7-38"
How many flights have destination ATO?
SELECT count(*) FROM FLIGHTS WHERE DestAirport = "ATO"
What was its description?
SELECT T1.fault_log_entry_id , T1.fault_description FROM Fault_Log AS T1 JOIN Fault_Log_Parts AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id GROUP BY T1.fault_log_entry_id ORDER BY count ( * ) DESC LIMIT 1
What was the attendance when Hawthorn played as home team?
SELECT SUM(crowd) FROM table_name_25 WHERE home_team = "hawthorn"
Provide the page IDs and name of the menu which had the highest page count.
SELECT T1.page_number, T2.name FROM MenuPage AS T1 INNER JOIN Menu AS T2 ON T2.id = T1.menu_id ORDER BY T2.page_count DESC LIMIT 1
Who was asked 20 questions in the issue where the cover model is Linda Brava?
SELECT 20 AS _questions FROM table_1566850_9 WHERE cover_model = "Linda Brava"
What percentage of elderly customers who are never married in the place with geographic ID 24?
SELECT CAST(SUM(CASE WHEN T1.MARITAL_STATUS = 'never married' THEN 1.0 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.GEOID = 24
What is the total number scored for the team that had 19 points and a position larger than 4?
SELECT COUNT(scored) FROM table_name_48 WHERE position > 4 AND points = 19
What is the total number of runs scored by the batsmen during the 2nd inning of the match ID 335988?
SELECT SUM(Runs_Scored) FROM Batsman_Scored WHERE Match_Id = 335988 AND Innings_No = 2
What is the total quantity of "Telescoping Adjustable Floor Lamp" ordered from central superstores?
SELECT SUM(T1.Quantity) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'Telescoping Adjustable Floor Lamp'
Which Touchdowns is the lowest one that has Extra points smaller than 14, and a Player of white, and Points smaller than 5?
SELECT MIN(touchdowns) FROM table_name_98 WHERE extra_points < 14 AND player = "white" AND points < 5
How many number of donations did the project 'A Rug For Reaching Readers' get?
SELECT SUM(T2.donation_total) FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.title LIKE 'A Rug For Reaching Readers'
List the names of shops that have no devices in stock.
SELECT Shop_Name FROM shop WHERE NOT Shop_ID IN (SELECT Shop_ID FROM stock)