1
select `labtech`.`mngd_svc_defs`.`ServiceDefinitionID` AS `ServiceDefinitionID`,`labtech`.`mngd_svc_defs`.`ServiceDefinitionGUID` AS `ServiceDefinitionGUID`,`labtech`.`mngd_svc_defs`.`SKU` AS `SKU`,`labtech`.`mngd_svc_defs`.`Name` AS `ServiceName`,`labtech`.`mngd_svc_defs`.`Description` AS `Description`,`labtech`.`mngd_svc_services`.`GroupID` AS `GroupID`,`labtech`.`mngd_svc_services`.`AppliedCount` AS `AppliedCount`,`labtech`.`mngd_svc_servicexrefs`.`SearchID` AS `SearchID`,`labtech`.`contacts`.`ContactID` AS `ContactID`,`labtech`.`contacts`.`LocationID` AS `LocationID`,`labtech`.`contacts`.`ClientID` AS `ClientID`,`labtech`.`contacts`.`Firstname` AS `FirstName`,`labtech`.`contacts`.`LastName` AS `LastName`,`labtech`.`contacts`.`Email` AS `Email` from (((`labtech`.`mngd_svc_defs` join `labtech`.`mngd_svc_services` on((`labtech`.`mngd_svc_services`.`ServiceDefinitionID` = `labtech`.`mngd_svc_defs`.`ServiceDefinitionID`))) join `labtech`.`contacts` on((`labtech`.`contacts`.`ContactID` = `labtech`.`mngd_svc_services`.`TargetID`))) join `labtech`.`mngd_svc_servicexrefs` on(((`labtech`.`mngd_svc_servicexrefs`.`TargetID` = `labtech`.`mngd_svc_services`.`GroupID`) and (`labtech`.`mngd_svc_servicexrefs`.`ServiceDefinitionID` = `labtech`.`mngd_svc_defs`.`ServiceDefinitionID`) and (`labtech`.`mngd_svc_servicexrefs`.`TargetTypeFlags` = 128)))) where (((`labtech`.`mngd_svc_defs`.`ServiceType` & 8192) = 8192) and (`labtech`.`mngd_svc_services`.`TargetTypeFlags` = 8192))