Skip to main content

 

CASE WHEN (ROUND_DAY("PAYMENT_TABLE"."Payment registered date")) <

PU_MAX(DOMAIN_TABLE("PAYMENT_TABLE"."CG Key"), "PAYMENT_TABLE"."Payment registered date", ROUND_DAY("PAYMENT_TABLE"."Payment registered date") IS NOT NULL

)

THEN ROUND_DAY("PAYMENT_TABLE"."Payment registered date") ELSE NULL END

 

Try the LAG() or LEAD() window functions, those will allow you to offset by N rows based on a sorting criteria.


Reply