I have a list of codes for same IDs with ranking, I want to have these codes in a coma separated way by there rank in ASC order like (71,49,490,41,61,42,62,614,615,621), when I am using string_agg(code,"," ORDER BY rank_)
it is showing below error:
List: