• unfortunately taht query did not encompass all scenarios such as:
    col1 col2 col3
    ('A','B',100),
    ('B','A',-50),
    ('A','C',200),
    ('A','D',100),
    ('A','B',150),
    ('B','F',200),
    ('d','K',400),
    ('K','D',-20),
    ('C','D',-50),
    ('D','C',-60);
    I need to display which one of col1 or col2 had the max net value (col3). I mean I have to have as a result:
    A,B,300
    A,C,200
    A,D,100
    B,F,200
    D,K,420
    C,D,10
    hopefully this table will help to cover all 4 scenarios of values between col1 and col2 (first two rows). Last four rows is the answer we need to get:

    AB3030-30-30
    BA90-9090-90
    BA60   
    AB 120  
    BA  120 
    AB   60

    s???9w