Not really sure what you want to achieve.

WITH problem, collect(problem) doesn't make sense, as you are aggregating
on problem, so you have all 1 element collections.

You don't need unwind for collections, just use size(measures)

On Wed, Aug 16, 2017 at 11:55 AM, <[email protected]>
wrote:

> MATCH (ORG:ORG)-[ORGHASPROBLEM:HAS]->(PROBLEM:PROBLEM) WITH PROBLEM,
>
>
>
> extract(NUM IN filter( V IN collect({ *PROB1*:PROBLEM.*PROB_ID*, *PROB2*:
> PROBLEM.*REGION*}) where V.PROB2= ‘*LONDON**’*) | NUM.PROB1) AS MEASURES1,
>
>
>
> extract(NUM IN filter( V IN collect({ *PROB1*:PROBLEM.*PROB_ID*, *PROB2*:
> PROBLEM.*REGION*}) where V.PROB2= *‘**PARIS**’*) | NUM.PROB1) AS MEASURES
> 2,
>
>
>
> unwind MEASURES1 AS *RESULT1*
>
> unwind MEASURES2 AS *RESULT2*
>
> RETURN DISTINCT PROBLEM.*SLAB *AS DIMENSION,count(*RESULT1*) AS
>  MEASURES1,count(*RESULT2*) AS MEASURES2
>
>  ===========================================================
> ========================================
>
> I am Uploading the image of the database and expected output can anybody
> rewrite the query or tell me where i am going wrong
>
> AS MY Question is that MEASURES1 and MEASURES2 have my required data when
> i am using the *unwind MEASURES1 AS RESULT1* it give the output as
> required but in case of the 2nd step : *unwind MEASURES2 AS RESULT2* it
> remove the entier data from MEASURES1 and MEASURES2
>
>
> <https://lh3.googleusercontent.com/-SDkQUPkGsrc/WZQWbpsPUHI/AAAAAAAAAAM/p6322GV2Kz4t10921xAlUmd-LjYUXuHVwCLcBGAs/s1600/Question.png>
>
> --> *PLEASE SEE THE IMAGE ATTACH WITH THIS QUESTION TO UNDERSTAND THE
> SCENARIO MORE CLEARLY*
>
> --
> 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