以下查询获取特定用户的所有组,然后对每个结果(每个组)进行展开,并且仅当该组的关系计数为1时才应删除所有传入关系。
可以帮忙完成吗?
谢谢。
example: group1<-user1 (will delete the incoming relationship to the group)
group1-<user1
group1-<user2 (will remain all incoming relationships to the group)
可以帮忙完成吗?
MATCH (me:userId{{1})-[rel:relation_group]-(allGroups:GROUP)
unwind userGroups as group
//how to use CASE or WHERE in order to check if this group
has only 1 relationship just remove it
谢谢。