Hi guys and thanks to everyone will help me.
I have this query:
SELECT c.accNum.bID.bID AS "Branch ID",
--c.accNum.accNumber AS "Account Number",
--c.accHolder.PrintFullName() AS "Customer Name",
MAX(c.accNum.balance) AS "Balance"
FROM tabCustomersAccounts c
GROUP BY c.accNum.bID.bID--, c.accNum.accNumber, c.accHolder.PrintFullName(), c.accNum.balance
ORDER BY c.accNum.bID.bID;
When I change the code to this:
SELECT c.accNum.bID.bID AS "Branch ID",
c.accNum.accNumber AS "Account Number",
c.accHolder.PrintFullName() AS "Customer Name",
MAX(c.accNum.balance) AS "Balance"
FROM tabCustomersAccounts c
GROUP BY c.accNum.bID.bID, c.accNum.accNumber, c.accHolder.PrintFullName(), c.accNum.balance
ORDER BY c.accNum.bID.bID;
From this results you can see that I they are wrong because I want only the MAX balance to be displayed for each Branch.