Subject Simple sql query question
Author jasajona
Hello,

I am wondering is it possible to get this result without writting UDF.

There is a table:
Field1 Field2
---------------
1 2
1 1
1 3
2 4
2 1
2 3
---------------

I need to get in one recod sum() of Field2 according to Field1. Wanted
result:

ResField1 ResField2
---------------------
6 8
---------------------

6 = 2+1+3 (Field1 = 1)
8 = 4+1+3 (Field2 = 2)