How can I count how many times I get a result in neo4j? -
currently, have following graph database in neo4j, hundreds of thousands of "customers" (so there's hundreds of thousands of layout in neo4j database).
currently, running following query:
match (m:member)-[r:activity{issue_d:"16-jan"}]->(l:loan) match (m)-[:activity]->(p:payments) match (m)-[:history]->(c:credithistory) not p.total_pymnt=0 return l.funded_amnt, p.total_pymnt, (l.funded_amnt)-(p.total_pymnt) amountowed, r.issue_d dateissued, l.installment monthlypayment, l.int_rate interestrate, c.dti debt order (l.funded_amnt)-(p.total_pymnt) desc limit 50000;
and results following (except january "dateissued") 2
i want count how many times monthlypayment greater 1000, count(x) query in cypher works count things related single node, not across nodes. how can count across data?
count
is counting things "across nodes".
this simple query should give count of number of l.installment
values > 1000:
match (l:loan) l.installment > 1000 return count(*);