For another column, try this
SELECT DOC, PRODTYPE
,sum(CASE WHEN TERM = 1 THEN 1 ELSE 0 END) as 'YR'
,sum(CASE WHEN TERM = 12 THEN 1 ELSE 0 END) AS 'MTH'
,sum(CASE WHEN TERM IN (1,12) THEN 1 ELSE 0 END) as 'YRMTH'
From (table)
GROUP BY DOC, PRODTYPE
I'm not really sure why you're doing this with both case statements and with group by. Could you expose a small set of sample data and your desired results?
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills