meteficha/esqueleto — pull request #7 by db81 (2012-09-23 12:36:31+00:00)
Title: GROUP BY support.

This adds a new groupBy function:
```haskell
select $ from $ \(fooBar `InnerJoin` foo `InnerJoin` bar) -> do
on (fooBar ^. FooBarBar ==. bar ^. BarId)
on (fooBar ^. FooBarFoo ==. foo ^. FooId)
groupBy (bar ^. BarId, bar ^. BarName)
orderBy [asc countRows]
return (bar ^. BarId, bar ^. BarName, countRows)
```
It has tuple magic that allows the user to easily specify several columns.