Direction: Choose the correct option
Q1.
What is the correct SQL execution order?
Direction: Choose the correct option
Q2.
SELECT department, COUNT(*) FROM employees WHERE hire_date > '2020-01-01' GROUP BY department HAVING COUNT(*) >= 3 ORDER BY department;What happens first?Direction: Choose the correct option
Q3.
Why can't you use column alias in WHERE clause?
Direction: Choose the correct option
Q4.
SELECT department, AVG(salary) AS avg_sal FROM employees WHERE salary > 30000 GROUP BY department HAVING avg_sal > 50000 ORDER BY avg_sal DESC LIMIT 3;When is LIMIT applied?Direction: Choose the correct option
Q5.
Where does DISTINCT fit in execution order?
