Notes on database like queries with for.