pass group by to sql builder