MERGE INTO public.part_7 as target_0
USING public.tenk1 as ref_0
  left join public.num_exp_ln as sample_0 
  on (ref_0.twenty = sample_0.id )
ON target_0.a = sample_0.id 
WHEN MATCHED AND 41 is NULL
   THEN UPDATE  set a = random()*1000
WHEN NOT MATCHED AND 48 is not NULL
   THEN INSERT VALUES ( 37, null)
