title: SQL Query - Select Customers over a certain age
body: <p>I am trying to <code>SELECT</code> customers who are over the age of 65, and also have a balance greater than 5000.</p>
  
  <p>I can not figure out how to successfully calculate their age in my <code>WHERE</code> clause.</p>
  
  <p>This is my code:</p>
  
  <pre><code>SELECT 
      Customer.ID, Customer.lastName, Customer.firstName
  FROM 
      CUSTOMER
  INNER JOIN 
      has ON has.ID = CUSTOMER.ID
  INNER JOIN 
      Account ON Account.ACCNUMBER = has.ACCNUMBER
  WHERE 
      Account.BALANCE &gt; 5000 
      AND ((DATEDIFF(DAY, CUSTOMER.DATEOFBIRTH, GETDATE()) / 365.25) &gt; 65)
  ORDER BY 
      CUSTOMER.LASTNAME;
  </code></pre>
  
  <p>Where am I going wrong?</p>
  
  <p>Thanks for the help!</p>