Everytime I try to divide something in neo4j, I keep getting zero. I am using the following query:
MATCH (m:Member)-[:ACTIVITY{issue_d:"16-Jan"}]->(l:Loan)
MATCH (m)-[:ACTIVITY]->(p:Payments)
WHERE l.installment<1000 AND p.total_pymnt>0
RETURN (l.funded_amnt-p.total_pymnt),(l.funded_amnt-p.total_pymnt)/(l.funded_amnt), l.funded_amnt, p.total_pymnt, m.member_id
LIMIT 1000;
I checked to make sure that my values for funded_amnt
and total_pymnt
are not messing up the operation they seem good:
Even when I just do:
500/l.funded_amnt
I still get zero. What am I doing wrong?