1
select distinct sql_no_cache `labtech`.`approvalpolicies`.`ID` AS `ApprovalPolicyID`,`labtech`.`approvalpolicies`.`RequiresApproval` AS `RequiresApproval`,`labtech`.`approvalpolicies`.`StageDelay` AS `StageDelay`,`labtech`.`hotfixdata`.`HotFixID` AS `HotfixID`,`labtech`.`hotfixdata`.`IsThirdParty` AS `IsThirdParty`,`labtech`.`hotfixdata`.`Manufacturer` AS `Manufacturer`,`labtech`.`hotfixdata`.`kbID` AS `KBID`,`labtech`.`hotfixdata`.`Bulletin` AS `Bulletin`,`labtech`.`hotfixdata`.`Title` AS `Title`,`labtech`.`hotfixdata`.`Description` AS `Description`,`labtech`.`hotfixdata`.`OS` AS `OS`,`labtech`.`hotfixdata`.`CategoryName` AS `Category`,`labtech`.`hotfixdata`.`Severity` AS `Severity`,`labtech`.`hotfixdata`.`CVSS` AS `CVSS`,`labtech`.`hotfixdata`.`Date_Added` AS `DateAdded`,`labtech`.`patchapprovalsettings`.`Approval` AS `ApprovalSetting`,`labtech`.`patchapprovalsettings`.`Action` AS `Action`,`labtech`.`hotfixdata`.`Version` AS `Version`,`labtech`.`patchapprovalsettings`.`Version` AS `ApprovalVersion`,`labtech`.`patchapprovalsettings`.`Setby` AS `SetBy`,`labtech`.`patchapprovalsettings`.`SetTime` AS `SetTime`,`labtech`.`hotfixdata`.`ApprovalPolicyCount` AS `ApprovalPoliciesCount`,`labtech`.`patchapprovalsettings`.`Stage` AS `Stage`,`labtech`.`hotfixdata`.`LTProductKey` AS `LTProductKey`,if((`labtech`.`hotfixdata`.`CVSS` > 6.9),2,if((`labtech`.`hotfixdata`.`CVSS` > 3.9),1,0)) AS `CVSSCategory` from ((`labtech`.`patchapprovalsettings` join `labtech`.`hotfixdata` on(((`labtech`.`patchapprovalsettings`.`HotFixID` = `labtech`.`hotfixdata`.`LTProductKey`) and (`labtech`.`patchapprovalsettings`.`OS` = `labtech`.`hotfixdata`.`OS`)))) join `labtech`.`approvalpolicies` on((`labtech`.`patchapprovalsettings`.`ApprovalPolicyID` = `labtech`.`approvalpolicies`.`ID`)))