thanks, that got me pointed in the right direction. I am writing this for AS/400 SQL so it looks almost the same:
Select
FFDARCD"A/S/D",FFCCUSN"Cust#",FFCCNMB"CustNm",FFDDTEI"LastOrdDt",
FFDCDTE"CreateDt",FFDDTBC"FirstOrd", FFDDTEI”LastOrdr”,
Sum(CASE when HHHFSYR=2005 then HHHEXSN else 0 END)...