cypher - Query needed for neo4j -
hey guys needed in framing query in neo4j.
rank artists (music artists) unique number of listening users, display top 5.
thanks
graph this:
(user)-[:listens_to{weight:1212}]->(artists), (user)-[:tags]->(artists), (user)-[:friends_with]->(friend)
query think might work :
match (m : user) - [l : listnto ] - > : aryist return count (distinct (m ) )as listncount , a.name order lostencount desc limit {5}
created small graph sample here: http://console.neo4j.org/r/ujhh0x
the query
match (u:user)-[:listens_to]->(a:artist) return a.name,count(distinct u) count order count desc limit 5
returns artists ordered number of unique listeners.
Comments
Post a Comment