SQL sometimes feel a bit like black magic. How the query engine figures out what plan to execute, why is this query slow etc. The best resource I have come across is the book Indexing beyond the basics. It gives a bit of easy to remember theory and lots of great examples.
Some more random links I stumples upon recently:
And lastly ALWAYS remember to