1. In the logical execution order, does HAVING run before or after GROUP BY?
- After GROUP BY
- Before GROUP BY
- Simultaneously
- Depends on indexes
Hint: The engine must form the groups (GROUP BY) before it can evaluate aggregate conditions (HAVING) on those groups.