상세 컨텐츠

본문 제목

postgresql - lead, lag over

꼬꼬마

by TISTORY 2017. 6. 7. 17:15

본문

SELECT 

LEAD(id) OVER () AS prev, -- offset rows after the current row within the partition

LAG(id) OVER AS next -- offset rows before the current row within the partition


관련글 더보기