So I often wonder, where you
would use Haskell's groupBy WITHOUT sorting first, but I assume there are situations, where this is useful.
But if you sorted first, then there must be an Ord-er on the elements, yes? In which case you could then apply (sqlGroup = group . sort) as originally desired.
I'm sure groupBy is useful standalone (dim memories of some functional pearl) but your hunch is right in that I normally use it after a sorting step.