This is my query
MATCH (n:SampleLabel)-[:R1]->(n2:Genus) WITH
{
name:n.name,
genus_specie: n2.genus_specie
} AS productDetails RETURN productDetails ORDER BY n.name
SKIP 0 LIMIT 5...
It worked and it worked like a charm. But I was having some trouble using nested aggregate funcion as conditional_expression in WHEN. Is it not allow to use aggregate function as expression?