Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试检查是否有两个人通过关系 B 连接,并且关系 c 具有相同的元素
问{
{?x :B ?y}filter not exist{?x :c ?t1, ?y :c ?t2 ,t1 ≠ t2 } }
如果我理解正确,您尝试编写的查询应如下所示:
ASK{ ?x :B ?y; :c ?t1 . ?y :c ?t2 . filter (t1 != t2 ) }
请注意,对于这样的查询,x也y可能是类,而不是个人。
x
y