run query one by one