Get minimum/maximum value from loop in template script?

The search words "minimum maximum export" get this hit: