Abinitio Interview Question #15 | Lowest and Highest value implementatio...
Watch my YouTube video for explanation :
Please look into the class notes here for your references:
SELECT deptno,
ename,
sal,
MIN(sal) KEEP (DENSE_RANK FIRST ORDER BY sal) OVER (PARTITION BY deptno) "Lowest",
MAX(sal) KEEP (DENSE_RANK LAST ORDER BY sal) OVER (PARTITION BY deptno) "Highest"
FROM emp
ORDER BY deptno, sal;
DEPTNO ENAME SAL Lowest Highest
---------- ---------- ---------- ---------- ----------
10 MILLER 1300 1300 5000
10 CLARK 2450 1300 5000
10 KING 5000 1300 5000
20 SMITH 800 800 3000
20 ADAMS 1100 800 3000
20 JONES 2975 800 3000
20 SCOTT 3000 800 3000
20 FORD 3000 800 3000
30 JAMES 950 950 2850
30 WARD 1250 950 2850
30 MARTIN 1250 950 2850
30 TURNER 1500 950 2850
30 ALLEN 1600 950 2850
30 BLAKE 2850 950 2850
Achive the above in abinitio
a. Use SCAN with ROLLUP
b.
Replicate ------------------->
Input -> Sort--> -> JOIN (on Key DeptID) --> O/P
Replicate-->ROLLUp(key dept) ->
Fore more Abinitio, AWS and data engineering videos please subscribe , view , like and share my YouTube channel
Click DataPundit
Comments
Post a Comment