exam questions

Exam 1z0-051 All Questions

View all questions & answers for the 1z0-051 exam

Exam 1z0-051 topic 1 question 69 discussion

Actual exam question from Oracle's 1z0-051
Question #: 69
Topic #: 1
[All 1z0-051 Questions]

See the Exhibit and examine the structure of the PROMOTIONS table:
Exhibit:

Using the PROMOTIONS table, you need to find out the average cost for all promos in the range $0-2000 and $2000-5000 in category A.
You issue the following SQL statements:
Exhibit:

What would be the outcome?

  • A. It generates an error because multiple conditions cannot be specified for the WHEN clause
  • B. It executes successfully and gives the required result
  • C. It generates an error because CASE cannot be used with group functions
  • D. It generates an error because NULL cannot be specified as a return value
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️
CASE Expression -
Facilitates conditional inquiries by doing the work of an
IF-THEN-ELSE statement:
CASE expr WHEN comparison_expr1 THEN return_expr1
[WHEN comparison_expr2 THEN return_expr2
WHEN comparison_exprn THEN return_exprn
ELSE else_expr]
END

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Currently there are no comments in this discussion, be the first to comment!
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...