title: Selecting all entries in a table before this month
body: <p>I've been trying different solutions but none seem to return the same values as I get from excel.</p>
  
  <p>I want to return all the items from a table where the entries in a column are before the current month value. So, if this month is January 2020, return the values before January 2020.</p>
  
  <p>Ideally it's going in a function where I am passing in the number of months back</p>
  
  <pre><code>SELECT *
  FROM tbl_name
  WHERE date_column &lt; (NOW() - INTERVAL 1 MONTH).
  </code></pre>
  
  <p>I've tried so many variations, I've now confused myself! Lots of the times it's returning NULL, and this variation returns a value, but it's missing some values.</p>