update public.submissions as s
set submitted_by_name = p.name
from public.profiles as p
where s.submitted_by = p.id
  and coalesce(s.submitted_by_name, '') is distinct from coalesce(p.name, '');
