Something is wrong there.

An array property is never converted into individual rows by cypher you
must have done something differently.

Can you please share the full query?

Just tried it, works perfectly fine.




On Thu, Aug 7, 2014 at 10:15 PM, Michael Azerhad <[email protected]>
wrote:

> I managed to do the trick with:
>
> RETURN extract(d IN user.ranks | d) as ranks, count(game.name)
>
> => one shot :)
>
> Michael
>
>
> On Thursday, August 7, 2014 9:01:55 PM UTC+2, Michael Azerhad wrote:
>>
>> Hi,
>>
>> Let's suppose this Cypher query snippet:
>>
>> RETURN user.name, count(game.name)
>>
>>
>> => a user can have multiple video games
>>
>> No matter the example is, the important thing is that I can count names
>> of user's video games associated with the user's name.
>>
>> Result would be:
>>
>>             NAME                    NUMBER_OF_GAMES
>>             Michael                       18
>>
>>
>> Now, suppose that the user.name is replaced by an array property: let's
>> imagine user.ranks
>>
>> I expect the output to be:
>>
>>            RANKS                  NUMBER_OF_GAMES
>>           [1,2,3]                      18
>>
>>
>> However the result is a cartesian product over the array:
>>
>>           RANKS                  NUMBER_OF_GAMES
>>               1                     ... //no matter the number of games
>> is
>>               2                     ...
>>               3                     ...
>>
>>
>> Why isn't it possible to return the array in one shot ?
>>
>> Thanks,
>>
>> Michael
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Neo4j" 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.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Neo4j" 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.

Reply via email to