Thanks for the feedback Prashant! The main point on the CTE part is to avoid multiple calls of the same object to minimize duplicate retrieves and reduce the amount of data to be processed. I've used CTE in this case and it proved to be more performant and resource-efficient.