Do I just not understand count()?

From: Ben <bench(at)silentmedia(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Do I just not understand count()?
Date: 2002-04-08 18:25:43
Message-ID: Pine.LNX.4.30.0204081122230.9115-100000@gilgamesh.eos.SilentMedia.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

If I have the table t defined as:

a
---
1
1
2

and I say:

select count(a=1) from t;

should it give me 1 or 2 as a result? I'm getting 2, and I'd think I
should get 1....

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ben 2002-04-08 18:39:41 Re: Do I just not understand count()?
Previous Message Darren Ferguson 2002-04-08 18:12:31 Re: Tcl_CreateSlave error (pg 7.1.2, RH 7.2)