[add] query to fetch tasks by spaces