COUNT doesn't shows items with 0 occurrance

From: "Giorgio A(dot)" <jh(at)libero(dot)it>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: COUNT doesn't shows items with 0 occurrance
Date: 2001-07-17 15:01:27
Message-ID: 001901c10ed1$5adfba90$3302a8c0@ducale.mentelocale.bogus
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

hi all,
i have this little problem: when i do a

SELECT COUNT (*) AS number, pieces
FROM hardware
GROUP BY pieces

if a pieces has 'number = 0' it's not shown in the result report ... how can
i fix this, having as a result the whole list of my hardware pieces ?

tnx !

have a nice day

Giorgio A.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Jiri D. Hoogeveen 2001-07-17 15:21:05 execute sql in a function?
Previous Message Tom Lane 2001-07-16 16:18:14 Re: GROUP BY and aggregate functions