move statement in query