꼬꼬마
postgresql - lead, lag over
알 수 없는 사용자
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