Function ifnull() returns the left-most non null value from two values, or returns null if both values are null.
NOTEWhen two values are of different data structures, data conversion might be triggered to guarantee a consistent data type in the final column.
NOTEOccasions when
nullvalue is produced: properties not provided when inserting data, properties created after data is inserted, calling a property that is not existent.
Arguments:
Returns:
Sample graph: (to be used for the following examples)

UQLcreate().node_property(@default, "name").node_property(@default, "try1", int32).node_property(@default, "try2", int32).node_property(@default, "try3", int32) insert().into(@default).nodes([{name:"Jason", try1:84}, {name:"Alice", try1:55, try2:79}, {name:"Lina"}, {name:"Eric", try1:39, try2:46, try3:61}, {name:"Pepe", try1:89}])
Example: Return the score of the last re-test that each student takes, knowing that each student has three chances, and retesting is allowed only if the previous one failed. Return null if a student does not give any try.
UQLfind().nodes() as n return table(n.name, ifnull(n.try3, n.try2))
Result| n.name | ifnull(n.try3, n.try2) | |--------|------------------------| | Jason | null | | Alice | 79 | | Lina | null | | Eric | 61 | | Pepe | null |