Question: Write a function that calculates and returns the sales price of the item from the items table. Hint: You must pass the item_id and

Write a function that calculates and returns the sales price of the item from the items table. Hint: You must pass the item_id and the function will return the sales price calculated based on the cost_price, discount from items table. CREATE TABLE items( item_id VARCHAR2(20) PRIMARY KEY ,item_name VARCHAR2(40) NOT NULL ,cost_price NUMBER(3,1) .discount NUMBER(3,1) ,category VARCHAR2(20) ); [You can consider discount as either direct value or percentage, completely your choice]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
