Changed record exists query