Question: Given the following code, troubleshoot the errors by answering the questions below. CREATE PROCEDURE RepSales ( IN repid int, in startdate varchar ( 2 0

Given the following code, troubleshoot the errors by answering the questions below.
CREATE PROCEDURE RepSales (IN repid int, in startdate varchar(20),out enddate varchar(20))
BEGIN
#Get all sales by Month and user with bonus function
Select monthname(purchase_date) MonthName, Rep,
sum(revenue) as Revenue,
salesbonus(sum(revenue)) as bonus from vwRepSales
where purchase_date between startdate and enddate
and idrep=ifnull(repid,idrep);
END$$
DELIMITER ;
Question 45(2 points)
What is missing after the Where filter that will make the stored procedure return the proper results?
Question 45 options:
A group by monthname to properly group the sum of the revenue.
A group by of monthname and rep to properly group the sum of the revenue.
a group by of rep to properly group the sum of the revenue
A group by of Revenue to properly group the sum of the revenue.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!