Query to get technician group is not working properly - Build-8013 & MS SQL DB

Query to get technician group is not working properly - Build-8013 & MS SQL DB

Provided query is not working properly. Group is displying more than 1 times after polling the report.PSA report
Forum Reference - 
https://forums.manageengine.com/topic/technicians-and-roles-report

-----------------------------------------------------
Rajesh Singh | Sr. Tech Specialist | ACP, ITILv3f, MCSE
-----------------------------------------------------

                  New to ADSelfService Plus?