I'm trying to write a query like ```sql SELECT array_agg(foo) FROM bar GROUP BY baz ``` but I'm struggling to understand how to do it. How should the [`groupBy`](https://hackage.haskell.org/package/rel8-1.3.1.0/docs/Rel8.html#v:groupBy) combinator be used?