'How to find previous month's last day for last year in Teradata SQL

I want to find out the previous month's last day, but I want it for last year, in Teradata SQL.

Examples:

If current date is '2022-02-02', then the output I require is '2021-01-31'
If current date is '2022-07-25', then the output I require is '2021-06-30'



Solution 1:[1]

Substract 13 months from today and then find the last day of this month:

last_day(add_months(current_date, -13)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 dnoeth