Quantcast
Channel: SCN : Unanswered Discussions - SAP HANA and In-Memory Computing
Viewing all articles
Browse latest Browse all 4343

Window function(OVER) equivalent in calculation view

$
0
0

Hi All,

 

I am trying to find a equivalent function that can replicate window function in calculation view.

 

Below are SQL that I am trying to replicate in Hana View

 

SELECT CATEGORY, ITEM, SUM(SALES) OVER (ORDER BY SALES) as CumulativeSales, 0 as TotalSales FROM SALES

 

The script above basically doing a running total on sales.

 

Raw Data

 

raw data.png

 

Expected result

 

result.png

 

Anyone have any idea what's the equivalent of "OVER" in calculation view?

 

Regards,

Kang


Viewing all articles
Browse latest Browse all 4343

Trending Articles



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