with a as
(
select 'Total Employees' as item, sum(pv.value) as [value]
from p
inner join pv on p.id=pv.pid
union all
select p.item,pv.value
from p
inner join pv on p.id=pv.pid
)
SELECT [Total Employees],[EMPLOYE PERSON],[UNEMPLOYPERSON],[MALEUNEMPLOY]
FROM
a
PIVOT
(Sum([value]) FOR [item]
IN ( [Total Employees],[EMPLOYE PERSON],[UNEMPLOYPERSON],[MALEUNEMPLOY])
) AS b
Happy Coding!
:)