title: Get employee with tenure of 2 to 5 years in sql
body: <p>I have a tenure table where I have columns link id, name, join date of an employee.</p>
  
  <p>I am trying to get only those employee whose tenure(work experience) is 2 to 5 years from join date to today's date.</p>
  
  <p>I used query </p>
  
  <pre><code>SELECT ID FROM tenure WHERE DATEADD(year, 2, JoinDate) &gt;= '2018-08-06' AND DATEADD(year, 5, JoinDate) &lt;= '2018-08-06';
  </code></pre>
  
  <p>My tabular structure is
  <a href="https://i.stack.imgur.com/6aLFo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6aLFo.png" alt="enter image description here"></a></p>
  
  <p>How can I get only those employees whose working period or tenure is between 2 to 5 years from their join date to today's date?</p>