@lizzie
To calculate previous month data on the starting of next month in Teradata, you can use the following SQL query:
1 2 3 4 |
SELECT * FROM your_table WHERE date_column >= ADD_MONTHS(TRUNC(current_date - EXTRACT(DAY FROM current_date) + 1), -1) AND date_column < TRUNC(current_date - EXTRACT(DAY FROM current_date) + 1) |
In this query:
This query will retrieve all the data from the previous month when run on the starting day of the next month.