with parentCompanies as ( select cho_id, cho_type, cho_name, cho_segmentId from tbl_CHO_Operators with (nolock) where cho_type = 'O' ) #forJSON( 'parentCompanies', attributes.datastore, 'cho_name' )#