On 9/11/07, Jeff Lanzarotta <delux256-postgresql(at)yahoo(dot)com> wrote:
> I appreciate the help...
SELECT TO_CHAR(ts, 'MM/DD/YYYY') AS "day", str, proc
, SUM(CASE
WHEN z <> 0
THEN 1
ELSE 0
END) AS good, 0 AS ajaaaaaaaaaaaaaa
, SUM(CASE
WHEN z = 0
THEN 1
ELSE 0
END) AS bad
FROM foobar
WHERE str <> 99999
GROUP BY str, DAY, proc
ORDER BY str