R
R
Ravenswood2021-06-01 17:50:52
Python
Ravenswood, 2021-06-01 17:50:52

How do I get the sum of all "coins" values ​​in mongodb?

"id": 1
"coins": 500

"id": 2
"coins": 10

"id": 50
"coins": 1000

How can I count the value of "coins" in all MongoDB records and find out how many coins there are in total?
I want to get the result - 1510

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question