Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm having trouble writing a set analysis.
I want to calculate the avg(sum(weight)) for this year or for a selected month.
The month is also a calculated field: month(empty_date)
Because emprt_date is a timestamp.
Can anyone help me write this?
Hi,
sum() is an aggregation function as is avg() - you can't put one around the other afaIk. Try
>>> aggr(sum(weight), month) <<<
instead.
HTH
Best regards,
DataNibbler