I have columns called accKey, dateKey, feeType, and item count. There are three types of accounts, seven types of fees, and 200 or so dates each corresponding to an item count. I want to find the total item count for a certain date and fee type. In other words, consolidating the accKey column, so I'm just finding the total item count of a certain type of fee on a specific date regardless of the accKey.
For example,
I have a table like this:
dateKey____AccKey_______FeeType____Total Item Count
1____________1 ___________2__________10
1____________2____________2__________10
1____________3____________2__________10
2____________1 ___________2__________10
2____________2____________2__________10
2____________3____________2__________20
3____________1 ___________2__________10
3____________2____________2__________10
3____________3____________2__________30
Thus on date 1, the total item count was 30
Thus on date 2, the total item count was 40
Thus on date 1, the total item count was 50
But I want to produce a table like this:
dateKey_____FeeType____Total Item Count
1____________2__________30
2____________2__________40
3____________2__________50
How do I do this?
Bookmarks