We are retrieve the records from emp table.
Select * from emp
where sal in (select sal from emp group by sal having count(*)>1)
or
Select * from emp
where (sal,deptno) in (select sal,deptno from emp group by sal,deptno having count(*)>1)
output on tool
