title: SQL Statement to find between two table less than date
body: <p>I'm stuck trying to find sql statement... I am using</p>
  <pre><code>SELECT rank.rank_name FROM rank, promotion_log
  WHERE rank.Id=promotion_log.rank 
  AND (promotion_date&lt;=@PD AND promotion_log.employee_ID=@ID)
  </code></pre>
  <p>I am trying to find rank name of employee where their most recent promotional date is less than or equal to a given date. This way I can have logs written and be able to retrieve them with the rank of employee at that time. Above statement is just returning most recent rank.</p>