grade/report/outcomes/index.php contains MySQL-specific query and produces an error at PostgreSQL.
There were two problems.
AFAIK wrapping column names by ` ` is not necessary in this case ("avg" and "count").
The "itemid" can be used here as a first returned column (and therefore the array key) because data are grouped by it.
Waiting for +2
Fixed in CVS HEAD and MOODLE_19_STABLE - see revs 1.14 and 18.104.22.168