# Finding Maximum Number in a list

**URL:** <https://forums.losant.com/t/finding-maximum-number-in-a-list/2686>\
**Category:** Help\
**Tags:** workflow\
**Created:** [March 2, 2020, 11:17pm UTC](https://forums.losant.com/t/finding-maximum-number-in-a-list/2686 "2020-03-02T23:17:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Elisa\_Cui](https://avatars.discourse-cdn.com/v4/letter/e/eb9ed0/32.png) [@Elisa\_Cui](https://forums.losant.com/u/Elisa_Cui)\
**Post date:** [March 2, 2020, 11:17pm UTC](https://forums.losant.com/t/finding-maximum-number-in-a-list/2686/1 "2020-03-02T23:17:27Z")

</div>

If i have a table with a column of seconds, and i want to find the row with the maximum seconds within the table. How do I create a workflow to find that maximum value?

---

<div class="post-metadata">

**Author:** ![Dylan\_Schuster](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/dylan_schuster/32/2850_2.png) [@Dylan\_Schuster](https://forums.losant.com/u/Dylan_Schuster)\
**Post date:** [March 2, 2020, 11:28pm UTC](https://forums.losant.com/t/finding-maximum-number-in-a-list/2686/2 "2020-03-02T23:28:01Z")

</div>

That’s quite simple, actually. You can accomplish this with the [Table: Get Rows Node](https://docs.losant.com/workflows/data/table-get-rows/).

- Choose the table you want to query for the “Table ID Template”. In my screenshot it’s “table”.
- It is not necessary to pass a query in your case.
- Put the name of your column in the “Sort By Template” field. In my screenshot it’s “num”.
- Enter “desc” (as in “descending”) in the “Sort Direction Template” field.
- Set your “Limit Template” to “1”. This is the number of rows to return.
- Do not set a value in “Offset Template”.
- Make sure to set a “Result Path”, which is where the result of the query will be stored on your payload.

 ![Screen Shot 2020-03-02 at 6.26.04 PM](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/4/4e33d53b005b170ca51bca3b78692c8303bde1da.png)
