UPDATE ACCESSIBLE_ITEM AI, ACCESSIBLE_ITEM F
SET AI.SECTION_ORDER = AI.SECTION_ORDER - 1
WHERE AI.KEY_FUNCTIONALITY = F.ID_INTERNAL
  AND F.UUID = 'b36012ae-41f4-401d-9297-2f5d2e55c5da'
  AND AI.SECTION_ORDER > 1;

DELETE FROM AI USING ACCESSIBLE_ITEM AI, ACCESSIBLE_ITEM F
WHERE AI.KEY_FUNCTIONALITY = F.ID_INTERNAL
  AND F.UUID = 'b36012ae-41f4-401d-9297-2f5d2e55c5da';

