managers having more than 3 emp working under him

  • how to get employeenames whose managers have a minimum of 3 persons working under him..

    thanks in advance

  • 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

  • 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.

  • thanks shiv..

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply