1.

Which of the following ignores non numeric values?(a) $order(b) $sum(c) $asc(d) None of the mentionedThis question was posed to me during an internship interview.This intriguing question comes from Pipeline Operators in chapter Aggregation Concepts and Aggregation Mechanics of MongoDB

Answer»

The correct option is (B) $SUM

Explanation: $sum RETURNS a sum for each GROUP. IGNORES non-numeric values.



Discussion

No Comment Found

Related InterviewSolutions