Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Get top row count
How does one get Oracle SQL to return only the top (#1/head -1) row with the greatest number of occurences (count(column_name))for a give table.
In other words what sql function will
just return the first row in the result set
generated by:
select column_name
from table_name
group by column_name
order by count(column_name)
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Tue Jul 25 2000 - 00:00:00 CDT
![]() |
![]() |