No matter how good a T-SQL programmer you think you are, it is always good to revisit the basics every once in a while and to ensure that you keep your high quality coding standards in check.
One of my favourite series of articles regarding good T-SQL coding practices is by Jeff Moden over at SQLServerCentral.com. Jeff discusses how to avoid RBAR (pronounced “ree-bar” and is a “Modenism” for “Row-By-Agonizing-Row”) using his humorous narrative tones.
I highly recommend you take a look at this enjoyable read. Hidden RBAR: Triangular Joins