see if this helps: select v,sum(count) from (select if(eval("in=#11:0"),out,in) as v,count from E where in=#11:0 or out=#11:0) group by v
~nagu. On Wednesday, June 3, 2015 at 5:15:52 PM UTC+5:30, Andrey Yesyev wrote: > > Thanks Nagu! > > But I also need to group by vertices I related to. > > On 3 June 2015 at 07:02, nagaraja sosale ramaswamy <nagu...@gmail.com > <javascript:>> wrote: > >> select sum(count) from RELATED where in = #11:0 or out = #11:0 >> >> >> hope that helps... >> ~nagu. >> >> >> On Wednesday, June 3, 2015 at 2:26:24 PM UTC+5:30, SavioL wrote: >>> >>> Hi Ziink, >>> >>> I created V1 and V2, and i linked them so: >>> >>> V1 -->related --> V2 >>> V1 -->related --> V2 >>> V1 -->related --> V2 >>> V2 -->related --> V1 >>> V2 -->related --> V1 >>> >>> so i have 3 link from V1 to V2, and 2 link from V2 to V1. >>> >>> With this query: select count(*) FROM Related LET $c = in.size() >>> i get Count = 5. (five is number of total link with V1 and V2) >>> >>> i hope is this the answer you were looking for.. >>> >>> Regards, >>> Luigi S. >>> >> -- >> >> --- >> You received this message because you are subscribed to a topic in the >> Google Groups "OrientDB" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/orient-database/CRR-simpmLg/unsubscribe >> . >> To unsubscribe from this group and all its topics, send an email to >> orient-databa...@googlegroups.com <javascript:>. >> For more options, visit https://groups.google.com/d/optout. >> > > -- --- 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.