@sduenas I checked the queries.
The new query is fine, too. In my point of view the new query is much more readable, because there is no subquery to generate a virtual table like in the last one.
You are right, the new query can return more than one query. The last query only returns one.
But it is possible to add a LIMIT 1 to the new query to return only one query.
What do you think about this @linzhp ?