1:SELECT ID, SID FROM Test WHERE ID ='001'
2:SELECT ID,LISTAGG(SID, ',') WITHIN GROUP (ORDER BY SID) AS SID_LIST FROM Test WHERE ID ='001' group by ID