$ 0 0 Mohan, The sql I provided was based on the premise that there would be unique Alt_id_type for Acct_num, Acct_type combination.