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.

Reply via email to