accident delete intended function for statistics stored procedure