with data as ( select distinct abbreviation as classificationAbbr, name as classification, classificationId from tbl_OPR_Classifications with (nolock) where ownerId = and ownerType = ) select count(*) over() as fseRowCount, * from data where classificationId in ( ) #applyFilter( _dataStore.filter )# and #applyFilter( _dataStore.search )# order by classification offset #_dataStore.skip# rows fetch next #_dataStore.take# rows only for JSON AUTO, INCLUDE_NULL_VALUES