Home » RDBMS Server » Server Administration » Find all row from one table exists maximum in other
Find all row from one table exists maximum in other [message #371457] Mon, 23 October 2000 00:42 Go to next message
Prashant patil
Messages: 6
Registered: October 2000
Junior Member
Display DEPT table details for the department which has the highest number of employees in the EMP table
Re: Find all row from one table exists maximum in other [message #371489 is a reply to message #371457] Sat, 28 October 2000 02:34 Go to previous message
Prashant patil
Messages: 6
Registered: October 2000
Junior Member
select * from dept where deptno in (select deptno from emp group by deptno having count(deptno) = (select max(count(a.deptno)) from emp a group by a.deptno))

This query worked with ORACLE/SQL and not with MS-SQL
Previous Topic: Does trunc slow down performance
Next Topic: Oracle JDeveloper with Informix
Goto Forum:
  


Current Time: Sat Apr 27 04:29:08 CDT 2024