neo4j - condition in count function -
can put condition in count()? let me explain.
start me=node:node_auto_index(userprofileid = '1'), other=node(*) match pmutualfriends=me-[r?:friends]-mf-[r1:friends]-other other.username? =~ '(?i)dh.*' , other.userprofileid? <> 1 return me.emailid, other.emailid,other.userprofileid, other.username, r.approvalstatus, count(pmutualfriends) mutualcount
in above query can user this.
count(pmutualfriends r.approvalstatus = 1 , r1.approvalstatus =1 )
or may in other way?
thanks
the filter
function should you. if need further assistence, please provide data sample on http://console.neo4j.org , share here.
as example:
start me=node:node_auto_index(userprofileid = '1'), other=node(*) match pmutualfriends=me-[r?:friends]-mf-[r1:friends]-other other.username? =~ '(?i)dh.*' , other.userprofileid? <> 1 return me.emailid, other.emailid,other.userprofileid, other.username, count(filter(x in r.approvalstatus: x=1)), count(filter(x in r1.approvalstatus: x=1))
Comments
Post a Comment