Sunday 6 October 2013

14. Create a report containing the sales order ID of those orders where the total value is greater than the average of the total value of all the orders.

select salesOrderID, TotalDue
from sales.salesorderHeader
where totalDue > (select avg(TotalDue)
from sales.salesOrderheader)

No comments:

Post a Comment