fix aggregates in case of no aggregation variables
Merge pull request #921 from dennishendriksen/master

Fix aggregates in case of no aggregation variables