QuestionQ136

VerifiedRestricting and Sorting Data

The STORES table contains a START_DATE column of data type DATE, which records the date on which the row was inserted.

You want to display details only for rows whose START_DATE falls within the past 25 months.

Which WHERE clause can be used?

Explanation

MONTHS_BETWEEN(SYSDATE, start_date) returns the number of months elapsed since START_DATE. Restricting that value to 25 or less includes rows whose insertion date is within the preceding 25 months.

Community Discussion

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