Re: showing also value '0' with aggregate count()

From: Janning Vygen <vygen(at)planwerk6(dot)de>
To: pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: showing also value '0' with aggregate count()
Date: 2001-09-27 16:00:42
Message-ID: 01092718004207.27858@janning
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Am Donnerstag, 27. September 2001 17:47 schrieb David Christian:
> Hmmm... I'm using 7.1.2, and don't know if you should upgrade or
> not.
>
> Can you use UNIONs?
>
> select name, count(client_id) from sales, clients where client_id =
> id group by name UNION select name,0 from clients where not id in
> (select client_id from sales) order by 2;

Oh yes! Thanks. i dont need to upgrade. thats fine. thanks to randal
too.

janning

--
Planwerk 6 /websolutions
Herzogstrae 86
40215 Dsseldorf

fon 0211-6015919
fax 0211-6015917
http://www.planwerk6.de

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dale Anderson 2001-09-27 16:05:13 Record Sets
Previous Message Mitch Vincent 2001-09-27 15:57:30 Re: showing also value '0' with aggregate count()