Question: Based on this textbook: https://www.chegg.com/homework-help/using-searched-case-statements-brewbean-s-application-needs-chapter-3-problem-4hap-solution-9781133947363-exc Problem Using Searched CASE Statements The Brewbeans application needs a block to determine whether a customer is rated HIGH, MID,

Based on this textbook: https://www.chegg.com/homework-help/using-searched-case-statements-brewbean-s-application-needs-chapter-3-problem-4hap-solution-9781133947363-exc

Problem

Using Searched CASE Statements

The Brewbeans application needs a block to determine whether a customer is rated HIGH, MID, or LOW based on his or her total purchases. The block needs to select the total amount of orders for a specified customer, determine the rating, and then display the results onscreen. The code rates the customer HIGH if total purchases are greater than $200, MID if greater than $100, and LOW if $100 or lower. Use an initialized variable to provide the shopper ID.

1. Start SQL Developer, if necessary.

2. Modify the code used in Assignment 3-3 to use a searched CASE statement to check the shoppers total purchase amount and determine the correct rating.

3. Run the block, and verify the results.

4. Enter and run the following code to confirm that the total for this shopper is indeed greater than $200:

SELECT SUM(total)

FROM bb_basket

WHERE idShopper = 22

AND orderplaced = 1

GROUP BY idshopper;

5. Test other shoppers who have a completed order.

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!