I am trying to combined data in a csv file. The data looks like:
colIP,colPartition,colPartitionSize,colPartitionFree
10.160.0.10,C:,8400,4600
10.160.0.11,C:,19500,16000
10.160.0.11,D:,185500,97700
10.160.0.12,C:,19500,15100
10.160.0.12,D:,48200,45900
What I am looking for is the deletion of the 2nd column, and then for all the rows who are the same in the first field, a sum of the 3rd and 4th fields. There could be 1 to 4 rows with the same data in field 1. Output should look like.
colIP,colPartitionSize,colPartitionFree
10.160.0.10,8400,4600
10.160.0.11,205000,113700
10.160.0.12,67700,61000
If this were columns I think I could do it, but since it's rows I'm not sure of the SQL.