Added groupby and distinct to QueryIterable