Remove sorting to support postgres group by