Aggregate sorted list of comma delimited records

Given a list records in comma delimited format, each line of which has two fields - first field being the key, second field being the value.