I have a table (shapefile) in QGIS where I want to select features that satisfies this condition:
group by a field ("join_label"
) and within the "grouped field"
, pick the attribute with the highest area (the area has already been calculated in a separate field)
I tried to do this:
maximum("Area", group_by:="join_label")
This expression selects everything in the table.
I wanted to use the "Execute SQL" function but how do I write the query?
Best Answer
Using the Execute SQL function:
Not forgetting to select the layer in the
Additional input datasources
at the top of the tool window (which gets the nameinput1
in your expression).