--- title: "How to: Find the Maximum Value Using the Aggregate Operator" slug: "aggregate-operator-max-by" description: "Learn to identify the oldest dog in a dataset using the Max By function with this step-by-step guide on configuring data components and workflows." updated: 2026-01-06T07:19:55Z published: 2026-01-06T19:09:42Z canonical: "docs.unqork.io/aggregate-operator-max-by" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.unqork.io/llms.txt > Use this file to discover all available pages before exploring further. # How to: Find the Maximum Value Using the Aggregate Operator UDesignerClassic Designer This how-to guide guides in identifying the maximum value in a data set by using the Max By function of the [Aggregate](/v1/docs/aggregate-operator) operator. ## Configuration Let’s say you require the name of the oldest dog from a list of dogs. Begin with a [Data Table](https://docs.unqork.io/docs/data-table-component) component that stores information regarding dogs and their respective ages. Then, configure a [Data Workflow](https://docs.unqork.io/docs/data-workflow-component) to identify and return the name of the oldest dog. > [!NOTE] > These instructions assume you have a new module open, saved, and with a title. ### Configure the Data Table Component Begin by adding your [Data Table](/v1/docs/data-table-component) component to store a list of dogs and their ages. 1. In the Module Builder, drag and drop a **Data Table** component onto your canvas. 2. In the **Property ID** field, enter `dtDogs`. 3. In the data table, enter the following: | # | A | B | | --- | --- | --- | | 1 | **name** | **age** | | 2 | Ivy | 7 | | 3 | Lucy | 10 | | 4 | Wally | 1 | | 5 | Nacho | 5 | | 6 | Thor | 5 | | 7 | Holly | 13 | ![A static image displaying the Data table displaying names and ages of various dogs for reference.](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/UD_Agg_MAXBY_DT.jpg?sv=2026-02-06&spr=https&st=2026-11-07T17%3A57%3A44Z&se=2026-11-07T18%3A57%3A44Z&sr=c&sp=r&sig=eoQ7fISEOx1FerarxnnLTLDFgqDZU0AI%2FpJYlZ%2BuxJw%3D) 4. Click **Save Component**. ### Configure the Data Workflow Component Next, configure your [Data Workflow](/v1/docs/data-workflow-component) component and an [Aggregate](/v1/docs/aggregate-operator) operator to identify the oldest dog. Then, you’ll display the results using a [Console](/v1/docs/console-operator) operator. 1. Drag and drop a **Data Workflow** onto your canvas, placing it below your Data Table component. 2. In the **Property ID** and **Canvas Label Text** fields, enter `dwfOldest`. #### Configure the Input Operator 1. Drag and drop an **Input** operator onto your Data Workflow canvas. 2. Configure the operator's **Info** window as follows: | Setting | Value | | --- | --- | | Category | Input | | Component | dtDogs | | Required | Yes | | Source | Default | #### Configure the Aggregate Operator 1. Drag and drop an **Aggregate** operator onto your Data Workflow canvas. 2. Configure the operator's **Info** window as follows: | Setting | Value | | --- | --- | | Category | Aggregate By | | Label | Oldest Dog | | Aggregation Type | Max By | | Join Group Keys | No | | Group Key | | | Value Key | age | 3. Connect the output port (right) of the `dtDogs` **Input** operator to the input port (left) of the `Oldest Dog` **Aggregate** operator. #### Configure the Console Operator 1. Drag and drop a **Console** operator onto your Data Workflow canvas. 2. Configure the operator's **Info** window as follows: | Setting | Value | | --- | --- | | Category | Console | | Label | Who is the oldest dog? | 3. Connect the output port (right) of the `Oldest Dog` **Aggregate** operator to the input port (left) of the `Who is the oldest dog?` **Console** operator. ![A static image displaying the Data workflow interface showing input, aggregate, and console components for dog information.](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/UD_Agg_MaxBY_DW.jpg?sv=2026-02-06&spr=https&st=2026-11-07T17%3A57%3A44Z&se=2026-11-07T18%3A57%3A44Z&sr=c&sp=r&sig=eoQ7fISEOx1FerarxnnLTLDFgqDZU0AI%2FpJYlZ%2BuxJw%3D) 4. Click **Save Component**. ### Configure the Button Component Lastly, configure a [Button](https://docs.unqork.io/docs/how-to-guide-button-component) component to trigger your Data Workflow. 1. Drag and drop a **Button** component onto your canvas, placing it below your Data Workflow component. 2. In the **Property ID** field, enter `btnOldestDog`. 3. In the **Label Text** field, enter `Find Oldest Dog`. 4. From the **Action Type** drop-down**,** select **Event.** 5. From the **On Click** drop-down, select **dwfOldest**. ![A static image displaying the Button labeled 'Find Oldest Dog' with action type and trigger settings displayed.](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/UD_Agg_MaxBY_BUtton.jpg?sv=2026-02-06&spr=https&st=2026-11-07T17%3A57%3A44Z&se=2026-11-07T18%3A57%3A44Z&sr=c&sp=r&sig=eoQ7fISEOx1FerarxnnLTLDFgqDZU0AI%2FpJYlZ%2BuxJw%3D) 6. Click **Save Component**. 7. **Save** your module. Here's how your configured module looks in the Module Builder: ![A static image displaying the UDesigner Module Interface displaying a database query to find the oldest dog in a dataset.](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/UD_Agg_MaxBy_MB.jpg?sv=2026-02-06&spr=https&st=2026-11-07T17%3A57%3A44Z&se=2026-11-07T18%3A57%3A44Z&sr=c&sp=r&sig=eoQ7fISEOx1FerarxnnLTLDFgqDZU0AI%2FpJYlZ%2BuxJw%3D) Preview your module in Express View and open the DevTools Console. Click the **Find the Oldest Dog** button and you'll see the oldest dog in your `Who is the oldest dog?` **Console** operator. ![](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/DWF_Aggregate_MaxBy_Express.jpg?sv=2026-02-06&spr=https&st=2026-11-07T17%3A57%3A44Z&se=2026-11-07T18%3A57%3A44Z&sr=c&sp=r&sig=eoQ7fISEOx1FerarxnnLTLDFgqDZU0AI%2FpJYlZ%2BuxJw%3D) This how-to guide guides in identifying the maximum value in a data set by using the Max By function of the [Aggregate](/v1/docs/aggregate-operator) operator. ## Configuration Let’s say you require the name of the oldest dog from a list of dogs. Begin with a [Data Table](https://docs.unqork.io/docs/data-table-component) component that stores information regarding dogs and their respective ages. Then, configure a [Data Workflow](https://docs.unqork.io/docs/data-workflow-component) to identify and return the name of the oldest dog. > [!NOTE] > These instructions assume you have a new module open, saved, and with a title. ### Configure the Data Table Component Begin by adding your [Data Table](/v1/docs/data-table-component) component to store a list of dogs and their ages. 1. In the Module Builder, drag and drop a **Data Table** component onto your canvas. 2. In the **Label** and **Property Name** fields, enter `dtDogs`. 3. In the data table, enter the following: | # | A | B | | --- | --- | --- | | 1 | name | age | | 2 | Ivy | 7 | | 3 | Lucy | 10 | | 4 | Wally | 1 | | 5 | Nacho | 5 | | 6 | Thor | 5 | | 7 | Holly | 13 | ![A static image displaying the Data table displaying names and ages of various dogs for reference.](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/CD_Agg_MaxBy_DT.jpg?sv=2026-02-06&spr=https&st=2026-11-07T17%3A57%3A44Z&se=2026-11-07T18%3A57%3A44Z&sr=c&sp=r&sig=eoQ7fISEOx1FerarxnnLTLDFgqDZU0AI%2FpJYlZ%2BuxJw%3D) 4. Click **Save**. ### Configure the Data Workflow Component Next, configure your [Data Workflow](/v1/docs/data-workflow-component) component and an [Aggregate](/v1/docs/aggregate-operator) operator to identify the oldest dog. Then, you’ll display the results using a [Console](/v1/docs/console-operator) operator. 1. Drag and drop a **Data Workflow** onto your canvas, placing it below your Data Table component. 2. In the **Canvas Label Text** and **Property Name** fields, enter `dwfOldest`. #### Configure the Input Operator 1. Drag and drop an **Input** operator onto your Data Workflow canvas. 2. Configure the operator's **Info** window as follows: | Setting | Value | | --- | --- | | Category | Input | | Component | dtDogs | | Required | Yes | | Source | Default | #### Configure the Aggregate Operator 1. Drag and drop an **Aggregate** operator onto your Data Workflow canvas. 2. Configure the operator's **Info** window as follows: | Setting | Value | | --- | --- | | Category | Aggregate By | | Label | Oldest Dog | | Aggregation Type | Max By | | Join Group Keys | No | | Group Key | | | Value Key | age | 3. Connect the output port (right) of the `dtDogs` **Input** operator to the input port (left) of the `Oldest Dog` **Aggregate** operator. #### Configure the Console Operator 1. Drag and drop a **Console** operator onto your Data Workflow canvas. 2. Configure the operator's **Info** window as follows: | Setting | Value | | --- | --- | | Category | Console | | Label | Who is the oldest dog? | 3. Connect the output port (right) of the `Oldest Dog` **Aggregate** operator to the input port (left) of the `Who is the oldest dog?` **Console** operator. ![A static image displaying the Data workflow options showing input, aggregate, and console steps for finding the oldest dog.](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/CD_Agg_MaxBy_DW.jpg?sv=2026-02-06&spr=https&st=2026-11-07T17%3A57%3A44Z&se=2026-11-07T18%3A57%3A44Z&sr=c&sp=r&sig=eoQ7fISEOx1FerarxnnLTLDFgqDZU0AI%2FpJYlZ%2BuxJw%3D) 4. Click **Save**. ### Configure the Button Component Lastly, configure a [Button](https://docs.unqork.io/docs/how-to-guide-button-component) component to trigger your Data Workflow. 1. Drag and drop a **Button** component onto your canvas, placing it below your Data Workflow component. 2. In the **Property ID** field, enter `btnOldestDog`. 3. In the **Label Text** field, enter `Find Oldest Dog`. 4. From the **Action Type** drop-down**,** select **Event.** 5. From the **On Click** drop-down, select **dwfOldest**. ![A static image displaying the button component configuration settings for finding the oldest dog in a workflow module.](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/CD_Agg_MaxBy_Button.jpg?sv=2026-02-06&spr=https&st=2026-11-07T17%3A57%3A44Z&se=2026-11-07T18%3A57%3A44Z&sr=c&sp=r&sig=eoQ7fISEOx1FerarxnnLTLDFgqDZU0AI%2FpJYlZ%2BuxJw%3D) 6. Click **Save & Close**. 7. **Save** your module. Here's how your configured module looks in the Module Builder: ![A static image displaying the Classic Designer configuration for dog data and a button to find the oldest dog.](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/CD_Agg_MaxBy_MB.jpg?sv=2026-02-06&spr=https&st=2026-11-07T17%3A57%3A44Z&se=2026-11-07T18%3A57%3A44Z&sr=c&sp=r&sig=eoQ7fISEOx1FerarxnnLTLDFgqDZU0AI%2FpJYlZ%2BuxJw%3D) Preview your module in Express View and open the DevTools Console. Click the **Find the Oldest Dog** button and you'll see the oldest dog in your `Who is the oldest dog?` **Console** operator. ![](https://cdn.us.document360.io/15548f06-2fba-434c-b0c1-5df88317dbd7/Images/Documentation/DWF_Aggregate_MaxBy_Express.jpg?sv=2026-02-06&spr=https&st=2026-11-07T17%3A57%3A44Z&se=2026-11-07T18%3A57%3A44Z&sr=c&sp=r&sig=eoQ7fISEOx1FerarxnnLTLDFgqDZU0AI%2FpJYlZ%2BuxJw%3D) A Property ID is the unique field ID used by Unqork to track and link components in your module. Canvas Label Text indicates the purpose of the corresponding field or component. For non-input components, the Canvas Label Text isn't end-user facing, and only appears in the . Triggers activate another component when certain requirements are met. Trigger types include Concurrent, Post, and Error. Some components do not have the ability to trigger others. Label Text conveys what the input component is and what information it displays. Enter the purpose of the corresponding component or field. The action performed by the button when selected. Enter the Property ID of the component that you want to trigger on each button-click. Express View is how your end-user views your application. Express View also lets you preview your applications to test your configuration and view the styling. This is also the view your end-users will see when interacting with your application. After configuring a module, click Preview in the Module Builder to interact with the module in Express View. The DevTools Console helps you securely store, build, test, and deploy your software. Label Text conveys what the input component is and what information it displays. Enter the purpose of the corresponding component or field. A Property ID is the unique field ID used by Unqork to track and link components in your module.