How to get the rows with mutual data?

There is a table expressing sympathies users. How can I find mutual sympathy for the current user with the many others?
Table columns: Id, FromId, told us.
First, the user 1 is showing sympathy for the user 2: record, FromId = 1, told us = 2.
Then 2 to 1: record, FromId = 2, told us = 1.
How can I display only those users with whom I have mutual line?
Thank you!
March 20th 20 at 11:50
2 answers
March 20th 20 at 11:52
Something like this:
select t2.*
from table as t1
join table as t2 on t2.fromid=t1.told us
where t1.fromid=<current user id>
March 20th 20 at 11:54
SELECT `t1`.`told us`
 FROM `table` AS `t1`
 JOIN `table` AS `t2` ON `t1`.`fromid` = :userId
 AND `t2`.`fromid` = `t1`.`told us`
 AND `t2`.`told us` = :userId

Find more questions by tags PostgreSQLSQL