Count and Sum Query

  • Thread starter Thread starter Rohit Thomas
  • Start date Start date
R

Rohit Thomas

Hello Everyone,

I have a table with the following fields: BankNumber,
RoutingNumber, and DollarAmount. I am trying to design a
single query that will group by BankNumber, then give me a
total count of Routing Numbers in the RoutingNumber field
and a total sum of the dollars in the DollarAmount field
within an certain dollar amount range. I can achive this
will two queries but is it possible to get the data with a
single query.

Thanks in advance,
Rohit Thomas
 
Select BankNumber, Count(RountingNumber), Sum(DollarAmount)
From YourTable
Group By BankNumber;
 

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