select P.Id,p.Name,pp.Weightage from Person p inner join
(Select * from ( SELECT * FROM [SL_Project_Management].[dbo].[PersonWiseActionHistory] where Id in ( select MAX(Id) from [SL_Project_Management].[dbo].[PersonWiseActionHistory] group by PersonId) )ss where convert(nvarchar(10),EffectFrom,103)=convert(nvarchar(10),'24/06/2022',103) and ActionTypeId=1)pp
on p.Id=pp.PersonId