Orderby and Limit for Groupby

This commit introduces an order by and limit for group by queries.