Test RunQuery