Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Get top row count

Get top row count

From: <yarenort_at_my-deja.com>
Date: 2000/07/25
Message-ID: <8lk8r1$ln9$1@nnrp1.deja.com>#1/1

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US