select left(B.B_num,3) as JD, sum(B.B_COUNT) as Doc_Cnt, P.PROJECTED_VOL as Proj_Vol, P.DD_RECD as DD_Recd, P.JD_CURRENT as JD_Current, P.JD_FUTURE as JD_Future from batches B left join projectedvolume P on P.REPORT_IMPORT_DT = B.REPORT_IMPORT_DT where B.REPORT_IMPORT_DT = '2005-10-12' group by left(b_num,3) #### select left(B_num,3) as JD, count(B_Num) as BatchCount, sum(B_count) as DocCount from Batches where report_import_dt = '2005-11-10' and b_status in ('RD', 'RO') group by left(b_num,3)