I have a review table with multiple number columns. I would like to count he avg of all columns in one query.
So if the table looks like:
{
foo : 2,
bar : 5,
foobar : 10
},
{
foo : 4,
bar : 3,
foobar : 12
}
then i would like to get the avg for each column in one query. I know I can do:
r.table('stats' ).avg( 'foo' )
on each column but I would like to do this in just one query and map into into just one object.
Any ideas on how to do this?