Table table
colA colB colC
------- -------- --------
a11 b11 c11
a11 b11 c22
a22 b11 c33
a33 b22 c44
try to get the following
colA colB colC
------- ----- -------
a11 b11 (c11 +c22)
a22 b11 c33
a33 b22 c44
In another word, I want to get the sum of colC with the distinct colA and colB.
how to write the sql?
				
			colA colB colC
------- -------- --------
a11 b11 c11
a11 b11 c22
a22 b11 c33
a33 b22 c44
try to get the following
colA colB colC
------- ----- -------
a11 b11 (c11 +c22)
a22 b11 c33
a33 b22 c44
In another word, I want to get the sum of colC with the distinct colA and colB.
how to write the sql?
 
	 
 
		
 
 
		 
 
		