Check this query if it can help your case

select from (select count(in() [**or out() up to your direction of edge 
link**]) as wordcnt, in() [**or out() up to your direction of edge 
link**].s as word from books) where wordcnt=2 and word in ['elephant'] 

เมื่อ วันพุธที่ 26 สิงหาคม ค.ศ. 2015 1 นาฬิกา 47 นาที 09 วินาที UTC+7, 
MV-dev1 เขียนว่า:
>
> I have another question that I can't find the answer to...
>
> #1.  I want to select all the out nodes who match 2 (TWO) entries in my 
> list.
>
> Ex.  (not complied so it could have typos)
>
> CREATE CLASS Word EXTENDS V;
>     CREATE PROPERTY Word.s String;
>
> CREATE CLASS Book EXTENDS V;
>     CREATE PROPERTY Book.title String;
>
> <assume I have a bunch of books and a bunch of out links from Words to 
> Books that contain these words.>
>
>
> >> How can I select all the Books that contain 2 words?
>
> There is probably a SELECT FROM (SELECT) syntax but I was hoping that I 
> could maybe follow links more efficiently to do something like....
>
> find all the books that contain some word ('elephant') take those books 
> and find out if some out link from these books has the 2nd word.
>
> Am I overthinking links?
>

-- 

--- 
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