--- title: "Using Data from Joined Tables to Get Greatest Value" slug: "using-data-from-joined-tables-to-get-greatest-value" updated: 2021-03-12T15:05:35Z published: 2021-03-12T15:07:29Z canonical: "documentation.decisions.com/using-data-from-joined-tables-to-get-greatest-value" --- > ## Documentation Index > Fetch the complete documentation index at: https://documentation.decisions.com/llms.txt > Use this file to discover all available pages before exploring further. # Using Data from Joined Tables to Get Greatest Value Example Lab ArticleWhile Example Lab projects are resources for public use, articles and assets are not actively maintained. Screenshots and features are from the specified version below. These references may become dated as new versions are released. --- ## Overview | ## Example Lab Details | | --- | | **Version** | 6.5.0 | | **Root Folder** | Example Lab - Greatest Value of Joined Table Group Step | | **Modules** | None | | **Dependencies** | None | This Example Lab demonstrates how to create two lists of data types and compare the largest data entries of the two. --- ## Explanation Using the **Create Data** step, this creates two small samples list of two different data types. TableOne holding values and IDs, and TableTwo for the names associated with those IDs. Then the flow iterates through TableOnes values with the **For Each Group** Step based off of TableTwo's IDs. Then For Each value in the grouping, add them to a Sum list. Afterwards the Flow uses a **Sort Array step** to sort based off of the Sum in descending order and store the top value with its associated data to the resulting list. Repeat this for the next group and return the resulting list. Reference Articles[ARTICLES GO HERE. USE THE LINK ICON AT THE TOP OF THE EDITOR TO MASK THE URL WITH TEXT. ONE LINK PER LINE VERTICALLY.] ![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-874(1).png) --- ## Project Download The examples attached were developed to be instructional and were not developed as officially supported components. For more information or to engage our service team to develop fully supported, production quality solutions, please contact services@decisions.com. Import the project below to a Decisions environment on version 6.5.0 or later using our [Importing/Exporting](https://documentation.decisions.com/docs/exporting-and-importing-overview) article. [ExampleLab[SumJoinedTablesData].zip](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/ExampleLab%5BSumJoinedTablesData%5D.zip) ---