GET urza/order/_search
{
"size": 0,
"aggs": {
"by_user": {
"terms": {
"field": "userId.keyword"
},
"aggs": {
"total_cost": {
"sum": {
"field": "subtotalPrice"
}
}
}
}
}
}
Now i want to apply histogram aggregation on total cost, Is this possible ??