I'm working to compute the median hours to resolution for tech support workers in my organization. I have pretty good idea of what needs to happen to compute the median, I'm just not sure how to get there.
I currently have a mysql dataset being returned with values similar to the data below.
hoursResolveDiff,lastname
0,Astudillo
3,Astudillo
7,Astudillo
7,Astudillo
8,Astudillo
8,Astudillo
22,Astudillo
25,Astudillo
46,Astudillo
51,Astudillo
103,Astudillo
117,Astudillo
145,Astudillo
148,Astudillo
169,Astudillo
173,Astudillo
334,Astudillo
339,Astudillo
0,Blakeman
0,Blakeman
0,Blakeman
0,Blakeman
0,Blakeman
0,Blakeman
1,Blakeman
2,Blakeman
2,Blakeman
2,Blakeman
3,Blakeman
4,Blakeman
4,Blakeman
5,Blakeman
5,Blakeman
5,Blakeman
6,Blakeman
6,Blakeman
6,Blakeman
6,Blakeman
7,Blakeman
7,Blakeman
7,Blakeman
10,Blakeman
...
I'm guessing I need to break this data into multiple arrays, so I would have an array of Astudillo's data, and array of Blakeman's data, etc. Count the number of elements in each array. Then, if the number of elements in that array is odd, grab the middle element. If the number of elements is even, get the sum of the middle two elements / 2.
Any help is appreciated. I'm really having trouble getting started.
Thanks for your time.
Scott