I would like to make an aggregation (or "sql group by" like action) to a index, so the result can be used to make a line chart of the average value of that result set, like this
-Index data:
|attendance id|clerk id|hours spent|year |
|1 |A |1.5 |2015|
|1 |B |2 |2015|
|2 |B |3 |2015|
|3 |C |6 |2016|
|3 |B |3.2 |2016|
|4 |A |7 |2017|
The line graph, when plotted, would have 4 dots with the years and man-hour values:
2015: 3.25 [(3.5+3)/2]
2016: 9.2 [(9)/1]
2017: 7 [(7)/1]
Is there a way to accomplish this?