title: How do I list the count of occurrences using the over() function, but only display the occurrences that are listed in the result 3 or more times?
body: <p>How do I list the amount of times each account number has occurred if I only want to see the ones that have occurred 3 times or more? </p>
  
  <p>I'm using a window OVER() function to get the number of times the account number is listed.</p>
  
  <pre><code>SELECT a.ACCOUNTNUMBER AS [Account Number]
      , CONCAT(n.FIRST, ' ', n.MIDDLE, ' ', n.LAST) AS [Member Name]
      , l.id AS [Loan ID]
      , COUNT(a.ACCOUNTNUMBER)
          OVER(partition by a.ACCOUNTNUMBER) as [Number of 
  Tracking Record] 
      , n.EMAIL AS [Email]
      , n.HOMEPHONE AS [Phone Number]
  FROM dbo.account a
  INNER JOIN dbo.LOAN l
  ON a.ACCOUNTNUMBER = l.PARENTACCOUNT
  INNER JOIN dbo.LOANTRACKING lt
  ON l.PARENTACCOUNT = lt.PARENTACCOUNT
  AND l.ID = lt.ID
  INNER JOIN dbo.NAME n 
  ON a.ACCOUNTNUMBER = n.PARENTACCOUNT
  WHERE lt.type = 46
  AND l.ProcessDate = CONVERT(VARCHAR(8), dateadd(day,-1, getdate()), 
  112)
  AND lt.ProcessDate = CONVERT(VARCHAR(8), dateadd(day,-1, getdate()), 
  112)
  AND a.CLOSEDATE IS NULL
  AND lt.EXPIREDATE IS NULL
  GROUP BY a.ACCOUNTNUMBER, n.FIRST, n.MIDDLE, n.LAST, l.id, n.email, 
  n.HOMEPHONE
  ORDER BY [Account Number]
  </code></pre>
  
  <p>Right now my result is giving me the number of times all of the accounts are listed in the "Number of Tracking Record" column. I want to see only the account numbers that have "3" occurrences or above.</p>
  
  <p>My current result:</p>
  
  <p><img src="https://i.stack.imgur.com/NPD6B.png" alt="My current result"></p>
  
  <p>My Desired Result:</p>
  
  <p><img src="https://i.stack.imgur.com/OScIf.png" alt="My Desired Result"></p>