Top N Min


๐Ÿ“Š Top N Min Function

๐Ÿ” Definition

This function is used to:

โžก๏ธ Count the values โ€‹โ€‹of a field
โžก๏ธ Then take the N data with the largest min value

In other words:
    Aggregate + Automatic Ranking (Top N based on MIN)

โš™๏ธ Parameter

1. ๐ŸŽฏ Field

Fields to be calculated the Min value

Example:

2. ๐Ÿ”ข Number of Record (N)

3. ๐Ÿ”€ Ordered (Y/N)

๐Ÿ“Œ Recommendation: use Y for clear results (Largest top)

๐Ÿ“ฅ Input & ๐Ÿ“ค Output

Input Output
The output will contain:

๐Ÿง  How it works

For example data:
    category        views
    ---------------------
    Music           100
    Music           200
    Gaming          300
    Gaming          100
    Gaming          50
After the process:
1. Max value per category
    category        max_views
    --------------------------
    Music           100
    Gaming          50
2. Top N (for example N=1)
    category_new    max_views
    -------------------------
    Music           100

๐Ÿงช Case Study Examples

๐ŸŽฏ Case:

Displays the Top 3 YouTube categories with the most min views

๐Ÿ”„ Workflow ๐Ÿ“Š Output:
    category_new	min_views
    -----------------------------
    Music               100
    Gaming              50
    News                45

๐Ÿ’ก Important Note:

The useful output fields from this buffer function are the grouped fields and new fields. Add a Transformator () assembly afterward to select these fields.