mysql query last month code example
Example 1: mysql get last 2 month data
SELECT * FROM d_jobs WHERE `job_date` >= last_day(now()) + interval 1 day - interval 3 month;
Example 2: mssql last day of month
SELECT DATEADD(month, ((YEAR(getdate()) - 1900) * 12) + MONTH(getdate()), -1)