Assuming I have one way relation from child to parent like this:
class Parent {
String id;
}
class child {
String id;
Parent parent;
}
I'm trying to find all parents without any children using nested select but
I'm not sure how to reference row from main query in the inner one. Trying
something like this:
select $temp from parent
let $childrenCnt = (select count(*) from child where parent=$temp)
where $childrenCnt[0].count = 0
it just returns rid with negative cluster
I read https://github.com/orientechnologies/orientdb/wiki/SQL-Query
in
Usage in projection
SELECT $temp.name FROM ProfileLET $temp = address.cityWHERE $city.name like
'%Saint%"' and
( $city.country.name = 'Italy' or $city.country.name = 'France' )
but I don't understand $temp var used in SELECT and LET
can you show how to properly reference selected objects ?
Thank you
--
---
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.