Problem 10: Create a stored procedure that presents the sales discount average and standard deviation for bike brands at
Posted: Thu Jul 14, 2022 2:28 pm
Problem 10: Create a stored procedure thatpresents the sales discount average and standard deviation for bikebrands at or above a specified discount value. The output must showthe brand names in alphabetical order along with the associatedstatistics. The skeleton of the stored procedure is provided below.(Hint: The HAVING clause needs to be used.)
CREATE PROCEDUREGetBrandAverageSalesDiscountAboveValue
@DiscountDECIMAL(4,2)
AS
<REPLACE WITH YOUR SQLCODE>
Then execute the following stored procedure call to get thesales discount average and standard deviation values at or above11% (0.11):
EXECGetBrandAverageSalesDiscountAboveValue @Discount=0.11;
Expected Output:
CREATE PROCEDUREGetBrandAverageSalesDiscountAboveValue
@DiscountDECIMAL(4,2)
AS
<REPLACE WITH YOUR SQLCODE>
Then execute the following stored procedure call to get thesales discount average and standard deviation values at or above11% (0.11):
EXECGetBrandAverageSalesDiscountAboveValue @Discount=0.11;
Expected Output: