GroupByTableSelect<TTable> ToSelect<TTable>(this GroupByTableQuery<TTable> source)
where TTable : ITable;
var select = _db.From("Users")
.ToSqlQuery()
.Where("Status=1")
.GroupBy("City")
.ToSelect();
// SELECT [City] FROM [Users] WHERE Status=1 GROUP BY [City]
var select = new CommentTable()
.GroupBy(c => [c.PostId])
.ToSelect()
.SelectGroupBy()
.SelectAggregate(c => c.Pick.SumAs("PickTotal"));
// SELECT [PostId],SUM([Pick]) AS PickTotal FROM [Comments] GROUP BY [PostId]