sum(if command - Mailing list pgsql-general

From king
Subject sum(if command
Date
Msg-id 3Eog9.617491$m91.25037299@bin5.nnrp.aus1.giganews.com
Whole thread Raw
Responses Re: sum(if command
List pgsql-general
Hi,

Does posgres support the equivalent to the mysql sum(if command in a SQL
statement? I did not see reference to it in my readings.

For example:
SELECT STYLENO,  SUM(IF(RECORDTYPE='5', TOTALQTY,0)) AS 'ONHAND'
FROM WHOE314 WHERE SEASON='202' AND STYLENO NOT LIKE'S%'
GROUP BY SEASON, STYLENO


thanks






pgsql-general by date:

Previous
From: Chris
Date:
Subject: bigint datatype accepting floating numbers
Next
From: "Ron Harter"
Date:
Subject: A question on performance