Steps or evaluation order of the SQL statement
Following is the logical order of execution of the SQL clauses:


  
  FROM clause  
  WHERE clause
  GROUP BY clause
  HAVING clause
  SELECT clause
  ORDER BY clause