SQL Language (MOSC)

MOSC Banner

Grouping Of Dates

in SQL Language (MOSC) 20 commentsAnswered ✓

Hi All,

I am stuck in one of query as per client requirement

There is One ID whose status is

On 1st March to 10th March - status is "Estimated"

On 11th March to 15th March - status is "Regular"

On 16th March to 20th March - status is "Estimated"


these dates(Start and Stop Date) are coming from single column (MSRMT_LOCAL_DTTM), So i am using below condition

MIN(MSRMT_LOCAL_DTTM) START_DTTM,

MAX(MSRMT_LOCAL_DTTM) STOP_DTTM


But according to my condition used i am getting result

1st March to 20th March as "Estimated"

which is wrong

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center