Re: count(1) return 0? - Mailing list pgsql-general

From Klint Gore
Subject Re: count(1) return 0?
Date
Msg-id 40428E23352.B2CDKG@129.180.47.120
Whole thread Raw
In response to count(1) return 0?  (Zak McGregor <zak@mighty.co.za>)
Responses Re: count(1) return 0?
List pgsql-general
On Mon, 1 Mar 2004 02:14:56 +0200, Zak McGregor <zak@mighty.co.za> wrote:
> to return a 0 value instead of absolutely nothing if no rows match fixture=4916
> and winner=away? I get absolutely no results at all.
>
> any ideas please?

dont group by winner.  it's not returned in the statement so it's not
needed anyway.  an exact value is specified in the where clause so it's
not going to be different either.

klint.

+---------------------------------------+-----------------+
: Klint Gore                            : "Non rhyming    :
: EMail   : kg@kgb.une.edu.au           :  slang - the    :
: Snail   : A.B.R.I.                    :  possibilities  :
: Mail      University of New England   :  are useless"   :
:           Armidale NSW 2351 Australia :     L.J.J.      :
: Fax     : +61 2 6772 5376             :                 :
+---------------------------------------+-----------------+

pgsql-general by date:

Previous
From: Stephen Howard
Date:
Subject: referring to computed values from the select list in the where and order clauses
Next
From: Kris Jurka
Date:
Subject: Re: count(1) return 0?