Generally, you can always wrap a query as subquery if you don't want to output all rows:
SELECT title FROM (SELECT ...) sub;
But you can also use expressions in
ORDER BY, not just input or output columns. So there is no need for this (like @ypercube already commented).
For the case at hand, it must be mentioned that you are using the additional module pg_trgm. What you are trying to do can be simplified to:
WHERE title % 'Nation'
ORDER BY title <-> 'Nation'
SIMILARITY(title, 'Nation') DESC with the simpler, equivalent
title <-> 'Nation', since the
<-> operator (per documentation):
Returns the "distance" between the arguments, that is one minus the
Either version works, but the latter is shorter and index support is bound to the operator, not the function. And you should have a GiST index on