Actually problem was not in AVG function, but in SUM before the AVG in the query.
Attach a file by drag & drop or click to upload