Re: is this possible? it should be!

Поиск
Список
Период
Сортировка
От reina@nsi.edu (Tony Reina)
Тема Re: is this possible? it should be!
Дата
Msg-id f40d3195.0108201556.60c4fe39@posting.google.com
обсуждение исходный текст
Ответ на is this possible? it should be!  (newsreader@mediaone.net)
Ответы Re: Re: is this possible? it should be!  (newsreader@mediaone.net)
Список pgsql-general
> select a,b,c from a where d=2 order by e limit 10;
> select count(*) from a where d=2;
>
> The point is that I want to know the total number
> of matches and I also want to use "limit".  And
> I don't want to do two queries.
>

Perhaps GROUP BY will get you where you want to go:

select count(*), a, b, c from a where d=2 group by a, b, c order by e limit 10;


-Tony

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

Предыдущее
От: "Robert J. Sanford, Jr."
Дата:
Сообщение: clustering and/or failover?
Следующее
От: missive@frontiernet.net (Lee Harr)
Дата:
Сообщение: Re: Missing Sequence File