Cypher query to retrieve common nodes and relationships

Hello,

Not sure what you mean by having the count in the same column?

You return count(distinct r) and count(distinct s) which return numbers as well as the first element of the collection collect(r). Are you saying that you want the type of the relationship as a column header?

That is not possible to do. The column headers must be specified and cannot be dynamic.

You can refer to this article for clarification:

Elaine