[filter] Implement order by in smart raw query.