Below Query takes long time to run and thing query need to be optimize. I tries to optimize the query but i thing i needs more improvement.
Am work with scalar sub query