with counties as ( select distinct sc.county, sc.countyId, sc.state, sc.stateId, 27 as countryId from tbl_UT_StateCounty sc with (nolock) ) #forJSON( 'counties', attributes.datastore, 'county' )#