Handling LIMIT in queries with subqueries using TOP and ORDER BY