score:1

Accepted answer
var serverNames = new string[]{"ServerX", "ServerY"};
var result = db.Processes
    .Where(p => serverNames.Contains(p.ID) && p.Type == "Complete")
    .GroupBy(p => p.ProcessTime)
    .Select(g => new
    {
        ProcessTime = g.Key,
        AmountOfProcesses = g.Count()
    })
    .OrderBy(x => x.ProcessTime);

score:1

var query1 = (from a in this.db.Processes
              where (a.ID == "ServerX" || a.ID == "ServerY") && a.Type == "Complete"
              group a by a.ProcessTime into b
              orderby b.Key
              select new {ProcessTime = b.Key, Count = b.Count()});

Related Query

More Query from same tag