ARRAY_POSITION
Finds the number of the first array element with the given value.
Syntax
ARRAY_POSITION(<array>, <value>)
ARRAY_POSITIONS(<array>, <value>)
Returns the element number, counting from 1, or NULL if the value isn't there. ARRAY_POSITIONS returns the numbers of all matches as an array. Handy for finding out where a value sits in a list — for example, in a fixed order of statuses or priorities.