• I'm not going to write a query here. Just some ideas. If you need more help, I'm glad to help you out.

    Your query will look something like

    
    
    SELECT <all your main stuff here>
    FROM ... OuterFrom1
    WHERE ProjNum IN
    (SELECT TOP 5 ProjNum
    FROM ...
    WHERE OuterFrom1.EmpId = SubQuery1.EmpID)

    Maybe a bit of explanation :

    In the subquery in the where clause, you select the TOP 5 projects that an employee has worked on.

    So you will have to bind the employeeid of the subquery to that of the mainquery.

    Using the IN clause, you only select projects that are in the TOP 5 in your main query. With those results, you can do anything you want.

    If you want some more elaborate query, please post the structure of your tables. That makes it easier to get things right...