title: How to find previous month's last day for last year in Teradata SQL
body: <p>I want to find out the previous month's last day, but I want it for last year, in Teradata SQL.</p>
  <p>Examples:</p>
  <p>If current date is '2022-02-02', then the output I require is '2021-01-31'<br />
  If current date is '2022-07-25', then the output I require is '2021-06-30'</p>