title: Selecting count(column) from different table
body: <p>I have three tables area,vehicle and employee.
  ward_no is the foreign key for vehicle and employee.
  I want to select the number of vehicles and number of employees and display them along with other details of area.
  The query i used is:</p>
  
  <pre><code>select a.* ,count(v.vid) as vehicles,count(e.eid) as employees from area a,vehicle v,employee e where v.ward_no=a.ward_no and e.ward_no=a.ward_no group by a.name;
  </code></pre>
  
  <p>But the output is not what I want. I get the same values in both the columns where the count is use instead of displaying the total number of vehicles/employees in that particular area.
  I'm new to MySQl</p>