[off-topic]
When you post code in the forum, you need to format it. To do so you can either select all the code and click the </> button, or type 3 backticks ``` on a separate line both before and after the code block.
They are the same exact query’s except for what you are naming the result.
What is the real problem you are trying to solve by doing this? I suspect you also have a DB design problem. It would be a good idea to post an sql dump of your schema.