The Hermit Hacker <scrappy(at)hub(dot)org> writes:
> Just trying to summarize some traffic stats, and am either running the
> query wrong, or you can't do this?
I can't tell if there's anything wrong with that or not. You didn't
show us the input data being used by the CASE expression ...
regards, tom lane