QuestionQ15

VerifiedRestricting and Sorting Data

Refer to the exhibit and review the structure of the promotions table.

You need to produce a report of all promos from the promotions table under these conditions:

  1. The promo name must not start with 'T' or 'N'.
  2. The promo cost must be greater than $20000.
  3. The promo must have ended after 1st January 2001.

Which WHERE clause returns the required result?

Question Image

Explanation

The required filter must combine all conditions with AND. The patterns 'T%' and 'N%' match values whose first character is T or N, respectively, so applying NOT LIKE to both excludes either initial letter. promo_cost > 20000 and promo_end_date > '1-JAN-01' enforce the remaining thresholds. OR would allow rows satisfying only part of the requirements, while patterns beginning with % test for a letter anywhere in the name rather than at its start.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!