On 9/11/07, Jeff Lanzarotta <delux256-postgresql@xxxxxxxxx> 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 ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster