I am trying with this query and it does not return anything:
select * from CompositionVersions where value.uid.value.split("::")[2] = 
(select max(value.uid.value.split("::")[2] ) from CompositionVersions)


This return the number 4:
select max(value.uid.value.split("::")[2] ) from CompositionVersions

This 
select * from CompositionVersions where value.uid.value.split("::")[2] = *4*
 
This yes that returns results



El viernes, 25 de noviembre de 2016, 9:48:53 (UTC+1), Aceitunas y 
encurtidos Quijote escribió:
>
> Hi, I want to retrieve the latest version of each Composition object.
>
> *select from CompositionVersions where version = (select max(version) from 
> CompositionVersions)*
>
> But this not working.
>
> 1-Is there another more efficient way to recover the latest version, 
> without knowing the number of versions that there are?
> 2-Would it be convenient to save in the Composition object, an attribute 
> with the id of the latest version?
>  
>

-- 

--- 
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