Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Simple Query [Q]
Try the following if the table is small...
create view vstaff as
select deptno, count(*) staffno group by deptno;
select deptno, staffno from vstaff
where staffno = (select max(staff) from vstaff);
It's quick and dirty, but it works.
Greg...
Received on Tue May 13 1997 - 00:00:00 CDT