SELECT P.*,r.*; FROM; FORCE (select cl_ref , min(re_date) re_date from referral rr WHERE re_date<>{} GROUP BY 1) X; JOIN person p ON p.cl_ref=x.cl_ref AND gomonth(p.cl_dob, 216) > x.re_date; JOIN referral r on r.cl_ref = p.cl_ref ; WHERE {} <> r.re_datefor us it is quite clear that because of the group by only 1 combination of cl_ref and min_re_date can exist in the subselect. I am pretty sure that the only way for the vfp optimizer to work is to define a SQL way utilizing a compound index with both conditions. If the date part checked on equality, checking against cl_Ref + dtos(re_date) would surely use an existing compound index for optimization.