On 12/7/11 21:53 , Andres Taylor wrote:
> A subset of the graphs are trees, and they have a few problems that are
> specific for them. I'm right now planning what needs to be added to Cypher
> to make it play nice with your tree structures.
>
> I'd love to know if you have hierarchical data, and what queries you do and
> would like to do. Doesn't matter if you use Cypher or not.

Here's a problem I had recently: I have an organizational structure 
defined as a tree. On each level there might be cases assigned for 
completion.

Given a OU I want to find all OU's that has the given OU as root, and 
then all the cases associated with those OU's, and then perform some 
operation on them. For example: "For all cases handled in Department X 
(or any subdepartments of X), calculate average completion time".

I'm guessing something like this:
start ou=node(1234)
match (ou)-[:CHILD_OU*..100]->(child_ou)<-[:OWNER]-(case)
where case.status = "CLOSED"
return avg(case.completionTime)

Question is, will the OU itself be included? Or does this imply that 
there *has* to be a child-OU?

/Rickard
_______________________________________________
NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please register 
and consider posting at https://groups.google.com/forum/#!forum/neo4j

Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to