SQL - GROUP BY and HAVING
Which of the following SQL queries correctly uses
GROUP BY to count employees per department?GROUP BY to count employees per department?SELECT department, COUNT(*) FROM employees GROUP BY department; correctly groups by department and counts employees. The other options have syntax errors: missing column after GROUP BY, no GROUP BY clause, or invalid WHERE syntax.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions