View the Exhibit and examine the structure of the PROMOTIONS table. Using the PROMOTIONS
table, you need to display the names of all promos done after January 1, 2001, starting with the
latest promo. Which query would give the required result? (Choose all that apply.)
A.
SELECT promo_name, promo_begin_date FROM promotions
WHERE promo_begiii_date > ’01-JAN-01′ ORDER BY 2 DESC;
B.
SELECT promo_name. promo_begiii_date FROM promotions
WHERE promo_begin_date > ’01-JAN-01′ ORDER BY promo_name DESC:
C.
SELECT promo_name. promo_begin_date FROM promotions
WHERE promo_begin_date > ’01-JAN-01′ ORDER BY 1DESC:
D.
SELECT promo_name, promo_begin_date “START DATE” FROM promotions
WHERE promo_begin_date > ’01-JAN-01′ ORDER BY “START DATE” DESC;
How can you use column alias in group by clause ? 😮
Sorry, *order by clause
You can use alias in the ORDER BY clause, not GROUP BY.