Code what you know
Know what you code
First Principles:
If you don’t really understand what the SQL is supposed to accomplish, it will likely perform poorly,…
and even if it didn’t, it will likely be functionally wrong…
And even if it isn’t, it will be hard to understand and maintain!