Changes query to bind query