Question: 3. (25) Write a script that finds (1) The name of the customer who made the largest order (amount of money spent on a single

 3. (25) Write a script that finds (1) The name of
the customer who made the largest order (amount of money spent on

3. (25) Write a script that finds (1) The name of the customer who made the largest order (amount of money spent on a single order) and (2) the value of that largest order. Store the name and the value of the order in two different variables and then print using the two variables. A sample print statement with the correct customer and order value- "The largest order of $2799.95 was made by David Goldstein" Hint: This problem may require you to use a table variable to store information that you will use to get to the required information. You may need to use multiple queries. There are multiple ways to solve this problem. Stored Procedure 5. (10) Write a stored procedure named findAverageSales. The procedure does not have any parameter variable (accepts no arguments) but returns the average sales value using an output parameter. You can use the code from exercise 1 to write the code inside the procedure. (5) Code an EXEC statement to call/test this procedure and print the return value. 6. (10) Write a stored procedure named spinsertCategory. The procedure has one parameter variable (accepts one argument), which is the name of the new category that you want to insert in the Categories table and returns nothing. If the insert is successful, the procedure should print that the insert was successful. If the insert was not successful, the procedure should print that the insert failed. (5) Code one EXEC statement that calis/tests this procedure with a valid category name. (5) Code another EXEC statement that calls/tests this procedure with an invalid category name. Note that this table doesn't allow duplicate category names

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 Databases Questions!