sentence
stringlengths
3
347
sql
stringlengths
18
804
Show each premise type and the number of premises in that type.
SELECT premises_type , count(*) FROM premises GROUP BY premises_type
Indicate the last number of each street.
SELECT street_number FROM address
WHAT IS THE WEEK WITH AN ATTENDANCE OF 75,555?
SELECT SUM(week) FROM table_name_23 WHERE attendance = "75,555"
How many lanes have 2 as the heat, and susanna kallur as the name?
SELECT SUM(lane) FROM table_name_77 WHERE heat = 2 AND name = "susanna kallur"
Give the Wikipedia IDs of historical legislators who are Readjuster Democrats.
SELECT T2.wikipedia_id FROM `historical-terms` AS T1 INNER JOIN historical AS T2 ON T2.bioguide_id = T1.bioguide WHERE T1.party = 'Readjuster Democrat'
On what date did Hudswell Clarke build the locomotive with 0-6-0 ST wheel arrangements?
SELECT date_built FROM table_1157867_2 WHERE wheel_arrangement = "0-6-0 ST" AND builder = "Hudswell Clarke"
What are the wines that have prices higher than 50 and made of Red color grapes?
SELECT T2.Name FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "Red" AND T2.price > 50
Name the flight up for 10 december 1982 19:02:36 utc
SELECT flight_up FROM table_245801_1 WHERE landing_date = "10 December 1982 19:02:36 UTC"
List at least 10 films that falls into the Horror category.
SELECT T1.title FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T3.name = 'Horror'
What is the 2012 election results for locations whose representative is Barbara Lee?
SELECT 2012 AS _election_results FROM table_19283806_4 WHERE representative = "Barbara Lee"
Which customers use "Cash" for payment method? Return the customer names.
SELECT customer_name FROM customers WHERE payment_method = "Cash"
Which paper is published in an institution in "USA" and have "Turon" as its second author?
SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid = t2.authid JOIN papers AS t3 ON t2.paperid = t3.paperid JOIN inst AS t4 ON t2.instid = t4.instid WHERE t4.country = "USA" AND t2.authorder = 2 AND t1.lname = "Turon"
Which album is the royal g's club mix version, which is remixed by royal garden sound, from?
SELECT album FROM table_name_20 WHERE remixed_by = "royal garden sound" AND version = "royal g's club mix"
How many inspections were done under the personnel category?
SELECT COUNT(T1.inspection_id) FROM violation AS T1 INNER JOIN inspection_point AS T2 ON T1.point_id = T2.point_id WHERE T2.category = 'Personnel'
How much is the processed time of the method whose tokenized name is "about box1 dispose"? Indicate the language of the method.
SELECT DISTINCT T1.ProcessedTime, T2.Lang FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.NameTokenized = 'about box1 dispose'
What is the to par of player hunter mahan?
SELECT to_par FROM table_name_87 WHERE player = "hunter mahan"
What is the total number of Mark, when Country is "Russia", and when React is less than 0.165?
SELECT COUNT(mark) FROM table_name_65 WHERE country = "russia" AND react < 0.165
How many times did Anna Himes use her Mastercard when paying between 12/25/2014 and 5/20/2016 ?
SELECT COUNT(T2.CustomerID) FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.First = 'Anna' AND T1.Last = 'Himes' AND T2.CreditCardType = 'MasterCard' AND T2.TransactionDate BETWEEN '2014-12-25' AND '2016-05-20'
Tell me the venue for score of 82-0
SELECT venue FROM table_name_58 WHERE score = "82-0"
How many players bowl in the legbreak style?
SELECT T1.Player_Name FROM Player AS T1 INNER JOIN Bowling_Style AS T2 ON T1.Bowling_skill = T2.Bowling_Id WHERE T2.Bowling_skill = 'Legbreak'
What is the KINKA 1.3 when the developer is yes and the support version is support mo 230?
SELECT kinka_13 FROM table_name_11 WHERE kinka_developer = "yes" AND version = "support mo 230"
What's the game with an attendance of 71,962?
SELECT MIN(game) FROM table_name_53 WHERE attendance = 71 OFFSET 962
where is Mascot of quakers?
SELECT location FROM table_name_35 WHERE mascot = "quakers"
List all webkit versions when the major version was Safari 3, and the minor version was 3.1.2.
SELECT webkit_version FROM table_24257833_4 WHERE major_version = "Safari 3" AND minor_version = "3.1.2"
Which school is student829 enrolled in?
SELECT school FROM enrolled WHERE name = 'student829'
How many students enrolled in Course ID 302?
SELECT count ( * ) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T2.course_id = 302
Give the neighborhood name of West Englewood community.
SELECT T1.neighborhood_name FROM Neighborhood AS T1 INNER JOIN Community_Area AS T2 ON T1.community_area_no = T2.community_area_no WHERE T2.community_area_name = 'West Englewood'
how many different student ids are there?
SELECT count ( distinct student_id ) from student_course_attendance
What is the gearbox when the torque is torque?
SELECT gearbox FROM table_250230_2 WHERE "torque" = "torque"
What is CFL Team, when Pick # is greater than 34, and when College is Boise State?
SELECT cfl_team FROM table_name_86 WHERE pick__number > 34 AND college = "boise state"
What is the home team of the match with an attendance greater than 202?
SELECT home_team FROM table_name_22 WHERE attendance > 202
What is the description of role code ED?
SELECT role_description FROM ROLES WHERE role_code = "ED"
What tournament did Nadal win and had a nadal of 16?
SELECT tournament FROM table_name_75 WHERE winner = "nadal" AND "nadal" = 16
What was the stage when the winner was luis león sánchez?
SELECT stage FROM table_25580292_13 WHERE winner = "Luis León Sánchez"
List the names of states that have more than 2 parks.
SELECT state FROM park GROUP BY state HAVING count(*) > 2;
What is the difference between the hottest temperature and the coldest temperature in in Fahrenheit on 8/29/2013 for the area where the zip code is 94107?
SELECT SUM(IIF(zip_code = 94107 AND date = '8/29/2013', max_temperature_f - min_temperature_f, 0)) FROM weather
Which current legislator is older, Sherrod Brown or Maria Cantwell?
SELECT official_full_name FROM current WHERE official_full_name = 'Sherrod Brown' OR official_full_name = 'Maria Cantwell' ORDER BY birthday_bio LIMIT 1
Show the ids and names of festivals that have at least two nominations for artworks.
SELECT T1.Festival_ID , 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 GROUP BY T1.Festival_ID HAVING COUNT(*) >= 2
What is the sport with the most scholarship students?
SELECT sportname FROM Sportsinfo WHERE onscholarship = 'Y' GROUP BY sportname ORDER BY count(*) DESC LIMIT 1
Can you tell me the average Points that has a Pts/game larger than 4, and the Nation of england, and the Games smaller than 5?
SELECT AVG(points) FROM table_name_1 WHERE pts_game > 4 AND nation = "england" AND games < 5
Name the number of flaps for 63 points
SELECT COUNT(flaps) FROM table_16908657_1 WHERE points = "63"
How many businesses were founded after 1960 in a nation that wasn't independent?
SELECT COUNT(T3.Name) FROM country AS T1 INNER JOIN politics AS T2 ON T1.Code = T2.Country INNER JOIN organization AS T3 ON T3.Country = T2.Country WHERE T2.Independence = NULL AND STRFTIME('%Y', T3.Established) > '1960'
Calculate the percentage of object samples that are related to street lights.
SELECT CAST(SUM(CASE WHEN T2.OBJ_CLASS = 'street lights' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.OBJ_SAMPLE_ID) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID
On what day was the game that ended in a score of 97-38?
SELECT date FROM table_name_1 WHERE score = "97-38"
What is the current payrate of Rob Walters? Calculate the percentage increment from his previous payrate.
SELECT T2.Rate , (MAX(T2.Rate) - MIN(T2.Rate)) * 100 / MAX(T2.Rate) FROM Person AS T1 INNER JOIN EmployeePayHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.FirstName = 'Rob' AND T1.LastName = 'Walters'
In 2011 which sport had the year award?
SELECT sport FROM table_name_92 WHERE year_of_award = 2011
Name the total number of sinhalese for indian tamil being 177
SELECT COUNT(sinhalese) FROM table_24574438_1 WHERE indian_tamil = 177
Find the id and local authority of the station whose maximum precipitation is higher than 50.
SELECT t2.id, t2.local_authority FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id GROUP BY t1.station_id HAVING MAX(t1.precipitation) > 50
Which call sign has a frequency of FM 105.3?
SELECT call_sign FROM table_name_81 WHERE frequency = "fm 105.3"
What is the home for the away of 4-0?
SELECT home FROM table_name_1 WHERE away = "4-0"
What is the release date for the Chinese title 摸摸瓦力欧制造?
SELECT released_date FROM table_name_46 WHERE chinese_title = "摸摸瓦力欧制造"
Calculate the population of Arab in each country?
SELECT T2.Percentage * T1.Population FROM country AS T1 INNER JOIN ethnicGroup AS T2 ON T1.Code = T2.Country WHERE T2.Name = 'Arab'
What were phoenix's high points?
SELECT high_points FROM table_name_83 WHERE opponent = "phoenix"
In which city is the store with the highest sales order unit price located?
SELECT T2.`City Name` FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE REPLACE(T1.`Unit Price`, ',', '') = ( SELECT REPLACE(T1.`Unit Price`, ',', '') FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID ORDER BY REPLACE(T1.`Unit Price`, ',', '') DESC LIMIT 1 ) ORDER BY REPLACE(T1.`Unit Price`, ',', '') DESC LIMIT 1
How many draws have 1 win, 1 loss, and a Goal Differential of +1?
SELECT SUM(draws) FROM table_name_85 WHERE wins = 1 AND losses = 1 AND goal_differential = "+1"
Name the overall record for road record being 4-3
SELECT overall_record FROM table_22825679_1 WHERE road_record = "4-3"
ok. can you also please give me the name and age of the youngest editor?
SELECT Name, age FROM editor WHERE Age = ( select min ( age ) from editor )
List the top 5 movies from other countries which to language is not in English.
SELECT DISTINCT T1.movieid FROM u2base AS T1 INNER JOIN movies AS T2 ON T1.movieid = T2.movieid WHERE T2.country = 'other' AND T2.isEnglish = 'F' LIMIT 5
What are the prices of products that have never gotten a complaint?
SELECT product_price FROM products WHERE product_id NOT IN (SELECT product_id FROM complaints)
What commune has an area of 12.4 sq.km.?
SELECT commune FROM table_1828368_1 WHERE area__km_2__ = "12.4"
Name the location attendance for april 5
SELECT location_attendance FROM table_17322817_10 WHERE date = "April 5"
Who won the season of 1998?
SELECT winner_season FROM table_name_52 WHERE year = 1998
What years was the player Lonny Baxter in Toronto?
SELECT years_in_toronto FROM table_10015132_2 WHERE player = "Lonny Baxter"
What are the names of tourist attractions that can be reached by walk or is at address 660 Shea Crescent?
SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = "660 Shea Crescent" OR T2.How_to_Get_There = "walk"
What is the percentage of Russian players who have a height of under 200 inch?
SELECT CAST(COUNT(CASE WHEN T1.height_in_cm < 200 AND T2.nation = 'Russia' THEN T2.ELITEID ELSE NULL END) AS REAL) * 100 / COUNT(T2.ELITEID) FROM height_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.height_id = T2.height
What is the name of the customer who has made the minimum amount of payment in one claim?
SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id = t2.policy_id JOIN customers AS t3 ON t2.customer_id = t3.customer_id WHERE t1.amount_piad = (SELECT min(amount_piad) FROM claim_headers)
What was the kickoff time for the December 14, 2003 game?
SELECT kickoff_time FROM table_name_82 WHERE date = "december 14, 2003"
How many episodes have a share of 16.2% and an episode number of less than 1?
SELECT COUNT(total_viewers) FROM table_name_82 WHERE share = "16.2%" AND episode_no < 1
What are the names of the artists who sang the shortest song?
SELECT T1.artist_name FROM song AS T1 JOIN files AS T2 ON T1.f_id = T2.f_id ORDER BY T2.duration LIMIT 1
Which Studio has the Year of 2012 listed and the Movie, Dabangg?
SELECT studio_s_ FROM table_name_22 WHERE year = 2012 AND movie = "dabangg"
How many Latin Americans were there in the Northwest Territories in 2011?
SELECT MIN(latin_americans_2011) FROM table_1939405_2 WHERE province = "Northwest Territories"
What was the date of the Mavericks home game?
SELECT date FROM table_name_25 WHERE home = "mavericks"
Which team has the highest winning rate in year 2000? State the team ID and list down the birth country of it's players.
SELECT DISTINCT T3.tmID, T1.birthCountry FROM Master AS T1 INNER JOIN Scoring AS T2 ON T1.playerID = T2.playerID INNER JOIN ( SELECT year, tmID FROM Teams WHERE year = 2000 ORDER BY W / (W + L) DESC LIMIT 1 ) AS T3 ON T2.tmID = T3.tmID AND T2.year = T3.year
What is the age of the tallest person?
SELECT Age FROM people ORDER BY Height DESC LIMIT 1
Name the fa cup apps for george green
SELECT fa_cup_apps FROM table_19730892_1 WHERE name = "George Green"
What is the share of votes in the 2008 election?
SELECT share_of_votes FROM table_name_44 WHERE election = 2008
What the name of the school where the last win in 2007-08?
SELECT school FROM table_14286908_1 WHERE year_of_last_win = "2007-08"
What is the average age of all the vivo device users?
SELECT AVG(age) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.phone_brand = 'vivo'
What is the home team at the venue mcg?
SELECT home_team FROM table_name_20 WHERE venue = "mcg"
The stamp was 39¢, who was the printer?
SELECT printer FROM table_15635768_1 WHERE face_value = "39¢"
Can you please list the names of all tracks in the playlists of 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"
What was South Melbourne's home team score?
SELECT home_team AS score FROM table_name_90 WHERE home_team = "south melbourne"
What is the name of the wrestler with the fewest days held?
SELECT Name FROM wrestler ORDER BY Days_held ASC LIMIT 1
List apps whose rating is 3.9 and state the translated review of each app.
SELECT T1.App, T2.Translated_Review FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Rating = 3.9
Which type of principal activity, cargo airline or airline, operates the most flights?
SELECT Principal_activities FROM operate_company AS T1 JOIN flight AS t2 ON T1.id = T2.company_id GROUP BY Principal_activities order by count ( * ) limit 1
how many orders there
SELECT count ( * ) FROM orders
Which surface had a partner of Sandrine Testud on November 14, 1999?
SELECT surface FROM table_name_93 WHERE partner = "sandrine testud" AND date = "november 14, 1999"
Show the names of all technicians.
select name from technician
How many students are in each department?
SELECT count(*) , dept_name FROM student GROUP BY dept_name
Show me the count of students for each city
SELECT city_code, count ( * ) FROM student group by city_code
Find the market shares and names of furnitures which no any company is producing in our records.
SELECT Market_Rate , name FROM furniture WHERE Furniture_ID NOT IN (SELECT Furniture_ID FROM furniture_manufacte)
What is the 2 vs 3 when total is bigger than 38?
SELECT AVG(2 AS _vs_3) FROM table_name_52 WHERE total > 38
What's the latest original air date with more than 10 episodes and a DVD Region 2 release date of 23 april 2012?
SELECT MAX(original_air_date) FROM table_name_17 WHERE dvd_region_2_release_date = "23 april 2012" AND number_of_episodes > 10
What is the lowest bronze a team with 9 silvers, a total larger than 13, and more than 13 gold medals has?
SELECT MIN(bronze) FROM table_name_58 WHERE silver = 9 AND total > 13 AND gold > 13
List all the paper that were under the conference homepage URL "http://www.irma-international.org/".
SELECT T1.Title FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T2.HomePage = 'http://www.irma-international.org/'
What are their organization ids?
SELECT organisation_id FROM Projects GROUP BY organisation_id ORDER BY count ( * ) DESC LIMIT 1
Show the name of the shop that have the largest quantity of devices in stock.
SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY SUM(T1.quantity) DESC LIMIT 1
List the name of albums that are released by aritist whose name has 'Led'
SELECT T2.title FROM artists AS T1 JOIN albums AS T2 ON T1.id = T2.artist_id WHERE T1.name LIKE '%Led%'
What is the population density of Hanoi's home country?
SELECT T1.Population / T1.Area FROM country AS T1 INNER JOIN province AS T2 ON T1.Code = T2.Country INNER JOIN city AS T3 ON T3.Province = T2.Name WHERE T3.Name = 'Hanoi'
How many basic or medium undergraduate courses are taught by a professor?
SELECT COUNT(*) FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T3.p_id = T2.p_id WHERE T1.courseLevel = 'Level_300' AND T3.professor = 1