Functions
COLLECT_LIST
COLLECT_LIST function collects values into a list
Collects values into a list
Note that we first use the COLLECT_LIST to get all the people who live in the same city as Fatima in a LIST. Next we use the REDUCE to calculate the Geometric Mean.
An alternate way to calculate Geometric Mean would be: