如果我喜欢两次用户的状态,则下面的代码会返回该ID两次,因此我可以计算出我喜欢用户状态的次数。
SELECT uid FROM status WHERE status_id IN (SELECT object_id FROM like WHERE user_id=me() LIMIT 5000) ORDER BY uid LIMIT 5000
但是,以下代码只返回一次uid,即使我喜欢他的状态两次!在这里,我尝试仅过滤那些我的朋友。
SELECT uid FROM status WHERE status_id IN (SELECT object_id FROM like WHERE user_id=me() LIMIT 5000) and uid in(SELECT uid2 FROM friend WHERE uid1 = me()) LIMIT 5000
为什么上面的FQL只返回一次id? 或者,如果有人能帮助我找出我想要多少次我所有的朋友'状态?