Search code examples
orientdbvertex

query 2 vertexes orientdb


I have 2 vertexes, Client and Campaign, linked by an edge hasClient.

Schema: Client #33 ----- hasClient #19 ----- Campaign #15

I would like to have the name of the client and also the number of edge he has with Campaign (generally more than 1).

Do you know how to query this ?

thanks !


Solution

  • You can use

    select name,out("hasClient").size() as size from Client
    

    Hope it helps