• Here is the simplified query

    select

    m.trans_num ,

    m.trans_type ,

    m.lot

    from matltran m

    /*I want to find the top 1 record from same tables with 'WHERE trans_type = 'F' and lot = m.lot */

    inner join top 1 record of matltran table where trans_type = 'F' and lot = m.lot