title: How to convert this stored procedure to retain or delete data from past 7 days
body: <p>Where
  IFNULL(d.updated,d.inserted) &lt; (CONCAT(YEAR(NOW()), &quot;<em>&quot;,MONTH(NOW)), &quot;</em>&quot;, &quot;01&quot;) -INTERVAL ',date_logs,' DAY):&quot;):</p>
  <p>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.</p>