Sunday 6 October 2013

16. Write a query to display the sales order ID, the order detail ID, and the total value of those orders where the total value is greater than the maximum of the total value of order ID 43662.

select salesOrderID, salesOrderDetailID,LineTotal
from sales.salesOrderDetail
where LineTotal >All (select Linetotal from sales.salesOrderDetail
Where salesOrderID=43662)

No comments:

Post a Comment