WITH T AS (
SELECT '20160101' DY, '1' SEQ FROM DUAL UNION ALL
SELECT '20160101' , '2' FROM DUAL UNION ALL
SELECT '20160101' , '3' FROM DUAL
)
SELECT DY , SEQ , LAG(SEQ) OVER(PARTITION BY DY ORDER BY SEQ )
FROM T
by 정민호
[2016.01.06 16:22:26]
감사합니다
댓글등록
SQL문을 포맷에 맞게(깔끔하게) 등록하려면 code() 버튼을 클릭하여 작성 하시면 됩니다.