Possible something like this will work for you.
create table sales (account int, month int, part int, amt money)
insert into sales values(1,6,1,1)
insert into sales values(1,7,1,1)
insert into sales values(1,8,1,1)
insert into sales values(1,9,2,1)
insert into sales values(1,7,1,1)
insert into sales values(1,8,1,1)
insert into sales values(2,6,1,1)
insert into sales values(2,7,1,1)
insert into sales values(2,8,1,1)
insert into sales values(2,9,1,1)
insert into sales values(2,7,1,1)
insert into sales values(2,8,1,1)
select pma.account,pma.month,pma.part , sum(isnull(s.amt,0))
from sales s right outer join
(select * from (select distinct part from sales) p,
(select distinct month from sales) m,
(select distinct account from sales) a) pma
on s.part = pma.part and s.month = pma.month and s.account = pma.account
where pma.month > month(getdate())-3
group by pma.account, pma.month, pma.part
order by pma.account, pma.month, pma.part
drop table sales
Gregory Larsen, DBA
If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples