i have DataTable which can have semi-duplicate rows. In the picture example two highlighted rows have all the same values but the amounts in 'Amount' columns. I would need to identify those rows and sum the amount $. Data comes from text file and there is no key to uniquely identify rows.
I looked at some answers like this one Best way to remove duplicate entries from a data table but in my case would need to match on not just one column but 10.
Also I tried different LINQ queries but was not successful in getting far.
This is the SQL query which does the job:
SELECT [Date1],[Date2],[Date3]
,SUM([Amount1]) as Summary1
,SUM([Amount2]) as Summary2
,SUM([Amount3]) as Summary3
,[col1],[col2],[Rate1],[Rate2],[Rate3],[product],[comment]
FROM [Table]
group by [Date1],[Date2],[Date3],[col1],[col2],[Rate1],[Rate2],[Rate3],[product],[comment]
EDIT: Just to clarify, SQL query was an example of how I could get a successful results if I was querying SQL table.