SELECT q.name, q.cost
FROM (SELECT name, cost
FROM test
ORDER BY name DESC LIMIT 10) q
ORDER BY q.name ASC;
SELECT q.name, q.cost
FROM (SELECT name, cost
FROM test
ORDER BY name DESC LIMIT 10) q
ORDER BY q.name ASC;