I have a custom comment type with a star rating field value. When people create a comment on a node type they can also select a rating. I need to create a way to get an average of the ratings from the comments for the node.
I have created a view block that has a contextual filter of Id from url that can be placed on a node and it will display all the rating fields for that node. I need to calculate the average of the values. The views aggregation is throwing up an error regarding (GROUP columns is illegal if there is no GROUP BY clause).
Is there a way to get the average ?
Update: I have sorted the problem with the averaging by adding a field that is used to group. Now having problems using the average as an outputted field in templates. The view is creating the average but the node ID is needed. How would I display the view average for each node on a list of nodes?