Hi,
I have a view as below
id month year service ---------------------------------------------------- 4855 4 2010 SERVICE1 4855 4 2010 SERVICE1 4855 4 2010 SERVICE2 4866 5 2011 SERVICE1 4866 5 2011 SERVICE2 4866 5 2011 SERVICE2 4866 6 2011 SERVICE2 4866 5 2012 SERVICE2
How can i add two columns : CountService1 and CountService2 in order to have
id month year service CountService1 CountService2 ------------------------------------------------------------------------------------------------------------ 4855 4 2010 SERVICE1 2 1 4866 5 2011 SERVICE1 1 2 4866 6 2011 SERVICE2 0 1 4866 5 2012 SERVICE2 0 1
The idea is to count distinct service fro same (id,month,year)
Thanks