select sourceId, sourceType, sourceName from tbl_DW_1fsSources#_tableSuffix# s with (nolock) inner join tbl_CHO_Operators c with (nolock) on c.cho_Id = s.sourceId where s.sourceType = 'CHO' and c.cho_type in ( 'G','C' ) order by sourceName for JSON AUTO, INCLUDE_NULL_VALUES