Again I am stuck at a step, here I want to find the name of the nodes where the date is the least with a particular condition:
this has multiple capacity nodes and I need to find out the least date nodes where Available capacity < Required capacity
I have written this query but this is returning all the nodes with their dates
match (b:Capacity) where b.Available_Capacity<b.Required_Capacity with b,min(b.Date) as date return b.name order by date ;
Another method using apoc is returning me the nodes in the graph format but I just want the
name property of this node:
match (b:Capacity) where b.Available_Capacity<b.Required_Capacity WITH apoc.agg.minItems(b, b.Date) AS minItems return minItems
In this graph the output should be nodes A and B, assuming the where condition is satisfied.
Can someone pls suggest what is the best way to return name property of these nodes?