multiple count functions in a select statement

Поиск
Список
Период
Сортировка
От Jeannie Stevenson
Тема multiple count functions in a select statement
Дата
Msg-id 000b01c44409$13744d40$0800000a@jeannie
обсуждение исходный текст
Ответы Re: multiple count functions in a select statement  (Oliver Elphick <olly@lfix.co.uk>)
Список pgsql-general
Hello list
 
I'm a MSSQL convert and I'm running postgresql 7.2
 
I'm trying to create a statement in which display multiple counts on a table
 
In MSSQL I would use
 
select
count_1=(select count(ad_code) AS "CP" from leads where ad_code = '555'),
count_2=(select count(ad_code) AS HED" from leads where ad_code = '222'),
etc
 
 
I've searched the docs but to avail.
 
Any help, suggestions, pointers, would be appreciated
 
Thanks
 
Jeannie
 
 

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

Предыдущее
От: "Hale"
Дата:
Сообщение: connecting to an external postgresql db
Следующее
От: Phil Berman
Дата:
Сообщение: Postgres on Solaris 10