• attached the updated plan and a txt file that Contains : the 4 tables creation, the stored proc. and the function i used in the stored proc.