1.上个月的第一天时间戳
select UNIX_TIMESTAMP(date_sub(date_sub(date_format(now(),'%y-%m-%d'),interval extract(
day from now())-1 day),interval 1 month))
2.上个月最后一天时间戳
select UNIX_TIMESTAMP(date_sub(date_sub(date_format(now(),'%y-%m-%d 23:59:59'),interval extract(
day from now()) day),interval 0 month)) as date
3.当月第一天时间戳
select unix_timestamp(date_format(NOW(), '%Y-%m-01')