1. SQL queries inside a loop