Oracle documentation says I can use:
select avg(id) over (partition by <expression>) from table1;
For example this goes well:
select avg(id) over (partition by id) from table1;
But if I use “greater than” expression I got failure ORA-00907:
select avg(id) over (partition by (id > 3)) from table1;
Where syntax of expression is documented? Can I use “greater than” expressions to partition record set?
I guess the problem is that Oracle SQL does not properly support Boolean expressions. But a case expression should work where you return 1 if id>3 and 0 otherwise.