From: Daniel Hernandez <breydan@excite.com>
To: jim@contactbda.com
To: pgsql-sql@postgresql.org
Subject: Re: Sum If
Date: Thu, 23 Feb 2006 14:03:03 -0500 (EST)
Message-ID: <20060223190303.5858C8A1E3@xprdmxin.myway.com> (raw)
Hi Jim, Thanks for the tip, It worked!!!!!Thanks a lot!!!Daniel Hernández.Tijuana, BC, México."More you learn, more you earn".try select ...,sum(case when sales.itemname = 'some' then sales.count else 0 end) as "Sales Candies"from your_table_heregroup by ...
_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: breydan@excite.com, jim@contactbda.com
Subject: Re: Sum If
In-Reply-To: <20060223190303.5858C8A1E3@xprdmxin.myway.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox