cartesian join or reflex join are terms to describe "every-way" join
why not do all the work your self with an sql step
, like (to create the list of code pairs that are 4 weeks apart)
/* interval between dates measured in weeks*/[pre]
select a.code as code_a
, b.code as code_b
, a.date as date_a
, b.date as date_b
, from data a, data b
where range( a.date, b.date)/7 =between 3.5 and 4.49 [/pre]
or something like that (depending on the "precision" of 4 weeks)
if you just want counts of the code_a, code_b pairs then
use count(*) instead of a.date, b.date in the "select columns list" and group by
code_a, code_b