Oracle
1Z0-061 · Question #308
View the Exhibits and examine the structures of the COSTS and PROMOTIONS tables. Evaluate the following SQL statement: SQL> SELECT prod_id FROM costs WHERE promo_id IN (SELECT promo_id FROM…
The correct answer is D. It displays prod IDs in the promos with cost less than the highest cost in the same time interval. See the full explanation below for the reasoning.
Question
View the Exhibits and examine the structures of the COSTS and PROMOTIONS tables. Evaluate the following SQL statement:
SQL> SELECT prod_id FROM costs WHERE promo_id IN (SELECT promo_id FROM promotions WHERE promo_cost < ALL (SELECT MAX(promo_cost) FROM promotions GROUP BY (promo_end_datepromo_ begin_date))); What would be the outcome of the above SQL statement?
Options
- AIt displays prod IDs in the promo with the lowest cost.
- BIt displays prod IDs in the promos with the lowest cost in the same time interval.
- CIt displays prod IDs in the promos with the highest cost in the same time interval.
- DIt displays prod IDs in the promos with cost less than the highest cost in the same time interval.
How the community answered
(27 responses)- A4% (1)
- B11% (3)
- C7% (2)
- D78% (21)
Community Discussion
No community discussion yet for this question.