Skip to Content

Window frame specification of RANGE not allowed for this window function

Hi Experts,

whenever i'm using RANGE window frame it throws an error like as shown as below:

Error:

Window frame specification of RANGE not allowed for this window function

Code:

SELECT COUNT(*) 
OVER (PARTITION BY "ID" ORDER BY "S_DATE"  
RANGE BETWEEN CURRENT ROW AND 2 FOLLOWING) AS COUNT_VALUE 
FROM "KABIL_PRACTICE"."WINDOW_RANGE";

But if i use Rows instead of Range it works... But i.e., not my need.

Because RANGE is different from ROWS, if I'm not mistaken.

Any suggestion Please...

Add comment
10|10000 characters needed characters exceeded

  • RANGE is not part of the window function syntax. So check the documentation and explain, what you wanna reach.

  • I suggest checking the SQL reference documentation for the window aggregate functions.

    Besides that, you might get a better result to your question if you explain what you want to ask the database and not how you tried to put it in SQL.

  • Get RSS Feed

0 Answers