add column

  • Thread starter Thread starter Dan
  • Start date Start date
D

Dan

is there a way to add columns in a query for example


Loan officer # Loans
Dan 2
Ed 3
Frank 8

is there a way to total these numbers up at the bottom?
 
You can do something like this. The first query gets the name of the officer
and the count of each one's loans. The second query gets the total count of
all loans.

SELECT LoanOfficer, Count(LoanOfficer) AS NumberOfLoans
FROM Loans
GROUP BY LoanOfficer
UNION
SELECT "Total", Count(LoanOfficer)
FROM Loans;
 
Back
Top