SQL Server - select distinct rows and sum of duplicates
<p>I am facing 1 prob in implementing business solution. Any help would be much appreciated.</p>

<p>There is 1 table with 3 columns.</p>

<p>Table Employee
(
Id, Name, Salary
)
Values -
(1,John,10000),
(2,Rey, 15000),
(3,John,20000)</p>

<p>Expected Output -
It should fetch only distinct employees and for duplicate records of employee, it should fetch sum of salary.</p>

<p>So, output should be like this -
(1,john,30000),
(2,Rey,15000)</p>

<p>Please help</p>