Replaced sortBy with Joli SQL query with 'order by'