Custom Aggregations in ES

Hello,

please could you check Sum by quantity and sort by lowest price - #2 by 79g ?

The query is almost the same, with an average as agg

"aggs": {
    "aggScore": {
      "avg": {
        "field": "score"
      }
    }
}

Hope it helps!