I have SQL query and it works OK.
select monthname (timestamp_iso(STATUSDATE)),
count (case when service='ADSL' then 1 end) as ADSL,
count (case when service='IPTV' then 1 end) as IPTV,
count (case when service='VOIP' then 1 end) as VOIP
from INCIDENT
group by monthname(timestamp_iso(STATUSDATE))
I am getting for each month number of services in that month. But these services I have over 100. Is it possible to have dynamic CASE WHEN? To get all services and for each service return number of them in that month. Also it should write me after AS name of the service. Another option is to I write those 100 services manually so I was just wondering? Thanks