Thursday 10 October 2013

10. What will be the output of the following code written to display the total order value for each order? (Use the AdventureWorks database) SELECT SalesOrderID,ProductID,sum(LineTotal) FROM Sales.SalesOrderDetail GROUP BY SalesOrderID

select salesorderID,ProductID,sum(LineTotal) as Total from sales.salesorderDetail
Group by salesorderID,productID

No comments:

Post a Comment