To have in common
Used to describe shared characteristics, interests, or traits between people or things. Tener algo en común con alguien = to have something in common with someone.
We have a lot in common, that's why we get on so well.
What do these two cases have in common?
—Did you know each other? —No, but it turned out we had a lot in common.