Oracle:
select sum(age) over (partition by snumber order by grades rows between unbounded preceding and 0 preceding)
from temp_table
Can somebody provide me the equivalent code for this in the SQL server? I tried
select sum(age) over (partition by snumber order by grades)
from temp_table
and got syntax error
Incorrect syntax near 'order'
Can't we use order by
in the partition by
when using a sum
function?
Please suggest !