Thursday 10 October 2013

5.Display a report containing the sales order ID and the average value of the total amount greater than $ 5,000 in the following format. (Use the AdventureWorks database)



select * from Sales.SalesOrderDetail
select 'sales order ID'= SalesorderID,'Average value'=Avg(lineTotal) from Sales.SalesOrderDetail
Group by SalesOrderID

No comments:

Post a Comment