Updated example for Query()