Hi,
Can someone please help me understand difference between FIRST and FIRST_VALUE in Anaytic Functions.
I tried below 2 queries, but I'm seeing same output. The only difference I'm seeing is the SAL field is ordered in FIRST_VALUE, but not in FIRST.
SELECT ename,
deptno,
sal,
MIN(sal) keep (dense_rank FIRST
ORDER BY sal) over (partition BY deptno) FIRST
FROM emp;
SELECT ename,
deptno,
sal,
first_value(sal) over (partition BY deptno order by sal) FIRST
FROM emp;
Using: Windows 8.1
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
PL/SQL Release 12.1.0.1.0 - Production
"CORE 12.1.0.1.0 Production"
TNS for 64-bit Windows: Version 12.1.0.1.0 - Production
NLSRTL Version 12.1.0.1.0 - Production