Return Table results as Nodes


Could you please let me know if it is possible to return Table results as Nodes.

I have a Category and Sub Category nodes where Category is having a relation with Sub Cateogory as (C:Category)-[:hasChild]-(SC:SubCategory) . For every Category node C there are multiple Sub Category node SC.

I am executing the following cypher to know the Category and the total number of Sub Categories in each Cateogry

MATCH (C:Category)-[]-(SC:SubCategory1) RETURN C.Name,COUNT(C) AS SubCatCount

This statement returns me the result in the form of a table

I would like to know if it is possible to return this result in the form of a node in Neo4J browser. e.g CatogorySummary node with properties set CatogorySummary.Name = C.Name and CatogorySummary.TotalElements = SubCatCount without saving the CatogorySummary node in the database.

I am using Neo4j desktop 4.1.3.


What you are looking for is called virtual nodes, they can be created from the APOC plugin who can be easily install with Neo4j Desktop via the plugin menu.

Many Thanks Gabriel. Your feedback was very helpful. This saved us a lot of time.