title: Selecting employees with birthdays in given range using Oracle SQL
body: <p>For selecting birthdays between two months where FROMDATE and TODATE are some parameters in a prepared statement I figured something like this:</p>
  
  <pre><code>select
    p.id as person_id,
     ...
     ...
    where e.active = 1
          and extract(month from TODATE) &gt;= extract(month from e.dateOfBirth)
          and extract(month from e.dateOfBirth) &gt;= extract(month from FROMDATE)
          order by extract(month from e.dateOfBirth) DESC,
                extract(day from e.dateOfBirth) DESC
  </code></pre>
  
  <p>How can this be improved to work with days as well? </p>