I want to get the average of a value that is present in a related model, basically like this, but it doesn't work:
?fields=id,position,avg(ratings.value)
Is that possible? What would be the easiest way to implement it?
I want to get the average of a value that is present in a related model, basically like this, but it doesn't work:
?fields=id,position,avg(ratings.value)
Is that possible? What would be the easiest way to implement it?