Wednesday, 11 September 2013

7. Display the Order ID of the top five orders based on the total amount due in the year 2001. (Use the AdventureWorks database)

select Top 5 salesorderId from sales.salesorderHeader
where Datepart(yyyy,orderDate)=2001 order by totalDue desc

No comments:

Post a Comment