sentence
stringlengths
3
347
sql
stringlengths
18
804
Which rider has a time of +2:11.524?
SELECT rider FROM table_name_92 WHERE time = "+2:11.524"
What is the average annual revenue of customers who have shipment weight of less than 65000 pounds?
SELECT AVG(T1.annual_revenue) FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE T2.weight < 65000
How many districts are in Idaho?
SELECT COUNT(district) FROM `current-terms` WHERE state = 'ID'
List all the items from "Sax Arts & Crafts" and the zip code of the schools that received them.
SELECT T2.school_zip, T1.item_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.vendor_name = 'Sax Arts & Crafts'
What's the avatar image of the user who created the movie list "250 Favourite Films"?
SELECT T2.user_avatar_image_url FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.list_id = T2.list_id AND T1.user_id = T2.user_id WHERE T1.list_title = '250 Favourite Films'
How many debates did they win total?
SELECT count ( * ) FROM debate_people WHERE If_Affirmative_Win = 'T'
Find the name of each user and number of tweets tweeted by each of them.
SELECT T1.name, COUNT(*) FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid
Who was the away team for tie number 9?
SELECT away_team FROM table_name_6 WHERE tie_no = "9"
Which College has a Round of 11, and a Pick of 14?
SELECT college FROM table_name_53 WHERE round = 11 AND pick = 14
What are the comments when the implementation is software running on central processor module?
SELECT comments FROM table_1206114_2 WHERE implementation = "Software running on Central Processor Module"
Name the height for demetrius jemison
SELECT height FROM table_25360865_1 WHERE name = "Demetrius Jemison"
Show the names of journalists that have reported more than one event.
SELECT T3.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID GROUP BY T3.Name HAVING COUNT(*) > 1
Provide the categories and fines for the inspections done by Lisa Tillman in January 2014.
SELECT DISTINCT T4.category, T3.fine FROM inspection AS T1 INNER JOIN employee AS T2 ON T1.employee_id = T2.employee_id INNER JOIN violation AS T3 ON T1.inspection_id = T3.inspection_id INNER JOIN inspection_point AS T4 ON T3.point_id = T4.point_id WHERE T2.first_name = 'Lisa' AND T2.last_name = 'Tillman' AND strftime('%Y-%m', T1.inspection_date) = '2014-01'
What is the lowest week that has 7:15 p.m. as the time (cst) and fedexfield as the game site?
SELECT MIN(week) FROM table_name_53 WHERE time__cst_ = "7:15 p.m." AND game_site = "fedexfield"
What is Final, when Team is United States (USA) USA I?
SELECT final FROM table_name_66 WHERE team = "united states (usa) usa i"
Among the Yelp_Businesses which are still running, how many of them fall under the category of "Food"?
SELECT COUNT(T3.business_id) 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 INNER JOIN Tips AS T4 ON T3.business_id = T4.business_id WHERE T1.category_name LIKE 'Food' AND T3.active LIKE 'TRUE'
What is the to par that has england as the country, with 66 as a score?
SELECT to_par FROM table_name_95 WHERE country = "england" AND score = 66
When grid is less than 7, laps are greater than 17, and time/retired is + 1:35.6, who is the constructor?
SELECT constructor FROM table_name_84 WHERE laps > 17 AND grid < 7 AND time_retired = "+ 1:35.6"
Find the locations that have more than one movie theater with capacity above 300.
SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING COUNT(*) > 1
Show the number of transactions with transaction type code "SALE" for different investors if it is larger than 0.
SELECT investor_id , COUNT(*) FROM TRANSACTIONS WHERE transaction_type_code = "SALE" GROUP BY investor_id
what's the won with club being ammanford rfc
SELECT won FROM table_12828723_3 WHERE club = "Ammanford RFC"
What is the minimum laid down?
SELECT MIN(laid_down) FROM table_12592074_1
Show average ticket price for exhibitions for year 2005?
SELECT avg ( ticket_price ) FROM exhibition WHERE YEAR = 2005
What are the distinct location names?
SELECT DISTINCT Location_Name FROM LOCATIONS
What is Score In The Final, when Date is "30 August 1993"?
SELECT score_in_the_final FROM table_name_20 WHERE date = "30 august 1993"
What was the pick number when Paul Krake was selected?
SELECT MIN(pick__number) FROM table_2897457_8 WHERE player = "Paul Krake"
What is the Team with a Machine that is nsr250 and has Points of 8?
SELECT team FROM table_name_39 WHERE machine = "nsr250" AND points = 8
What is the record for the loss in UFC 62?
SELECT record FROM table_name_26 WHERE res = "loss" AND event = "ufc 62"
Who did the cubs play on june 3?
SELECT opponent FROM table_name_60 WHERE date = "june 3"
What was the score when the record became 25–14–9?
SELECT score FROM table_name_78 WHERE record = "25–14–9"
What team does Bill Walker play for?
SELECT team FROM table_name_1 WHERE player = "bill walker"
What is the name of the product with the color description 'yellow'?
SELECT T1.product_name FROM products AS T1 JOIN ref_colors AS T2 ON T1.color_code = T2.color_code WHERE T2.color_description = 'yellow'
What was the score of the game played on September 9?
SELECT score FROM table_name_5 WHERE date = "september 9"
Tell me the recorded for time of 2:50 and released date of 6/6/77 with track more than 20
SELECT recorded FROM table_name_84 WHERE track > 20 AND release_date = "6/6/77" AND time = "2:50"
What is the value for Lost when Drawn is 0, and Tries against is 41?
SELECT lost FROM table_name_33 WHERE drawn = "0" AND tries_against = "41"
How many customers do not have an account?
SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts)
What is the per-capita GDP of the country with an overall GDP of 80.955?
SELECT gdp_per_capita__us$_ FROM table_name_40 WHERE gdp__billion_us$_ = "80.955"
How about the total number of enrollments for just colleges that were founded after the year 1850?
SELECT sum ( Enrollment ) FROM university WHERE founded > 1850
List all player names who have an overall rating higher than the average.
SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.overall_rating > ( SELECT avg(overall_rating) FROM Player_Attributes )
What was the date of the game when the Avalanche had a record of 8–3–1?
SELECT date FROM table_name_34 WHERE record = "8–3–1"
What is minimum hours of the students playing in different position?
SELECT min(T2.HS) , T1.pPos FROM tryout AS T1 JOIN player AS T2 ON T1.pID = T2.pID GROUP BY T1.pPos
What's the release price of the processor with the part number bx80601975at80601002274aa, and has 1 × 6.4 gt/s qpi I/O?
SELECT release_price___usd__ FROM table_name_12 WHERE i_o_bus = "1 × 6.4 gt/s qpi" AND part_number_s_ = "bx80601975at80601002274aa"
Which player went to college at Tennessee-Chattanooga?
SELECT player FROM table_name_7 WHERE college = "tennessee-chattanooga"
what year did Vijay Singh joined?
SELECT Year_Join FROM artist where Name = 'Vijay Singh'
From what school was the player drafted in round 3?
SELECT school FROM table_name_88 WHERE round = 3
What is the highest against when the lost is 3 with less than 30 points?
SELECT MAX(against) FROM table_name_73 WHERE lost = 3 AND points < 30
Who is the captain of the team in Southampton?
SELECT captain FROM table_18461635_1 WHERE location = "Southampton"
Show origin and destination for flights with price higher than 300.
SELECT origin , destination FROM Flight WHERE price > 300
What is the sum of balls faced associated with a strike rate over 48.28, 3 innings, and an average under 5?
SELECT SUM(balls_faced) FROM table_name_99 WHERE sr > 48.28 AND innings = 3 AND average < 5
Calculate the average population of community areas in the West side.
SELECT AVG(population) FROM Community_Area WHERE side = 'West '
What is the average rating score of the movie "When Will I Be Loved" and who was its director?
SELECT AVG(T1.rating_score), T2.director_name FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'When Will I Be Loved'
What are the names and prices of products that cost at least 180, sorted by price decreasing and name ascending?
SELECT name , price FROM products WHERE price >= 180 ORDER BY price DESC , name ASC
Which Director has a Rank of 12?
SELECT director FROM table_name_22 WHERE rank = 12
What is the average pick of Florida State?
SELECT AVG(pick) FROM table_name_28 WHERE college = "florida state"
Which Effic is the highest one that has an Avg/G smaller than 305.6, and a GP-GS of 13-13?
SELECT MAX(effic) FROM table_name_56 WHERE avg_g < 305.6 AND gp_gs = "13-13"
In what year was GWRSn build?
SELECT Built FROM railway GROUP BY Builder having Builder = "GWR Swindon" order by Built desc limit 1
What is the highest Cycle, when the Number of Constestants is 11, and when Premiere Date is September 3, 2012?
SELECT MAX(cycle) FROM table_name_57 WHERE number_of_contestants = "11" AND premiere_date = "september 3, 2012"
What was the date of the game with a decision of Niittymaki and when the Flyers had a record of 30–21–5?
SELECT date FROM table_name_26 WHERE decision = "niittymaki" AND record = "30–21–5"
What is the rank that shows 426 games?
SELECT rank FROM table_name_64 WHERE games = "426"
What is the first and last name of the professor in biology department?
SELECT T3.EMP_FNAME , T3.EMP_LNAME FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code JOIN employee AS T3 ON T1.EMP_NUM = T3.EMP_NUM WHERE DEPT_NAME = "Biology"
Which nationality has the most hosts?
SELECT Nationality FROM HOST GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1
What is the average number of international passengers of all airports?
SELECT AVG(International_Passengers) FROM airport
What away team played at western oval?
SELECT away_team FROM table_name_11 WHERE venue = "western oval"
Hmm, I want to know the names of the tourist attractions that can be reached by bus.
SELECT name from tourist_attractions where how_to_get_there = "bus"
what is the name of the episode whose director is Michael Pressman and the number of that episode in that season is less than 10.0?
SELECT title FROM table_2791668_1 WHERE directed_by = "Michael Pressman" AND no_in_season < 10.0
find the total percentage share of all channels owned by CCTV.
SELECT sum(Share_in_percent) FROM channel WHERE OWNER = 'CCTV'
What are the names of those stations?
SELECT t2.station_id FROM train AS t1 JOIN route AS t2 ON t1.id = t2.train_id GROUP BY t2.train_id ORDER BY count ( * ) DESC LIMIT 3
Which role is most common for the staff?
SELECT role_code FROM Project_Staff GROUP BY role_code ORDER BY count(*) DESC LIMIT 1
What is the total number of Block for the Player with less than 85 Weight and more than 187 Height?
SELECT COUNT(block) FROM table_name_73 WHERE weight < 85 AND height > 187
Among the male customers in Sacramento, what percentage bought Dominion root beer in 2013?
SELECT CAST(COUNT(CASE WHEN T4.BrandName = 'Dominion' THEN T1.CustomerID ELSE NULL END) AS REAL) * 100 / COUNT(T1.CustomerID) 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 T1.City = 'Sacramento' AND T1.Gender = 'M' AND T2.TransactionDate LIKE '2014%'
What is the id of the longest song?
SELECT f_id FROM files ORDER BY duration DESC LIMIT 1
What is the christian amount where work participation rate is the composition?
SELECT christians FROM table_14598_5 WHERE composition = "Work Participation Rate"
How many rides did it take to get less than 3 bonus pts in no more than 7 matches?
SELECT MIN(rides) FROM table_name_92 WHERE bonus_pts < 3 AND matches < 7
Jeff Staples player for which College, Junior or Club league?
SELECT college_junior_club_team__league_ FROM table_name_28 WHERE player = "jeff staples"
What title to the japanese give the romani title ashita wa ashita no kaze ga fuku?
SELECT japanese_title FROM table_name_88 WHERE romaji_title = "ashita wa ashita no kaze ga fuku"
Who wrote title number 38?
SELECT written_by FROM table_26199484_1 WHERE no = 38
What is the high lap total for pedro diniz?
SELECT MAX(laps) FROM table_name_24 WHERE driver = "pedro diniz"
what is the building id for the apt number suite 645
SELECT building_id FROM Apartments where apt_number = "Suite 645"
Given the titles of all courses, in order of titles and credits.
SELECT title FROM course ORDER BY title , credits
Show all headquarters with both a company in banking industry and a company in Oil and gas.
SELECT headquarters FROM company WHERE main_industry = 'Banking' INTERSECT SELECT headquarters FROM company WHERE main_industry = 'Oil and gas'
find the name of driver who is driving the school bus with the longest working history.
SELECT t1.name FROM driver AS t1 JOIN school_bus AS t2 ON t1.driver_id = t2.driver_id ORDER BY years_working DESC LIMIT 1
What is firefox market ahare?
SELECT market_share from browser where name = "Firefox"
How much absorption in nm does the orange dye have?
SELECT MIN(absorb__nm_) FROM table_26428602_1 WHERE color = "orange"
How many Canadian players, between the ages of 18 and 24 when they initially played their first NHL, had a cumulative goal total of no more than 5? Indicate their complete names, the year, and the team for which they scored the specified amount of goals.
SELECT T2.nameGiven, T2.lastName, T2.birthYear, birthMon, birthDay , T3.tmID FROM Scoring AS T1 INNER JOIN Master AS T2 ON T2.playerID = T1.playerID INNER JOIN Teams AS T3 ON T3.tmID = T1.tmID WHERE (T2.firstNHL - T2.birthYear) BETWEEN 18 AND 24 AND T3.G < 5
Name the transfer wind for giuly
SELECT transfer_window FROM table_name_15 WHERE name = "giuly"
Find the name and location of the stadiums which some concerts happened in the years of both 2014 and 2015.
SELECT T2.name , T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2014 INTERSECT SELECT T2.name , T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2015
Please name all of the cities in California.
SELECT DISTINCT City FROM customers WHERE State = 'CA'
What are the resident details containing the substring 'Miss'?
SELECT other_details FROM Residents WHERE other_details LIKE '%Miss%'
What is the Tie Number when Barnsley was the away team?
SELECT tie_no FROM table_name_40 WHERE away_team = "barnsley"
How many draws have goals for less than 56, 10 as the postion, with goals against less than 45?
SELECT COUNT(draws) FROM table_name_26 WHERE goals_for < 56 AND position = 10 AND goals_against < 45
How many games were sold on PS3 platform in Japan?
SELECT SUM(T1.num_sales * 100000) FROM region_sales AS T1 INNER JOIN region AS T2 ON T1.region_id = T2.id INNER JOIN game_platform AS T3 ON T1.game_platform_id = T3.id INNER JOIN platform AS T4 ON T3.platform_id = T4.id WHERE T2.region_name = 'Japan' AND T4.platform_name = 'PS3'
What is the email address of clients who submitted their complaints via postal mail?
SELECT T1.email FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Submitted via` = 'Postal mail'
Find the average prices of all products from each manufacture, and list each company's name.
SELECT avg(T1.price) , T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code GROUP BY T2.name
What is the location of the festival with the largest number of audience?
SELECT LOCATION FROM festival_detail ORDER BY Num_of_Audience DESC LIMIT 1
How much Ekstraklasa has a Total smaller than 3?
SELECT SUM(ekstraklasa) FROM table_name_98 WHERE total < 3
Which item has the suffix containing thiocyanato- (-scn) as a prefix?
SELECT suffix FROM table_name_77 WHERE prefix = "thiocyanato- (-scn)"
Which player has a to par greater than 11, with a total less than 155?
SELECT player FROM table_name_74 WHERE to_par > 11 AND total < 155
What is the lowest number of total goals for a player with 6 league goals?
SELECT MIN(total_goals) FROM table_27170987_5 WHERE league_goals = 6
What was the first year of the Lithuanian National Badminton Championships?
SELECT MIN(year) FROM table_15001753_1
Name the No. 2 which has a No. 3 of jacob, and a No. 10 of wyatt, and a No. 6 of ethan?
SELECT no_2 FROM table_name_66 WHERE no_3 = "jacob" AND no_10 = "wyatt" AND no_6 = "ethan"