Query for Warranty Expiration on Network Equipment

Query for Warranty Expiration on Network Equipment

Hello,
I am trying help our network engineer out. He built a query for asset records on all of our network equipment, however, warranty expiration date is a field you can build into reports. I have tried to create a custom query with query editor to add warranty expiration and I just cannot get it right. Is anyone able to assist with adding an additional line/lines to the query I have below?

SELECT MAX(longtodate(resource.EXPIRYDATE)) AS "Expiry Date", MAX(deptDef.DEPTNAME) AS "Department", MAX(resource.RESOURCENAME) AS "Asset Name", MAX(resource.SERIALNO) AS "Org Serial Number", MAX(product.COMPONENTNAME) AS "Product", MAX(longtodate(resource.EXPIRYDATE)) AS "Expiry Date", MAX(productType.COMPONENTTYPENAME) AS "Product Type", MAX(state.DISPLAYSTATE) AS "Asset State", MAX(rCategory.CATEGORY) AS "Asset Category", MAX(rtype.TYPE) AS "Asset Type" FROM Resources resource LEFT JOIN ComponentDefinition product ON resource.COMPONENTID=product.COMPONENTID LEFT JOIN ComponentType productType ON product.COMPONENTTYPEID=productType.COMPONENTTYPEID LEFT JOIN ResourceType rtype ON productType.RESOURCETYPEID=rtype.RESOURCETYPEID LEFT JOIN ResourceCategory rCategory ON productType.RESOURCECATEGORYID=rCategory.RESOURCECATEGORYID LEFT JOIN ResourceState state ON resource.RESOURCESTATEID=state.RESOURCESTATEID LEFT JOIN ResourceOwner rOwner ON resource.RESOURCEID=rOwner.RESOURCEID LEFT JOIN ResourceAssociation rToAsset ON rOwner.RESOURCEOWNERID=rToAsset.RESOURCEOWNERID LEFT JOIN DepartmentDefinition deptDef ON rOwner.DEPTID=deptDef.DEPTID WHERE  (( ( ( productType.COMPONENTTYPENAME = 'Firewall' ) OR ( productType.COMPONENTTYPENAME = 'Switch' ) ) OR ( productType.COMPONENTTYPENAME = 'Access Point' ) ) AND ( state.DISPLAYSTATE = 'In Use' ))   GROUP BY resource.RESOURCEID ORDER BY 1, 3

                New to ADSelfService Plus?