Question : Trying to rank top 10 records in Access query by a group

Attached is my code that I am trying to get to work in Access. Below is the SQL and what I am trying to do is get the top 10 customers by balance by each branch. The code below works but it gives me the top 10 balances and the branch they are assigned to, I need this for each branch we have in our bank.
Code Snippet:
1:
2:
3:
4:
5:
SELECT DISTINCT TOP 10 dbo_FDM.[GL MTD Avg Bank Share Balance (Account)*], [dbo_0T-CostCenters].Branch
FROM dbo_FDM INNER JOIN [dbo_0T-CostCenters] ON dbo_FDM.[Cost Center] = [dbo_0T-CostCenters].CC_Z
WHERE ((([dbo_0T-CostCenters].CC_A)=830 Or ([dbo_0T-CostCenters].CC_A)=834) AND ((dbo_FDM.[Account Type])="d"))
GROUP BY dbo_FDM.[GL MTD Avg Bank Share Balance (Account)*], [dbo_0T-CostCenters].Branch
ORDER BY dbo_FDM.[GL MTD Avg Bank Share Balance (Account)*] DESC;

Answer : Trying to rank top 10 records in Access query by a group

It appears I pasted the wrong field into the GROUP BY statement.  Rather than  [dbo_0T-CostCenters].Branch it should have been dbo_FDM.[Cost Center]
Random Solutions  
 
programming4us programming4us