FIX: Add missing 'groupby' and remove redundant conditional in 'having'