Thursday 10 October 2013

1.Consider the following SQL query: SELECT ProductID, LineTotal AS 'Total' FROM Sales.SalesOrderDetail Group By Cube(LineTotal) Once executed, the preceding query generates errors. Identify the possible causes of such errors and rectify the same. (Use the AdventureWorks database)

select * from Sales.SalesOrderDetail
select productID, SUM (LineTotal) as 'Total' from Sales.SalesOrderDetail
Group by cube (ProductID)

No comments:

Post a Comment