Question: 1. ( 25 pts.) Write the SQL statements to create a view called as ProductPrice that returns the price of products that are electronics. 2.

1. ( 25 pts.) Write the SQL statements to create a view called as "ProductPrice" that returns the price of products that are electronics. 2. (75 pts.) Create a PL/SQL function called as "GetCustomerinfo" which gets a customer id (cid) and returns the total numbe of buying for the given customer. ( 40pts.) - Function returns 1 if the given customer id does not exist. (5 pts.) - Display "No customer found" message if there is no customer for the given id. (10 pts.) - Display number of buying for each customer. (10 pts.) - Use "DBMS_OUTPUT.PUT_LINE" for displaying output. - Create anonymous block to test function. (10 pts.) Note1: PK Primary Key FK Foreign Key NN Not Null Note2: You can find sample data on the back of the page
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
