Answers for "mysql get last month data"

SQL
4

mysql get last day of month

SELECT LAST_DAY(CURDATE());						-- Current month
SELECT LAST_DAY(CURDATE() - INTERVAL 1 MONTH);	-- Previous month
SELECT LAST_DAY(CURDATE() + INTERVAL 1 MONTH);	-- Next month
Posted by: Guest on May-21-2021
0

mysql get last 2 month data

SELECT * FROM d_jobs WHERE  `job_date` >= last_day(now()) + interval 1 day - interval 3 month;
Posted by: Guest on July-09-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language