public void GroupStdDev() { var sexos = from a in Database.Query <ArtistEntity>() group a.Name.Length by a.Sex into g select new { Key = g.Key, StdDev = (double?)g.StdDev(), StdDevInMemory = GetStdDev(g.ToList()), StdDevP = (double?)g.StdDevP(), StdDevPInMemory = GetStdDevP(g.ToList()), }; var list = sexos.ToList(); list.ForEach(a => Assert2.AreSimilar(a.StdDev, a.StdDevInMemory)); list.ForEach(a => Assert2.AreSimilar(a.StdDevP, a.StdDevPInMemory)); }