sentence
stringlengths
3
347
sql
stringlengths
18
804
Among the teams with the most number of ties, how many penalty was committed by a player or coach that is not on the ice? Indicate the name of the team.
SELECT BenchMinor, name FROM Teams ORDER BY T DESC LIMIT 1
Please list the total number of companies with a commission percentage of 0.018 or above, along with each company's assigned geographical location.
SELECT T1.BusinessEntityID, T2.'Group' FROM SalesPerson AS T1 INNER JOIN SalesTerritory AS T2 USING (territoryid) WHERE T1.CommissionPct >= 0.018
What is the lowest number of goals scored by a player in the normal league games where more than 8 total goals were scored?
SELECT MIN(league) FROM table_name_67 WHERE total > 8
how many innings had bbi 4/26?
SELECT innings FROM table_28846752_5 WHERE bbi = "4/26"
What tracks belong to genre Rock?
SELECT * FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock"
What are the dates of assessment notes for students with first name 'Fanny'?
SELECT T1.date_of_notes FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.first_name = "Fanny"
what's the thursday iuppiter (jupiter) with saturday saturnus ( saturn) being jesarn
SELECT thursday_iuppiter__jupiter_ FROM table_1277350_1 WHERE saturday_saturnus___saturn_ = "Jesarn"
Find the number of rooms with price higher than 120 for different decor.
SELECT decor , count(*) FROM Rooms WHERE basePrice > 120 GROUP BY decor;
What date was the game when away team northampton town played?
SELECT date FROM table_name_43 WHERE away_team = "northampton town"
How many people attended the Royals game with a score of 17 - 6?
SELECT SUM(attendance) FROM table_name_17 WHERE opponent = "royals" AND score = "17 - 6"
What is the least political rights rank in 1976?
SELECT MIN(political_rights) FROM table_name_54 WHERE year = 1976
What are the average ages for male and female students?
SELECT avg(age) , sex FROM Student GROUP BY sex
What is the list date of the historic place that was built 1896, 1914?
SELECT listed FROM table_name_88 WHERE built = "1896, 1914"
What is the displacement when the fuel system is carburettor, and a power of ps (kw; hp), and also has a model of 2000?
SELECT displacement FROM table_name_20 WHERE fuel_system = "carburettor" AND power = "ps (kw; hp)" AND model = "2000"
Find all the policy types that are used by more than 2 customers.
SELECT policy_type_code FROM policies GROUP BY policy_type_code HAVING count(*) > 2
Final question is how many votes for Niki Ashton?
SELECT Votes FROM player WHERE player_name = "Niki Ashton"
Show names of technicians in ascending order of quality rank of the machine they are assigned.
SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID ORDER BY T2.quality_rank
Where is the Belhaven College SSAC conference location?
SELECT location FROM table_name_23 WHERE current_conference = "ssac" AND institution = "belhaven college"
What episode had a run time of 24:53?
SELECT episode FROM table_2102714_1 WHERE run_time = "24:53"
what is the powertrain (engine/transmission) when the order year is 2000?
SELECT powertrain__engine_transmission_ FROM table_10007452_3 WHERE order_year = "2000"
Opponent of at san francisco 49ers had what lowest week?
SELECT MIN(week) FROM table_name_43 WHERE opponent = "at san francisco 49ers"
With a 2011 of 0 what was the 2006 result?
SELECT 2006 FROM table_name_83 WHERE 2011 = "0"
Name the year for japanese
SELECT year__ceremony_ FROM table_21790203_1 WHERE language_s_ = "Japanese"
What is the average game number when the record is 4-1?
SELECT AVG(game) FROM table_name_18 WHERE record = "4-1"
What was the original title for the film used in nomination of keep smiling?
SELECT original_title FROM table_name_36 WHERE film_title_used_in_nomination = "keep smiling"
What is the campus fee for San Francisco State University in 1996?
SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id = t2.campus WHERE t1.campus = "San Francisco State University" AND T2.year = 1996
Which category is the most common?
SELECT T.name FROM ( SELECT T2.name, COUNT(T2.name) AS num FROM film_category AS T1 INNER JOIN category AS T2 ON T1.category_id = T2.category_id GROUP BY T2.name ) AS T ORDER BY T.num DESC LIMIT 1
What is Country, when Player is "Jack Nicklaus"?
SELECT country FROM table_name_56 WHERE player = "jack nicklaus"
When was the record 27-25?
SELECT date FROM table_name_64 WHERE record = "27-25"
Can you find the response received dates for all grants that were over 100?
SELECT T1.response_received_date FROM Documents AS T1 JOIN Grants AS T2 ON T1.grant_id = T2.grant_id WHERE T2.grant_amount > 100
What are the different schools and their nicknames, ordered by their founding years?
SELECT school , nickname FROM university ORDER BY founded
What is the percentage of American players among all the players who have gotten in the Hall of Fame?
SELECT CAST(COUNT(CASE WHEN T1.birthCountry = 'USA' THEN T1.playerID ELSE NULL END) AS REAL) * 100 / COUNT(T1.playerID) FROM Master AS T1 INNER JOIN HOF AS T2 ON T1.hofID = T2.hofID
Can you show the product name and total order quantity of each product please?
SELECT T1.product_name , sum ( T2.order_quantity ) FROM products AS T1 JOIN order_items AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_id
For each product type, return the maximum and minimum price.
SELECT product_type_code , max(product_price) , min(product_price) FROM products GROUP BY product_type_code
How Many Students have Behavior Incident reports with recommendations?
SELECT count ( * ) from ( SELECT * FROM Behavior_Incident AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id )
State the name of the publisher with the most games.
SELECT T.publisher_name FROM ( SELECT T2.publisher_name, COUNT(DISTINCT T1.game_id) FROM game_publisher AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id GROUP BY T2.publisher_name ORDER BY COUNT(DISTINCT T1.game_id) DESC LIMIT 1 ) t
List the names of all the customers that use email as a contact channel.
SELECT t1.customer_name FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t2.channel_code = 'Email'
What season did SV Darmstadt 98 end up at RL Süd (1st)?
SELECT season FROM table_20217456_7 WHERE rl_süd__1st_ = "SV Darmstadt 98"
What is the highest amount of floors in Stockholm with a rank of 15?
SELECT MAX(floors) FROM table_name_96 WHERE location = "stockholm" AND rank = "15"
How many students live there?
SELECT COUNT ( T1.stuid ) FROM lives_in AS T1 JOIN dorm AS T2 ON T1.dormid = T2.dormid WHERE T2.student_capacity = ( SELECT max ( student_capacity ) FROM dorm )
What dorms have no Study Room as an amenity? | Do you mean among those with a TV Lounge? | Yes.
SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'Study Room'
Is there anyone else with the first name Joe?
select first_name, last_name from actor where first_name = 'JOE' and last_name ! = 'SWANK'
Which religion has the largest population in Martinique?
SELECT T2.Name FROM country AS T1 INNER JOIN religion AS T2 ON T1.Code = T2.Country WHERE T1.Name = 'Martinique' ORDER BY T1.population DESC LIMIT 1
how many titles were never presented in china?
SELECT count ( title ) FROM film WHERE film_id NOT IN ( SELECT film_id FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.market_id = T2.Market_ID WHERE country = 'China' )
How many territories are owned by Anne Dodsworth?
SELECT COUNT(T2.TerritoryID) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.FirstName = 'Anne' AND T1.LastName = 'Dodsworth'
Great! How many catalogs has each publisher published?
SELECT catalog_publisher, count ( * ) FROM catalogs GROUP BY catalog_publisher
Which game has the longest name?
SELECT T.game_name FROM game AS T ORDER BY LENGTH(T.game_name) DESC LIMIT 1
What are the names of conductors, sorted descending by the number of years they have worked?
SELECT Name FROM conductor ORDER BY Year_of_Work DESC
What Canadian Championship has Ashtone Morgan Category:Articles with hcards as the name?
SELECT canadian_championship FROM table_name_45 WHERE name = "ashtone morgan category:articles with hcards"
Tell me the Draft Pick Number for the country 6 ? | For which season do you want? | for 1998.0
SELECT Draft_Pick_Number from match_season WHERE season = "1998.0" AND country = "6"
Excellent! Can you tell me what the total number of trips is, within zip code 94002, for bike 252?
SELECT COUNT ( * ) FROM trip WHERE zip_code = 94002 and bike_id = '252'
What was the weight in kg when the horse was Alcopop?
SELECT weight__kg_ FROM table_24915874_1 WHERE horse = "Alcopop"
Please list three businesses with the lowest total sales from last year.
SELECT BusinessEntityID FROM SalesPerson ORDER BY SalesLastYear LIMIT 3
What is the average number of employees of the departments whose rank is between 10 and 15?
SELECT avg(num_employees) FROM department WHERE ranking BETWEEN 10 AND 15
What is the name of the department with the student that has the lowest GPA?
SELECT T2.dept_name FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code ORDER BY stu_gpa LIMIT 1
What are the total amount and average amount paid in claim headers?
SELECT sum(amount_piad) , avg(amount_piad) FROM claim_headers
Show the names of phones that are on market with number of shops greater than 50.
SELECT T3.Name FROM phone_market AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID JOIN phone AS T3 ON T1.Phone_ID = T3.Phone_ID WHERE T2.Num_of_shops > 50
What are the keywords of the "Shield" episode?
SELECT T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Shield'
How many reshared tweets are there in Texas?
SELECT COUNT(T1.TweetID) FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T2.State = 'Texas' AND T1.IsReshare = 'TRUE'
Which Site that has a Sex and other data of old male?
SELECT MAX(site) FROM table_name_42 WHERE sex_and_other_data = "old male"
What is the release date of the episode named Mouse-Placed Kitten with an episode number less than 1495 directed by Robert McKimson?
SELECT release_date FROM table_name_93 WHERE production_number < 1495 AND director = "robert mckimson" AND title = "mouse-placed kitten"
What was the results for the candidates listed as bart gordon (d) 76.5% wallace embry (r) 23.5%?
SELECT result FROM table_1341577_43 WHERE candidates = "Bart Gordon (D) 76.5% Wallace Embry (R) 23.5%"
The episode with production code 693-002, has how many original airdates?
SELECT COUNT(original_airdate) FROM table_26982362_2 WHERE production_code = "693-002"
now can you show the those same results, but ordered in ascending order of member names
SELECT T2.Name, T1.College_Location FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID ORDER BY T2.Name ASC
what's the won with points against being 597
SELECT won FROM table_13758945_3 WHERE points_against = "597"
How many original air dates did episode 12 have?h
SELECT COUNT(original_air_date) FROM table_23255941_1 WHERE episode__number = 12
What is the smallest district that had 33.25 in animals
SELECT MIN(district) FROM table_20403667_2 WHERE animal__in_lakh__ = "33.25"
Which one of them registered the earliest?
SELECT student_id FROM student_course_attendance WHERE course_id = 301 ORDER BY date_of_attendance LIMIT 1
Which student's age is older than 18 and is majoring in 600? List each student's first and last name.
SELECT Fname, Lname FROM Student WHERE Age > 18 AND Major = 600
How many total finals where there when the last win was in 2012-13?
SELECT total_finals FROM table_14286908_1 WHERE year_of_last_win = "2012-13"
Find the first names and offices of all professors sorted by alphabetical order of their first name.
SELECT T2.emp_fname, T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num ORDER BY T2.emp_fname
What was the result for Rank 2 on December 6, 1969?
SELECT result FROM table_name_23 WHERE rank_number = "2" AND date = "december 6, 1969"
What are the id and name of the stations that have ever had more than 12 bikes available?
SELECT DISTINCT T1.id , T1.name FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available > 12
What ward was she nominated at for her work, Flare Path for the category of best featured actress in a play?
SELECT award FROM table_name_62 WHERE nominated_work = "flare path" AND category = "best featured actress in a play"
What is the average silver with more than 0 gold, a Rank of 1, and a Total smaller than 30?
SELECT AVG(silver) FROM table_name_82 WHERE gold > 0 AND rank = "1" AND total < 30
How many undergraduates are there in "San Jose State University" in year 2004?
SELECT sum(t1.undergraduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus = t2.id WHERE t1.year = 2004 AND t2.campus = "San Jose State University"
What are the names of the photos that use a Sigma lens?
SELECT T2.name FROM camera_lens AS T1 JOIN photos AS T2 ON T2.camera_lens_id = T1.id WHERE T1.brand = 'Sigma'
Who was the director of the film with an original title of "16 Days in Afghanistan"?
SELECT director FROM table_17155250_1 WHERE original_title = "16 Days in Afghanistan"
How many concerts occurred in 2014 or 2015?
SELECT count(*) FROM concert WHERE YEAR = 2014 OR YEAR = 2015
In what season did Rusty Wallace win?
SELECT MAX(season) FROM table_1769428_2 WHERE winning_driver = "Rusty Wallace"
Find the name and email for the users who have more than one follower.
SELECT T1.name, T1.email FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid = T2.f1 GROUP BY T2.f1 HAVING COUNT(*) > 1
Calculate the percentage of words used in Agents class label.
SELECT CAST(COUNT(DISTINCT CASE WHEN T1.class_label = 'Agents' THEN T2.word_cited_id ELSE NULL END) AS REAL) * 100 / COUNT(DISTINCT T2.word_cited_id) FROM paper AS T1 INNER JOIN content AS T2 ON T1.paper_id = T2.paper_id
Which assets have 2 parts and have less than 2 fault logs? List the asset id and detail.
SELECT T1.asset_id , T1.asset_details FROM Assets AS T1 JOIN Asset_Parts AS T2 ON T1.asset_id = T2.asset_id GROUP BY T1.asset_id HAVING count(*) = 2 INTERSECT SELECT T1.asset_id , T1.asset_details FROM Assets AS T1 JOIN Fault_Log AS T2 ON T1.asset_id = T2.asset_id GROUP BY T1.asset_id HAVING count(*) < 2
What Elector has the Place of Birth listed as Bavaria?
SELECT elector FROM table_name_4 WHERE place_of_birth = "bavaria"
When the country is austria germany and the rank is kept under 5, what's the average number of matches played?
SELECT AVG(matches) FROM table_name_91 WHERE country = "austria germany" AND rank < 5
How many marriages between women have % same-sex marriages of 1.06?
SELECT marriages_between_women FROM table_19614212_1 WHERE _percentage_same_sex_marriages = "1.06"
What are the names of the courses that have exactly 1 student enrollment?
SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name HAVING COUNT(*) = 1
What is the last name of the professor whose office is located in DRE 102, and when were they hired?
SELECT T1.emp_lname , T1.emp_hiredate FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num WHERE T2.prof_office = 'DRE 102'
What is the prize money for the second round qualifying that is listed?
SELECT prize_money FROM table_name_60 WHERE round = "second round qualifying"
What is the result when the nominee(s) of janine sherman?
SELECT result FROM table_name_57 WHERE nominee_s_ = "janine sherman"
What is the home city when the stadium was Gradski Stadion U Poljudu?
SELECT home_city FROM table_name_69 WHERE stadium = "gradski stadion u poljudu"
Who ran for office in the Alabama 1 district?
SELECT candidates FROM table_1342198_3 WHERE district = "Alabama 1"
List down application that have not been updated since 2015. What is the percentage of this application having more negative sentiment than positive sentiment?
SELECT CAST((( SELECT COUNT(*) Po FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE SUBSTR(T1."Last Updated", -4, 4) > '2015' AND T2.Sentiment = 'Positive' ) - ( SELECT COUNT(*) Ne FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE SUBSTR(T1."Last Updated", -4, 4) > '2015' AND T2.Sentiment = 'Negative' )) AS REAL) * 100 / ( SELECT COUNT(*) NUM FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE SUBSTR(T1."Last Updated", -4, 4) > '2015' )
List down the product name for products from id 1 to 10.
SELECT Name FROM Products WHERE ProductID BETWEEN 1 AND 10
Who is the artist that drew higher than 4?
SELECT artist FROM table_name_33 WHERE draw > 4
Where is shabazz muhammad from?
SELECT hometown FROM table_name_58 WHERE player = "shabazz muhammad"
What is the name of the available rock single/pack by REO Speedwagon?
SELECT single___pack_name FROM table_name_30 WHERE genre = "rock" AND artist = "reo speedwagon"
How many books did David Foster Wallace write?
SELECT COUNT(T1.title) FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T3.author_name = 'David Foster Wallace'
What is Mañana es para siempre of impreuna pentru totdeauna from Monday to Friday?
SELECT monday_to_friday FROM table_name_34 WHERE mañana_es_para_siempre = "impreuna pentru totdeauna"
What is the gender with a age range of 3-11 at the st adrian roman catholic primary school?
SELECT gender FROM table_28523_2 WHERE age_range = "3-11" AND school = "St Adrian Roman Catholic Primary school"