Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Report: Generate a report with the names of customers who spent the most money (top 3) so we can send them discount coupons, and also

Report: Generate a report with the names of customers who spent the most money (top 3) so we can send them discount coupons, and also the names of the most frugal customers (bottom 3). Feature 19: Report names of customers who spent the most money. Input: Create a function with Cust_Name, Amount_Paid, Tip, Cust_Credit_Card, Cust_email (join) followed by a procedure and a cursor to store the select statement output into the cursor. Output: Displays the 3 names of customers with the highest amount_paid and 3 names of customers with the lowest amount_paid using the cursor. Example of calling the feature:

Exec customer_spending(customers.Cust_name, customers.Cust_Credit_Card_Num, orders.amount_paid, orders.tip);

image

Sort.. Filter: CUST_ID CUST_NAME CUST_EMAIL 21 Lisa Williams lisawilliams@gmail.com 22 Peter Smith petersmith@gmail.com 23 James Miller jamesmiller@gmail.com 24 Hope Davis hopedavis@gmail.com 25 Daisy Brown daisybrown@gmail.com CUST_STREET_ADDRESS CUST_CITY 112 Snow Avenue 14 2nd Street 221 Main Street 61 Valley Rd 33 5th Street CUST_STATE Buffalo Norfolk Ocean City Washington, D.C. Washington, D.C. Aspen NY Parlam CUST_ZIP CUST_CREDIT_CARD_NUM 10007 23317 28392 43898 64277 2272192735432946 2738475898893665 2234127627731728 2213195526557272 1324112327864665

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

International Marketing And Export Management

Authors: Gerald Albaum , Alexander Josiassen , Edwin Duerr

8th Edition

1292016922, 978-1292016924

More Books

Students also viewed these Databases questions