Query Client.ClientGLAccountId

Select [DBId], count(*) from [Client] where [ClientGLAccountId] = 0 or [ClientGLAccountId] is null Group by [DBId]