It is not at all clear what your issue is.
Perhaps the issue is that your B table has repeating observations?
So if LEFT has one observation of a particular key combination but RIGHT has 10 observations for that same key combination the result of your left join will have 10 observations for that key combination.
You need to figure out a way to make the right side have just one observation. This might work:
create table pl201903.query as
select a.*,b.ratecde as ratecde_1
from pl201903.Fire_clm_201903 a
left join (select distinct claim,totsi,ratecde from pl201903.Fire_clm_cov_201903) b
on a.claim=b.claim and a.zsumsi=b.totsi
;
But you might need to use some method to pick one of many different RATECDE values.
... View more