View previous topic :: View next topic
|
Author |
Message |
mahi
New User
Joined: 04 Apr 2006 Posts: 86 Location: Hyderabad
|
|
|
|
Hi,
I have a table EMPTAB with columns empname and Dept.There are different depts.
I want to select the employees of those depts, in which there are more than 10 members.
plz suggest me the query |
|
Back to top |
|
|
paresh.ojha
New User
Joined: 21 Sep 2006 Posts: 17
|
|
|
|
Mahi,
I think this will solve your purpose
Code: |
SELECT EMPNAME
FROM EMPTAB
WHERE DEPT IN (SELECT DEPT
FROM EMPTAB
GROUP BY DEPT
HAVING COUNT(DEPT) >=10) |
|
|
Back to top |
|
|
|