I have a table that looks like this:
The agentsReady field is duplicating in all of the groups for the same location (in other words the 12 agentsReady in group1 are the same 12 agentsReady in group2) Grouping by location would be really easy, but what I really need is a grand total, which in the case above contractsComple ted would be 54 (very easy sum() function) but the agentsready should be 37, not 99. Is there any obvious way to group or aggregate these numbers so that I get the expected number? like maybe group everything by location and take the sum of contracts and max of agents, then take the total of everything?
I have a workaround in place, but it is pretty cumbersome, manipulating the data programatically . I would really like to get the total from the db.
Jared
Code:
location group agentsReady contractsCompleted location1 group1 12 14 location1 group2 12 6 location2 group1 25 12 location2 group2 25 20 location2 group3 25 2
I have a workaround in place, but it is pretty cumbersome, manipulating the data programatically . I would really like to get the total from the db.
Jared
Comment