with parentCompanies as ( select dstId, dstName from tbl_DST_Distributors with (nolock) where dstcompanytype = 'P' ) #forJSON( 'parentCompanies', attributes.datastore, 'dstName' )#