Skip to Content
0
Former Member
Jan 27, 2016 at 08:42 AM

Correlated subquery in HANA calculation views

717 Views

Hi

How can I implement the following sub query in HANA calculation views?

select empno, ename ,sal from emp e1,

(select avg(sal) avg_sal, deptno from emp

group by deptno ) e2

where e1.sal > e2.avg_sal and e1.deptno=e2.deptno

or

select * from emp t2

where sal > (select avg(sal) from emp t1 where t1.deptno = t2.deptno group by deptno):

,

Any kind of help would be highly appreciated..

Regards

Rajib