Generally speaking your queries are executed (processed) in the following order: 1. FROM 2. ON 3. OUTER 4. WHERE 5. GROUP BY 6. CUBE | ROLLUP 7. HAVING 8. SELECT 9. DISTINCT 10 ORDER BY 11. TOP
"My interest is in the future because I'm going to spend the rest of my life there." - Charles F. Kettering