Let's say I have this data:
Table items
idnametag1exampleunique_tag2foosimple42barsimple3bazhello51quuxworld
I'd like to get all those lines and know if a tag is used by other lines
SELECT id, name, tag, COUNT(*) OVER (PARTITION BY tag) > 1 AS flag FROM items
The result will be:
idnametag...