Mailing List Archive

(Postgresql) SQL stuff to deal with folders & folder counts

I had to do some optimizing of a user's mailboxes, so i wrote some
useful SQL:

I assume that MySQL or oracle syntax would be a bit different (do they
have FILTER ? no idea.. )
But maybe this is useful for someone else.
also that VIEW is very handy to quickly get an idea of folder message
counts :)