Answer to Question #180983 in Databases | SQL | Oracle | MS Access for Miley

Question #180983

Help in doing this : Create a function that takes as inputs a SalesOrderID, a Currency Code, and a date, and returns a table of all the SalesOrderDetail rows for that Sales Order including Quantity, ProductID, UnitPrice, and the unit price converted to the target currency based on the end of day rate for the date provided. Exchange rates can be found in the Sales.CurrencyRate table. ( Use AdventureWorks)



1
Expert's answer
2021-04-16T02:23:54-0400
SELECT ProductID, SUM((UnitPrice-(UnitPrice*UnitPriceDiscount/100))*OrderQty) AS "Total"

FROM Sales.SalesOrderDetail

GROUP BY ProductID

HAVING Total > 9000

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS