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;
Good point at putting brackets between the math operation with date fields.
why is the answer not c?
This is because it follows PEMDAS
C divides promo begin date by 7, and not the difference between begin and end as intended.
It will evaluate: promo_begin_date/7 first. But the corrent order is (promo_end_date-promo_begin_date)/7
Because in C “promo_begin_date” is devided by 7.
The answer is D.
Please see at extra brackets . Extra thing makes to expert and also has ability to kick us out.
First three will throw the below error:
inconsistent datatypes: expected NUMBER got DATE
So Correct answer is D
This question is all about using the parenthesis correctly.
s
D
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.
usually posts some pretty interesting stuff like this. If youre new to this site
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
Sites of interest we have a link to
always a large fan of linking to bloggers that I love but do not get quite a bit of link like from
Here are a few of the internet sites we suggest for our visitors
The facts talked about inside the report are a number of the most beneficial accessible
below youll obtain the link to some web sites that we believe you must visit
one of our guests just lately proposed the following website
please go to the web pages we stick to, such as this a single, as it represents our picks in the web
The data mentioned within the write-up are several of the most beneficial available
check beneath, are some completely unrelated internet sites to ours, nonetheless, they are most trustworthy sources that we use
we came across a cool site that you just could get pleasure from. Take a appear if you want
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
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. š
got failed today from this dump, its so crap š