Is there a better way to find the max count in a table
Posted
by nXqd
on Stack Overflow
See other posts from Stack Overflow
or by nXqd
Published on 2010-05-09T12:17:52Z
Indexed on
2010/05/09
12:28 UTC
Read the original article
Hit count: 267
tsql
select NV.PHG
From Nhanvien NV
Group by NV.phg
Having count(nv.Manv) >= all (select count(NV.MANV from nhanvien nv group by nv.MANV))
I'm finding a better way to find the 'max count' NV of a PHG ( in this example ) . I think, we meet this case all the time when we do SQL, i should've a better way . Thanks for reading this :)
© Stack Overflow or respective owner