Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

'Row Number () Partition By' syntax problem - response (8) by dnoeth

$
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


Viewing all articles
Browse latest Browse all 27759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>