View the Exhibit and examine the data in the PROMOTIONS table.
You need to display all promo categories that do not have ‘discount’ in their subcategory.
Which two SQL statements give the required result? (Choose two.)
A.
SELECT promo_category
FROM promotions
MINUS
SELECT promo_category
FROM promotions
WHERE promo_subcategory = ‘discount’;
B.
SELECT promo_category
FROM promotions
INTERSECT
SELECT promo_category
FROM promotions
WHERE promo_subcategory = ‘discount’;
C.
SELECT promo_category
FROM promotions
MINUS
SELECT promo_category
FROM promotions
WHERE promo_subcategory <> ‘discount’;
D.
SELECT promo_category
FROM promotions
INTERSECT
SELECT promo_category
FROM promotions
WHERE promo_subcategory <> ‘discount’;
Seriously someone should revise the tests because a lot of them have wrong answers. In this case d is not correct. Only a is correct
revise don’t comment if u don’t know.
D is also correct.. INTERSECT means common results of 2 queries.. the 2nd query shows only those rows which don’t have promo_sub_category as discount.. while 1st query gives all rows with all categories.. hence common of both is the required result.
why b and c is not corect?
can u plz tell me why b and c is not corect?
B and C would show all promo categories, that would ONLY have “discount” in their subcategory.
But the question is to show all promo categories, that DON’T have “discount” in their subcategory.
A & D is corrcet answer I think.
Yes.I am sure both A and D are right.
A & D