About Me

My photo
I worked as freelancer on freelance.com for many years, Then opened my Company. I did software coding with my company. But also did pottery -- I know well business management. Software coding is coming next to it as a plus. It helps but organising is as much important as coding. I have many years of experience in business management of Industrial Construction works. I am quite known as company for CAD drafting and 3d for architectural design. I had quite a lot experience at USA and at Turkey. I am less known, in my pottery love.

Monday, April 21, 2025

neo4j-mathematics

 create the nodes:

CREATE (n:sil {name:"k1", val: 1250}),(m:sil2 {name:"k2", val:1250}), (n)-[r:sil3]->(m)

Addition:


MATCH (n:sil), (d:sil2)
RETURN SUM(n.val + d.val)

//returns 2500

Substraction


MATCH (n:sil), (d:sil2)
RETURN SUM(n.val - d.val)

//returns 0

Multiplication:


MATCH (n:sil), (d:sil2)
RETURN SUM(n.val * d.val)

//returns 1562500

Division:


MATCH (n:sil), (d:sil2)
RETURN SUM(n.val / d.val)

//returns 1

Formatting numbers


first you have to setup apoc in settings / plugins . Then close database, exit neo4j and reopen it. Apoc will be activted.

MATCH (n:sil), (d:sil2)
RETURN apoc.number.format(SUM(n.val * d.val))

//returns "1,562,500"

Source:


neo4j-mathematics

 create the nodes: CREATE   ( n : sil  { name : "k1" ,  val :   1250 }),( m : sil2  { name : "k2" ,  val : 1250 }),   ( ...