This is a very dense article but it has a lot of little nuggets of information for someone like me who self taught themselves SQL as the needed it.

I think this is the part that was super helpful to me:

SELECT is executed after most other clauses. Most importantly, after FROM and GROUP BY. This is important to understand when you think you can reference stuff that you declare in the SELECT clause from the WHERE clause.

This causes me to have problems like this (their code sample):

SELECT A.x + A.y AS z
FROM A
WHERE z = 10 -- z is not available here!

http://tech.pro/tutorial/1555/10-easy-steps-to-a-complete-understanding-of-sql via Reddit?