Which statement is true regarding the above query?

View the Exhibit and examine the data in the COSTS table.
You need to generate a report that displays the IDs of all products in the COSTS table whose unit price is at
least 25% more than the unit cost. The details should be displayed in the descending order of 25% of the
unit cost.
You issue the following query:
SQL>SELECT prod_id
FROM costs
WHERE unit_price >= unit_cost * 1.25
ORDER BY unit_cost * 0.25 DESC;
Which statement is true regarding the above query?

View the Exhibit and examine the data in the COSTS table.

You need to generate a report that displays the IDs of all products in the COSTS table whose unit price is at least 25% more than the unit cost. The details should be displayed in the descending order of 25% of the unit cost.

You issue the following query:
SQL>SELECT prod_id
FROM costs
WHERE unit_price >= unit_cost * 1.25
ORDER BY unit_cost * 0.25 DESC;

 

Which statement is true regarding the above query?

A.
It executes and produces the required result.

B.
It produces an error because an expression cannot be used in the ORDER BY clause.

C.
It produces an error because the DESC option cannot be used with an expression in the ORDER BY clause.

D.
It produces an error because the expression in the ORDER BY clause should also be specified in the SELECT clause.



Leave a Reply 15

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


Anand Aili

Anand Aili

Can we have expression in GROUP BY clause?

Sayed

Sayed

Yes Anand. GROUP BY accommodates expression.

Google

Google

Usually posts some very exciting stuff like this. If youre new to this site.

Google

Google

Usually posts some very fascinating stuff like this. If you are new to this site.

human assets

human assets

Wonderful story, reckoned we could combine a handful of unrelated information, nonetheless actually really worth taking a look, whoa did 1 find out about Mid East has got additional problerms at the same time

SEO services in Lahore

SEO services in Lahore

please pay a visit to the web pages we stick to, which includes this a single, because it represents our picks from the web

Free Games download

Free Games download

check below, are some completely unrelated internet websites to ours, having said that, they are most trustworthy sources that we use

Contact- AtlantaPiano

Contact- AtlantaPiano

just beneath, are many completely not connected web sites to ours, on the other hand, they may be certainly worth going over

create app

create app

Here is an excellent Weblog You may Discover Exciting that we Encourage You

Wood fired pizza oven Pizza Party

Wood fired pizza oven Pizza Party

very few websites that take place to be comprehensive beneath, from our point of view are undoubtedly effectively worth checking out