I thought my problem was solved with the question I asked bevor (QGIS 3.4 feature filter maximum() does not work). But there is still a problem.
I still want to filter a layer with the maximum value of field_a, grouped by field_b. I used this filter:
"field_a" IN SELECT MAX("field_a") FROM 'layer_test' GROUP BY "field_b") The result is a reduced number of features, but there are still several features from one value in field_b with different values in field_a. Here a picture from the wrong result:
But I want only the maximum value of field_a, grouped by field_b. For example I want for value '12' in field_b only the feature with value '6' in field_a. If I use the expression without
GROUP BY, then it works like I expected, I get only the total maximum value. How can I get the right
GROUP BY result? Unfortunately I don't know SQL...