Reference material for ARRAY_MAX function
ARRAY_MAX(<array>)
<array>
ARRAY
levels
SELECT ARRAY_MAX([ 1, 2, 3, 4 ]) AS levels;
4