>>;with cte as (SELECT q.GroupId, >> (SumOfcert_complete/CountOfcert_complete)*100 AS Percent_Certified, >> Groups.GroupName FROM qryGroupCert_base AS q >> INNER JOIN Groups ON q.GroupId=Groups.GroupId) >> >>select * from cte >>UNION ALL >>select 0 as GroupID, SUM(Percent_Certified), 'ALL' as GroupName >>from cte>