Thursday 10 October 2013

12. Consider the following SQL query containing the ROLLUP operator: SELECT ProductID, LineTotal AS 'Total' FROM Sales.SalesOrderDetail GROUP BY ROLLUP (ProductID) The preceding query generates errors during execution. Identify the possible causes of such errors and rectify? (Use the AdventureWorks database)

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

No comments:

Post a Comment