fixed traveled trips query