I am in need of producing a query that has two count fields in it... Something like:
select to_char(ts, 'MM/DD/YYYY') as "day", str, proc, (select count (*) as good from foobar where z != 0), (select count (*) as bad from foobar where z = 0) from foobar where str != 99999 group by str, day, proc order by str
From this query, the output should look something like this: