Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select x.ename,y.dname, round(to_char(sysdate,'yyyy') - to_char(hiredate,'yyyy')) an_vechime
- from emp x,dept y where x.deptno = y.deptno and
- x.deptno = (select a.deptno from emp a
- having count(a.empno) in
- (select max(count(empno)) from emp
- where (to_char(sysdate,'yyyy') - to_char(hiredate,'yyyy')) >20
- group by deptno
- )
- group by a.deptno);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement