graph - neo4j - How to use push null values in 'order by' DESC to the bottom? -
graph - neo4j - How to use push null values in 'order by' DESC to the bottom? -
i have bunch of items property "updated" tells when item updated. bunch of timestamps null. when do: match (item) homecoming item order item.updated desc
, w/ null values returned @ top.
i tried coalesce
, which seems work in v2.2 not in v2.1.6:
match (item) homecoming item order coalesce(product.updated?,"0") desc
in v2.1.6, get:
this syntax no longer supported (missing properties returned null). please utilize (not(has(.updated)) or .updated=) if need old behavior.
is there alternative solution work irrespective of neo4j version?
have tried case statement?
match (item:item) homecoming case when has(item.updated) item.updated else 0 end updated order updated desc
graph neo4j cypher
Comments
Post a Comment