Sum Values in COlumn?

J

Jerry Baker

I have a table like this:

ID Absent Reason
1 1 a
1 1 b
2 2 a
2 1 c
2 1 b

How can I come up with a query, or report that totals the amount of
absences for each person (ID)?

ID Total Absences
1 2
2 4

Thanks.
 
J

Jerry Baker

Answered my own question.

SELECT ID, SUM(Absences) as [Total Absences]
GROUP BY ID
 

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

Top