Below are the list data.
Code ItemCount Type Amount ---------------------------------------- B001 1 Dell 10.00 B001 1
The amounts you give differ from the sample data but this works for the sample data values:
SELECT Code, SUM(ItemCount) AS ItemCount, [Type], SUM(Amount) AS Amount FROM dbo.TestSubs GROUP BY Code,[Type] ORDER BY Code