Which query would achieve the required result?

Examine the structure of the PROMOTIONS table:

The management wants to see a report of unique promotion costs in each promotion category.
Which query would achieve the required result?

Examine the structure of the PROMOTIONS table:

The management wants to see a report of unique promotion costs in each promotion category.
Which query would achieve the required result?

A.
SELECT DISTINCT promo_cost, promo_category FROM promotions;

B.
SELECT promo_category, DISTINCT promo_cost FROM promotions;

C.
SELECT DISTINCT promo_cost, DISTINCT promo_category FROM promotions;

D.
SELECT DISTINCT promo_category, promo_cost FROM promotions ORDER BY 1;



Leave a Reply 6

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


Naj

Naj

I think A is correct …why is it D?

Naj

Naj

As the question is for distinct promotion costs in each category and not distinct category.

Ekta

Ekta

a and d are both right

Achin

Achin

I think A is correct

spellublind

spellublind

A is wrong because, the results would be something like below

Promo_cost Promo_category
1000 A
2000 A
1000 B
2000 B

Sri

Sri

Even if it displays it as said above since the costs r unique in a specific category it shud b correct…