Where IFNULL(d.updated,d.inserted) < (CONCAT(YEAR(NOW()), "",MONTH(NOW)), "", "01") -INTERVAL ',date_logs,' DAY):"):
Question : I need to create a stored procedure that cab delete data from past 7 days the above codes is for 30 days only .please help im just new to sql thank you.
)* to choose the first non-null value from list. So: `coalesce(d.updated,d.inserted) < current_date -7`
– Belayer Aug 24 '22 at 15:53