TO THE NEW interview question

basic loop concept mysql ,