• This is the query i was trying to do...

    i was trying to get vend_i and dept which has max(wgt) when grouped by vend_i and dept

    select vend_i,dept,max(tot_wgt)

    from

    table1

    group by vend_i,dept