Apache Pig Group Operator
The Apache Pig GROUP operator is used to group the data in one or more relations. It groups the tuples that contain a similar group key. If the group key has more than one field, it treats as tuple otherwise it will be the same type as that of the group key. In a result, it provides a relation that contains one tuple per group.
Example of Group Operator
In this example, we group the given data on the basis of the last name.
Steps to execute Group Operator
Here, we got the desired output.