1 2 3 4 5 6 7 8 9 10 11 12 13
| db.Sites.SelectMany(s => db.Taxes
.Where(t => t.Site == s.Site && t.Date_Comm == new DateTime('28/09/2016'))
.DefaultIfEmpty()
.GroupBy(t => t.Site)
.Select(g => new {
Site = s.Site,
Libelle = s.Libelle,
NbreAppelSortant = g.Count(),
NbreAppelSortantGsm = g.Count(t => t.Nature_Comm == "M"),
NbreAppelSortantLocaux = g.Count(t => t.Nature_Comm == "L"),
NbreAppelSortantNationnaux = g.Count(t => t.Nature_Comm == "N"),
NbreAppelSortantInternationnaux = g.Count(t => t.Nature_Comm == "I"),
}) |
Partager