Put a filter using ROW_NUMBER in a Derived Table and join to it:
SELECT *
FROM tab
QUALIFY
ROW_NUMBER()
OVER (PARTITION BY LINE_ITEM
ORDER BY
CASE STATUS_CODE
WHEN 'A' THEN 1
WHEN 'U' THEN 2
WHEN '1' THEN 3
WHEN 'G' THEN 4
WHEN 'F' THEN 5
WHEN 'E' THEN 6
WHEN 'L' THEN 7
WHEN 'C' THEN 8
END
) = 1
Put a filter using ROW_NUMBER in a Derived Table and join to it: