Question: Using SQL and Adventure Works Datawarehouse database how do i make a stored procedure named GetAverageProductSalesAmountUSD which will first calculate the USD equivalence of
Using SQL and Adventure Works Datawarehouse database
how do i make a stored procedure named "GetAverageProductSalesAmountUSD" which will first calculate the
USD equivalence of all transactions for the SalesAmount column according to Order Date seen within
the entire FactInternetSales table. Later, in the same stored procedure, filter out for the transactions
that occurred between '01-Jan-2012' and '31-Dec-2013' based on Order Date to calculate average
SalesAmountUSD values for each product. Finally, give the combination output of each Product Key,
English Product Name and calculated average SalesAmountUSD value which contains only 2 decimal
digits for this specified time range. In the stored procedure, include a logging mechanism to keep the
execution datetime of this stored procedure
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
