Hi Tom,

your query works fine without "Limit 1" too. it shows all the unique 
combinations of "labelsn, labelm and typer", which is exactly your scope.

And that's true that lablesn is not a collection, so what is the problem? 
or what is not working?

Thanks,
Sumit

On Wednesday, 13 May 2015 03:47:12 UTC+5:30, Tom Zeppenfeldt wrote:
>
> In order to make a meta-model, i'd like to know what kind of nodes , rels 
> are present in a db, as well as counts. 
>
> Doing this
>
>
> *MATCH (n)-[r]->(m)*
> *WITH DISTINCT [labels(n),labels(m),type(r)] AS nrms, count(*) AS  countr*
> *WITH nrms[0] AS labelsn, nrms[1] AS labelsm, nrms[2] AS typer, countr*
> *RETURN labelsn,labelsm,typer,countr*
>
>
> works fine. with a LIMIT 1, the API returns this
>
>
> {
>     "columns": [
>         "labelsn",
>         "labelsm",
>         "typer",
>         "countr"
>     ],
>     "data": [
>         [
>             [
>                 "Somelabel",
>                 "Diagram"
>             ],
>             [
>                 "View"
>             ],
>             "CONTAINS",
>             2
>         ]
>     ]
> }
>
> However, the "labelsn" and  "labelsm" in the RETURN don't seem to be 
> collections. At least, I cannot do labelsn[0] or  length(labelsn)
>
> Accessing nrms[0][0] also produces an error.
>
> Running version 2.1.2
>
>
>
>
>

-- 
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 neo4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to