Try replacing the FLATTEN
and GROUP
with the following:
FLATTEN filter(tags, (t) => !startswith(t, "#ideanarrativa")) as tag
GROUP BY tag as Tipo
This should remove the #ideanarrativa
tag from the tag list, and be slightly cleaner as we rename tags
to tag
when we flatten it.