[GIS] How to select multiple features using advanced search SQL in QGIS

featuresqgissql

I have a layer of planning units covering a large area (there are over 16000 PU's). Three of the columns in the attribute table hold information about which planning units were included in the solutions from a conservation planning programme (Marxan). So the columns have an ID and then values ranging from 0 to 100 (the number of solutions that PU was included in).

What I am trying to do is to select the PU's from each column that were in all 100 solutions (so have a value of 100) – BUT only the PU's that match i.e. only PU's that have a value of 100 in ALL three columns (the columns represent different run scenarios).

I have tried SQL searches such as "ssoln_1 = 100 WHERE ssoln_2 = 100 AND ssoln_3 = 100" but my SQL is very basic and I am having no luck. Any suggestions would be hugely appreciated – I hope it all makes sense.

Best Answer

It looks like you have the right idea. Make sure you have AND between each. Try:

ssoln_1 = 100 AND ssoln_2 = 100 AND ssoln_3 = 100

Related Question