How can I make my loop check multiple records to determine the number of iterations for each camera_id
table ,,camere,,
table ,,inregistrari,,
I have th