SysSecRoleEntryPointsTmp srepTbl; SysUserLicenseMetadataTmp slsaTmp; SecurityRole securityRole; delete_from srepTbl; delete_from slsaTmp; SysUserLicenseMiner::BuildLicenseMetadataTable(slsaTmp); SysUserLicenseMiner::BuildRoleToUserTypeInfo(slsaTmp, srepTbl); while select maxOf(UserLicType) from srepTbl group by srepTbl.RoleRecId { select securityRole where securityRole.RecId == srepTbl.RoleRecId; info(strFmt("%1;%2;%3", securityRole.Name, securityRole.AotName, srepTbl.UserLicType)); }