January 30, 2012 at 10:26 pm
how to get employeenames whose managers have a minimum of 3 persons working under him..
thanks in advance
January 30, 2012 at 11:58 pm
You should ask the Human Resource department.
Ok, seriously now, how are we supposed the answer the question when we have no idea what the tables are like, how the columns are defined et cetera?
Please read the articles linked to in my signature on how to post a question to the forums.
ps: I hope this is not a homework assignment
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
January 31, 2012 at 1:23 am
Hi
I am using basic emp table.
select * from EMP a where exists(
select mgr from EMP b where a.MGR= b.mgr group by mgr having count(*)>2)
order by mgr
Regards
Siva Kumar J.
January 31, 2012 at 11:03 am
thanks shiv..
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply