Skip to content

partition by 범위 default 전략 #26

@white-gyu

Description

@white-gyu

문제

  • 왜 partition 범위 지정을 하지 않으면 이상한 값이 나올까?
  • 아래 쿼리 결과 동작 원리 알아오기
query결과
select DEPTNO, ename, SAL,
last_value(ename) over (
partition by deptno 
order by sal desc
)
from emp;
select DEPTNO, ename, SAL,
last_value(ename) over (
partition by deptno 
order by sal desc 
rows between current row 
     and unbounded following 
)
from emp;

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions