Saturday, 21 October 2017

MSSQL - How to sum each column values

Watch this example on YouTube




 SELECT        Qty, Price
FROM            Orders
UNION ALL
SELECT        SUM(Qty) AS Expr1, SUM(Price) AS Expr2
FROM            Orders

No comments:

Post a Comment