{%- for group in query|groupby('build')|sort(reverse=True) %}
Mappings for build {{ group.grouper }}
#
Machine ID
Event Time Series
Backtraces
Total
{# The list is reverse numeric sorted by "total", so the first row has the maximum value. #}
{%- set maxtotal = group.list[0].total %}
{%- for row in group.list %}