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?
That’s quite simple, actually. You can accomplish this with the Table: Get Rows Node.
- 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.