extract run-query