Find “friends of friends” with OrientDB SQL

前端 未结 3 624
自闭症患者
自闭症患者 2021-01-25 06:42

Although one of the most common use cases for demonstrating the capabilities of a graph database, I cannot seem to find a good example or best practice for obtaining \"friends o

3条回答
  •  感动是毒
    2021-01-25 07:26

    Have you tried this?

    select 
          expand(bothE('is_friend_with')[status = 'approved'].inV().bothE('is_friend_with')[status = 'approved'].inV()) 
    from user where uuid = '95920a96a60c4d40a8f70bde98ae1a24'
    

提交回复
热议问题