date_sub(date,INTERVAL 时间间隔 类型):从日期date减去指定的时间间隔 类型可以是second,minute,hour,day,week,month,year
select created_at,date_sub(created_at ,interval 1 day) as created_date from users;
date_sub(date,INTERVAL 时间间隔 类型):从日期date减去指定的时间间隔 类型可以是second,minute,hour,day,week,month,year
select created_at,date_sub(created_at ,interval 1 day) as created_date from users;