Group

Aggregation function is a type of function used in data processing by grouping values into categories in order to find a significant meaning. The common aggregate functions include Count, Average, Maximum, Minimum, and Sum. However, we may perform more complicated statistical functions, such as Mode or Standard Deviation. Typically, the grouping is performed with the SQL Group by statement, as is shown in the following code; additionally, we may use aggregation functions, such as COUNT, MAX, MIN, and SUM in order to retrieve summarized information:

SELECT sentiment, COUNT(*)
FROM Tweets
GROUP BY sentiment

In MongoDB, we can use the Group function, which is similar to the SQL Group By statement. However, the Group function doesn't work in ...

Get Practical Data Analysis - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.