I have below query I am doing but its failing for" Operand type clash: date is incompatible with int".
FDT , case when lead is null then '2500-12-31' else lead -1 end as ef_dt
FROM (SELECT EMPID, RATE, FSEQ, FDT , lead(FDT) over (partition by EMPID order by FDT, fseq) as lead --- this returns INT
FROM job j) j1
WHERE FDT <= getdate()