Mouhssine tahri

Mouhssine tahri

  • NA
  • 201
  • 11.1k

sql query to linq or lambda query

Apr 27 2021 10:45 AM
Hello 
can you help me to transform the next query to linq or lambda: 
 
select Site,Libellé,(select count(*) from Staxe
where Sites.Site = Staxe.Site and [Date_Comm]='28/09/2016') as NbreAppelSortant ,
(select count(*) from Staxe
where Sites.Site = Staxe.Site and [Date_Comm]='28/09/2016' and [Nature_Comm]='M') as NbreAppelSortantGsm,
(select count(*) from Staxe
where Sites.Site = Staxe.Site and [Date_Comm]='28/09/2016' and [Nature_Comm]='L') as NbreAppelSortantLocaux,
(select count(*) from Staxe
where Sites.Site = Staxe.Site and [Date_Comm]='28/09/2016' and [Nature_Comm]='N') as NbreAppelSortantNationnaux,
(select count(*) from Staxe
where Sites.Site = Staxe.Site and [Date_Comm]='28/09/2016' and [Nature_Comm]='I') as NbreAppelSortantInternationnaux
from Sites
 
thanks 
 

Answers (3)