I have tried transitive SQL fiature from http://docs.openlinksw.com/virtuoso/transitivityinsQL.html , but unfortunately my filter transitive's sub query SQL, do not work. But if I save the the result from transitive query to another table, the after that I query them, it do work.
This is the SQL for how to repeat the problem:
transitive t_in (1)
t_step (1) as via,
t_step ('path_id') as path ,
t_step ('step_no') as step
k where p1 = 1
where l.step = 1
Note: I don't know if this bug has been fixed in the 6.1.5 version.