title: Elastic search find sum of two fields in single query
body: <p>I have a requirement of find sum of two fields in a single query. I have managed to find the sum of one field, but facing difficulty to add two aggression in a single query.</p>
  
  <p>My json look like the following way </p>
  
  <pre><code>{
      "_index": "outboxprov1",
      "_type": "message",
      "_id": "JXpDpNefSkKO-Hij3T9m4w",
      "_score": 1,
      "_source": {
         "team_id": "1fa86701af05a863f59dd0f4b6546b32",
         "created_user": "1a9d05586a8dc3f29b4c8147997391f9",
         "created_ip": "192.168.2.245",
         "folder": 1,
         "post_count": 5,
         "sent": 3,
         "failed": 2,
         "status": 6,
         "message_date": "2014-08-20T14:30Z",
         "created_date": "2014-06-27T04:34:30.885Z"
      }
   } 
  </code></pre>
  
  <p>My search query </p>
  
  <pre><code>{
     "query": {
        "filtered": {
           "query": {
              "match": {
                 "team_id": {
                    "query": "1fa86701af05a863f59dd0f4b6546b32"
                 }
              }
           },
           "filter": {
              "and": [
                 {
                    "term": {
                       "status": "6"
                    }
                 }
              ]
           }
        }
     },
     "aggs": {
        "intraday_return": {
           "sum": {
              "field": "sent"
           }
        }
     },
      "aggs": {
        "intraday_return": {
           "sum": {
              "field": "failed"
           }
        }
     }
  }
  </code></pre>
  
  <p>How to put two aggression in one query? Please help me to solve this issue. Thank you</p>