SQL script can sum the digits of a number

If you are looking to delete the rows with number divisible completely by 3, you can use built-in modulus function

You could say something like this

delete
from myTable
where colNumber%3 = 0

This query should solve your problem

DELETE FROM table WHERE (id % 3) = 0;