Nielsen interview question

Explain how to run a loop in SQL