To solve a problem (details see here) I am looking for an expression in QGIS (3.16) that creates a new field and should achieve this:
- On a polygon layer, it should group together all polygons that have the same attribute-value
- For each group, it should order the containing features according to some value, let's say for demonstration purposes the area (
$area) - It should assign kind of an auto-increment value to the features of each group (smallest gets 1)
The result would look something like this:
I tried different combinations of aggregate and arrays, however, I'm not sure where to start and how to combine: how do I create an expression that creates such a new value?

