Which query would achieve the required result?

View the Exhibit; e xamine 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; e xamine 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 28

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


maugzoide

maugzoide

Good point at putting brackets between the math operation with date fields.

zooshoes

zooshoes

why is the answer not c?

Bob

Bob

This is because it follows PEMDAS

C divides promo begin date by 7, and not the difference between begin and end as intended.

Guess

Guess

It will evaluate: promo_begin_date/7 first. But the corrent order is (promo_end_date-promo_begin_date)/7

Justyna

Justyna

Because in C “promo_begin_date” is devided by 7.

kingRich

kingRich

The answer is D.

Anand AIli

Anand AIli

Please see at extra brackets . Extra thing makes to expert and also has ability to kick us out.

Susanto

Susanto

First three will throw the below error:

inconsistent datatypes: expected NUMBER got DATE

So Correct answer is D

Sayed

Sayed

This question is all about using the parenthesis correctly.

Google

Google

Although internet sites we backlink to below are considerably not associated to ours, we feel they may be actually worth a go as a result of, so possess a look.

lcd repair

lcd repair

usually posts some pretty interesting stuff like this. If youre new to this site

consultancy

consultancy

although sites we backlink to beneath are considerably not connected to ours, we feel they’re in fact worth a go as a result of, so possess a look

app maker free

app maker free

Sites of interest we have a link to

Free Games downloads

Free Games downloads

always a large fan of linking to bloggers that I love but do not get quite a bit of link like from

read this post here

read this post here

Here are a few of the internet sites we suggest for our visitors

create your own app

create your own app

The facts talked about inside the report are a number of the most beneficial accessible

Fliesendruck

Fliesendruck

below youll obtain the link to some web sites that we believe you must visit

app creator

app creator

one of our guests just lately proposed the following website

make your own app

make your own app

please go to the web pages we stick to, such as this a single, as it represents our picks in the web

create your own app

create your own app

The data mentioned within the write-up are several of the most beneficial available

kala jadu

kala jadu

check beneath, are some completely unrelated internet sites to ours, nonetheless, they are most trustworthy sources that we use

kala jadu

kala jadu

we came across a cool site that you just could get pleasure from. Take a appear if you want

how to make money from home

how to make money from home

The info mentioned inside the report are several of the most beneficial offered

インフルエンザ

インフルエンザ

below you will find the link to some web pages that we feel you should visit

Amit

Amit

This site is so Horrible:( . I have got only 10-15 questions from this dump and iā€™m so tensed because i beleaved of this Dump. Try ur side too. šŸ™

Romiyo

Romiyo

got failed today from this dump, its so crap šŸ™