I have sql query that returns total counts by name.
Select distinct name_title, count(name_title) from table_name
I need to further work the data by grouping them by Name_Title column:
when Name_title in('a','b') then sum(count(name_title)) end as dept1
when Name_title in('c','d') then sum(count(name_title)) end as dept2
the desired output:
any assistant or direction greatly appreciated.