I want to do a querry:
select pl_id, pl_t, pl_v, sum(pl_v) over (partition by trunc(pl_t)) suma from pl_data_valid_tmp
order by rank(1) within group over (order by suma desc)
but i get an error:
ora-00906 missing left parenthesis
i know that something wrong in rank function, but I don't know what is it exacly.
maybe there is another way to choose rows which have only '1' rank?
maybe someone knows what's wrong?