Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
10-28-2022 05:52 PM
I'm starting with neo4j
have the following nodes and relationships
(i1:Item{name:'Computer', price:1500.00, id:1}),
(i2:Item{name:'Video_Game', price:3500.00, id:2}),
(i3:Item{name:'Book1', price:50.00, id:3}),
(i4:Item{name:'Book2', price:20.00, id:4}),
(s1:Store{name:'Store', location:'Street R', id:5}),
(s2:Store{name:'BookStore', location:'Street Z', id:6});
My question is, how can i get the sum of products's price per each store
Something like this...
Store | BookStore
5.000| 70.00
Solved! Go to Solution.
10-29-2022 02:19 AM
Hello @1121vv 🙂
MATCH (store)-[:Sells]->(item)
RETURN store.name AS store, sum(item.price) AS total;
Regards,
Cobra
10-29-2022 02:19 AM
Hello @1121vv 🙂
MATCH (store)-[:Sells]->(item)
RETURN store.name AS store, sum(item.price) AS total;
Regards,
Cobra
10-29-2022 01:32 PM
It worked perfectly! Thanks a lot for the help!
All the sessions of the conference are now available online