In that case it seems to me that you should not be being asked to do this?
This isn’t a problem with a simple solution that you could be expected to self-teach … it reads to me like the programmer would need to know all sorts of company-specific inter-related stuff (such as “SCMI security check will delete non-matching records and assign security values to the remaining records”), but also require the programmer to have sufficient skills for the complexity of SQL that would be required to solve this.
By your own admission you don’t have those skills.
I can’t imagine that anyone here is going to help with this, it would take way too much time and because you have no skills it would require teaching rather than just “nudging in the right direction”. If your company doesn’t have resources for this job then they need to hire someone