10Jul/130
Last Day of Last Month and Last Day of Current Month in Teradata
Last day of last month:
select ADD_MONTHS(ADD_MONTHS((CURRENT_DATE - EXTRACT(DAY FROM CURRENT_DATE)+1),1)-1,-1)
Last day of current month:
select ADD_MONTHS((CURRENT_DATE - EXTRACT(DAY FROM CURRENT_DATE)+1),1)-1
10Jul/130
Get First Day of Month and First Day of Last Month in Teradata
First day of last month:
select ADD_MONTHS(CURRENT_DATE - EXTRACT(DAY FROM CURRENT_DATE) + 1,-1)
First day of current month:
select CURRENT_DATE - EXTRACT(DAY FROM CURRENT_DATE) + 1