I have a dataset (buildings, polygons) that has some overlapping features. Some buildings are old and already demolished but are still in the dataset. I want to hide all these. These have properties of ‘demolished’. So that’s easy one might say. However, for the same (old building) another feature exist and has properties ‘in use’. Luckily these two features have the same reference numbers. I like to filter the identification numbers (so multiple features) when at least one of the features has properties ‘demolished’.
I’m not experienced with good syntaxes for this and was wondering If anyone could help me out with this. I’m using QGIS 2.14.
The easy one, only filtering the demolished building would be:
NOT “buildingstatus” = ‘demolished’
But I need the other features with a corresponding identification number. What would be this syntax? Either to hide them, or select them (and delete, or move to other layer)?
CASE WHEN buildingstatus = demolished THEN SELECT Identification END
UPDATE:I'm trying this query with a virtual layer. First I get geometry issues. If I define the geometry as a polygon, than it adds a layer but QGIS crashes.
NOTE: If I embed the layer it doesn't make a difference