Super, thanks Alessandro!

On Tuesday, August 11, 2015 at 3:17:35 AM UTC-7, alessand...@gmail.com 
wrote:
>
> Hi Josh,
> for the second question you can use a server-side function like this
>
> var g=orient.getGraph();
>
> var query="select name, sum(weigth) from (select weigth,inV().name as name 
> from (select expand(outE('metadata_of'))";
> query+=" from (select from Document where name in " + names + " ))) group 
> by name";
>
> var list=g.command('sql',query);
>
> return list;
>
> the function has one parameter: names
>
> In your case enter in names ['Doc 1','Doc 3']
>
> Regards,
> Alessandro
>

-- 

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