Adding a query task