I have been working ot see the equivalent function for Oracle lead and lag function.
The oracle lead would look like
LEAD(col1.date,1,ADD_MONTHS(col1.DATE,12))
OVER(Partition By tab.a,tab.b,tab.c Order By tab.a)-1 END_DATE
LAG(col1.DATE + 7,1,col1.DATE-1)
OVER(partition by tab.a,tab.b Order By tab.b) LAG_DATE
Any better idea
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…