```scala
(tabs.map(_.name).distinct.orderBy(n=>n).mkString(","), tabs.map(_.count).avg).run
```
can generate sql like this:
```
select string_agg(distinct x1.name, ',' order by x1.name), avg(x1.count) from test1_tab1 x1
```

As `PostgreSQL` [documentation](http://www.postgresql.org/docs/9.3/static/sql-expressions.html#SYNTAX-AGGREGATES) said, that's a `PostgreSQL` extension:
> **Note**: The ability to specify both DISTINCT and ORDER BY in an aggregate function is a PostgreSQL extension.

And if `slick` can provide an easy way to define and use aggregate functions, that will very good. : )
In fact, your suggested syntax looks so good!