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

Home -> Community -> Usenet -> c.d.o.misc -> Re: order by question

Re: order by question

From: Mike Heisz <mheisz_at_rim.net>
Date: Tue, 6 Jul 1999 14:01:35 -0400
Message-ID: <newscache$nengef$bki$1@njord.rim.net>


Try this:

select distinct a.columname, count(a.columname) from ...
 where ...
 group by a.columname
order by count(a.columname) desc

<h0444vcs_at_rz.hu-berlin.de> wrote in message news:7lqlf5$mpg$1_at_nnrp1.deja.com...
> Dear Readers,
>
> I have the following sql statement
>
> select distinct a.columname, count(a.columname)
> from ...
> where ...
> group by a.columname
>
> the result is then displayed and ordered by a.columname,
> but I want to display the result of the query ordered by
>
> count(a.columname) desc
>
> How does it work in oracle ?
>
> Many thanks in advance !
>
> Markus Banach
>
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
Received on Tue Jul 06 1999 - 13:01:35 CDT

Original text of this message

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