executing query for dataclip