查询语言.groupBy

    用法如下

    1. Db::table('test', 'tid as id,tname as value')->
    2. groupBy('id')->
    3. groupBy('name')->
    4. getAll();
    5. # SELECT `test`.`tid` AS `id`,`test`.`tname` AS `value` FROM `test` GROUP BY `post`.`id`
    6. getAll();
    7. # SELECT `test`.`tid` AS `id`,`test`.`tname` AS `value` FROM `test` GROUP BY SUM(`test`.`num`)
    8. Db::table('test', 'tid as id,tname as value')->
    9. groupBy('{SUM([num])}')->
    10. getAll();
    11. groupBy("title,id,{concat('1234',[id],'ttt')}")->
    12. getAll();
    13. # SELECT `test`.`tid` AS `id`,`test`.`tname` AS `value` FROM `test` GROUP BY `test`.`title`,`test`.`id`,`test`.`ttt`,`test`.`value`
    14. Db::table('test', 'tid as id,tname as value')->
    15. groupBy(['title,id,ttt', 'value'])->
    16. getAll();