Your query appears to be joining two tables on columns neither of which is a candidate key of its table. A join would normally be on a primary key (or a candidate key at least) in the referenced table, and a corresponding foreign key in the referencing table. The former will have distinct values. To do otherwise will produce numerous cross matches leading to erroneous results.
The following is a simple example:
SELECT [FirstName] & " " & [LastName] AS Customer,
COUNT(*) AS TransactionCount,
SUM(TransactionAmount) AS TotalAmount,
AVG(TransactionAmount) AS AverageAmount
FROM Customers INNER JOIN Transactions
ON Customers.CustomerID = Transactions.CustomerID
GROUP BY Customers.CustomerID, [FirstName] & " " & [LastName],
LastName, FirstName
ORDER BY LastName, FirstName;
This taken from my DatabaseBasics.zip demo which you'll find in my public databases folder at:
https://onedrive.live.com/?cid=44CC60D7FEA42912&id=44CC60D7FEA42912!169
The query returns the total number of transactions, the total amount of all transactions, and the average transaction amount per customer.