I have the below SQL which generates the Account type and their region and type. Currently, my table has only Type 1, Type 2, Type 4, and Type 6. But I would like it to show me all the types: 1,2,3,4,5,6 where 3 and 5 would have zero.
So my results would look like this
select *
from (values ('Account Exec','US','Type 1',12)
, ('Account Exec','US','Type 2',34)
, ('Account Exec','US','Type 4',24)
, ('Account Exec','US','Type 6',32)
, ('Account Exec','Europe','Type 1',35)
, ('Account Exec','Europe','Type 4',43)
, ('Account Exec','Europe','Type 6',45)
, ('Account Exec','Others','Type 1',23)
, ('Account Exec','Others','Type 4',23)
, ('Account Exec','Others','Type 6',54)
) a(TE,REG,ATTAIN,total)

