title: Sql numbers of employees by department
body: <p>I have 2 tables employees(id, first_name, last_name, salary, department_id_ and department(id, name) and I want to show number of employees in each department.</p>
  <p>I have this question here:</p>
  <pre><code>SELECT department.name, COUNT(*) AS 'employees_number'
  FROM department
  LEFT JOIN employees
  ON employees.department_id = department.id
  GROUP BY department.id, department.name;
  </code></pre>
  <p>But for some reason, in departments where I have no people, it shows a number of employees as 1. Any idea why this is happening?</p>