Another company used statistic in reports is the total number of orders placed by a shopper. Complete the following steps to create a function named NUM_PURCH_SF that accepts a shopper id and returns the total number of orders the shopper has placed. Use the function in a SELECT statement to display the number of orders for shopper 23. ? Develop and run a CREATE FUNCTION statement to create the NUM_PURCH_SF function. The function code needs to tally the number of orders by shopper. Keep in mind that the ORDERPLACED column contains a 1 if the order has been placed. ? Create a SELECT query using the function on the IDSHOPPER column of the BB_SHOPPER table. Be sure to select only shopper 23.

   Related Questions in Database Management System