When using Virtual Layer to group_concat()
a string field, the result would contain duplicates string
. For example, here's a polygon layer "city_lot"
with "land_use"
and "owner"
fields.
I want to create a virtual layer that merges lots by owner. So here's the query:
select st_union(geometry),"owner",
group_concat("land_use") as 'land_use',
group_concat("fid") as 'fid'
from "city_lot"
group by "owner"
And here's the result:
Notice that the 3rd record has two "residence"
in the "land_use"
field. My question is, instead of being "residence,commerce,residence"
, would that be possible to make the result be "residence,commerce"
, merging identical string
?