• Change the IN for an EXISTS clause.

    select FKStoreId, DateOfBusiness, CheckNumber, COUNT(fkitemid)

    from dpvHstGndItem o

    where EXISTS (

    select 1

    from dpvHstGndItem i

    where FKItemId = 200112

    and DateOfBusiness = '2016-04-01'

    AND i.CheckNumber = o.CheckNumber

    AND i.DateOfBusiness = o.DateOfBusiness

    AND i.FKStoreId = o.FKStoreId

    )

    and DateOfBusiness = '2016-04-01'

    group by fkstoreid, DateOfBusiness, CheckNumber

    order by fkstoreid, DateOfBusiness

    This code might need changes as I can't test it for correctness, but I hope you get the idea. If you don't fully understand it, ask any questions that you might have.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2