Filter query for list of teams