Mining frequent sequences