In a mongodb group/map command determine the group's percentage of a total -


In a mongodb group operation, there is a way to determine totals during their final determination, To eaxample, for example, after the completion of the group operation, I know that the total volume of Group A is 50. Is there a way to get the group's quantity value as a percentage of the total?

Or do I have to save the results in the collection, to determine the sum, then go back and update each document with the count of the total count for the group?

area area, which sets JavaScript globals available for map , < You can add a field to area and type either map , and final function and either map or Total track during the short steps; whatever is most understandable for your use; You can reach it during final to calculate the percentage for each output group.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -