View the step-by-step solution to:

Question 4. Calculate the Total Shopper Spending Many of the reports generated from the system calculate the total dollars in purchases for a...

This question was created from CPD3454 Assignment 1.doc https://www.coursehero.com/file/24431738/CPD3454-Assignment-1doc/

24431738-199130.jpeg

Create function named TOT_PURCH

24431738-199130.jpeg

Question 4. Calculate the Total Shopper Spending Many of the reports generated from the system calculate the total dollars in purchases for a shopper.
Complete the following steps to create a function named TUT_PURCH_SF that accepts a shopper id
as input and returns the total dollars that the shopper has spent with the company. Use the function
in a SELECT statement that shows the shopper id and total purchases for every shopper in a
database. 1. Develop and run a CREATE FUNCTION statement to create the TOT_PURCH_SF function.
The function code needs a formal parameter for the shopper id and to sum the total column
from the BB_BASKET table. 2. Develop a SELECT statement using the BB_SHOPPER table to produce a list of each
shopper in the database and his or her respective totals.

Recently Asked Questions

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question