It is a toy example. Perhaps imagine a more realistic subquery that is much longer. Are you going to duplicate a 50 line subquery to get the salary when all you want is one more value? No, you'd probably want to restructure the query with a join or CTE instead. To the author's point, a large change relative to the gain.
Well if he is insisting in doing the SQL version of writing everything inside a lambda without modularizing the code, then yeah that is bound to happen.
There's already a subquery in there. I'm saying this can still be done with one subquery, just in a different place and it returns the desired results.
>the only solution is to change half of the lines in the query
How about adding a second subquery for the salary.