SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
SELECT department AS DEPARTMENT, COUNT(*) AS EMP_COUNT FROM employee RIGHT JOIN department ON employee.dept_no=department.dept_no GROUP BY department ORDER BY EMP_COUNT DESC, department.department asc

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear