All Collections
Data Analysis
Gremlin training
Gremlin Training 15: Basic aggregation steps - max()
Gremlin Training 15: Basic aggregation steps - max()

Learn to use the max()-step to find the highest value from a collection of numerical values in fields.

Kristine Marhilevica avatar
Written by Kristine Marhilevica
Updated over a week ago

The max()-step works on a collection of numerical values.

The following query returns the highest value among the total_direct_cost fields on applications.

g.V().
hasLabel('Application').
values('total_direct_cost').
max()

highest value

Did this answer your question?