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 varcharout enddate varchar
BEGIN
#Get all sales by Month and user with bonus function
Select monthnamepurchasedate MonthName, Rep,
sumrevenue as Revenue,
salesbonussumrevenue as bonus from vwRepSales
where purchasedate between startdate and enddate
and idrepifnullrepididrep;
END$$
DELIMITER ;
Question points
What is missing after the Where filter that will make the stored procedure return the proper results?
Question 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
