There is a polygon layer
"Union23" that was created with
Layer's attribute table includes the following values.
My effort is simply to aggregate those polygons by
"FLAECHEID" field with the sum and count of a field
"In_Value1" via Virtual Layer. So I am using the expression
SELECT *, SUM(In_Value1), COUNT(In_Value1) FROM Union23 GROUP BY "FLAECHEID"
However, I am getting really weird output and I do not understand why I am losing a part of geometry on the way? Any suggestions?
When I use the solution offered by @JGH I am somehow getting better output but still with small issues. It is most like related to the original geometry. Improving geometry is necessary as was mentioned by @Stu Smith.