Michael,
That's an excellent solution, but on my table, the explain plan sucks
and the query time is over 3 minutes when implemented. Is there a
simple way to get a row_num without using a temporary sequence?
Thanks for your help.
-Don
Make your query a set returning function which iterates over
Michael,
That's an excellent solution, but on my table, the explain plan sucks
and the query time is over 3 minutes when implemented. Is there a
simple way to get a row_num without using a temporary sequence?
Thanks for your help.
-Don
On Fri, 4 Feb 2005 14:02:20 +0900, Michael Glaesemann
<[E
On Feb 4, 2005, at 12:06, Don Drake wrote:
I have a query that shows the top N count(*)'s.
So it's basically:
select some_val, count(*)
from big_table
group by some_val
order by count(*)
limit 50
Now, I would like to have the rank included in the result set. The
first row would be 1, followed by 2
On Thu, Feb 03, 2005 at 09:06:36PM -0600, Don Drake wrote:
> select some_val, count(*)
> from big_table
> group by some_val
> order by count(*)
> limit 50
>
> Now, I would like to have the rank included in the result set. The
> first row would be 1, followed by 2, etc. all the way to 50.
Maybe
I have a query that shows the top N count(*)'s.
So it's basically:
select some_val, count(*)
from big_table
group by some_val
order by count(*)
limit 50
Now, I would like to have the rank included in the result set. The
first row would be 1, followed by 2, etc. all the way to 50.
I can do thi