The product table contains these columns.
ID NUMBER(9) PK
Management has asked you to calculate the net revenue per unit for each product, if the cost of each product is increased by 10% and the sale price of each product is increased by 25%. You issue this SQL statement.
SELECT id, sale_price * 1.25 – cost * 1.10
Which conclusion can you draw from the results?
A) Only the required results are displayed.
B) The results provide more information than management requested.
C) A function needs to be included in the SELECT statement to achieve the desired result.
D) The order on the operations in the calculation needs to be changed to achieve the required results.
I consider A this select just gets the desired result. Any comment?
A is correct unless we have to assume that PRODUCT table does not have a PRIMARY KEY and there are many id's for the same product (use distinct) or there are inactive and expired products (use where clause).
Noting in the question suggests we have to assume all that.
Remember the Golden Rule - He who has the gold makes the rules!
Ph.D., OCP 8i, 9i, 10g DBA