The syntax seems really odd to me and far away from the Scala collections api. Shouldn't this rather aim for something like

    val q = (tabs.map(_.name).distinct.orderBy(n=>n).mkString(","), tabs.map(_.count).avg).run

There are obviously some features that would needed to be added to Slick to make that work.

1. distinct: https://github.com/slick/slick/issues/96
2. calling .run on a tuple of queries and executing them in a single SQL query.
3. mkString or better custom aggregation functions which would be the focus of this PR. They would need to be extension methods of Query[...] and we could provide an easy way to define them.