Adjust query