cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Is there any way to get only duplicate records from label for a specific property?

Hi Team,

Need to know that - " Is there any way to get only duplicate records from label for a specific property? "

Please let me know if it is possible to do.

Thanks in Advance!

Regards
AM

4 REPLIES 4

oleg_neo4j
Graph Buddy

Hi Akshat
You could probably do something like this without the year, order by frequency DESC, where frequency> 1

match(c:SEASON)<-[t:during]-(a:PLAYER)-[r:won]->(b:AWARD)
return r.year as year, t.team as team, count(t.team) as frequency

Hi Oleg,

Thanks for your response.

Actually I did not understand this.

Adding more to it, I am not having any year value as well.

If possible , can u please explain little bit more.

Regards
Akshat

oleg_neo4j
Graph Buddy

The idea was just that you can group by the node labels, count them, and return only those with a count greater than 1. Have you been able to try grouping? I can't try much more without seeing the structure and data.

md7
Node Link

hello akshat,

hope this will work
Here is data:

CREATE
(:Project {projectName:'Digital Lab'}),
(:Project {projectName:'Digital Lab'}),
(:Project {projectName:'Digital Lab'})

and Query is :

PROFILE
MATCH(n:Project {projectName:'Digital Lab'})
WITH COLLECT( n) as m, COUNT(n) as freq
WHERE freq >1
RETURN (m[0]),freq