 -- B4
 select *
 from analytics_invoice_adjustments b
-left outer join invoice_items ii on ii.id = b.item_id
-left outer join bundles bndl on ii.bundle_id = bndl.id
+left outer join bundles bndl on b.bundle_id = bndl.id
 where coalesce(bndl.external_key, 'NULL') != coalesce(b.bundle_external_key, 'NULL')
 ;
 

and cf.object_type = 'ACCOUNT'
;

-- K1b TODO
select *
from analytics_account_fields b
left outer join custom_fields cf on cf.record_id = b.custom_field_record_id


-- ACCOUNT FIELDS

-- K1a
select *
from custom_fields cf
left outer join analytics_account_fields b on cf.record_id = b.custom_field_record_id
