Re: ORDER BY what?

Поиск
Список
Период
Сортировка
От postgres
Тема Re: ORDER BY what?
Дата
Msg-id 9g814s$1528$1@news.tht.net
обсуждение исходный текст
Ответ на ORDER BY what?  (Martín Marqués <martin@bugs.unl.edu.ar>)
Список pgsql-general
Try to give a alias of the value and order by the alias:

 select count(spotted_gene_id) as bbb from spot_nav_simple group by
spotted_gene_id order by  bbb desc limit 10;

Hope this is what you ask for.


"Mart�n Marqu�s" <martin@bugs.unl.edu.ar> wrote in message
news:01061111193103.29653@bugs...
> I have a quite complex select query on postgres (obviously :-) ) using PHP
> (which is not the problem at the moment) which has some text searches
using
> LIKE.
> My question is: "How can I write an ORDER BY statment so that it's ordered
by
> the amount of matches it gets?"
> Is this posible without getting ichy with the programing?
>
> Saludos.... :-)
>
> --
> Cualquiera administra un NT.
> Ese es el problema, que cualquiera administre.
> -----------------------------------------------------------------
> Martin Marques                  |        mmarques@unl.edu.ar
> Programador, Administrador      |       Centro de Telematica
>                        Universidad Nacional
>                             del Litoral
> -----------------------------------------------------------------
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org



В списке pgsql-general по дате отправления:

Предыдущее
От: junkboy@zeus.bwh.harvard.edu (holtzman)
Дата:
Сообщение: What do you do when...? A schema Question
Следующее
От: "tom"
Дата:
Сообщение: RE: Web site gripes