Description suggests that we should use UPDATE statement: "with a single update query and no intermediate temp table". But it turns out that solution with UPDATE is invalid, and in fact we must use SELECT statement.
@cpp0x Hi, I am the editor of this problem and I am sorry to confuse you. This is actually
update statement but previously
update has some permission issue. Now it has been fixed.
Thanks for the feedback and enjoy coding...