SELECT User_FirstName,
User_LastName,
User_Date,
User_Email,
SUM(User_ID) OVER (Partition by User_Salary) as TotalUserSalary,
row_number() OVER (ORDER BY User_ID DESC) as SrNo
FROM [TestProject].[dbo].[TBL_USER]
User_LastName,
User_Date,
User_Email,
SUM(User_ID) OVER (Partition by User_Salary) as TotalUserSalary,
row_number() OVER (ORDER BY User_ID DESC) as SrNo
FROM [TestProject].[dbo].[TBL_USER]