First_Value_PartionBy1.htm
Oracle and PostgreSQL
Script:

select ename, deptno dept, sal, sal - first_value( sal ) over ( partition by deptno order by sal ) diff from emp order by deptno, sal

 

Oracle emp table:

First Value :Oracle

First_Value: PostgreSQL