SELECT DISTINCT c.countryID, c.country FROM tbl_CDR_Distributors cdr with (nolock) INNER JOIN tbl_UT_Countries c with (nolock) ON (cdr.cdr_dstcountryID = c.countryid) WHERE OwnerID = AND FSL_TableCode = ORDER BY c.country for json path, include_null_values