GROUP BY and BY clause

Example: If you need to create a report showing "n" best branches in individual years, then simply use the HEAT () or RANK () with the condition. Unfortunately, use the function itself is not enough! Report now shows the top 5 affiliates for the entire period, but we want the top 5 branches in each year. There are two solutions:







  1. Using the GROUP BY clause
  2. Using BY clause

1 / GROUP BY clause

on the "Advanced" explicitly specifies a GROUP BY clause, which when used with the "Display" function shall reset the values ​​for each group.When using the "Aggregate" function ensures the sum of values ​​for each group. The result is the desired report. 2 / BY clause is an alternative extension of the "Display" and "aggregation" function of "BY" clause. The result is the desired report. Erik Eckhardt .