Hi,
Below is the query where I need to filter the data using window function.
I don't want to use inline view for mt query because i need to use the same query in OWB which it wont support.
Select a.Physical_Id,
a.Booking_Begin_Date,
a.Booking_End_Date,
a.Country_Cd,
Row_Number() Over(Partition By a.Physical_Id, a.Country_Cd, a.Booking_Begin_Date Order By a.Booking_Begin_Date) Rnk
From booking_mstr a
Where Row_Number() Over(Partition By a.Physical_Id, a.Country_Cd, a.Booking_Begin_Date Order By a.Booking_Begin_Date) =1;
I Cannot use below query in OWB Which is Inline View
----------------------------------------------------------------------------
Select b.* From
(Select a.Physical_Id,
a.Booking_Begin_Date,
a.Booking_End_Date,
a.Country_Cd,
Row_Number() Over(Partition By a.Physical_Id, a.Country_Cd, a.Booking_Begin_Date Order By a.Booking_Begin_Date) Rnk
From booking_mstr a) Where b.rnk=1;
;
Any help really appreciated.
Thanks in advance