Thursday, March 11, 2021

Aggregate Pipelines Mongodb


db.purchase_orders.aggegate(
	[
		{$match : {customer : {$in : ["Mike", "Karen"]}}}
		{$group : {
			_id: "$product",
			total:{$sum : "$total"}
			}
		}
		{$sort  : {total : -1}}
	]
)

No comments:

Post a Comment

Azure - Pipeline - Add Approver for Stage

https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass