Re: Oracle LAG OVER en Mysql
Bonjour,
En fait en faisant un inner join j'ai réussi à faire ce que je voulais
select B.DAY as CURRENT_DAY, B.HLRID as CURRENT_HLRID, B.RANK as CURRENT_RANK ,
max(qGetPrev.DAY) as PREVIOUS_DAY,
max(qGetPrev.HLRID) as PREVIOUS_HLRID,
max(qGetPrev.RANK) as PREVIOUS_RANK
from OPM_DATA_DB.ALC_HLR_SUPSER_PEG_HH B
inner join
(
select HLRID, RANK, DAY
from OPM_DATA_DB.ALC_HLR_SUPSER_PEG_HH
) qGetPrev
on qGetPrev.HLRID = B.HLRID and qGetPrev.RANK = B.RANK
and qGetPrev.DAY < B.DAY
group by B.HLRID, B.RANK, B.DAY;
Subject
Views
Written By
Posted
3456
March 27, 2014 04:32AM
2005
March 28, 2014 12:40AM
Re: Oracle LAG OVER en Mysql
1676
March 28, 2014 02:03AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.