diff --git a/SQL_exercise_01/1_questions_and_solutions.sql b/SQL_exercise_01/1_questions_and_solutions.sql index 42ce6d2..9a259da 100644 --- a/SQL_exercise_01/1_questions_and_solutions.sql +++ b/SQL_exercise_01/1_questions_and_solutions.sql @@ -81,6 +81,13 @@ SELECT name,price FROM Products ORDER BY price ASC LIMIT 1; + +--SQL SERVER SOLUTION (T-SQL) +SELECT TOP 1 name + ,price +FROM Products +ORDER BY price ASC + -- 1.16 Select the name of each manufacturer along with the name and price of its most expensive product. select a.Name, max(a.price), b.Name