I have a layer
my_layer containing a virtual field
virtual_1. Next step I want to create a virtual layer, which list only unique values (as a bonus also dissolves the geometries by unique values).
The following query for the virtual layer doesn't work with virtual fields:
SELECT DISTINCT virtual_1 from my_layer
How could the desired outcome be achieved?
- I need an dynamic solution, as the data in
my_layergets updated reguarly. So unfortunately the Vector>Analysis>Unique Values isn't an option. Also Dissolving by virtual field is therefore not an option.
- Would it work to generate the virtual field inside the query itself? How could an expression of the field editor evaluated in the virtual-field-query?