Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How could I use a window function median() in a sql console

Hi, everyone

I got an error message" feature not supported: not supported window function:" when I try to run a sql script in SPS08.

SELECT

  MEDIAN(DURA) OVER(PARTITION BY TIME2) as MedianValue,

    TIME2

FROM

(

SELECT

  TO_INT((HOUR(TIME_2)*60+MINUTE(TIME_2))/5) AS TIME2,

  DURA

FROM

  TRAFFIC.D26PAIRSCER

);

HANA gave me an error:  :

Could not execute 'SELECT MEDIAN(DURA) OVER(PARTITION BY TIME2) as MedianValue, TIME2 FROM ( SELECT ...' in 11 ms 603 µs .

SAP DBTech JDBC: [7] (at 8): feature not supported: not supported window function: line 2 col 2 (at pos 8)

according to the windows function page, it looks right.

Thanks a lot!

Tags:
Former Member
replied

The MEDIAN aggregation is available as of SAP HANA SPS9.

- Lars

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question