Another atempt to fix the group_by error on postgres
Merge branch 'hotfix/improved_index_charts_3'