我有一个有朋友的用户:
User {
"@rid:": "#11:2"
...
friends: ["#61:1", "#61:2", "#61:3"]
}
...
User {
"@rid:": "#11:3"
...
friends: ["#61:2", "#61:3","#61:4"]
}
如何使用osql找到用户的共同朋友("#11:2","#11:3")?
因此查询应返回"#61:2", "#61:3"
。
答案 0 :(得分:2)
试试这个:
select from User where @rid in (select out() from User where @rid = "#11:2") and @rid in (select out() from User where @rid = "#11:3")
希望有所帮助
此致