The execution sequence of oracle clauses an SQL statement contains many clauses. When writing SQL statements, it is very important to understand the priority of executing SQL clauses, otherwise, a simple SQL statement may be converted into multiple nested SQL statements, which may lead to incorrect return results. Under www.2cto.com, an example is provided to illustrate the priority of each clause: select a, B, count (sum (c) over () from twhere t. d = 1 start with e is not null connect by prior f = ggroup by a, bhaving sum (c)> 100 order by 3; this SQL contains: 1. SELECT Clause 2. group by clause 3. analysis function 4. from clause 5. where Clause 6. start... connect by clause 7. having clause 8. the order by clause for the FROM clause can be simply understood as a table or a scan (if multi-Table Association is involved, it is complicated and will not be discussed here); www.2cto.com for the SELECT clause, the execution plan is executed at the end. I understand it as returning data to the user rather than reading data. Reading data is performed at the FROM step. The order is 4-> 6-> 5-> 2-> 7-> 3-> 8-> 1 from clause-> start... connect by clause-> where clause-> group by clause-> having clause-> analysis function-> order by clause-> SELECT clause, note that the preceding sequence only indicates general conditions, not all cases follow this execution order, especially when group by and order by are both present. Example: select a, B, count (sum (c) over () from twhere t. d = 1 start with e is not null connect by prior f = ggroup by a, bhaving sum (c)> 100 order by a; the execution sequence of this SQL statement may be: 4-> 6-> 5-> 2 + 8-> 7-> 3-> 1. The actual execution order is based on the execution plan. However, the priority of the following parts is determined regardless of the SQL statement: start... connect by clause-> where clause-> group by clause-> having clause-> Analysis Function