# Social Network: How to map the cypher hop degree to that of the connection degree in a social network

**URL:** <https://community.neo4j.com/t/social-network-how-to-map-the-cypher-hop-degree-to-that-of-the-connection-degree-in-a-social-network/35840>\
**Category:** Cypher\
**Tags:** cypher\
**Created:** [March 25, 2021, 10:21am UTC](https://community.neo4j.com/t/social-network-how-to-map-the-cypher-hop-degree-to-that-of-the-connection-degree-in-a-social-network/35840 "2021-03-25T10:21:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashishmalg](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/ashishmalg/32/17411_2.png) [@ashishmalg](https://community.neo4j.com/u/ashishmalg)\
**Post date:** [March 25, 2021, 10:21am UTC](https://community.neo4j.com/t/social-network-how-to-map-the-cypher-hop-degree-to-that-of-the-connection-degree-in-a-social-network/35840/1 "2021-03-25T10:21:25Z")

</div>

![Screenshot 2021-03-25 at 1.34.57 PM](https://us1.discourse-cdn.com/flex021/uploads/neo4jcommunity/original/3X/c/5/c5ef6eeade4e17a9250735210c3969329bab317d.png)

In fig1, I would like to retrieve all the 3rd level connections for person "A" using the query  
`match (p:Person {name: "A"})-[:FRIENDS_WITH*3]->(p2:Person) return p2`  
and the output returned is none, which is correct.  
But, when I execute the same query for the graph in fig2, the output is person "E", since "B" and "C" are connected now. How do I prevent "E" from being returned as a 3rd level connection?  
Thanks.
