advanced task query