-
The product table contains these columns.
ID NUMBER(9) PK
COST NUMBER(7,2)
SALE_PRICE NUMBER(7,2)
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
FROM product;
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.
Ans: B
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.
-
Thx, so many guys consider B. I had it in my test and missed one basic SQL statement item most likely it is.