better way to do this [message #372499] |
Thu, 15 February 2001 18:33 |
Mike
Messages: 417 Registered: September 1998
|
Senior Member |
|
|
If I want to grab 2 items of data for the largest values of one of the items - can i do this in one query statement?
for example:
SELECT EX_ID,COUNT FROM EX_VIEW_COUNT ORDER BY COUNT
where I only want 10 items(rows) where the COUNT values are the greatest values (like a reverse order sort on COUNT).
any ideas?
TIA!
--Mike
(http://www.js-examples.com)
|
|
|
Re: better way to do this [message #372502 is a reply to message #372499] |
Fri, 16 February 2001 02:55 |
Tittom
Messages: 15 Registered: November 2000
|
Junior Member |
|
|
Try something like this :
select * from
( SELECT EX_ID,COUNT FROM EX_VIEW_COUNT
ORDER BY COUNT DESC
)
where rownum <= 10
I did not test this but it is the idea
I hope this helps
Tittom
|
|
|
|