Write a query which add two fields of a document and compare their sum to third field in mongo I have one document, say:

{
        "_id" : ObjectId("538b7128cf16e3ea5a1ab23c"),   
        "pgDownloadTime" : NumberLong(9776),
        "pgAccessTime" : NumberLong("1401647400058"),
        "expiredTime" : NumberLong("1401647468678"),
        "contentType" : 1,
        "articleId" : "35909002",
}


My query will be:

db.pageTrendLog.findOne({"expiredTime" : {$lte : "pgDownloadTime"+"pgAccessTime"}});


How can I write this query?
Here is one part of the answer; adding two fields together. Still trying to figure out how to compare the total of pgDownloadTime +pgAccessTime with expiredTime

// Add pgDownloadTime and pgAccessTime

db.pageTrendLog.aggregate([
    { $match: { "_id" : ObjectId("538c304b7446cf13431a2c5c") } }, 
      { $project : 
        {  
          'pgDownloadTime' : '$pgDownloadTime',  
          'pgAccessTime' : '$pgAccessTime', 
          'total' : {'$add' : [ '$pgDownloadTime', '$pgAccessTime' ]}
        }
      }]);