Wednesday, 11 September 2013

18.Display the order ID and the total amount due of all the sales orders in the following format. Ensure that the order with the highest price is at the top of the list. (Use the AdventureWorks database)

select * from Sales.SalesOrderHeader
select 'Order Id'= SalesOrderID,'Total Due'=TotalDue from Sales.SalesOrderHeader
Order by TotalDue Desc

No comments:

Post a Comment