i have a table like this:
id        code    delta
--        ----    -----
1          113        0 <-- minimum delta of ID 1
1          254       12
1         1254       55
2           45       42
2          148       10 <-- minimum delta of ID 2
2           20      100
I want to select the code that have the minimum delta of all row with the same id:
id    code
--    ----
1      113
2      148
 
    