1 2 3 4 5 6 7 8 9 10
|
Select sdpID as SDP, ServiceClassID as Service_Class, count (*) as Nb_Subs,sum (case when ActivationDate IS NULL then 0 else 1 end) as Actif_Subs,
sum( case when ActivationDate IS NULL then 1 else 0 end ) as Non_Actif_Subs,
str( (convert (float, sum(case when ActivationDate IS NULL then 0 else 1 end) ) / count (*) * 100), 5, 2) as prctge_actif,
str( (convert (float, sum(case when ActivationDate IS NULL then 1 else 0 end) ) / count (*) * 100), 5, 2) as prctge_nonactif
from Account group by sdpID, ServiceClassID Order By sdpID, ServiceClassID |
Partager