Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: order by question
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
![]() |
![]() |