Question :
How the SQL statement containing simple statement like
Select x
From y
Where z
Having,
order by
, group by
etc. are evaluated.( In which order they are evaluated.?)
Answer :
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