Hey Alessandro, I did, and your query does not exclude just friends from friends of friends.
Oh, by the way, I thought, at first, my query wasn't fast enough compared to the performance of an RDBMS, but the performance difference was greater once I ran the query in a larger database. Now I think my query is sufficiently fast, so I stopped working on improving the query. I don't need this query anymore, but I'll get back to you if you come up with another query and want to test its performance on my database. Cheers, Jihoon On Friday, September 25, 2015 at 10:11:15 PM UTC+9, [email protected] wrote: > > Hi, > try this query and let me know > > select @rid, count(*) as NumberOfMutualFriends from > ( select expand($friends.out('isFriendsWith')) from #11:5 > let $friends = out('isFriendsWith')) > where @rid <> "11:5" AND (rid NOT IN $friends) > group by @rid > order by NumberOfMutualFriends desc > > Alessandro > > -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
