$ 0 0 Well, the "ultimate solution" in this case would use QUALIFY instead of a Derived Table and WHERE :-) SELECT * FROM DW_NLIP_PRV_PLNS QUALIFY ROW_NUMBER () OVER (PARTITION BY Subscription_Id ORDER BY Wrls_Prod_Eff_Dt DESC) = 1; Dieter
Well, the "ultimate solution" in this case would use QUALIFY instead of a Derived Table and WHERE :-)
Dieter