Commit 31d566a6 authored by vipul.v's avatar vipul.v

aggregate functions

parent 8ce631bc
...@@ -33,14 +33,19 @@ class InventoryData: ...@@ -33,14 +33,19 @@ class InventoryData:
"order_id": order_id, "order_id": order_id,
}, },
}, },
{
"$addFields": {
"customer_names": {"$toLower": "$customer_name"}
}
},
{ {
"$sort": "$sort":
{ {
"customer_name": -1, "customer_names": -1,
}, },
}, },
{ {
"$limit": 3 "$limit": 5
}, },
{ {
"$project": "$project":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment