Thanks a lot, Sam (and others), thanks to your help I managed to finally produce the query I wanted.
Regards, mk -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general