Sunday 6 October 2013

07. Write a query to display the total amount due for all the sales orders rounded off to a whole number. In addition, display the sales order ID and the type of credit card through which the payment was made.

select salesOrderID, CardType,
'Total Due'= Round(TotalDue,0)
from sales.salesOrderHeader s
join sales.CreditCard c
on s.CreditCardID= c.CreditCardID

No comments:

Post a Comment