Fix error with long aggregates (week/month)
Merge pull request #56 from thkaiser/master

Fix error with long aggregates (week/month) (add missing SORT to query)