1
select distinct sql_no_cache `labtech`.`approvalpolicies`.`ID` AS `ApprovalPolicyID`,`labtech`.`approvalpolicies`.`RequiresApproval` AS `RequiresApproval`,`labtech`.`hotfixdata`.`HotFixID` AS `HotfixID`,`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`.`Manufacturer` AS `Manufacturer`,`labtech`.`hotfixdata`.`IsThirdParty` AS `IsThirdParty`,`labtech`.`hotfixdata`.`LTProductKey` AS `LTProductKey`,if((`labtech`.`hotfixdata`.`CVSS` > 6.9),2,if((`labtech`.`hotfixdata`.`CVSS` > 3.9),1,0)) AS `CVSSCategory` from ((`labtech`.`approvalpolicies` join `labtech`.`hotfixdata`) left join `labtech`.`patchapprovalsettings` on(((`labtech`.`approvalpolicies`.`ID` = `labtech`.`patchapprovalsettings`.`ApprovalPolicyID`) and (`labtech`.`hotfixdata`.`LTProductKey` = `labtech`.`patchapprovalsettings`.`HotFixID`) and (`labtech`.`hotfixdata`.`OS` = `labtech`.`patchapprovalsettings`.`OS`)))) where isnull(`labtech`.`patchapprovalsettings`.`Approval`)