This repository has been archived on 2024-12-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
Databases/Lab2/Task2_3.sql

2 lines
346 B
SQL

SELECT ProductID, SpecialOfferID, AVG(UnitPrice), SUM(LineTotal) FROM AdventureWorks.Sales.SalesOrderDetail GROUP BY ProductID, SpecialOfferID;
SELECT ProductID, SpecialOfferID, AVG(UnitPrice) AS avg_unit_price, SUM(LineTotal) AS sum_line_total FROM AdventureWorks.Sales.SalesOrderDetail GROUP BY ProductID, SpecialOfferID ORDER BY ProductId ASC;