title: MYSQL- Help making a query
body: <p>Solved! Thanks for all the help!</p>
  
  <p>How do I fix this query </p>
  
  <p>So the Pet's table's fields are</p>
  
  <blockquote>
    <p>Pet_Code,Name,Employee_code,Type,Sex</p>
  </blockquote>
  
  <p>And the Employees table's fields are </p>
  
  <blockquote>
    <p>Employee_code,Last_Name,First_Name,Department</p>
  </blockquote>
  
  <p>This is what I tried but didn't work:</p>
  
  <pre><code>SELECT First_Name,Last_Name 
  FROM employees E,pets P 
  WHERE P.Employee_code=E.Employee_code AND COUNT(Type='C') &gt; Count(Type='D'); 
  </code></pre>