Which two SQL statements give the required result?

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.)

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’;



Leave a Reply 8

Your email address will not be published. Required fields are marked *


revise

revise

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

RJ RON

RJ RON

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.

john

john

why b and c is not corect?

john

john

can u plz tell me why b and c is not corect?

Mr. T

Mr. T

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.

saurabh sharma

saurabh sharma

A & D is corrcet answer I think.

vrish

vrish

Yes.I am sure both A and D are right.