OrientDb - Conducting a query

41 Views Asked by At

I have DB with following schema enter image description here

I want to conduct a query to find all the vertexes which have only 'A' and dont't have 'B' as their descendant (c.out('RepositoryEdge').out('InfoEdge')) For Specific example only vertex #33:53 satisfies this condion

How Should i Conduct My Query ? Thanks in advance

1

There are 1 best solutions below

0
Michela Bonizzi On BEST ANSWER

Try this:

select from <class-name> where @rid not in (select in("InfoEdge").in("RepositoryEdge") from #42:0) and @rid in (select in("InfoEdge").in("RepositoryEdge") from #41:5)

Hope it helps

Regards