Dados dos usuarios, @friend1 y @friend2, encuentre todos los usuarios que son amigos en común:
SELECT user.uid
FROM user
WHERE EXISTS(
SELECT TOP 1 1
FROM Friends
WHERE Friends.fuid = @friend1 AND Friends.fapproved = 1
AND Friends.fuid2 = User.uid
)
AND EXISTS(
SELECT TOP 1 1
FROM Friends
WHERE Friends.fuid = @friend2 AND Friends.fapproved = 1
AND Friends.fuid2 = User.uid
)