# RANK variable in DB

**URL:** <https://forum.knime.com/t/rank-variable-in-db/30564>\
**Category:** KNIME Analytics Platform\
**Created:** [February 9, 2021, 11:33am UTC](https://forum.knime.com/t/rank-variable-in-db/30564 "2021-02-09T11:33:49Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [February 9, 2021, 5:11pm UTC](https://forum.knime.com/t/rank-variable-in-db/30564/7 "2021-02-09T17:11:56Z")

</div>

@chanoufi_marwa one way to do it is to use a Hive environment and a RANK function. Other SQL databases should also support RANK like H2 ([Window Functions](https://www.h2database.com/html/functions-window.html#rank)).

> [@Help needed with Multi row formula](https://forum.knime.com/t/help-needed-with-multi-row-formula/26479/5):
>
> OK, I produced a solution with the help of Hive/SQL slight_smile You could adapt the ORDER statement to get a different sorting. This should give you the result you want. I would have to see to do this with just KNIME nodes.

Hint: the KNIME implementation of H2 currently has the version 1.4.196. Unfortunately with H2 the RANK etc functions are only supported with version 1.4.198 or later … @ScottF might be an interesting case to update that version 🙂

---

_[View the full topic](https://forum.knime.com/t/rank-variable-in-db/30564)._
