I agree with Eve
Return size(collect(distinct color))) as colors, size(collect(distinct size)))
as sizes
Von meinem iPhone gesendet
> Am 20.04.2016 um 00:33 schrieb Eve Freeman :
>
> Can you give an example output?
>
> There are two ways I typically do this:
> -
Can you give an example output?
There are two ways I typically do this:
- collect the field I don't want to aggregate along with the count, then
later unwind and count it while collecting the first field.
- Collect both fields, then write a collection function aggregation with
reduce or
hi! I’m running neo 2.3 and I have a node, call it a Shoe with (for example)
two properties, color and size. I have a cypher query that finds the shoes
people bought on a given day. What I want to know is the count of shoes with
distinct sizes and the count of shoes with distinct colors. I can