Below is the oracle SQL query currently used in the existing system, i am trying to convert this sql into a SQL Server query for the new system.
I have been trying di