Hi Sagar,
of course you can use RANK and aggregates in the same query, OLAP functions are calculated after GROUP BY/HAVING.
You probably use the deprecated RANK(col) instead of RANK() OVER (ORDER BY col DESC):
select col, sum(col2) as sumcol2, rank() over (order by sumcol2)
from tab
group by 1;
Hi Sagar,
of course you can use RANK and aggregates in the same query, OLAP functions are calculated after GROUP BY/HAVING.
You probably use the deprecated RANK(col) instead of RANK() OVER (ORDER BY col DESC):