title: mySQL isn't giving the results that it should
body: <p>I have been creating a data base for an assignment and I have a query that needs to be implemented.
  The query needs to Provide a project id of all projects that have more than two update patches.
  and I'm using the query:</p>
  
  <pre><code>SELECT projectID
  FROM Transaction
  HAVING COUNT(Transaction.status = ‘patch’) &gt; 2
  </code></pre>
  
  <p>but I'm getting <code>projectID 1</code> from this eventhough the only project with more than two patches is 9.</p>
  
  <p>I'm using the table:</p>
  
  <pre><code>CREATE TABLE Transaction
  ( 
      transactionID SMALLINT NOT NULL,
      ProjectID SMALLINT NOT NULL,
      PRIMARY KEY(transactionID, projectID),
      FOREIGN KEY(projectID) REFERENCES Project(projectID),
      userID SMALLINT NOT NULL,
      FOREIGN KEY(userID) REFERENCES Developer(userID),
      date DATE NOT NULL,
      status ENUM('upload','update','patch') NOT NULL
  );
  </code></pre>
  
  <p>and this is the data that I have in my table:</p>
  
  <pre><code>INSERT INTO Transaction
  (transactionID, projectID, userID, date, status) values
  
  (1,1,2,'2013-12-29','upload'),
  (2,7,8,'2014-05-12','update'),
  (3,9,20,'2013-07-15','patch'),
  (4,12,8,'2013-08-04','upload'),
  (5,10,26,'2014-11-06','update'),
  (6,9,26,'2013-07-04','patch'),
  (7,20,26,'2012-12-15','upload'),
  (8,13,14,'2013-02-16','update'),
  (9,12,8,'2014-07-11','patch'),
  (10,19,20,'2013-08-14','upload'),
  (11,19,20,2013-02-13,'update'),
  (12,14,20,'2013-11-10','patch'),
  (13,18,14,'2012-12-26','upload'),
  (14,1,2,'2014-07-14','update'),
  (15,12,8,'2013-04-11','patch'),
  (16,3,14,'2013-09-16','upload'),
  (17,4,20,'2013-09-02','update'),
  (18,9,20,'2014-09-18','patch'),
  (19,8,14,'2013-03-24','upload'),
  (20,17,8,'2014-10-20','update');
  </code></pre>
  
  <p>Does anyone have any idea why this isn't working?</p>