Im struggling with this SQL query, from Measure collected polygons in Geometry Generator, avoiding extra texts from multipart polygons. It used to work OK sometimes in some datasets; throw errors on others and so on. But now I'm trying to automate a project and it is working (I think it is, because the data table of the resulting virtual layer seems OK) but I can not retrieve the geometries on the resulting table. I already tried to change the SRC on the layer and the project, set the geometry detection to use "geom" field.
It started to fail when I tryed to get the source data from another new virtual layer (which is working, it just merges 6 layers into one) and migrated from QGIS 3.8 to 3.10. I tried to make it work again in 3.8 but failed.
I will ask my superior about posting the project but I don't guarantee it.