- Group by
Users can observe that by default, categorical variables take ‘Group by’ function and Numerical variables take ‘Sum’ function. These default applied functions can be seen and changed in the Meta data file which is present in the folder where the application is installed.
1. Group by: This function is used to aggregate data, mainly categorical variables. For example, if there is a column containing employee names and another with cost, we can find out the cost incurred for different employees. To do that, we will have to apply group by function to the Employee name column and a sum function to the cost. Have a look at below insight:
2. Sum: It returns the total sum of the row. In the above example, sum function was applied to the travel cost column which returned the total cost of travel for that particular employee in the row. To elaborate, Employee Alec Lynch would have travelled to the destination Mumbai for numerous times. So by applying the sum function on the Travel cost column, we could find out the total cost for Alec Lynch to travel to Mumbai.
3. Distinct: Distinct function returns unique values present in the column. A use case can be, finding the unique name of clients and their respective travel counts. It will show the count of unique clients in the column.
4. Count: The count function returns the number of rows matching a specified criterion. For example, if we need to find out the number of time a particular employee has travelled to Mumbai, first we need take an employee name column with group by function applied. Then the destination column with a filter of Mumbai applied to it. And again a destination column with count function applied on it. The result will be seen as follows:
5. Max/Min: Max/Min will return the biggest/smallest value of that column. For example, if we need to find out what was the highest/lowest cost for a particular employee, we would have to apply a group by function to the employee name column and Max/Min function to the Travel cost column. The results would be as follows:
6. Avg: The average function returns the average value of selected column. For example, if we need to find out the average expenditure for a particular employee for a particular year, we would have apply a group by function to employee name and a avg function to the Travel cost column. The result would be as follows:
Note: Users can also add new aggregate functions. To know more, Click Here
For More Info, Contact us at firstname.lastname@example.org