When I added the join to the bottom of this procedure it takes a while to run. Is there a way to get it to run faster? Do I have the join set up in the wrong spot?SELECT A.FO, n.region_ltr as reg, n.regionacronym as regname, n.area, A.MMPending, A.RecPending, B.MMPendingLastWk, B.RecPendingLastWk, ABS(A.MMPending-B.MMPendingLastWk) AS MMPendingCleared, ABS(A.RecPending- B.RecPendingLastWk) AS RecPendingClearedFROM (select FO, count(claim) as MMPending, count(distinct claim) as RecPendingfrom CurrentWeekgroup by fo) A INNER JOIN(select FO, count(claim) as MMPendingLastWk, count(distinct claim) as RecPendingLastWkfrom Lastweekgroup by fo) B ON A.FO = B.FOjoin docfile n on n.doc=a.foorder by reg