Using SQL and Adventure Works Datawarehouse database how do i make a stored procedure named GetAverageProductSalesAmountUSD
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 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
Database Systems Design Implementation and Management
ISBN: 978-1285196145
11th edition
Authors: Carlos Coronel, Steven Morris