SZI Technologies interview question

How to run a loop in database