FIX: Add missing 'groupby' and remove redundant conditional in 'having'
Merge pull request #2029 from nedmas/patch-2

FIX: Add missing 'groupby' method