Which query would achieve the required result?

View the Exhibit; examine the structure of the PROMOTIONS table.

Each promotion has a duration of at least seven days.
Your manager has asked you to generate a report, which provides the weekly cost for each
promotion done to l date.
Which query would achieve the required result?

View the Exhibit; examine the structure of the PROMOTIONS table.

Each promotion has a duration of at least seven days.
Your manager has asked you to generate a report, which provides the weekly cost for each
promotion done to l date.
Which query would achieve the required result?

A.
SELECT promo_name, promo_cost/promo_end_date-promo_begin_date/7 FROM promotions;

B.
SELECT promo_name,(promo_cost/promo_end_date-promo_begin_date)/7 FROM promotions;

C.
SELECT promo_name, promo_cost/(promo_end_date-promo_begin_date/7) FROM
promotions;

D.
SELECT promo_name, promo_cost/((promo_end_date-promo_begin_date)/7) FROM
promotions;



Leave a Reply 2

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


Eamon

Eamon

interesting, D is the only one that is not ambiguous. Maybe that is what the examiner is looking for here and not the priorities of each type of operator.

Eamon

Eamon

I meant to say “precedence rules” instead of “priorities of each type of operator”.