简体   繁体   中英

OrientDb - Conducting a query

I have DB with following schema 在此处输入图片说明

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM