Hi
Please find the needed Pivot query below
Create Table #tblPersonTask
(
DayNmchar(3),
Personvarchar(20),
Tasksmallint
)
insert into #tblPersonTask
select 'sun', 'Jhon', 1 union all
select 'sun', 'Smith', 1 union all
select 'sun', 'Dan', 2 union all
select 'mon', 'Smith', 2...