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;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top