Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

query on CSUM - response (5) by vuyyuru

$
0
0

Hi Dieter,
 
We are trying to find the missing dates from the source table with the sys calendar date.
the query is like below.
 

SEL NAME, MEASURE, DATE,

SUM(MEASURE) OVER(PARTITION BYNAMEORDERBYDATEASCROWSUNBOUNDED PRECEDING) ASCUM_AMT

FROM<<TABLE_NAME>>

ORDERBYNAME, DATEASC;

but this is going to product join....  is there any alternate is there for this quwery design..
because my actual source table is having 139 M records... so it will take longer time ( 5 hrs)..
Regards,
Ramaiah


Viewing all articles
Browse latest Browse all 14773

Trending Articles



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