Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 266
  • Last Modified:

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
0
Frank Freese
Asked:
Frank Freese
  • 5
  • 5
1 Solution
 
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
 
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
Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

 
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.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now