implemented insert-by-query plan

same here