sentence
stringlengths
3
347
sql
stringlengths
18
804
What gender is allowed to attend the school that has a decile of 6 and a roll that is less than 179?
SELECT gender FROM table_name_69 WHERE decile = 6 AND roll < 179
Thank you for that info. Now, how many 'cutlery' products have the daily hire cost lower than 20?
SELECT count ( product_id ) FROM products_for_hire WHERE product_type_code = 'Cutlery' AND daily_hire_cost < 20
What is the lowest attendance when the h/A is H in the Semi-Finals Second Leg?
SELECT MIN(attendance) FROM table_name_73 WHERE h___a = "h" AND round = "semi-finals second leg"
When does week 11 start?
SELECT date FROM table_name_25 WHERE week = "11"
Which area 2006 km² has an area 1996 km² of 26.39, and a pop 2006 smaller than 18,610?
SELECT MIN(area_2006_km²) FROM table_name_94 WHERE area_1996_km² = 26.39 AND pop_2006 < 18 OFFSET 610
List the name and residence for players whose occupation is not "Researcher".
SELECT Player_name , residence FROM player WHERE Occupation != "Researcher"
What is the highest number of nominations by Taoiseach of the composition with an administrative panel greater than 0 and an industrial and commercial panel less than 1?
SELECT MAX(nominated_by_the_taoiseach) FROM table_name_11 WHERE administrative_panel > 0 AND industrial_and_commercial_panel < 1
What was the record when the high rebound was Deandre Jordan (11)?
SELECT record FROM table_name_63 WHERE high_rebounds = "deandre jordan (11)"
What is the NBA Draft status of the person who went to college at LSU?
SELECT nba_draft FROM table_name_38 WHERE college = "lsu"
Please list the name(s) of the tracks in the playlist "Movies".
SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T3.id = T2.playlist_id WHERE T3.name = "Movies"
Find the total and average amount paid in claim headers.
SELECT sum(amount_piad) , avg(amount_piad) FROM claim_headers
In complaints about the credit card product, list the phone number of the oldest client.
SELECT T1.phone FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.Product = 'Credit card' ORDER BY T1.age DESC LIMIT 1
What is the percentage of complaints about the late fee issue whose priority is 2 in 2017?
SELECT CAST(SUM(CASE WHEN T1.priority = 2 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE strftime('%Y', T1.`Date received`) = '2017'
What phone number does alderman Emma Mitts have to call if she wants to speak to the commander in charge of the investigation of the crimes that have occurred in her ward?
SELECT T3.phone FROM Ward AS T1 INNER JOIN Crime AS T2 ON T2.ward_no = T1.ward_no INNER JOIN District AS T3 ON T3.district_no = T2.district_no WHERE T1.alderman_first_name = 'Emma' AND T1.alderman_last_name = 'Mitts'
What are the first and last names of all the employees and how many people report to them?
SELECT T2.first_name , T2.last_name , count(T1.reports_to) FROM employees AS T1 JOIN employees AS T2 ON T1.reports_to = T2.id GROUP BY T1.reports_to ORDER BY count(T1.reports_to) DESC LIMIT 1;
Which country has the player Johnny Miller?
SELECT country FROM table_name_58 WHERE player = "johnny miller"
Who was the home team on the May 2 game?
SELECT home FROM table_name_30 WHERE date = "may 2"
Which series had a title of Boyhood Daze?
SELECT series FROM table_name_78 WHERE title = "boyhood daze"
How much does the car accelerate that makes amc hornet sportabout (sw)?
SELECT T1.Accelerate FROM CARS_DATA AS T1 JOIN CAR_NAMES AS T2 ON T1.Id = T2.MakeId WHERE T2.Make = 'amc hornet sportabout (sw)';
List the names of wrestlers in descending order of days held.
SELECT Name FROM wrestler ORDER BY Days_held DESC
Who is the youngest player to have played during the 1997-1998 season for OHL League?
SELECT DISTINCT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '1997-1998' AND T1.LEAGUE = 'OHL' ORDER BY T2.birthdate DESC LIMIT 1
Among the USA players, who has the lightest weight?
SELECT T2.PlayerName FROM weight_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.weight_id = T2.weight WHERE T2.nation = 'USA' ORDER BY T1.weight_in_lbs ASC LIMIT 1
How did the manager replaced by Wolfgang Frank depart?
SELECT manner_of_departure FROM table_name_93 WHERE replaced_by = "wolfgang frank"
Which crew member of the simpson 20s is the oldest?
SELECT name FROM Person WHERE birthdate IS NOT NULL ORDER BY birthdate ASC LIMIT 1;
Please list the age and famous title of artists in descending order of age.
SELECT Famous_Title, Age FROM artist ORDER BY Age DESC
For any rating where the name of reviewer is the same as the director of the movie, return the reviewer name, movie title, and number of stars.
SELECT DISTINCT T3.name , T2.title , T1.stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID JOIN Reviewer AS T3 ON T1.rID = T3.rID WHERE T2.director = T3.name
Which order's shipment tracking number is "3452"? Give me the id of the order.
SELECT order_id FROM shipments WHERE shipment_tracking_number = "3452"
Which country with a city with a population between 50,000 and 300,000 inhabitants and which is a member of an organization established between 03/01/1991 and 04/30/1991 is also a member of the EBRD?
SELECT T2.Country FROM country AS T1 INNER JOIN isMember AS T2 ON T1.Code = T2.Country INNER JOIN organization AS T3 ON T3.Country = T2.Country INNER JOIN city AS T4 ON T4.Country = T3.Country WHERE T3.Abbreviation = 'EBRD' AND T4.Population BETWEEN 50000 AND 300000 AND T3.Established BETWEEN '1991-01-31' AND '1991-04-30'
What date was Apes of Wrath written by Friz Freleng, production number higher than 1496 from series mm released?
SELECT release_date FROM table_name_37 WHERE director = "friz freleng" AND production_number > 1496 AND series = "mm" AND title = "apes of wrath"
Hinkley Locomotive Works is listed as what number as it has a works number smaller than 1563?
SELECT number FROM table_name_7 WHERE works_number < 1563 AND builder = "hinkley locomotive works"
How many students are under advisor 415?
SELECT COUNT(*) FROM advisedBy WHERE p_id_dummy = 415
In what district was incumbent first elected in 1938?
SELECT district FROM table_1342013_42 WHERE first_elected = 1938
Tell me the highest wins for year less than 2000 and best finish of 4 and tournaments played less than 3
SELECT MAX(wins) FROM table_name_42 WHERE year < 2000 AND best_finish = "4" AND tournaments_played < 3
What are the id and zip code of the address with the highest monthly rental?
SELECT T2.address_id , T1.zip_postcode FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id = T2.address_id ORDER BY monthly_rental DESC LIMIT 1
What's the highest grid of Ronnie Bremer, who had more than 18 points?
SELECT MAX(grid) FROM table_name_91 WHERE driver = "ronnie bremer" AND points > 18
What Locomotive was Delivered as T414?
SELECT locomotive FROM table_name_2 WHERE delivered_as = "t414"
List ther users who gave the worst rating for movie 'Love Will Tear Us Apart'.
SELECT T1.user_id FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'Love Will Tear Us Apart' AND T1.rating_score = 1
what is th area where the municipaity is labrador?
SELECT area__km²_ FROM table_1691800_2 WHERE municipality = "Labrador"
how many stations there
SELECT count ( * ) from station
Provide the start date, end date, and party of Pearl Peden Oldfield.
SELECT T2.start, T2.`end`, T2.party FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.first_name = 'Pearl' AND T1.middle_name = 'Peden' AND T1.last_name = 'Oldfield'
What is the document type for document name Learning English?
SELECT document_type_code FROM documents WHERE document_name = "Learning English"
What is the title and director for the movie with highest worldwide gross in the year 2000 or before?
SELECT title , director FROM movie WHERE YEAR <= 2000 ORDER BY gross_worldwide DESC LIMIT 1
Is word id "88" the word id for title "Animals"?
SELECT CASE WHEN COUNT(T1.pid) > 0 THEN 'YES' ELSE 'NO' END AS YORN FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid WHERE T2.wid = 88 AND T1.title = 'Animals'
What is the first name and last name of the student who have most number of sports?
SELECT T2.Fname , T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID GROUP BY T1.StuID ORDER BY count(*) DESC LIMIT 1
how many on the airport table
SELECT count ( * ) FROM airports
Show all destinations and the number of flights to each destination.
SELECT destination , count(*) FROM Flight GROUP BY destination
Who is the "CTO" of club "Hopkins Student Enterprises"? Show the first name and last name.
SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Hopkins Student Enterprises" AND t2.position = "CTO"
What is the position of Dale Craigwell?
SELECT position FROM table_name_67 WHERE player = "dale craigwell"
Which title has origianal sound entertainment as its label?
SELECT title FROM table_name_85 WHERE label = "origianal sound entertainment"
Find name of the project that needs the least amount of time to finish and the name of scientists who worked on it.
SELECT T2.name, T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.SSN WHERE T2.hours = (SELECT MIN(hours) FROM projects)
What is the highest 2007 value with a 1985 value greater than 52, a 1987 value greater than 130, and a 1990 less than 1990?
SELECT MAX(2007) FROM table_name_56 WHERE 1985 > 52 AND 1987 > 130 AND 1990 < 1990
What is the name of every college in alphabetical order that has more than 18000 students enrolled?
SELECT cName FROM College WHERE enr > 18000 ORDER BY cName
What is the total number of years wehre anna thompson had a 3rd place result at edinburgh, scotland?
SELECT COUNT(year) FROM table_name_28 WHERE result = "3rd" AND venue = "edinburgh, scotland"
What was the record when the visitor was Cleveland in Dallas?
SELECT record FROM table_name_59 WHERE visitor = "cleveland" AND home = "dallas"
List the names of editors who are older than 25.
SELECT Name FROM editor WHERE Age > 25
Show the most common headquarter for companies.
SELECT Headquarters FROM company GROUP BY Headquarters ORDER BY COUNT(*) DESC LIMIT 1
What is sesame's typical selling price?
SELECT typical_selling_price from products where product_name = "sesame"
Which frequency belongs to the beat branding?
SELECT frequency FROM table_name_58 WHERE branding = "the beat"
Which space agency launched the herschel space observatory?
SELECT space_agency FROM table_name_17 WHERE name = "herschel space observatory"
Provide the google entity ID of the senators in New York.
SELECT T1.google_entity_id_id FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.type = 'sen' AND T2.state = 'NY'
what's the country/region with seasons and winners being season 1, 2012: demetra malalan
SELECT country_region FROM table_13779832_1 WHERE seasons_and_winners = "Season 1, 2012: Demetra Malalan"
Where did McCain get 20226 votes?
SELECT county FROM table_20350118_1 WHERE mccain_number = 20226
What is the lowest number of places for Sherri Baier / Robin Cowan when ranked lower than 1?
SELECT MIN(places) FROM table_name_70 WHERE name = "sherri baier / robin cowan" AND rank < 1
Which artist speaks croatian?
SELECT artist FROM table_name_32 WHERE language = "croatian"
Which artist does the album "Balls to the Wall" belong to?
SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId = T2.ArtistId WHERE T1.Title = "Balls to the Wall"
Which store owns most items?
SELECT store_id FROM inventory GROUP BY store_id ORDER BY COUNT(*) DESC LIMIT 1
who are all the players when season mvp is less than 1.0 and second team is less than 1.0
SELECT player FROM table_26130295_3 WHERE season_mvp < 1.0 AND second_team < 1.0
What is the status code, mobile phone number and email address of the customer with last name as Kohler or first name as Marina?
SELECT customer_status_code , cell_mobile_phone_number , email_address FROM Customers WHERE first_name = "Marina" OR last_name = "Kohler"
What are all company names that have a corresponding movie directed in the year 1999?
SELECT T2.company_name FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id = T2.movie_id WHERE T1.year = 1999
Calculate the percentage of movie titles with a screen length of more than 120 minutes that have a category of horror movies.
SELECT CAST(SUM(IIF(T3.`name` = 'Horror', 1, 0)) * 100 / COUNT(T1.film_id) AS REAL) FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T3.category_id = T2.category_id WHERE T1.length > 120
What is the year leicester was established?
SELECT MAX(established) FROM table_142950_1 WHERE location = "Leicester"
What is the email of the customer that has the credit card with the earliest date valid from?
SELECT T2.customer_email FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T1.date_valid_from = ( SELECT MIN ( date_valid_from ) FROM Customers_Cards )
What is the solution path for method number 3?
SELECT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Id = 3
What is the synchronisation for the controlnet fieldbus?
SELECT synchronisation FROM table_name_70 WHERE fieldbus = "controlnet"
What points has 18 for the played and bala rfc as the club?
SELECT points_for FROM table_name_31 WHERE played = "18" AND club = "bala rfc"
Who is the trainer for Cherry Valley Farm?
SELECT trainer FROM table_name_94 WHERE owner = "cherry valley farm"
With chem-s as the dative, what is the ergative?
SELECT ergative FROM table_name_85 WHERE dative = "chem-s"
What is the total number of byes that has 11 wins and a Tallangatta DFL of Barnawartha?
SELECT COUNT(byes) FROM table_name_3 WHERE wins = 11 AND tallangatta_dfl = "barnawartha"
What was the score of the Home team in the game that had the Away team of south melbourne?
SELECT home_team AS score FROM table_name_29 WHERE away_team = "south melbourne"
What is the acreage of the Maghereen in the civil parish of Macroom?
SELECT COUNT(area__acres__) FROM table_30120761_1 WHERE civil_parish = "Macroom" AND townland = "Maghereen"
Please list the top three employees with the most unused sick leave along with their position titles.
SELECT JobTitle FROM Employee ORDER BY SickLeaveHours DESC LIMIT 3
what's the date of birth with end of term being 2april1969
SELECT date_of_birth FROM table_12134383_1 WHERE end_of_term = "2April1969"
What is the minimum, maximum, and average market value for every company?
SELECT min(market_value) , max(market_value) , avg(market_value) FROM company
Which Laps have a Grid larger than 8, and a Rider of anthony west?
SELECT MAX(laps) FROM table_name_60 WHERE grid > 8 AND rider = "anthony west"
State the publisher name of the game "ModNation Racers".
SELECT T1.publisher_name FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id INNER JOIN game AS T3 ON T2.game_id = T3.id WHERE T3.game_name = 'ModNation Racers'
How many rooms in each building have a capacity of over 50?
SELECT count(*) , building FROM classroom WHERE capacity > 50 GROUP BY building
Find the id of the product ordered the most often on invoices.
SELECT Product_ID FROM INVOICES GROUP BY Product_ID ORDER BY COUNT(*) DESC LIMIT 1
What is the most popular full name of the actors?
SELECT first_name , last_name FROM actor GROUP BY first_name , last_name ORDER BY count(*) DESC LIMIT 1
Show the ages of gymnasts in descending order of total points.
SELECT T2.Age FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID ORDER BY T1.Total_Points DESC
How many races has there been?
SELECT count ( * ) FROM races
What was the surface tye during the match with the opponent of richard fromberg?
SELECT surface FROM table_name_3 WHERE opponent = "richard fromberg"
How many total movie ratings are there?
SELECT count ( * ) FROM rating
How many names have a country of civ?
SELECT COUnT AS name FROM table_22810095_8 WHERE country = "CIV"
Calculate the average inspections per year done by Jessica Anthony from 2010 to 2017.
SELECT CAST(COUNT(CASE WHEN T1.first_name = 'Jessica' AND T1.last_name = 'Anthony' THEN T2.inspection_id ELSE 0 END) AS REAL) / 8 FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE strftime('%Y', T2.inspection_date) BETWEEN '2010' AND '2017'
What is the building ID with apartment Suite 645?
select building_id from Apartments where apt_number = 'Suite 645'
What is the total number of enrollment of schools that do not have any goalie player?
SELECT sum(enr) FROM college WHERE cName NOT IN (SELECT cName FROM tryout WHERE pPos = "goalie")
How many goals were conceded by the team with more than 21 points more than 5 draws and less than 18 games played?
SELECT SUM(goals_conceded) FROM table_name_81 WHERE draw > 5 AND points > 21 AND played < 18
Name the style for 27
SELECT style FROM table_28677723_14 WHERE total = 27
If the player is Hashan Tillakaratne, what is the catches minimum?
SELECT MIN(catches) FROM table_26041144_16 WHERE player = "Hashan Tillakaratne"
What is the lowest Total for rank 3 with more than 4 gold?
SELECT MIN(total) FROM table_name_13 WHERE rank = "3" AND gold > 4