DELETE FROM FriendsData WHERE fID NOT IN ( SELECT fID FROM FriendsData GROUP BY UserID, FriendsUserID, IsSpecial, CreatedBy)