using System.Collections.Generic;
public record Account(string ownerEmail, string acc, string svc);
public static void Main()
var rows = new List<Account>{
new Account("a@m.com", "acc1", "svc1"),
new Account("a@m.com", "acc1", "svc1"),
new Account("a@m.com", "acc2", "svc2"),
new Account("b@m.com", "acc2", "svc2"),
new Account("c@m.com", "acc3", "svc3")
var byEmail = rows.GroupBy(x => x.ownerEmail, x => x).Distinct();
foreach (var email in byEmail)
foreach (var acc in email)
Console.WriteLine(email.Key + " " + acc);