title: How to subtract one to the month of a date format in mysql?
body: <p>Assuming I have a select statement:</p>
  
  <pre><code>SELECT COUNT(*), wedding, DATE_FORMAT(weddate, '%y %m %d') FROM weddingtable
  </code></pre>
  
  <p>I want to make it such that I could subtract 1 from the month it would return:
  for example:</p>
  
  <pre><code>SELECT COUNT(*), wedding, DATE_FORMAT(weddate, '%y %m-1 %d') FROM weddingtable
  </code></pre>
  
  <p>It appears to just append "-1" to the month integer instead of actually subtracting one from the month. How do I accomplish this? (in other words, where it would normally return 5 in place of %m, it would return 4, etc.)</p>
  
  <p>Note: For January, I would expect in place of %m, it would be "0".</p>