Query sum

Experts,
My table transactions has fields labeled check amount, fees, and check type.
I need to sum all "check amount", "fees" and count the number of "check type" = H
Frank FreeseAsked:
Who is Participating?
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
Sure:

SELECT Sum(Transactions.[check amount]) AS [SumOfcheck amount], Sum(Transactions.fees) AS SumOffees, Count(Transactions.[check type]) AS [CountOfcheck type]
FROM Transactions
WHERE (((Transactions.YourDate)=[Enter Date:]) AND ((Transactions.[check type])="H"));

mx
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
Like so?

SELECT Sum(Transactions.[check amount]) AS [SumOfcheck amount], Sum(Transactions.fees) AS SumOffees
FROM Transactions
WHERE (((Transactions.[check type])="H"));


mx
0
 
Frank FreeseAuthor Commented:
I need a date parameter and count on check type = H
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Frank FreeseAuthor Commented:
Didn't get anything?
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
Are you wanting to Filter (WHERE) on Check Type = H ?

Can you show some of the table data?

mx
0
 
Frank FreeseAuthor Commented:
ok...found something. I changed YourDate to Date. Now where do I need to put the Beginning Date for my date parameter
0
 
Frank FreeseAuthor Commented:
Great - I figured it out!
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
Date Range ... like so:

SELECT Sum(Transactions.[check amount]) AS [SumOfcheck amount], Sum(Transactions.fees) AS SumOffees, Count(Transactions.[check type]) AS [CountOfcheck type]
FROM Transactions
WHERE (((Transactions.YourDate) Between [Enter Begin Date] And [Enter End Date]) AND ((Transactions.[check type])="H"));
0
 
Frank FreeseAuthor Commented:
thanks - it's been a while but once you got me started I could finish. Have a great week end mx. I do appreciate your help, as always.
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
Always a pleasure.  You have a good one also.

mx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.