EasyBasic SELECT
Count employees in each department (just count)
The query
SQL
SELECT
dept_id,
COUNT(*) AS employee_count
FROM employees
GROUP BY dept_id;Note
“GROUP BY aggregates rows sharing the same value into summary rows.
SELECT
dept_id,
COUNT(*) AS employee_count
FROM employees
GROUP BY dept_id;Note
“GROUP BY aggregates rows sharing the same value into summary rows.