Reputation: 17
I have a table in MS Access:
ID | Holiday
----------+------------------
1234 | 1
1234 | 2
2345 | 5
2345 | 6
I would like create a query to sum the Holiday for each duplicate IDs.
I would like to make my query result like this:
ID | Holiday
----------+------------------
1234 | 3
2345 | 11
Any ideas on how to do this would be greatly appreciated.
Perhaps using SQL in MS Access ? Good day people.
Upvotes: 0
Views: 34
Reputation: 7503
Try the following, you just need to use sum
and group by
select
id,
sum(holiday) as holiday
from yourTable
group by
id
Upvotes: 2