• Just avoid RIGHT JOIN altogether. It makes it harder to follow the logic from top to bottom. Also use brackets around your tables so you can easily see what's going on.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP