I thought your starting point is 'New York islanders' vertex. And Linda is 
not connected with this Vertex.
If your starting point is 'New York islanders' vertex then [
id_of_New_York_islanders] is an id of this root Vertex, if your starting 
point is a list of some vertices then just put ids of those separated by 
comma.

I typed my query without having console handy but I assume the idea is 
right.

On Monday, 14 July 2014 15:10:38 UTC+1, Vladimir Ziankevich wrote:
>
> I included 'Linda', 'George' and 'child of' vertices (the last one is 
> mistaken, 'Kate' should be there) because these are starting points.
> The original problem is to retrieve subgraph of parents and teams which 
> linked directly, to the set of childs, or transitively, to the parents 
> (also direct or not) of starting vertices, in my example childs = Linda + 
> Shaun + Jeff + Donald.
>
> So If we decide that you query is correct then instead of '
> id_of_New_York_islanders' 
> should be '[id_of_Linda, id_of_Shaun, id_of_Jeff ,id_of_Donald]'
> something like that.
>
> понедельник, 14 июля 2014 г., 16:52:21 UTC+3 пользователь Andrey Kovalev 
> написал:
>>
>> Hi, Vladimir. I also wonder whether it is possible. It would be nice if 
>> OrientDB team gives us a lot of examples of tricky sql queries on some real 
>> graph models.
>> The query would probably look like:
>> traverse V.in_root_for, V.out_root_for, V.out_child_of from [
>> id_of_New_York_islanders]
>>
>>
>> But I do not get why do you include 'Linda', 'George' and 'child of' 
>> vertices?
>>
>> On Monday, 14 July 2014 14:37:53 UTC+1, Vladimir Ziankevich wrote:
>>>
>>> At first I am sorry for my question, but I really can't understand how 
>>> to solve my problem.
>>>
>>> Imagine, I have a graph of relationships which consists of:
>>> 1) family tree: one child can heve only one parent
>>> 2) graph of interests (hockey teams root for...)
>>>
>>> Example of the graph:
>>>
>>>
>>> <https://lh6.googleusercontent.com/-2gmc-apHGAw/U8PZ3T4Vc1I/AAAAAAAAABM/wwa19WQtMJ0/s1600/Graph1.png>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> So, the problem is I need to retrieve the subgraph by the several 
>>> childs, f.e. subgraph for Shaun, John, Linda, Jeff - relationship subtree 
>>> and linked teams:
>>>
>>>
>>>
>>>
>>> <https://lh4.googleusercontent.com/-gUIiUUxMbvU/U8Pb4JfciII/AAAAAAAAABY/ckGOzn0nHdc/s1600/Graph_highlighed1.png>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> And the result subgraph:
>>>
>>> <https://lh6.googleusercontent.com/-f6mUnwyrkL0/U8PcJxGfWBI/AAAAAAAAABg/ozvKup6dWlU/s1600/Subgraph_highlighted1.png>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> I have already read topic abpot
>>>
>>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to