Merge multiple rows in table setting one column based on value in rows
According to your text if any of them are true is must be true, otherwise is false:

select
    key,
    case 
      when sum(case when B is true then 1 else 0 end) &gt; 0 then true
      else false
    end as result
from
   t
group by
    key;


db&lt;>fiddle here