multiple count functions in a select statement - Mailing list pgsql-general

From Jeannie Stevenson
Subject multiple count functions in a select statement
Date
Msg-id 000b01c44409$13744d40$0800000a@jeannie
Whole thread Raw
Responses Re: multiple count functions in a select statement
List 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 by date:

Previous
From: "Hale"
Date:
Subject: connecting to an external postgresql db
Next
From: Phil Berman
Date:
Subject: Postgres on Solaris 10