You can start with:   select @rid,$i,$o from V let 
i=in().size(),o=out().size() where sum($i,$o)=1

Il giorno lunedì 16 gennaio 2017 19:43:12 UTC+1, Peter Figliozzi ha scritto:
>
> I would like to retrieve all vertices in a SQL query that have at least 
> one connection (non-zero degree). Just returning the rid is probably OK, 
> but it would be nice to select properties too.
>
> The edges have "in" and "out" properties, so I could make a set of those. 
> I'm not sure how to do this with OrientDB sql.
>
> Also, I thought there would be some way to do it more naturally by 
> querying vertices directly. I see the vertices have IN and OUT recorded, 
> and the edge Class name underneath. But I do not know how to access the 
> vertex IN and OUT in a SQL query.
>
> Thank you,
>
> Pete
>
> Link to question on SO 
> <http://stackoverflow.com/questions/41682591/orientdb-sql-retrieve-vertices-with-non-zero-degree>
>
>
>

-- 

--- 
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 orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to