Is Region another column in your table? If you want top 5 per branch you can do the following. If you want to calculate the top 5 for the region, you have to have some table where regions are listed and can be related to branches.

Hi James, It's not returning the required info. This is what I would need to be returned.

Branch3 - $500 000 *(the $500 000 would be the Sum(Fee) of the top5 consultants in Branch3)Branch6 - $450 000 *(the $450 000 would be the Sum(Fee) of the top5 consultants in Branch6)Branch1 - $300 000 *(the $300 000 would be the Sum(Fee) of the top5 consultants in Branch1)Branch5 - $250 000 *(the $250 000 would be the Sum(Fee) of the top5 consultants in Branch5)Branch2 - $200 000 *(the $200 000 would be the Sum(Fee) of the top5 consultants in Branch2)Branch4 - $100 000 *(the $100 000 would be the Sum(Fee) of the top5 consultants in Branch4)

Each branch has more than 10 consultant but I only want the sum(fee) of the top 5

SELECT Branch,SUM(Totalfee) AS BranchTop5Total
FROM
(
SELECT Consultant,Branch,SUM(fee) AS Totalfee,
DENSE_RANK() OVER (PARTITION BY Branch ORDER BY SUM(fee) DESC) AS Rn
FROM Table
GROUP BY Consultant,Branch
)t
WHERE Rn <=5
GROUP BY Branch

SELECT Branch,SUM(Totalfee) AS BranchTop5Total
FROM
(
SELECT Consultant,Branch,SUM(fee) AS Totalfee,
ROW_NUMBER() OVER (PARTITION BY Branch ORDER BY SUM(fee) DESC) AS Rn
FROM Table
GROUP BY Consultant,Branch
)t
WHERE Rn <=5
GROUP BY Branch