Group by multiple columns ( one with comma separated and other with sum ) using unix : I have a text/csv file as follows:

EDMP_SCI|INACTIVE|12|AE

EDMP_SCI|INACTIVE|10|AO

EDMP_SCI|ACTIVE|20|IN

EDMP_SCI|ACTIVE|30|US

EDMP_EBBS|UNKNOWN|10|HK

I need to group by based on column1 and column2 

(Column3 should have the sum of numbers and column4 should have comma separated values)

The required output should be like:

EDMP_SCI|INACTIVE|22|AE,AO

EDMP_SCI|ACTIVE|50|IN,US

EDMP_EBBS|UNKNOWN|10|HK


I am able to get sum and comma separated columns separately, but I need then to be done parallelly. I need this either by unix shell script or any single command in unix.

Please help me. I need this for an urgent development