Re: Sum If - Mailing list pgsql-sql

From Daniel Hernandez
Subject Re: Sum If
Date
Msg-id 20060223190303.5858C8A1E3@xprdmxin.myway.com
Whole thread Raw
In response to Sum If  ("Daniel Hernandez" <breydan@excite.com>)
List pgsql-sql
Hi Jim,<br /><br />�� Thanks for the tip, It worked!!!!!<br /><br />Thanks a lot!!!<br /><br /><br /><br />Daniel
Hern�ndez.<br/>Tijuana, BC, M�xico.<br />"More you learn, more you earn".<br /><br /><blockquote style="border-left:
2pxsolid orange; padding-left: 7px; margin-left: 7px;">try <br /><br />select ...,sum(case when sales.itemname = 'some'
thensales.count else 0 end) as "Sales Candies"<br />from your_table_here<br />group by ...<br /></blockquote><p><hr
/><fontface="geneva" size="2"><b>Join Excite! - <a href="http://www.excite.com"
target="_blank">http://www.excite.com</a></b><br/>The most personalized portal on the Web!</font> 

pgsql-sql by date:

Previous
From: "Jim Buttafuoco"
Date:
Subject: Re: Sum If
Next
From: Mario Splivalo
Date:
Subject: Re: 'locking' the SELECTs based on indices...