Add new sql function: del_elem_by_index