title: Compare the last 24h with the same period a year ago in MySQL
body: <p>I have a requirement to compare the last 24h with the same period a year ago.</p>
  
  <p>If I do:</p>
  
  <pre><code>event_date &lt; now() - INTERVAL 365 DAY and event_date &gt; now() - INTERVAL 366 DAY
  </code></pre>
  
  <p>it does not take into consideration leap years.</p>