replace AND DATE(projectcreatedon) =CURRENT_DATE AND DATEPART() <....? com: AND projectcreatedon > (now() - INTERVAL 10 SECOND)