今日の3か月前:
select * from table where timestamp >= now()-interval 3 month;
月の初めから開始:
select * from table where timestamp >= last_day(now()) + interval 1 day - interval 3 month;
今日の3か月前:
select * from table where timestamp >= now()-interval 3 month;
月の初めから開始:
select * from table where timestamp >= last_day(now()) + interval 1 day - interval 3 month;